[libvirt] [PATCH 0/5] graphics cleanup and bug fix
by Pavel Hrdina
Pavel Hrdina (5):
qemu_process: graphics: ref driver config only in function where it is
used
qemu_process: graphics: extract port allocation into function
qemu_process: graphics: extract for loop out of
qemuProcessGraphicsReservePorts
qemu_process: graphics: reserve port only if listen type is address or
network
qemu_process: graphics: setup listen types before ports are
reserved/allocated
src/qemu/qemu_process.c | 174 ++++++++++++++++++++++++++++++------------------
1 file changed, 108 insertions(+), 66 deletions(-)
--
2.9.2
8 years, 3 months
[libvirt] [PATCH v2] conf: Provide error on undefined vcpusched entry
by John Ferlan
Modify virDomainDefGetVcpuSched to emit an error message if
virDomainDefGetVcpu returns NULL meaning the vcpu could not
be found. Prior to commit id '9cc931f0b' the error message
would have been issued in virDomainDefGetVcpu.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
v1: http://www.redhat.com/archives/libvir-list/2016-August/msg00754.html
Wasn't fully clear from the v1 discussion whether my proposal for vcpusched
was acceptible or not, so I figured I'd generate a v2 and of course the
example...
Using a domain without <vcpusched> in a <cputune>, if there's:
<vcpu placement='static' current='2'>4</vcpu>
in the domain XML and one uses virsh edit to add:
<vcpusched vcpus='7-8' scheduler='idle'/>
then the generic error message is displayed.
This only occurs as of v2.1 where the message was removed from
virDomainDefGetVcpu.
src/conf/domain_conf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 9037304..14d4f7d 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -1480,8 +1480,12 @@ virDomainDefGetVcpuSched(virDomainDefPtr def,
{
virDomainVcpuDefPtr vcpuinfo;
- if (!(vcpuinfo = virDomainDefGetVcpu(def, vcpu)))
+ if (!(vcpuinfo = virDomainDefGetVcpu(def, vcpu))) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("vCPU '%u' is not present in domain definition"),
+ vcpu);
return NULL;
+ }
return &vcpuinfo->sched;
}
--
2.7.4
8 years, 3 months
[libvirt] qemu: Bug: NUMA memory policy ignored in some situations
by Sam Bobroff
Hi all,
I've found that if I create a QEMU guest that:
(a) is backed by host hugepages and
(b) specifies a host NUMA memory placement policy
... then the NUMA policy (b) is ignored. It's even possible to start the guest
if the policy specifies that memory must come from non-existant host nodes.
Is this a bug?
(I ask because I suspect that it is a bug, and that it can't be fixed trivially
due to migration considerations. Is that true?)
A few more details:
I do (a) using this in the guest XML:
<memoryBacking> <hugepages/> </memoryBacking>
And (b) using:
<numatune> <memory mode='strict' nodeset='1'> </numatune>
If the XML contains <cpu><numa><cell ...> and <numatune><memnode ...> to bind
guest NUMA nodes to host NUMA nodes then the policy is followed and this
behaviour isn't seen. The guest can't be started if the policy specifies
invalid host nodes.
(Strangely, if the host doesn't have the cpuset cgroup mount set up or otherwise
lacks cgroup support, then the policy is not ignored. This appears to be due to
a fallback path in libvirt so it seems like NUMA memory policy is intended to
work in this situation.)
Cheers,
Sam.
8 years, 3 months
[libvirt] [PATCH 0/2] Restore error messages for {iothread|vcpu}sched id out of range.
by John Ferlan
These patches will restore error messages indicating the vcpu or iothread
range(s) for vcpusched or iothreadsched are invalid rather than just quietly
ignoring. If someone for some unknown reason had hand edited their domain
prior to starting libvirt, they'll at least get a message indicating that
"some" domain has an invaliv vcpu/iothread value.
NB: Removal of error message occurred in the following releases:
iothreadsched: Removed in v1.3.2
vcpusched: Removed in V2.1
John Ferlan (2):
conf: Provide error on undefined iothreadsched entry
conf: Provide error on undefined vcpusched entry
src/conf/domain_conf.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
--
2.7.4
8 years, 3 months
[libvirt] [PATCH 0/3] qemu: vcpu: Split up qemuDomainSetVcpusFlags more
by Peter Krempa
As requested in the review for the vcpu hotplug series, split the API code even more.
Peter Krempa (3):
qemu: setvcpus: Extract setting of maximum vcpu count
qemu: driver: Extract setting of live vcpu count
qemu: driver: Split out regular vcpu hotplug code into a function
src/qemu/qemu_driver.c | 246 +++++++++++++++++++++++++++++--------------------
1 file changed, 144 insertions(+), 102 deletions(-)
--
2.9.2
8 years, 3 months
[libvirt] [PATCH 0/6] qemu: util: vz: some fixes and improvements
by Maxim Nestratov
Maxim Nestratov (5):
vz: get additional error information from job correctly
util: fix crash in virClassIsDerivedFrom for CloseCallbacks objects
vz: don't fail query domain info in case we don't have valid stats
handle
vz: reset errors after ignoring return values
vz: specify VIR_DOMAIN_NET_TYPE_NETWORK for routed networks
Yuri Pudgorodskiy (1):
qemu: guest agent: introduce new error code VIR_ERR_AGENT_UNSYNCED
include/libvirt/virterror.h | 2 ++
src/qemu/qemu_agent.c | 6 +++---
src/util/virclosecallbacks.c | 3 +++
src/util/virerror.c | 6 ++++++
src/vz/vz_driver.c | 13 +++++++++----
src/vz/vz_sdk.c | 41 +++++++++++++++++++++++------------------
6 files changed, 46 insertions(+), 25 deletions(-)
--
1.8.3.1
8 years, 3 months
[libvirt] [PATCH v3 0/5] Remove caching of address sets
by Tomasz Flendrich
Link to last version (1-6 are already ACK'd)
https://www.redhat.com/archives/libvir-list/2016-July/msg00917.html
Changes:
* qemuDomainPCIAddressSetCreate is now expanded instead of creating
a completely new function. It now contains
qemuDomainValidateDevicePCISlotsChipsets.
* A parameter was added to qemuDomainValidateDevicePCISlotsChipsets
to make new address asignment optional. If it's false, then that
function doesn't assign any new addresses: it just validates the
current ones (and in some cases reserves addresses for the future)
By the way I'd be grateful if someone took a look at my other patches:
https://www.redhat.com/archives/libvir-list/2016-July/msg01205.html
https://www.redhat.com/archives/libvir-list/2016-August/msg00132.html
Kind regards,
Tomasz
Tomasz Flendrich (5):
Move validating chipset PCI slots to qemuDomainPCIAddressSetCreate
Make address assignment in qemuDomainPCIAddressSetCreate optional
Reduce number of parameters to qemuDomainPCIAddressSetCreate
qemu_hotplug: generate pci address set on demand
qemu: remove pciaddrs caching
src/qemu/qemu_domain.c | 1 -
src/qemu/qemu_domain.h | 1 -
src/qemu/qemu_domain_address.c | 222 +++++++++++++++++++++++------------------
src/qemu/qemu_domain_address.h | 6 ++
src/qemu/qemu_hotplug.c | 50 ++++++++--
5 files changed, 175 insertions(+), 105 deletions(-)
--
1.9.1
8 years, 3 months
[libvirt] [PATCH] utils: storage: Fix JSON field name for uri based storage
by Peter Krempa
qemu uses 'url' instead of 'uri'. They unfortunately look very similar.
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1367260
---
src/util/virstoragefile.c | 2 +-
tests/virstoragetest.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c
index 6f7d131..8d3895d 100644
--- a/src/util/virstoragefile.c
+++ b/src/util/virstoragefile.c
@@ -2684,7 +2684,7 @@ virStorageSourceParseBackingJSONUri(virStorageSourcePtr src,
{
const char *uri;
- if (!(uri = virJSONValueObjectGetString(json, "uri"))) {
+ if (!(uri = virJSONValueObjectGetString(json, "url"))) {
virReportError(VIR_ERR_INVALID_ARG, "%s",
_("missing URI in JSON backing volume definition"));
return -1;
diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c
index 3b19f59..b3d59ad 100644
--- a/tests/virstoragetest.c
+++ b/tests/virstoragetest.c
@@ -1377,19 +1377,19 @@ mymain(void)
"\"file.filename\":\"/path/to/cdrom\"}",
"<source dev='/path/to/cdrom'/>\n");
TEST_BACKING_PARSE("json:{\"file.driver\":\"http\", "
- "\"file.uri\":\"http://example.com/file\"}",
+ "\"file.url\":\"http://example.com/file\"}",
"<source protocol='http' name='file'>\n"
" <host name='example.com'/>\n"
"</source>\n");
TEST_BACKING_PARSE("json:{\"file\":{ \"driver\":\"http\","
- "\"uri\":\"http://example.com/file\""
+ "\"url\":\"http://example.com/file\""
"}"
"}",
"<source protocol='http' name='file'>\n"
" <host name='example.com'/>\n"
"</source>\n");
TEST_BACKING_PARSE("json:{\"file.driver\":\"ftp\", "
- "\"file.uri\":\"http://example.com/file\"}",
+ "\"file.url\":\"http://example.com/file\"}",
NULL);
TEST_BACKING_PARSE("json:{\"file.driver\":\"gluster\", "
"\"file.filename\":\"gluster://example.com/vol/file\"}",
--
2.9.2
8 years, 3 months
[libvirt] [libvirt-perl][PATCH] Register VIR_NODE_DEVICE_EVENT_ID_UPDATE constant
by Michal Privoznik
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
I figured that there's no need to update Changelog here as it
already mentions nodedev events implementation.
Virt.xs | 1 +
lib/Sys/Virt/NodeDevice.pm | 4 ++++
2 files changed, 5 insertions(+)
diff --git a/Virt.xs b/Virt.xs
index 5025f2e..ee83431 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -8635,6 +8635,7 @@ BOOT:
REGISTER_CONSTANT(VIR_CONNECT_LIST_NODE_DEVICES_CAP_SCSI_GENERIC, LIST_CAP_SCSI_GENERIC);
REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_ID_LIFECYCLE, EVENT_ID_LIFECYCLE);
+ REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_ID_UPDATE, EVENT_ID_UPDATE);
REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_CREATED, EVENT_CREATED);
REGISTER_CONSTANT(VIR_NODE_DEVICE_EVENT_DELETED, EVENT_DELETED);
diff --git a/lib/Sys/Virt/NodeDevice.pm b/lib/Sys/Virt/NodeDevice.pm
index 4a8212b..1ebb97f 100644
--- a/lib/Sys/Virt/NodeDevice.pm
+++ b/lib/Sys/Virt/NodeDevice.pm
@@ -175,6 +175,10 @@ Include devices with the SCSI generic capability
Node device lifecycle events
+=item Sys::Virt::NodeDevice::EVENT_ID_UPDATE
+
+Node device update events
+
=back
=head2 LIFECYCLE CHANGE EVENTS
--
2.8.4
8 years, 3 months