[libvirt PATCH 0/3] cpu: Make unknown XML elements fail CPU comparison
by Tim Wiederhake
We currently ignore unknown elements in the CPU XML description, e.g. with vi=
rsh
cpu-compare and hypervisor-cpu-compare. This makes '<cpu><faeture name=3D"...=
"/></cpu>'
(note the typo in "faeture") semantically identic to '<cpu/>'. No error is re=
ported.
This series adds checks for unrecognized attributes and elements in the "<cpu=
>" element,
catching this kind of mistake.
An alternative approach to this problem would be to create a new schema, whic=
h might
turn out awkward as cpu-compare and hypervisor-cpu-compare accept a wide rang=
e of
cpu descriptions, including full domain, capabilities, and domainCapabilities=
XML.
Tim Wiederhake (3):
tests: Allow cpuTestLoadXML to fail for the guest if we expect it the
test to fail
tests: Ensure that cpu comparison fails in the presence of unknown xml
elements
cpu: Fail CPU comparison in the presence of unknown elements.
src/conf/cpu_conf.c | 38 ++++++++++++++++++++
tests/cputest.c | 15 +++++---
tests/cputestdata/x86_64-bogus-attribute.xml | 2 ++
tests/cputestdata/x86_64-bogus-element.xml | 3 ++
4 files changed, 54 insertions(+), 4 deletions(-)
create mode 100644 tests/cputestdata/x86_64-bogus-attribute.xml
create mode 100644 tests/cputestdata/x86_64-bogus-element.xml
--=20
2.26.2
4 years, 2 months
[PATCH v5 0/2] bhyve: support 'isa' controller for LPC
by Roman Bogorodskiy
Changes from v4:
- Document 'isa' controller type in docs/formatdomain.html.in.
While here, add 'xenbus' which was also missing.
Roman Bogorodskiy (2):
conf: add 'isa' controller type
bhyve: support 'isa' controller for LPC
docs/formatdomain.html.in | 6 ++--
docs/schemas/domaincommon.rng | 6 ++++
src/bhyve/bhyve_command.c | 27 +++++++-------
src/bhyve/bhyve_device.c | 23 +++++++++---
src/bhyve/bhyve_domain.c | 25 +++++++++++--
src/bhyve/bhyve_domain.h | 2 --
src/conf/domain_conf.c | 9 +++++
src/conf/domain_conf.h | 8 +++++
src/qemu/qemu_command.c | 1 +
src/qemu/qemu_domain.c | 1 +
src/qemu/qemu_domain_address.c | 1 +
src/qemu/qemu_validate.c | 1 +
src/vbox/vbox_common.c | 1 +
...ml2argv-addr-isa-controller-on-slot-1.args | 10 ++++++
...2argv-addr-isa-controller-on-slot-1.ldargs | 3 ++
...xml2argv-addr-isa-controller-on-slot-1.xml | 26 ++++++++++++++
...l2argv-addr-isa-controller-on-slot-31.args | 10 ++++++
...argv-addr-isa-controller-on-slot-31.ldargs | 3 ++
...ml2argv-addr-isa-controller-on-slot-31.xml | 26 ++++++++++++++
...argv-addr-non-isa-controller-on-slot-1.xml | 23 ++++++++++++
.../bhyvexml2argv-console.args | 2 +-
.../bhyvexml2argv-isa-controller.args | 10 ++++++
.../bhyvexml2argv-isa-controller.ldargs | 3 ++
.../bhyvexml2argv-isa-controller.xml | 24 +++++++++++++
...bhyvexml2argv-isa-multiple-controllers.xml | 25 +++++++++++++
.../bhyvexml2argv-serial-grub-nocons.args | 2 +-
.../bhyvexml2argv-serial-grub.args | 2 +-
.../bhyvexml2argv-serial.args | 2 +-
.../bhyvexml2argvdata/bhyvexml2argv-uefi.args | 4 +--
.../bhyvexml2argv-vnc-autoport.args | 4 +--
.../bhyvexml2argv-vnc-vgaconf-io.args | 4 +--
.../bhyvexml2argv-vnc-vgaconf-off.args | 4 +--
.../bhyvexml2argv-vnc-vgaconf-on.args | 4 +--
.../bhyvexml2argvdata/bhyvexml2argv-vnc.args | 4 +--
tests/bhyvexml2argvtest.c | 5 +++
...l2xmlout-addr-isa-controller-on-slot-1.xml | 36 +++++++++++++++++++
...2xmlout-addr-isa-controller-on-slot-31.xml | 36 +++++++++++++++++++
.../bhyvexml2xmlout-console.xml | 3 ++
.../bhyvexml2xmlout-isa-controller.xml | 36 +++++++++++++++++++
.../bhyvexml2xmlout-serial-grub-nocons.xml | 3 ++
.../bhyvexml2xmlout-serial-grub.xml | 3 ++
.../bhyvexml2xmlout-serial.xml | 3 ++
.../bhyvexml2xmlout-vnc-autoport.xml | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-io.xml | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-off.xml | 3 ++
.../bhyvexml2xmlout-vnc-vgaconf-on.xml | 3 ++
.../bhyvexml2xmlout-vnc.xml | 3 ++
tests/bhyvexml2xmltest.c | 3 ++
48 files changed, 409 insertions(+), 40 deletions(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-1.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-isa-controller-on-slot-31.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-addr-non-isa-controller-on-slot-1.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-isa-controller.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-isa-multiple-controllers.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-isa-controller-on-slot-1.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-addr-isa-controller-on-slot-31.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-isa-controller.xml
--
2.27.0
4 years, 2 months
[libvirt] [PATCH v2 0/4] qemu/virsh/docs: various minor fixes
by morecache@gmail.com
From: Lin Ma <lma(a)suse.de>
v1 -> v2:
* Remove the merged patches.
* Follow Ján and Erik's suggestions.
Lin Ma (4):
virsh: net-port-create: log errors for non-existent xml file
virsh: event: options --list, --all and --event are mutually exclusive
docs: virsh: Document the IO mode 'io_uring'
network: Check for active network during networkGetDHCPLeases
docs/manpages/virsh.rst | 3 ++-
src/network/bridge_driver.c | 7 +++++++
tools/virsh-domain.c | 4 ++++
tools/virsh-network.c | 1 +
4 files changed, 14 insertions(+), 1 deletion(-)
--
2.26.0
4 years, 2 months
[PATCH 1/2] docs: formatdomain: Add examples for nbd source
by Han Han
Signed-off-by: Han Han <hhan(a)redhat.com>
---
docs/formatdomain.rst | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 18e237c157..49713a12d4 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -2409,6 +2409,27 @@ paravirtualized driver is specified via the ``disk`` element.
</source>
<target dev='vde' bus='virtio'/>
</disk>
+ <disk type='network' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source protocol='nbd' tls='yes'>
+ <host name='example.com' port='10809'/>
+ </source>
+ <target dev='vdf' bus='virtio'/>
+ </disk>
+ <disk type='network' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source protocol='nbd' name='bar' tls='no'>
+ <host name='example.com' port='10810'/>
+ </source>
+ <target dev='vdg' bus='virtio'/>
+ </disk>
+ <disk type='network' device='disk'>
+ <driver name='qemu' type='raw'/>
+ <source protocol='nbd' name='bar'>
+ <host transport='unix' socket='/var/run/nbdsock'/>
+ </source>
+ <target dev='vdh' bus='virtio'/>
+ </disk>
</devices>
...
--
2.28.0
4 years, 2 months
[libvirt PATCH 0/2] storage: fully support qcow2 with LUKS volumes
by Daniel P. Berrangé
We added support for LUKS with raw volumes, but never extended it to
cover qcow2 volumes.
Daniel P. Berrangé (2):
util: detect LUKS encryption scheme in qcow2 files
storage: add support for qcow2 LUKS encryption
src/storage/storage_util.c | 70 +++++++++++++++++++++++++++++---------
src/util/virqemu.c | 23 +++++++++----
src/util/virqemu.h | 1 +
src/util/virstoragefile.c | 16 +++++++++
4 files changed, 88 insertions(+), 22 deletions(-)
--
2.26.2
4 years, 2 months
[libvirt PATCH] remote: slightly improve debugging of socket selection
by Daniel P. Berrangé
The current debug message reports the "mode" after selection has
completed, however, the "mode" value can be changed by the selection
logic. It is thus beneficial to report most values upfront, and only
report newly changed values at the end.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/remote/remote_sockets.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/src/remote/remote_sockets.c b/src/remote/remote_sockets.c
index 7c69ed9e7f..478c78edc2 100644
--- a/src/remote/remote_sockets.c
+++ b/src/remote/remote_sockets.c
@@ -145,6 +145,11 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
g_autofree char *direct_sock_name = NULL;
g_autofree char *legacy_sock_name = NULL;
+ VIR_DEBUG("Choosing remote socket for transport=%s mode=%s driver=%s ro=%d session=%d",
+ remoteDriverTransportTypeToString(transport),
+ remoteDriverModeTypeToString(mode),
+ driver, ro, session);
+
if (driver)
direct_daemon = g_strdup_printf("virt%sd", driver);
@@ -208,12 +213,9 @@ remoteGetUNIXSocket(remoteDriverTransport transport,
return NULL;
}
- VIR_DEBUG("Chosen UNIX sockname=%s daemon=%s "
- "for mode=%s transport=%s ro=%d session=%d",
+ VIR_DEBUG("Chosen UNIX sockname=%s daemon=%s with mode=%s",
sock_name, NULLSTR(*daemon),
- remoteDriverModeTypeToString(mode),
- remoteDriverTransportTypeToString(transport),
- ro, session);
+ remoteDriverModeTypeToString(mode));
return sock_name;
}
--
2.26.2
4 years, 2 months
[libvirt] [PATCH 00/12] qemu/virsh/docs: various minor fixes
by Lin Ma
Lin Ma (12):
qemu: qemuDomainPMSuspendForDuration: Check availability of agent
qemu: Return perf status that affect next boot for shutoff domains
network: Check for active network during networkGetDHCPLeases
virsh: domid: Error out if domain is not active
virsh: net-port-create: log errors for non-existent xml file
virsh: event: options --all and --event are mutually exclusive
virsh: domblkinfo: options --all and --device are mutually exclusive
virsh: domdisplay: options --all and --type are mutually exclusive
virsh: iface-list: options --all and --inactive are mutually exclusive
virsh: pool-list: options --all and --inactive are mutually exclusive
docs: virsh: Document the IO mode 'io_uring'
docs: virsh: Drop duplicate spelling for dompmwakeup
docs/manpages/virsh.rst | 5 +++--
src/network/bridge_driver.c | 7 +++++++
src/qemu/qemu_driver.c | 8 ++++++--
tools/virsh-domain-monitor.c | 2 ++
tools/virsh-domain.c | 17 ++++++++++++-----
tools/virsh-interface.c | 2 ++
tools/virsh-network.c | 1 +
tools/virsh-pool.c | 2 ++
8 files changed, 35 insertions(+), 9 deletions(-)
--
2.26.0
4 years, 2 months
[PATCH] access: ensure ACL files are rebuilt when protocol changes
by Daniel P. Berrangé
Meson is not told that the .x protocol files are an input for the
generator, so it doesn't know to setup a rebuild dependancy.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/access/meson.build | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/src/access/meson.build b/src/access/meson.build
index b23838a776..ff088024f6 100644
--- a/src/access/meson.build
+++ b/src/access/meson.build
@@ -34,6 +34,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
access_gen_headers += custom_target(
header_file,
+ input: protocol_file,
output: header_file,
command: [
gendispatch_prog, '--mode=aclheader', name, name.to_upper(), protocol_file,
@@ -43,6 +44,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
access_gen_sources += custom_target(
source_file,
+ input: protocol_file,
output: source_file,
command: [
gendispatch_prog, '--mode=aclbody', name, name.to_upper(),
@@ -53,6 +55,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
access_gen_sym += custom_target(
syms_file,
+ input: protocol_file,
output: syms_file,
capture: true,
command: [
@@ -62,6 +65,7 @@ foreach name : [ 'remote', 'qemu', 'lxc' ]
access_gen_xml += custom_target(
xml_file,
+ input: protocol_file,
output: xml_file,
capture: true,
command: [
--
2.26.2
4 years, 2 months
[PATCH] hyperv: fix the number of threads per core
by Matt Coleman
The operands were reversed, producing an incorrect result.
Co-authored-by: Sri Ramanujam <sramanujam(a)datto.com>
Signed-off-by: Matt Coleman <matt(a)datto.com>
---
src/hyperv/hyperv_driver.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/hyperv/hyperv_driver.c b/src/hyperv/hyperv_driver.c
index 20d372b274..9b181ebfff 100644
--- a/src/hyperv/hyperv_driver.c
+++ b/src/hyperv/hyperv_driver.c
@@ -310,7 +310,7 @@ hypervNodeGetInfo(virConnectPtr conn, virNodeInfoPtr info)
}
info->cores = processorList->data.common->NumberOfCores;
- info->threads = info->cores / processorList->data.common->NumberOfLogicalProcessors;
+ info->threads = processorList->data.common->NumberOfLogicalProcessors / info->cores;
info->cpus = info->sockets * info->cores;
result = 0;
--
2.27.0
4 years, 2 months