[libvirt] [PATCH V1 0/6] Add support for guests with TPM passthrough device
by Stefan Berger
Hello!
The following set of patches adds support to libvirt for
adding a TPM passthrough device to a QEMU guest. Support for
this was recently accepted into QEMU.
This set of patches borrows a lot from the recently added support
for rng's.
This patch series builds on top of the patches for adding
support for file descriptor sets.
Regards,
Stefan
11 years, 9 months
[libvirt] [PATCH v4 0/3] Keep original file label
by Michal Privoznik
Yet another rework of $subj. I am still not solving atomicity
problem for now. See diff to the patches if you want to know
what's changed.
Patch 1/3 has been already ACKed, however, I've changed it slightly.
Michal Privoznik (3):
virFile: Add APIs for extended attributes handling
virfile: Introduce internal API for managing ACL
security_dac: Favour ACLs over chown()
configure.ac | 2 +
libvirt.spec.in | 1 +
m4/virt-acl.m4 | 9 ++
src/Makefile.am | 4 +-
src/libvirt_private.syms | 6 +
src/security/security_dac.c | 302 +++++++++++++++++++++++++++++++++++++++-----
src/util/virfile.c | 301 +++++++++++++++++++++++++++++++++++++++++++
src/util/virfile.h | 28 ++++
8 files changed, 622 insertions(+), 31 deletions(-)
create mode 100644 m4/virt-acl.m4
--
1.8.1.5
11 years, 9 months
[libvirt] [libvirt-sandbox][PATCH] Docs: Fix security options wrongs in man page
by Alex Jia
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
bin/virt-sandbox.c | 14 ++++++++++----
1 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c
index 69d1e62..66676c3 100644
--- a/bin/virt-sandbox.c
+++ b/bin/virt-sandbox.c
@@ -372,13 +372,19 @@ separated by commas. The following options are valid for SELinux
=over 4
-=item type=TYPE
+=item dynamic
-The SELinux security type, defaults to sandbox_t
+The SELinux security dynamic for the sandbox, defaults to svirt_sandbox_t
-=item level=LEVEL
+=item dynamic,label=USER:ROLE:TYPE:LEVEL
-The SELinux MCS level, defaults to a randomly allocated level
+To use dynamic and override the base label, defaults to
+system_u:system_r:svirt_t:s0
+
+=item static,label=USER:ROLE:TYPE:LEVEL
+
+To set a completely static label. For example,
+static,label=system_u:system_r:svirt_t:s0:c412,c355
=back
--
1.7.1
11 years, 9 months
[libvirt] [PATCH] remote: Prevent race when closing a connection
by Viktor Mihajlovski
A race condition can occur when virConnectClose is called parallel
to the execution of the connection close callback in remoteClientCloseFunc.
The race happens if the connection object is destroyed (including
the mutex) while remoteClientCloseFunc is waiting for the connection
mutex. After the destruction of the (non error checking) mutex
remoteClientCloseFunc starts to process the callbacks. However the
operations can occur against a freed (or even worse, reallocated)
object. Another issue is that the closeFreeCallback is invoked
even if it's NULL (this is the case for virsh).
The solution is to clean out the callback pointers in virConnectDispose
before destroying the mutex. This way remoteClientCloseFunc will
return immediately after passing virMutexLock, thus avoiding potential
data corruption. There's still the slight chance that the concluding
virMutexUnlock could do harm on the freed connection object.
This could be fixed using an error checking mutex which however has a
much broader scope and impact.
Signed-off-by: Viktor Mihajlovski <mihajlov(a)linux.vnet.ibm.com>
---
src/datatypes.c | 8 +++++++-
src/remote/remote_driver.c | 3 ++-
2 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/src/datatypes.c b/src/datatypes.c
index b04e100..2358bdf 100644
--- a/src/datatypes.c
+++ b/src/datatypes.c
@@ -146,8 +146,14 @@ virConnectDispose(void *obj)
virMutexLock(&conn->lock);
- if (conn->closeFreeCallback)
+ if (conn->closeCallback)
+ conn->closeCallback = NULL;
+
+ if (conn->closeFreeCallback) {
conn->closeFreeCallback(conn->closeOpaque);
+ conn->closeFreeCallback = NULL;
+ conn->closeOpaque = NULL;
+ }
virResetError(&conn->err);
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index 3721af9..885120e 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -358,7 +358,8 @@ static void remoteClientCloseFunc(virNetClientPtr client ATTRIBUTE_UNUSED,
closeCallback(conn, reason, closeOpaque);
virMutexLock(&conn->lock);
conn->closeDispatch = false;
- if (conn->closeUnregisterCount != closeUnregisterCount)
+ if (conn->closeUnregisterCount != closeUnregisterCount &&
+ closeFreeCallback)
closeFreeCallback(closeOpaque);
}
virMutexUnlock(&conn->lock);
--
1.7.9.5
11 years, 9 months
[libvirt] [PATCHv2 1/1] Remove contiguous CPU indexes assumption
by Li Zhang
From: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
When getting CPUs' information, it assumes that CPU indexes
are not contiguous. But for ppc64 platform, CPU indexes are not
contiguous because SMT is needed to be disabled, so CPU information
is not right on ppc64 and vpuinfo, vcpupin can't work corretly.
This patch is to remove the assumption to be compatible with ppc64.
Test:
4 vcpus are assigned to one VM and execute vcpuinfo command.
Without patch: There is only one vcpu informaion can be listed.
With patch: All vcpus' information can be listed correctly.
Signed-off-by: Li Zhang <zhlcindy(a)linux.vnet.ibm.com>
---
v2 -> v1:
* Remove unused cpu variable suggested by Daniel P.Berrange
* Remove contigous assumption in qemu_monitor_text.c suggested by Daniel P.Berrange
src/qemu/qemu_monitor_json.c | 14 --------------
src/qemu/qemu_monitor_text.c | 13 ++-----------
2 files changed, 2 insertions(+), 25 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index 9991a0a..1bf8baf 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -1209,7 +1209,6 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
for (i = 0 ; i < ncpus ; i++) {
virJSONValuePtr entry = virJSONValueArrayGet(data, i);
- int cpu;
int thread;
if (!entry) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -1217,12 +1216,6 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
goto cleanup;
}
- if (virJSONValueObjectGetNumberInt(entry, "CPU", &cpu) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("cpu information was missing cpu number"));
- goto cleanup;
- }
-
if (virJSONValueObjectGetNumberInt(entry, "thread_id", &thread) < 0) {
/* Only qemu-kvm tree includs thread_id, so treat this as
non-fatal, simply returning no data */
@@ -1230,13 +1223,6 @@ qemuMonitorJSONExtractCPUInfo(virJSONValuePtr reply,
goto cleanup;
}
- if (cpu != i) {
- virReportError(VIR_ERR_INTERNAL_ERROR,
- _("unexpected cpu index %d expecting %d"),
- i, cpu);
- goto cleanup;
- }
-
threads[i] = thread;
}
diff --git a/src/qemu/qemu_monitor_text.c b/src/qemu/qemu_monitor_text.c
index 58f6323..1b6efba 100644
--- a/src/qemu/qemu_monitor_text.c
+++ b/src/qemu/qemu_monitor_text.c
@@ -510,7 +510,6 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
{
char *qemucpus = NULL;
char *line;
- int lastVcpu = -1;
pid_t *cpupids = NULL;
size_t ncpupids = 0;
@@ -530,16 +529,12 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
do {
char *offset = strchr(line, '#');
char *end = NULL;
- int vcpu = 0, tid = 0;
+ int tid = 0;
/* See if we're all done */
if (offset == NULL)
break;
- /* Extract VCPU number */
- if (virStrToLong_i(offset + 1, &end, 10, &vcpu) < 0)
- goto error;
-
if (end == NULL || *end != ':')
goto error;
@@ -552,15 +547,11 @@ int qemuMonitorTextGetCPUInfo(qemuMonitorPtr mon,
if (end == NULL || !c_isspace(*end))
goto error;
- if (vcpu != (lastVcpu + 1))
- goto error;
-
if (VIR_REALLOC_N(cpupids, ncpupids+1) < 0)
goto error;
- VIR_DEBUG("vcpu=%d pid=%d", vcpu, tid);
+ VIR_DEBUG("pid=%d", tid);
cpupids[ncpupids++] = tid;
- lastVcpu = vcpu;
/* Skip to next data line */
line = strchr(offset, '\r');
--
1.7.10.1
11 years, 9 months
[libvirt] [libvirt-sandbox][PATCH v2] Avoid infinite loop in gvir_sandbox_config_set_security_opts()
by Alex Jia
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
libvirt-sandbox/libvirt-sandbox-config.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
index 90217f1..08d21b9 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.c
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
@@ -1365,6 +1365,7 @@ gboolean gvir_sandbox_config_set_security_opts(GVirSandboxConfig *config,
"Unknown security option '%s'", name);
return FALSE;
}
+ i++;
}
return TRUE;
}
--
1.7.1
11 years, 9 months
[libvirt] [libvirt-sandbox][PATCH] Avoid infinite loop in gvir_sandbox_config_set_security_opts()
by Alex Jia
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
libvirt-sandbox/libvirt-sandbox-config.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
index 90217f1..f96d417 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.c
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
@@ -1356,10 +1356,13 @@ gboolean gvir_sandbox_config_set_security_opts(GVirSandboxConfig *config,
if (strncmp(name, "label=", 5) == 0) {
gvir_sandbox_config_set_security_label(config, value);
+ break;
} else if (g_str_equal(name, "dynamic")) {
gvir_sandbox_config_set_security_dynamic(config, TRUE);
+ break;
} else if (g_str_equal(name, "static")) {
gvir_sandbox_config_set_security_dynamic(config, FALSE);
+ break;
} else {
g_set_error(error, GVIR_SANDBOX_CONFIG_ERROR, 0,
"Unknown security option '%s'", name);
--
1.7.1
11 years, 9 months
[libvirt] [libvirt-sandbox][PATCH] Docs: fix typos in IPv6 address
by Alex Jia
Signed-off-by: Alex Jia <ajia(a)redhat.com>
---
bin/virt-sandbox.c | 2 +-
libvirt-sandbox/libvirt-sandbox-config.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/bin/virt-sandbox.c b/bin/virt-sandbox.c
index 9becd07..69d1e62 100644
--- a/bin/virt-sandbox.c
+++ b/bin/virt-sandbox.c
@@ -352,7 +352,7 @@ specifies the broadcast address. Some examples
address=192.168.122.1/24
address=192.168.122.1/24%192.168.122.255
- address=2001:212::204.2/64
+ address=2001:212::204:2/64
=item route=IP-NETWORK/PREFIX%GATEWAY
diff --git a/libvirt-sandbox/libvirt-sandbox-config.c b/libvirt-sandbox/libvirt-sandbox-config.c
index 3dc453a..90217f1 100644
--- a/libvirt-sandbox/libvirt-sandbox-config.c
+++ b/libvirt-sandbox/libvirt-sandbox-config.c
@@ -825,7 +825,7 @@ GList *gvir_sandbox_config_get_networks(GVirSandboxConfig *config)
*
* dhcp
* address=192.168.122.1/24%192.168.122.255;
- * address=192.168.122.1/24%192.168.122.255;address=2001:212::204.2/64
+ * address=192.168.122.1/24%192.168.122.255;address=2001:212::204:2/64
* route=192.168.122.255/24%192.168.1.1
*/
gboolean gvir_sandbox_config_add_network_strv(GVirSandboxConfig *config,
--
1.7.1
11 years, 9 months
[libvirt] [[PATCHv2]] Add support for qxl.revision in domain XML
by Christophe Fergeau
QXL devices have an associated 'revision' which is raised when
new features have been introduced which would break migration
to older versions. This commit makes it possible to set this
revision as QEMU sometimes support newer QXL revisions than what
it defaults to.
---
docs/formatdomain.html.in | 4 +++-
docs/schemas/domaincommon.rng | 5 +++++
src/conf/domain_conf.c | 20 ++++++++++++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 8 ++++++++
.../qemuxml2argv-graphics-spice-compression.args | 3 ++-
.../qemuxml2argv-graphics-spice-compression.xml | 4 ++--
.../qemuxml2argv-graphics-spice-qxl-vga.args | 3 ++-
.../qemuxml2argv-graphics-spice-qxl-vga.xml | 4 ++--
.../qemuxml2argv-graphics-spice.args | 3 ++-
.../qemuxml2argvdata/qemuxml2argv-graphics-spice.xml | 4 ++--
11 files changed, 49 insertions(+), 10 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index a9003d7..bcdd90f 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3584,7 +3584,9 @@ qemu-kvm -net nic,model=? /dev/null
1.0.2</span>) is allowed for "qxl" type only and specifies
the size of the primary bar, while <code>vram</code> specifies the
secondary bar size. If "ram" or "vram" are not supplied a default
- value is used.
+ value is used. The optional attribute <code>revision</code> (<span
+ class="since">since 1.0.3</span>) specifies the revision of
+ the QXL device, newer revisions provide more functionality.
</dd>
<dt><code>model</code></dt>
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 63be4aa..57128ab 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -2283,6 +2283,11 @@
<ref name="unsignedInt"/>
</attribute>
</optional>
+ <optional>
+ <attribute name="revision">
+ <ref name="unsignedInt"/>
+ </attribute>
+ </optional>
</group>
</choice>
<optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 0c75838..f4f273c 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -7646,6 +7646,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node,
char *vram = NULL;
char *ram = NULL;
char *primary = NULL;
+ char *revision = NULL;
if (VIR_ALLOC(def) < 0) {
virReportOOMError();
@@ -7661,6 +7662,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node,
ram = virXMLPropString(cur, "ram");
vram = virXMLPropString(cur, "vram");
heads = virXMLPropString(cur, "heads");
+ revision = virXMLPropString(cur, "revision");
if ((primary = virXMLPropString(cur, "primary")) != NULL) {
if (STREQ(primary, "yes"))
@@ -7713,6 +7715,19 @@ virDomainVideoDefParseXML(const xmlNodePtr node,
def->vram = virDomainVideoDefaultRAM(dom, def->type);
}
+ if (revision) {
+ if (def->type != VIR_DOMAIN_VIDEO_TYPE_QXL) {
+ virReportError(VIR_ERR_XML_ERROR, "%s",
+ _("revision attribute only supported for type of qxl"));
+ goto error;
+ }
+ if (virStrToLong_ui(revision, NULL, 10, &def->revision) < 0) {
+ virReportError(VIR_ERR_XML_ERROR,
+ _("cannot parse video revision '%s'"), revision);
+ goto error;
+ }
+ }
+
if (heads) {
if (virStrToLong_ui(heads, NULL, 10, &def->heads) < 0) {
virReportError(VIR_ERR_INTERNAL_ERROR,
@@ -7730,6 +7745,7 @@ virDomainVideoDefParseXML(const xmlNodePtr node,
VIR_FREE(ram);
VIR_FREE(vram);
VIR_FREE(heads);
+ VIR_FREE(revision);
return def;
@@ -7739,6 +7755,8 @@ error:
VIR_FREE(ram);
VIR_FREE(vram);
VIR_FREE(heads);
+ VIR_FREE(revision);
+
return NULL;
}
@@ -13632,6 +13650,8 @@ virDomainVideoDefFormat(virBufferPtr buf,
virBufferAsprintf(buf, " heads='%u'", def->heads);
if (def->primary)
virBufferAddLit(buf, " primary='yes'");
+ if (def->revision)
+ virBufferAsprintf(buf, " revision='%u'", def->revision);
if (def->accel) {
virBufferAddLit(buf, ">\n");
virDomainVideoAccelDefFormat(buf, def->accel);
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 4ffa4aa..1d7951b 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1174,6 +1174,7 @@ struct _virDomainVideoDef {
unsigned int ram; /* kibibytes (multiples of 1024) */
unsigned int vram; /* kibibytes (multiples of 1024) */
unsigned int heads;
+ unsigned int revision;
bool primary;
virDomainVideoAccelDefPtr accel;
virDomainDeviceInfo info;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index dee493f..5164bd5 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -3567,6 +3567,9 @@ qemuBuildDeviceVideoStr(virDomainVideoDefPtr video,
/* QEMU accepts bytes for vram_size. */
virBufferAsprintf(&buf, ",vram_size=%u", video->vram * 1024);
+
+ if (video->revision != 0)
+ virBufferAsprintf(&buf, ",revision=%u", video->revision);
}
if (qemuBuildDeviceAddressStr(&buf, &video->info, qemuCaps) < 0)
@@ -6612,6 +6615,11 @@ qemuBuildCommandLine(virConnectPtr conn,
virCommandAddArgFormat(cmd, "%s.vram_size=%u",
dev, vram * 1024);
}
+ if (def->videos[0]->revision) {
+ virCommandAddArg(cmd, "-global");
+ virCommandAddArgFormat(cmd, "%s.revision=%u",
+ dev, def->videos[0]->revision);
+ }
}
}
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.args
index 59f064b..05f5579 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.args
@@ -7,5 +7,6 @@ image-compression=auto_glz,jpeg-wan-compression=auto,\
zlib-glz-wan-compression=auto,\
playback-compression=on,streaming-video=filter -vga \
qxl -global qxl.ram_size=67108864 -global qxl.vram_size=18874368 \
--device qxl,id=video1,ram_size=67108864,vram_size=33554432,bus=pci.0,addr=0x4 \
+-global qxl.revision=4 \
+-device qxl,id=video1,ram_size=67108864,vram_size=33554432,revision=4,bus=pci.0,addr=0x4 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
index a8c4ad8..2dc5776 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-compression.xml
@@ -31,10 +31,10 @@
<streaming mode='filter'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='18432' heads='1'/>
+ <model type='qxl' ram='65536' vram='18432' heads='1' revision='4'/>
</video>
<video>
- <model type='qxl' ram='65536' vram='32768' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768' heads='1' revision='4'/>
</video>
<memballoon model='virtio'/>
</devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args
index ef499e6..0b08038 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.args
@@ -4,5 +4,6 @@ unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb -hda \
/dev/HostVG/QEMUGuest1 -spice port=5903,tls-port=5904,addr=127.0.0.1,\
x509-dir=/etc/pki/libvirt-spice,tls-channel=main,plaintext-channel=inputs -vga \
qxl -global qxl-vga.ram_size=67108864 -global qxl-vga.vram_size=33554432 \
--device qxl,id=video1,ram_size=67108864,vram_size=67108864,bus=pci.0,addr=0x4 \
+-global qxl-vga.revision=4 \
+-device qxl,id=video1,ram_size=67108864,vram_size=67108864,revision=4,bus=pci.0,addr=0x4 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
index 563d371..3cd0c42 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice-qxl-vga.xml
@@ -28,10 +28,10 @@
<channel name='inputs' mode='insecure'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='32768' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768' heads='1' revision='4'/>
</video>
<video>
- <model type='qxl' ram='65536' vram='65536' heads='1'/>
+ <model type='qxl' ram='65536' vram='65536' heads='1' revision='4'/>
</video>
<memballoon model='virtio'/>
</devices>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
index d7cfae0..082eaf7 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.args
@@ -6,5 +6,6 @@ x509-dir=/etc/pki/libvirt-spice,tls-channel=default,tls-channel=main,plaintext-c
image-compression=auto_glz,jpeg-wan-compression=auto,zlib-glz-wan-compression=auto,\
playback-compression=on,streaming-video=filter,disable-copy-paste -vga \
qxl -global qxl.ram_size=67108864 -global qxl.vram_size=18874368 \
--device qxl,id=video1,ram_size=67108864,vram_size=33554432,bus=pci.0,addr=0x4 \
+-global qxl.revision=4 \
+-device qxl,id=video1,ram_size=67108864,vram_size=33554432,revision=4,bus=pci.0,addr=0x4 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
index 9a36660..e99dbc8 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-graphics-spice.xml
@@ -34,10 +34,10 @@
<clipboard copypaste='no'/>
</graphics>
<video>
- <model type='qxl' ram='65536' vram='18432' heads='1'/>
+ <model type='qxl' ram='65536' vram='18432' heads='1' revision='4'/>
</video>
<video>
- <model type='qxl' ram='65536' vram='32768' heads='1'/>
+ <model type='qxl' ram='65536' vram='32768' heads='1' revision='4'/>
</video>
<memballoon model='virtio'/>
</devices>
--
1.8.1.2
11 years, 9 months
[libvirt] [PATCHv3 0/3] Enable virtio-scsi and virtio-rng for s390
by Viktor Mihajlovski
Early QEMU versions did not support virtio-scsi or virtio-rng
for s390 machines. This series enables libvirt to exploit the
capabilities provided by newer QEMUs.
Note: I have to apologize for the superfluous iterations which
could have been avoided by reading the comment in front of
the enum...
V2 Changes:
- Dropped 1/3, the rename of virtio-scsi-pci capability,
we will keep it for compatibility reasons.
- Add a new generic virtio-scsi capability for non-pci busses
V3 Changes
- Reverting to three patches with rename of enum symbol only
Viktor Mihajlovski (3):
qemu: Rename virtio-scsi capability
S390: Enable virtio-scsi and virtio-rng
S390: Testcases for virtio-scsi and virtio-rng
src/qemu/qemu_capabilities.c | 6 +++-
src/qemu/qemu_capabilities.h | 2 +-
src/qemu/qemu_command.c | 31 ++++++++++++++++----
tests/qemuhelptest.c | 6 ++--
.../qemuxml2argv-disk-virtio-scsi-ccw.args | 9 ++++++
.../qemuxml2argv-disk-virtio-scsi-ccw.xml | 31 ++++++++++++++++++++
.../qemuxml2argv-virtio-rng-ccw.args | 12 ++++++++
.../qemuxml2argv-virtio-rng-ccw.xml | 30 +++++++++++++++++++
tests/qemuxml2argvtest.c | 19 ++++++++----
9 files changed, 129 insertions(+), 17 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-disk-virtio-scsi-ccw.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-virtio-rng-ccw.xml
--
1.7.9.5
11 years, 9 months