[PATCH 0/7] secret: Relax usage 'name' regex
by Peter Krempa
Patches 1-6 are mostly cleanups noticed while looking at the schema.
See patch 7/7 for explanation.
Peter Krempa (7):
virSecretDefParseUsage: Use g_autofree for type_str
secretXMLParseNode: Clean up freeing of memory
virSecretLookupParseSecret: Use g_steal_pointer
schema: domaincommon: Remove pointless 'choice' from
'inituser'/'initgroup'
schema: Remove workaround for bug in libxml2 2.7.6
schema: Add define for object names
schema: secret: Relax requirements for usage name
docs/schemas/basictypes.rng | 13 ++++++++
docs/schemas/domaincommon.rng | 33 +++++--------------
docs/schemas/secret.rng | 8 ++---
docs/schemas/storagecommon.rng | 8 -----
docs/schemas/storagepool.rng | 4 +--
src/conf/secret_conf.c | 20 ++++-------
src/util/virsecret.c | 3 +-
.../disk-network-source-auth.args | 8 ++++-
...isk-network-source-auth.x86_64-2.12.0.args | 9 +++++
...isk-network-source-auth.x86_64-latest.args | 29 +++++++++++-----
.../disk-network-source-auth.xml | 12 +++++++
tests/qemuxml2argvtest.c | 3 +-
.../disk-network-source-auth.xml | 13 ++++++++
tests/secretxml2xmlin/usage-ceph-space.xml | 7 ++++
tests/secretxml2xmltest.c | 1 +
15 files changed, 107 insertions(+), 64 deletions(-)
create mode 100644 tests/secretxml2xmlin/usage-ceph-space.xml
--
2.29.2
3 years, 11 months
[PATCH] Qemu: migration: Not bind RAM info with active migration status
by Keqian Zhu
For that Qemu supports returning incoming migration info since its commit
65ace0604551 (migration: add postcopy total blocktime into query-migrate),
which may contains active status, but without RAM info. Drop this binding
relationship check in libvirt.
Signed-off-by: Keqian Zhu <zhukeqian1(a)huawei.com>
---
src/qemu/qemu_monitor_json.c | 88 +++++++++++++++++-------------------
1 file changed, 42 insertions(+), 46 deletions(-)
diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c
index d808c4b55b..ba8e340742 100644
--- a/src/qemu/qemu_monitor_json.c
+++ b/src/qemu/qemu_monitor_json.c
@@ -3547,56 +3547,52 @@ qemuMonitorJSONGetMigrationStatsReply(virJSONValuePtr reply,
case QEMU_MONITOR_MIGRATION_STATUS_PRE_SWITCHOVER:
case QEMU_MONITOR_MIGRATION_STATUS_DEVICE:
ram = virJSONValueObjectGetObject(ret, "ram");
- if (!ram) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("migration was active, but no RAM info was set"));
- return -1;
- }
+ if (ram) {
+ if (virJSONValueObjectGetNumberUlong(ram, "transferred",
+ &stats->ram_transferred) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("migration was active, but RAM 'transferred' "
+ "data was missing"));
+ return -1;
+ }
+ if (virJSONValueObjectGetNumberUlong(ram, "remaining",
+ &stats->ram_remaining) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("migration was active, but RAM 'remaining' "
+ "data was missing"));
+ return -1;
+ }
+ if (virJSONValueObjectGetNumberUlong(ram, "total",
+ &stats->ram_total) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("migration was active, but RAM 'total' "
+ "data was missing"));
+ return -1;
+ }
- if (virJSONValueObjectGetNumberUlong(ram, "transferred",
- &stats->ram_transferred) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("migration was active, but RAM 'transferred' "
- "data was missing"));
- return -1;
- }
- if (virJSONValueObjectGetNumberUlong(ram, "remaining",
- &stats->ram_remaining) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("migration was active, but RAM 'remaining' "
- "data was missing"));
- return -1;
- }
- if (virJSONValueObjectGetNumberUlong(ram, "total",
- &stats->ram_total) < 0) {
- virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
- _("migration was active, but RAM 'total' "
- "data was missing"));
- return -1;
- }
+ if (virJSONValueObjectGetNumberDouble(ram, "mbps", &mbps) == 0 &&
+ mbps > 0) {
+ /* mpbs from QEMU reports Mbits/s (M as in 10^6 not Mi as 2^20) */
+ stats->ram_bps = mbps * (1000 * 1000 / 8);
+ }
- if (virJSONValueObjectGetNumberDouble(ram, "mbps", &mbps) == 0 &&
- mbps > 0) {
- /* mpbs from QEMU reports Mbits/s (M as in 10^6 not Mi as 2^20) */
- stats->ram_bps = mbps * (1000 * 1000 / 8);
+ if (virJSONValueObjectGetNumberUlong(ram, "duplicate",
+ &stats->ram_duplicate) == 0)
+ stats->ram_duplicate_set = true;
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "normal",
+ &stats->ram_normal));
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "normal-bytes",
+ &stats->ram_normal_bytes));
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "dirty-pages-rate",
+ &stats->ram_dirty_rate));
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "page-size",
+ &stats->ram_page_size));
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "dirty-sync-count",
+ &stats->ram_iteration));
+ ignore_value(virJSONValueObjectGetNumberUlong(ram, "postcopy-requests",
+ &stats->ram_postcopy_reqs));
}
- if (virJSONValueObjectGetNumberUlong(ram, "duplicate",
- &stats->ram_duplicate) == 0)
- stats->ram_duplicate_set = true;
- ignore_value(virJSONValueObjectGetNumberUlong(ram, "normal",
- &stats->ram_normal));
- ignore_value(virJSONValueObjectGetNumberUlong(ram, "normal-bytes",
- &stats->ram_normal_bytes));
- ignore_value(virJSONValueObjectGetNumberUlong(ram, "dirty-pages-rate",
- &stats->ram_dirty_rate));
- ignore_value(virJSONValueObjectGetNumberUlong(ram, "page-size",
- &stats->ram_page_size));
- ignore_value(virJSONValueObjectGetNumberUlong(ram, "dirty-sync-count",
- &stats->ram_iteration));
- ignore_value(virJSONValueObjectGetNumberUlong(ram, "postcopy-requests",
- &stats->ram_postcopy_reqs));
-
disk = virJSONValueObjectGetObject(ret, "disk");
if (disk) {
rc = virJSONValueObjectGetNumberUlong(disk, "transferred",
--
2.19.1
3 years, 11 months
[PATCH v2] conf: Add support for keeping TPM emulator state
by Eiichi Tsukata
Currently, swtpm TPM state file is removed when a transient domain is
powered off or undefined. When we store TPM state on a shared storage
such as NFS and use transient domain, TPM states should be kept as it is.
Add per-TPM emulator option `persistent_sate` for keeping TPM state.
This option only works for the emulator type backend and looks as follows:
<tpm model='tpm-tis'>
<backend type='emulator' persistent_state='yes'/>
</tpm>
Signed-off-by: Eiichi Tsukata <eiichi.tsukata(a)nutanix.com>
Reviewed-by: Stefan Berger <stefanb(a)linux.ibm.com>
---
docs/formatdomain.rst | 7 ++++
docs/schemas/domaincommon.rng | 12 ++++++
src/conf/domain_conf.c | 21 ++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_tpm.c | 3 +-
...pm-emulator-tpm2-pstate.x86_64-latest.args | 38 +++++++++++++++++++
.../tpm-emulator-tpm2-pstate.xml | 30 +++++++++++++++
tests/qemuxml2argvtest.c | 1 +
...tpm-emulator-tpm2-pstate.x86_64-latest.xml | 37 ++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
10 files changed, 150 insertions(+), 1 deletion(-)
create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml
create mode 100644 tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml
diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst
index 512939679b..87bbd1a4f1 100644
--- a/docs/formatdomain.rst
+++ b/docs/formatdomain.rst
@@ -6986,6 +6986,13 @@ Example: usage of the TPM Emulator
- '1.2' : creates a TPM 1.2
- '2.0' : creates a TPM 2.0
+``persistent_state``
+ The ``persistent_state`` attribute indicates whether 'swtpm' TPM state is
+ kept or not when a transient domain is powered off or undefined. This
+ option can be used for preserving TPM state. By default the value is ``no``.
+ This attribute only works with the ``emulator`` backend. The accepted values
+ are ``yes`` and ``no``.
+
``encryption``
The ``encryption`` element allows the state of a TPM emulator to be
encrypted. The ``secret`` must reference a secret object that holds the
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 795b654feb..d7cedc014c 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -4780,6 +4780,18 @@
</optional>
</group>
</choice>
+ <choice>
+ <group>
+ <optional>
+ <attribute name="persistent_state">
+ <choice>
+ <value>yes</value>
+ <value>no</value>
+ </choice>
+ </attribute>
+ </optional>
+ </group>
+ </choice>
</element>
</define>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 23415b323c..82c3a68347 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -13178,6 +13178,12 @@ virDomainSmartcardDefParseXML(virDomainXMLOptionPtr xmlopt,
* <encryption secret='32ee7e76-2178-47a1-ab7b-269e6e348015'/>
* </backend>
* </tpm>
+ *
+ * Emulator persistent_state is supported with the following:
+ *
+ * <tpm model='tpm-tis'>
+ * <backend type='emulator' version='2.0' persistent_state='yes'>
+ * </tpm>
*/
static virDomainTPMDefPtr
virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
@@ -13193,6 +13199,7 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
g_autofree char *backend = NULL;
g_autofree char *version = NULL;
g_autofree char *secretuuid = NULL;
+ g_autofree char *persistent_state = NULL;
g_autofree xmlNodePtr *backends = NULL;
def = g_new0(virDomainTPMDef, 1);
@@ -13265,6 +13272,18 @@ virDomainTPMDefParseXML(virDomainXMLOptionPtr xmlopt,
}
def->data.emulator.hassecretuuid = true;
}
+
+ persistent_state = virXMLPropString(backends[0], "persistent_state");
+ if (persistent_state) {
+ if (virStringParseYesNo(persistent_state,
+ &def->data.emulator.persistent_state) < 0) {
+ virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
+ _("Invalid persistent_state value, either 'yes' or 'no'"));
+ goto error;
+ }
+ } else {
+ def->data.emulator.persistent_state = false;
+ }
break;
case VIR_DOMAIN_TPM_TYPE_LAST:
goto error;
@@ -26952,6 +26971,8 @@ virDomainTPMDefFormat(virBufferPtr buf,
case VIR_DOMAIN_TPM_TYPE_EMULATOR:
virBufferAsprintf(buf, " version='%s'",
virDomainTPMVersionTypeToString(def->version));
+ if (def->data.emulator.persistent_state)
+ virBufferAddLit(buf, " persistent_state='yes'");
if (def->data.emulator.hassecretuuid) {
char uuidstr[VIR_UUID_STRING_BUFLEN];
virBufferAddLit(buf, ">\n");
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 72771c46b9..109625828a 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1362,6 +1362,7 @@ struct _virDomainTPMDef {
char *logfile;
unsigned char secretuuid[VIR_UUID_BUFLEN];
bool hassecretuuid;
+ bool persistent_state;
} emulator;
} data;
};
diff --git a/src/qemu/qemu_tpm.c b/src/qemu/qemu_tpm.c
index 872be16570..532e0912bd 100644
--- a/src/qemu/qemu_tpm.c
+++ b/src/qemu/qemu_tpm.c
@@ -729,7 +729,8 @@ qemuExtTPMCleanupHost(virDomainDefPtr def)
if (def->tpms[i]->type != VIR_DOMAIN_TPM_TYPE_EMULATOR)
continue;
- qemuTPMDeleteEmulatorStorage(def->tpms[i]);
+ if (!def->tpms[i]->data.emulator.persistent_state)
+ qemuTPMDeleteEmulatorStorage(def->tpms[i]);
}
}
diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.args b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.args
new file mode 100644
index 0000000000..90505c7a76
--- /dev/null
+++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.x86_64-latest.args
@@ -0,0 +1,38 @@
+LC_ALL=C \
+PATH=/bin \
+HOME=/tmp/lib/domain--1-TPM-VM \
+USER=test \
+LOGNAME=test \
+XDG_DATA_HOME=/tmp/lib/domain--1-TPM-VM/.local/share \
+XDG_CACHE_HOME=/tmp/lib/domain--1-TPM-VM/.cache \
+XDG_CONFIG_HOME=/tmp/lib/domain--1-TPM-VM/.config \
+QEMU_AUDIO_DRV=none \
+/usr/bin/qemu-system-x86_64 \
+-name guest=TPM-VM,debug-threads=on \
+-S \
+-object secret,id=masterKey0,format=raw,\
+file=/tmp/lib/domain--1-TPM-VM/master-key.aes \
+-machine pc-i440fx-2.12,accel=tcg,usb=off,dump-guest-core=off,\
+memory-backend=pc.ram \
+-cpu qemu64 \
+-m 2048 \
+-object memory-backend-ram,id=pc.ram,size=2147483648 \
+-overcommit mem-lock=off \
+-smp 1,sockets=1,cores=1,threads=1 \
+-uuid 11d7cd22-da89-3094-6212-079a48a309a1 \
+-display none \
+-no-user-config \
+-nodefaults \
+-chardev socket,id=charmonitor,fd=1729,server,nowait \
+-mon chardev=charmonitor,id=monitor,mode=control \
+-rtc base=utc \
+-no-shutdown \
+-boot menu=on,strict=on \
+-device piix3-usb-uhci,id=usb,bus=pci.0,addr=0x1.0x2 \
+-tpmdev emulator,id=tpm-tpm0,chardev=chrtpm \
+-chardev socket,id=chrtpm,path=/dev/test \
+-device tpm-tis,tpmdev=tpm-tpm0,id=tpm0 \
+-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x2 \
+-sandbox on,obsolete=deny,elevateprivileges=deny,spawn=deny,\
+resourcecontrol=deny \
+-msg timestamp=on
diff --git a/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml
new file mode 100644
index 0000000000..45fc4c0e1a
--- /dev/null
+++ b/tests/qemuxml2argvdata/tpm-emulator-tpm2-pstate.xml
@@ -0,0 +1,30 @@
+<domain type='qemu'>
+ <name>TPM-VM</name>
+ <uuid>11d7cd22-da89-3094-6212-079a48a309a1</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>512288</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ </os>
+ <features>
+ <acpi/>
+ </features>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <tpm model='tpm-tis'>
+ <backend type='emulator' version='2.0' persistent_state='yes'/>
+ </tpm>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 9b853c6d59..e96a51d18b 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -2460,6 +2460,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("tpm-emulator");
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2");
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-enc");
+ DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-pstate");
DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr");
DO_TEST_PARSE_ERROR("pci-domain-invalid", NONE);
diff --git a/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml
new file mode 100644
index 0000000000..08bc8d690c
--- /dev/null
+++ b/tests/qemuxml2xmloutdata/tpm-emulator-tpm2-pstate.x86_64-latest.xml
@@ -0,0 +1,37 @@
+<domain type='qemu'>
+ <name>TPM-VM</name>
+ <uuid>11d7cd22-da89-3094-6212-079a48a309a1</uuid>
+ <memory unit='KiB'>2097152</memory>
+ <currentMemory unit='KiB'>512288</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64' machine='pc-i440fx-2.12'>hvm</type>
+ <boot dev='hd'/>
+ <bootmenu enable='yes'/>
+ </os>
+ <features>
+ <acpi/>
+ </features>
+ <cpu mode='custom' match='exact' check='none'>
+ <model fallback='forbid'>qemu64</model>
+ </cpu>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu-system-x86_64</emulator>
+ <controller type='usb' index='0' model='piix3-uhci'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
+ </controller>
+ <controller type='pci' index='0' model='pci-root'/>
+ <input type='mouse' bus='ps2'/>
+ <input type='keyboard' bus='ps2'/>
+ <tpm model='tpm-tis'>
+ <backend type='emulator' version='2.0' persistent_state='yes'/>
+ </tpm>
+ <memballoon model='virtio'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </memballoon>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c
index 1968be6782..f8bca9f559 100644
--- a/tests/qemuxml2xmltest.c
+++ b/tests/qemuxml2xmltest.c
@@ -761,6 +761,7 @@ mymain(void)
DO_TEST_CAPS_LATEST("tpm-emulator");
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2");
DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-enc");
+ DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-pstate");
DO_TEST("metadata", NONE);
DO_TEST("metadata-duplicate", NONE);
--
2.28.0
3 years, 11 months
[RFC] exposing 'nodedev assigned to domain' info to users
by Daniel Henrique Barboza
Hi,
This is something I've been giving a thought after working in Gitlab issue
#72 and decided to run through the ML before hitting the code.
We don't have an easy way to retrieve the domain that is using an specific
hostdev. Let's say that I want to know which domain is using the PCI card
pci_0000_01_00_2. 'nodedev-dumpxml' will return the hardware/driver capabilities
of the device, such as IOMMU group, driver and so on, but will not inform
which domain is using the hostdev, if any. 'nodedev-list' will simply list
all nodedev names known to Libvirt, without outputting any other information.
IIUC, the only existing way I can reliably tell whether a hostdev is being
used by domain, aside from having to register the information by myself
during domain definition of course, is via 'virsh dumpxml <domain>' each
existing running domain and matching the nodedev name with the source.address
element of the XML.
When we consider SR-IOV devices that can have 28+ VFs each (and have lots of
fun caveats, like Github #72 showed us), the capability of hot plug/unplug
hostdevs freely, and lots of running domains, it is clear that we're putting a
considerable pressure in the upper layers (OVirt, or a poor human admin) to
keep track of the nodedevs each running domain is using. An info that we
already have internally and can just expose it.
I have a few ideas to make this happen:
1 - upgrade 'nodedev-list' to add an extra 'assigned to' column
This is the more straightforward way of exposing the info. A simple 'nodedev-list'
call can retrieve which domain is using which nodedev. To preserve the existing
usage we can add an "--show-assigned-domains" option to control whether we
will display this info.
2 - add an '<assigned_to>' element in nodedev XML definition
I'm not a fan of exposing this in this particular XML because we would mix
host/hw related attributes with domain info. But it would be easier to pull
this off comparing to (1), so I'm mentioning it for the record.
I would start by exposing the info for HOSTDEV_SUBSYS_TYPE_PCI hostdevs
(--cap pci in nodedev-list).
Thanks,
DHB
3 years, 11 months
[libvirt PATCH v2 00/16] docs: add manpages for all the modular daemons
by Daniel P. Berrangé
Most of the modular daemon stuff has been done from a single template,
but for the man pages that is more trouble than it is worth, so we
create a separate man page source for each daemon, which makes it easy
to extend with driver specific information.
Changed in v2:
- BHyve man page has had references to systemd removed.
Daniel P. Berrangé (16):
docs: consistently mark libvirtd as preformatted text
docs: don't hardcode an ancient version in manpage examples
docs: tweak heading for daemon manual pages
docs: add manpage for virtproxyd
docs: add manpage for virtbhyved
docs: add manpage for virtinterfaced
docs: add manpage for virtlxcd
docs: add manpage for virtnetworkd
docs: add manpage for virtnodedevd
docs: add manpage for virtnwfilterd
docs: add manpage for virtqemud
docs: add manpage for virtsecretd
docs: add manpage for virtstoraged
docs: add manpage for virtvboxd
docs: add manpage for virtvzd
docs: add manpage for virtxend
docs/manpages/index.rst | 25 ++-
docs/manpages/libvirtd.rst | 50 +++---
docs/manpages/meson.build | 14 ++
docs/manpages/virtbhyved.rst | 193 +++++++++++++++++++++++
docs/manpages/virtinterfaced.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtlockd.rst | 2 +-
docs/manpages/virtlogd.rst | 2 +-
docs/manpages/virtlxcd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtnetworkd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtnodedevd.rst | 214 ++++++++++++++++++++++++++
docs/manpages/virtnwfilterd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtproxyd.rst | 256 +++++++++++++++++++++++++++++++
docs/manpages/virtqemud.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtsecretd.rst | 214 ++++++++++++++++++++++++++
docs/manpages/virtstoraged.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtvboxd.rst | 213 +++++++++++++++++++++++++
docs/manpages/virtvzd.rst | 215 ++++++++++++++++++++++++++
docs/manpages/virtxend.rst | 215 ++++++++++++++++++++++++++
18 files changed, 2874 insertions(+), 29 deletions(-)
create mode 100644 docs/manpages/virtbhyved.rst
create mode 100644 docs/manpages/virtinterfaced.rst
create mode 100644 docs/manpages/virtlxcd.rst
create mode 100644 docs/manpages/virtnetworkd.rst
create mode 100644 docs/manpages/virtnodedevd.rst
create mode 100644 docs/manpages/virtnwfilterd.rst
create mode 100644 docs/manpages/virtproxyd.rst
create mode 100644 docs/manpages/virtqemud.rst
create mode 100644 docs/manpages/virtsecretd.rst
create mode 100644 docs/manpages/virtstoraged.rst
create mode 100644 docs/manpages/virtvboxd.rst
create mode 100644 docs/manpages/virtvzd.rst
create mode 100644 docs/manpages/virtxend.rst
--
2.29.2
3 years, 11 months
[libvirt PATCH v2] qemuDomainChangeNet: Check changed virtio network driver options
by Tim Wiederhake
Changes to a virtio network device such as
<interface type="network">
<model type="virtio"/>
<driver iommu="on" ats="on"/> <!-- this line added -->
...
</interface>
were quietly dismissed by `virsh update-device ... --live`.
Signed-off-by: Tim Wiederhake <twiederh(a)redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
src/qemu/qemu_hotplug.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 57635cd419..6371d53871 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -3600,6 +3600,16 @@ qemuDomainChangeNet(virQEMUDriverPtr driver,
goto cleanup;
}
+ if (!!olddev->virtio != !!newdev->virtio ||
+ (olddev->virtio && newdev->virtio &&
+ (olddev->virtio->iommu != newdev->virtio->iommu ||
+ olddev->virtio->ats != newdev->virtio->ats ||
+ olddev->virtio->packed != newdev->virtio->packed))) {
+ virReportError(VIR_ERR_OPERATION_UNSUPPORTED, "%s",
+ _("cannot modify virtio network device driver options"));
+ goto cleanup;
+ }
+
/* data: this union will be examined later, after allocating new actualdev */
/* virtPortProfile: will be examined later, after allocating new actualdev */
--
2.26.2
3 years, 11 months
[PATCH 0/3] schemas: Allow <filesystem/> to have interleaved children
by Michal Privoznik
Tested with the following change:
diff --git a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml
index f6bb663e97..875e2316a0 100644
--- a/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml
+++ b/tests/qemuxml2argvdata/vhost-user-fs-fd-memory.xml
@@ -27,13 +27,13 @@
<controller type='usb' index='0' model='none'/>
<controller type='pci' index='0' model='pci-root'/>
<filesystem type='mount' accessmode='passthrough'>
- <driver type='virtiofs' queue='1024'/>
+ <target dir='mount_tag'/>
+ <source dir='/path'/>
<binary path='/usr/libexec/virtiofsd' xattr='on'>
<cache mode='always'/>
<lock posix='off' flock='off'/>
</binary>
- <source dir='/path'/>
- <target dir='mount_tag'/>
+ <driver type='virtiofs' queue='1024'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
</filesystem>
<input type='mouse' bus='ps2'/>
Michal Prívozník (3):
schemas: Allow fsDriver to be interleaved
schemas: Allow interleaving of fsBinary children
schemas: Allow direct children of <filesystem/> to be interleaved
docs/schemas/domaincommon.rng | 400 +++++++++++++++++-----------------
1 file changed, 202 insertions(+), 198 deletions(-)
--
2.26.2
3 years, 11 months
[libvirt PATCH v2 0/9 PUSHED] cleanup storage source related code
by Pavel Hrdina
This series is pushed, posting only to track the changes to fix the
issues pointed out by Peter.
Pavel Hrdina (9):
util: remove unused virStorageGenerateQcowPassphrase
virstoragefile: remove unused virStorageFileChainCheckBroken
util: move virQEMUBuildQemuImgKeySecretOpts into storage
util: move virStorageFileGetLVMKey to locking
util: move virStorageFileCheckCompat into conf
src: add missing headers to various files
virfile: refactor virFileNBDDeviceAssociate
virstoragefile: move virStorageFileResize into virfile
virstoragefile: move virStorageFileIsClusterFS into virfile
src/conf/storage_conf.c | 23 ++++-
src/driver.c | 1 +
src/libvirt_private.syms | 8 +-
src/locking/lock_driver_lockd.c | 68 +++++++++++-
src/lxc/lxc_controller.c | 4 +-
src/qemu/qemu_interop_config.c | 1 +
src/qemu/qemu_migration.c | 2 +-
src/qemu/qemu_shim.c | 1 +
src/storage/parthelper.c | 1 +
src/storage/storage_util.c | 76 +++++++++++++-
src/util/virarptable.c | 1 +
src/util/vircgroupv1.c | 1 +
src/util/vircgroupv2devices.c | 1 +
src/util/virfile.c | 68 ++++++++++--
src/util/virfile.h | 9 +-
src/util/virpidfile.c | 1 +
src/util/virqemu.c | 69 -------------
src/util/virqemu.h | 6 --
src/util/virresctrl.c | 1 +
src/util/virstorageencryption.c | 34 ------
src/util/virstorageencryption.h | 2 -
src/util/virstoragefile.c | 177 --------------------------------
src/util/virstoragefile.h | 12 ---
src/util/virsysinfo.c | 1 +
src/util/virtpm.c | 1 +
tests/virstoragetest.c | 6 --
tools/virsh-console.c | 1 +
tools/virsh-util.c | 1 +
28 files changed, 249 insertions(+), 328 deletions(-)
--
2.29.2
3 years, 11 months