[PATCH] docs: bhyve: style improvements
by Roman Bogorodskiy
- Wrap long lines in "domxml-to-native" example so it fits
content width,
- For changeset revision links, use "FreeBSD changeset rN" or
"changeset rN" instead of just "rN" to make it more readable.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
docs/drvbhyve.html.in | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/docs/drvbhyve.html.in b/docs/drvbhyve.html.in
index 2e58cc50e2..49d4aa5878 100644
--- a/docs/drvbhyve.html.in
+++ b/docs/drvbhyve.html.in
@@ -232,8 +232,8 @@ Then <code>virsh console</code> command can be used to connect to the text conso
of a guest.</p>
<p><b>NB:</b> Some versions of bhyve have a bug that prevents guests from booting
-until the console is opened by a client. This bug was fixed in FreeBSD
-<a href="https://svnweb.freebsd.org/changeset/base/262884">r262884</a>. If
+until the console is opened by a client. This bug was fixed in
+<a href="https://svnweb.freebsd.org/changeset/base/262884">FreeBSD changeset r262884</a>. If
an older version is used, one either has to open a console manually with <code>virsh console</code>
to let a guest boot or start a guest using:</p>
@@ -272,7 +272,9 @@ tweak them.</p>
<pre>
# virsh -c "bhyve:///system" domxml-to-native --format bhyve-argv --xml /path/to/bhyve.xml
/usr/sbin/bhyveload -m 214 -d /home/user/vm1.img vm1
-/usr/sbin/bhyve -c 2 -m 214 -A -I -H -P -s 0:0,hostbridge -s 3:0,virtio-net,tap0,mac=52:54:00:5d:74:e3 -s 2:0,virtio-blk,/home/user/vm1.img -s 1,lpc -l com1,/dev/nmdm0A vm1
+/usr/sbin/bhyve -c 2 -m 214 -A -I -H -P -s 0:0,hostbridge \
+ -s 3:0,virtio-net,tap0,mac=52:54:00:5d:74:e3 -s 2:0,virtio-blk,/home/user/vm1.img \
+ -s 1,lpc -l com1,/dev/nmdm0A vm1
</pre>
<h3><a id="zfsvolume">Using ZFS volumes</a></h3>
@@ -416,10 +418,11 @@ Make sure you understand the risks associated with this feature before using it.
<h3><a id="clockconfig">Clock configuration</a></h3>
<p>Originally bhyve supported only localtime for RTC. Support for UTC time was introduced in
-<a href="https://svnweb.freebsd.org/changeset/base/284894">r284894</a> for <i>10-STABLE</i> and
-in <a href="https://svnweb.freebsd.org/changeset/base/279225">r279225</a> for <i>-CURRENT</i>.
-It's possible to use this in libvirt <span class="since">since 1.2.18</span>, just place the
-following to domain XML:</p>
+<a href="https://svnweb.freebsd.org/changeset/base/284894">FreeBSD changeset r284894</a>
+for <i>10-STABLE</i> and
+in <a href="https://svnweb.freebsd.org/changeset/base/279225">changeset r279225</a>
+for <i>-CURRENT</i>. It's possible to use this in libvirt <span class="since">since 1.2.18</span>,
+just place the following to domain XML:</p>
<pre>
<domain type="bhyve">
@@ -443,8 +446,8 @@ you'll need to explicitly specify 'localtime' in this case:</p>
<h3><a id="e1000">e1000 NIC</a></h3>
-<p>As of <a href="https://svnweb.freebsd.org/changeset/base/302504">r302504</a> bhyve
-supports Intel e1000 network adapter emulation. It's supported in libvirt
+<p>As of <a href="https://svnweb.freebsd.org/changeset/base/302504">FreeBSD changeset r302504</a>
+bhyve supports Intel e1000 network adapter emulation. It's supported in libvirt
<span class="since">since 3.1.0</span> and could be used as follows:</p>
<pre>
@@ -497,7 +500,8 @@ be wired and cannot be swapped out as follows:</p>
<p><span class="since">Since 4.5.0</span>, it's possible to specify guest CPU topology, if bhyve
supports that. Support for specifying guest CPU topology was added to bhyve in
-<a href="https://svnweb.freebsd.org/changeset/base/332298">r332298</a> for <i>-CURRENT</i>.
+<a href="https://svnweb.freebsd.org/changeset/base/332298">FreeBSD changeset r332298</a>
+for <i>-CURRENT</i>.
Example:</p>
<pre>
<domain type="bhyve">
--
2.28.0
4 years, 2 months
[PATCH] qemu: Add support for -device ati-vga (models: rage128p and rv100)
by Steven Newbury
When using a passthrough GPU with libvirt there is no option to
pass "x-vga=on" to the device specification. This means legacy
VGA support isn't available which prevents any non-UEFI cards from
POSTing and prevents some drivers from initialising for example
Windows 10 NVIDIA driver for GeForce 8800.
Signed-off-by: Steven Newbury <steve(a)snewbury.org.uk>
---
docs/schemas/domaincommon.rng | 2 ++
src/conf/domain_conf.c | 7 +++++++
src/conf/domain_conf.h | 2 ++
src/qemu/qemu_capabilities.c | 6 ++++++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 6 ++++++
src/qemu/qemu_domain_address.c | 2 ++
src/qemu/qemu_process.c | 2 ++
tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 +
12 files changed, 32 insertions(+)
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng
index 7d4b105981..d52eb293a8 100644
--- a/docs/schemas/domaincommon.rng
+++ b/docs/schemas/domaincommon.rng
@@ -3915,6 +3915,8 @@
<value>none</value>
<value>bochs</value>
<value>ramfb</value>
+ <value>rage128p</value>
+ <value>rv100</value>
</choice>
</attribute>
<group>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index c003b5c030..5d8b6a7611 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -811,6 +811,8 @@ VIR_ENUM_IMPL(virDomainVideo,
"none",
"bochs",
"ramfb",
+ "rage128p",
+ "rv100",
);
VIR_ENUM_IMPL(virDomainVideoVGAConf,
@@ -16016,6 +16018,11 @@ virDomainVideoDefaultRAM(const virDomainDef *def,
/* QEMU use 64M as the minimal video memory for qxl device */
return 64 * 1024;
+ case VIR_DOMAIN_VIDEO_TYPE_RAGE128P:
+ case VIR_DOMAIN_VIDEO_TYPE_RV100:
+ /* The real world devices started at 16M */
+ return 16 * 1024;
+
case VIR_DOMAIN_VIDEO_TYPE_DEFAULT:
case VIR_DOMAIN_VIDEO_TYPE_VBOX:
case VIR_DOMAIN_VIDEO_TYPE_PARALLELS:
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 450686dfb5..b12c7ab00d 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -1502,6 +1502,8 @@ typedef enum {
VIR_DOMAIN_VIDEO_TYPE_NONE,
VIR_DOMAIN_VIDEO_TYPE_BOCHS,
VIR_DOMAIN_VIDEO_TYPE_RAMFB,
+ VIR_DOMAIN_VIDEO_TYPE_RAGE128P,
+ VIR_DOMAIN_VIDEO_TYPE_RV100,
VIR_DOMAIN_VIDEO_TYPE_LAST
} virDomainVideoType;
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index 38b901a6c4..0b2bd24619 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -600,6 +600,7 @@ VIR_ENUM_IMPL(virQEMUCaps,
/* 380 */
"usb-host.hostdevice",
+ "ati-vga",
);
@@ -1325,6 +1326,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "tcg-accel", QEMU_CAPS_TCG },
{ "pvscsi", QEMU_CAPS_SCSI_PVSCSI },
{ "spapr-tpm-proxy", QEMU_CAPS_DEVICE_SPAPR_TPM_PROXY },
+ { "ati-vga", QEMU_CAPS_DEVICE_ATI_VGA },
};
@@ -6127,6 +6129,10 @@ virQEMUCapsFillDomainDeviceVideoCaps(virQEMUCapsPtr qemuCaps,
VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_BOCHS);
if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_RAMFB))
VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_RAMFB);
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_ATI_VGA)) {
+ VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_RAGE128P);
+ VIR_DOMAIN_CAPS_ENUM_SET(dev->modelType, VIR_DOMAIN_VIDEO_TYPE_RV100);
+ }
}
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index 107056ba17..e316bd1532 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -580,6 +580,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for syntax-check */
/* 380 */
QEMU_CAPS_USB_HOST_HOSTDEVICE, /* -device usb-host.hostdevice */
+ QEMU_CAPS_DEVICE_ATI_VGA, /* -device ati-vga */
QEMU_CAPS_LAST /* this must always be the last item */
} virQEMUCapsFlags;
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 476cf6972e..b501b8e3e2 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -101,6 +101,8 @@ VIR_ENUM_IMPL(qemuVideo,
"" /* 'none' doesn't make sense here */,
"bochs-display",
"", /* ramfb can't be used with -vga */
+ "rage128p",
+ "rv100",
);
VIR_ENUM_DECL(qemuDeviceVideo);
@@ -120,6 +122,8 @@ VIR_ENUM_IMPL(qemuDeviceVideo,
"" /* 'none' doesn't make sense here */,
"bochs-display",
"ramfb",
+ "ati-vga" /* (rage128p) */,
+ "ati-vga" /* (rv100) */,
);
VIR_ENUM_DECL(qemuDeviceVideoSecondary);
@@ -139,6 +143,8 @@ VIR_ENUM_IMPL(qemuDeviceVideoSecondary,
"" /* 'none' doesn't make sense here */,
"" /* no secondary device for bochs */,
"" /* no secondary device for ramfb */,
+ "" /* no secondary device for ati-vga? (rage128p) */,
+ "" /* no secondary device for ati-vga? (rv100) */,
);
VIR_ENUM_IMPL(qemuSoundCodec,
diff --git a/src/qemu/qemu_domain_address.c b/src/qemu/qemu_domain_address.c
index dd87915a97..d8273af92f 100644
--- a/src/qemu/qemu_domain_address.c
+++ b/src/qemu/qemu_domain_address.c
@@ -964,6 +964,8 @@ qemuDomainDeviceCalculatePCIConnectFlags(virDomainDeviceDefPtr dev,
case VIR_DOMAIN_VIDEO_TYPE_VBOX:
case VIR_DOMAIN_VIDEO_TYPE_QXL:
case VIR_DOMAIN_VIDEO_TYPE_PARALLELS:
+ case VIR_DOMAIN_VIDEO_TYPE_RAGE128P:
+ case VIR_DOMAIN_VIDEO_TYPE_RV100:
return pciFlags;
case VIR_DOMAIN_VIDEO_TYPE_BOCHS:
diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c
index 6b5de29fdb..09aac14430 100644
--- a/src/qemu/qemu_process.c
+++ b/src/qemu/qemu_process.c
@@ -3111,6 +3111,8 @@ qemuProcessUpdateVideoRamSize(virQEMUDriverPtr driver,
case VIR_DOMAIN_VIDEO_TYPE_CIRRUS:
case VIR_DOMAIN_VIDEO_TYPE_XEN:
case VIR_DOMAIN_VIDEO_TYPE_VBOX:
+ case VIR_DOMAIN_VIDEO_TYPE_RAGE128P:
+ case VIR_DOMAIN_VIDEO_TYPE_RV100:
case VIR_DOMAIN_VIDEO_TYPE_LAST:
break;
}
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
index 928af2a01c..30609085e1 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml
@@ -199,6 +199,7 @@
<flag name='migration-param.xbzrle-cache-size'/>
<flag name='numa.hmat'/>
<flag name='blockdev-hostdev-scsi'/>
+ <flag name='ati-vga'/>
<version>5000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>61700241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
index e8668a25a9..254da198b2 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.ppc64.xml
@@ -208,6 +208,7 @@
<flag name='spapr-tpm-proxy'/>
<flag name='numa.hmat'/>
<flag name='blockdev-hostdev-scsi'/>
+ <flag name='ati-vga'/>
<version>5000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>42900241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
index 546b9b0422..ae6e66679b 100644
--- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml
@@ -243,6 +243,7 @@
<flag name='intel-iommu.aw-bits'/>
<flag name='numa.hmat'/>
<flag name='blockdev-hostdev-scsi'/>
+ <flag name='ati-vga'/>
<version>5000000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100241</microcodeVersion>
diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
index 987beb965e..33929735f5 100644
--- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
+++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml
@@ -243,6 +243,7 @@
<flag name='numa.hmat'/>
<flag name='blockdev-hostdev-scsi'/>
<flag name='usb-host.hostdevice'/>
+ <flag name='ati-vga'/>
<version>5001000</version>
<kvmVersion>0</kvmVersion>
<microcodeVersion>43100242</microcodeVersion>
--
2.28.0
4 years, 2 months
[libvirt PATCH 00/14] refactor qemuAgentGetInterfaces
by Ján Tomko
Recently, I have spent some time trying to figure out what this
function does. Let me share that with you before I forget.
Ján Tomko (14):
qemu: agent: remove redundant checks
qemu: agent: split out qemuAgentGetInterfaceOneAddress
qemu: agent: remove impossible errors
qemu: agent: reduce scope of addrs_count
qemu: agent: expand addrs upfront
qemu: agent: use g_auto for ifname
qemu: agent: use virHashNew
qemu: agent: simplify access to ifaces_ret
qemu: agent: split out qemuAgentGetInterfaceAddresses
qemu: agent: use GetArray to remove a check
qemu: agent: use g_auto in qemuAgentGetInterfaces
qemu: agent: remove cleanup in qemuAgentGetInterfaces
qemuAgentGetInterfaceAddresses: turn ifname into char*
qemu: agent: rename tmp_iface to iface_obj
src/qemu/qemu_agent.c | 291 +++++++++++++++++++-----------------------
1 file changed, 134 insertions(+), 157 deletions(-)
--
2.26.2
4 years, 2 months
[libvirt PATCH v3 0/8] Make unknown XML elements fail CPU comparison
by Tim Wiederhake
We currently ignore unknown elements in the CPU XML description, e.g.
with virsh cpu-compare and hypervisor-cpu-compare. This makes
'<cpu><faeture name="..."/></cpu>' (note the typo in "faeture")
semantically identic to '<cpu/>'. No error is reported.
This series adds checks for unrecognized attributes and elements in
the "<cpu>" element, catching this kind of mistake.
V1: https://www.redhat.com/archives/libvir-list/2020-September/msg00933.html
V2: https://www.redhat.com/archives/libvir-list/2020-September/msg01073.html
Changed:
* Added more detailed commit messages
* Added missing man page details
* Split the changes slightly differently in the commits
* CPU tests now always validate XML documents
* Fixed typo "nonexistant" -> "nonexistent"
Tim Wiederhake (8):
schema: Unify apostrophe and quotation mark usage
schema: Move host cpu definition to cputypes.rng
schema: Move guest cpu definition to cputypes.rng
schema: Add schema for guest or host cpu definition
util: Allow validation for single XML node
cpu: Wire in XML validation
virsh: Add "validate" argument to [hypervisor-]cpu-compare
tests: Add tests for unknown elements and attributes in cpu defintion
docs/manpages/virsh.rst | 9 +-
docs/schemas/basictypes.rng | 82 +--
docs/schemas/capability.rng | 466 ++++++---------
docs/schemas/cpu.rng | 12 +
docs/schemas/cputypes.rng | 117 +++-
docs/schemas/domain.rng | 10 +-
docs/schemas/domainbackup.rng | 178 +++---
docs/schemas/domaincaps.rng | 236 ++++----
docs/schemas/domaincheckpoint.rng | 62 +-
docs/schemas/domaincommon.rng | 431 +++++++-------
docs/schemas/domainsnapshot.rng | 104 ++--
docs/schemas/interface.rng | 6 +-
docs/schemas/meson.build | 1 +
docs/schemas/network.rng | 44 +-
docs/schemas/networkcommon.rng | 26 +-
docs/schemas/networkport.rng | 6 +-
docs/schemas/nodedev.rng | 464 +++++++--------
docs/schemas/nwfilter.rng | 32 +-
docs/schemas/nwfilterbinding.rng | 4 +-
docs/schemas/secret.rng | 70 +--
docs/schemas/storagecommon.rng | 110 ++--
docs/schemas/storagepool.rng | 584 +++++++++----------
docs/schemas/storagepoolcaps.rng | 64 +-
docs/schemas/storagevol.rng | 150 ++---
include/libvirt/libvirt-host.h | 2 +
src/bhyve/bhyve_driver.c | 7 +-
src/conf/cpu_conf.c | 25 +-
src/conf/cpu_conf.h | 6 +-
src/conf/domain_conf.c | 3 +-
src/cpu/cpu.c | 5 +-
src/cpu/cpu.h | 3 +-
src/libxl/libxl_driver.c | 7 +-
src/qemu/qemu_domain.c | 5 +-
src/qemu/qemu_driver.c | 18 +-
src/qemu/qemu_migration_cookie.c | 3 +-
src/util/virxml.c | 15 +
src/util/virxml.h | 6 +
tests/cputest.c | 28 +-
tests/cputestdata/x86_64-bogus-attribute.xml | 2 +
tests/cputestdata/x86_64-bogus-element.xml | 3 +
tools/virsh-host.c | 14 +
41 files changed, 1762 insertions(+), 1658 deletions(-)
create mode 100644 docs/schemas/cpu.rng
create mode 100644 tests/cputestdata/x86_64-bogus-attribute.xml
create mode 100644 tests/cputestdata/x86_64-bogus-element.xml
--
2.26.2
4 years, 2 months
[libvirt PATCHv3 0/4] Add support for QEMU's fmode and dmode
by Brian Turek
Apologies for the second submission here. I got a kickback on two of the
emails saying it was "rejected due to security policies."
This third version of the patches fixes a bug where QEMU interpreted the
command line value passed to it as base-10 rather than base-8. This new
version ensures there is always a preceeding 0 in the QEMU args (using
%04o formatting) and explictly sets it in the generated XML.
Brian Turek (4):
qemu: capabilities: add QEMU_CAPS_FSDEV_CREATEMODE
qemu: add support for 'fmode' and 'dmode' options
qemu: add schema 'fmode' and 'dmode' options
qemu: add docs for 'fmode' and 'dmode' options
docs/formatdomain.rst | 12 ++++
docs/schemas/domaincommon.rng | 16 +++++
src/conf/domain_conf.c | 27 ++++++++
src/conf/domain_conf.h | 2 +
src/qemu/qemu_capabilities.c | 2 +
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 6 ++
src/qemu/qemu_validate.c | 18 ++++++
.../caps_2.10.0.aarch64.xml | 1 +
.../caps_2.10.0.ppc64.xml | 1 +
.../caps_2.10.0.s390x.xml | 1 +
.../caps_2.10.0.x86_64.xml | 1 +
.../caps_2.11.0.s390x.xml | 1 +
.../caps_2.11.0.x86_64.xml | 1 +
.../caps_2.12.0.aarch64.xml | 1 +
.../caps_2.12.0.ppc64.xml | 1 +
.../caps_2.12.0.s390x.xml | 1 +
.../caps_2.12.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.ppc64.xml | 1 +
.../caps_3.0.0.riscv32.xml | 1 +
.../caps_3.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_3.0.0.s390x.xml | 1 +
.../caps_3.0.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_3.1.0.ppc64.xml | 1 +
.../caps_3.1.0.x86_64.xml | 1 +
.../caps_4.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.ppc64.xml | 1 +
.../caps_4.0.0.riscv32.xml | 1 +
.../caps_4.0.0.riscv64.xml | 1 +
.../qemucapabilitiesdata/caps_4.0.0.s390x.xml | 1 +
.../caps_4.0.0.x86_64.xml | 1 +
.../caps_4.1.0.x86_64.xml | 1 +
.../caps_4.2.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.ppc64.xml | 1 +
.../qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 +
.../caps_4.2.0.x86_64.xml | 1 +
.../caps_5.0.0.aarch64.xml | 1 +
.../qemucapabilitiesdata/caps_5.0.0.ppc64.xml | 1 +
.../caps_5.0.0.riscv64.xml | 1 +
.../caps_5.0.0.x86_64.xml | 1 +
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
.../virtio-9p-createmode.x86_64-latest.args | 45 ++++++++++++++
.../qemuxml2argvdata/virtio-9p-createmode.xml | 58 ++++++++++++++++++
.../virtio-9p-createmode.x86_64-latest.xml | 61 +++++++++++++++++++
tests/qemuxml2xmltest.c | 1 +
46 files changed, 283 insertions(+)
create mode 100644 tests/qemuxml2argvdata/virtio-9p-createmode.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/virtio-9p-createmode.xml
create mode 100644 tests/qemuxml2xmloutdata/virtio-9p-createmode.x86_64-latest.xml
--
2.25.1
4 years, 2 months
[RFC] bhyve: modeling virtio-9p
by Roman Bogorodskiy
Hi,
Recently bhyve got virtio-9p support. Modeling it appears to be pretty
straight-forward, but probably I'm missing something, so decided to
discuss first before proceeding with the implementation.
On the host side it looks like this:
bhyve .... -s 25:0,virtio-9p,distfiles=/workspace/distfiles
Mounting it in a (Linux) guest looks this way:
mount -t 9p distfiles /mnt/distfiles
lspci(8) shows it like this:
00:1f.0 SCSI storage controller: Red Hat, Inc. Virtio filesystem
Subsystem: Red Hat, Inc. Virtio filesystem
Flags: bus master, fast devsel, latency 64, IRQ 20
I/O ports at 2200 [size=512]
Memory at c2004000 (32-bit, non-prefetchable) [size=8K]
Expansion ROM at c0007000 [virtual] [disabled] [size=2K]
Capabilities: [40] MSI-X: Enable+ Count=2 Masked-
Capabilities: [4c] MSI: Enable- Count=1/1 Maskable- 64bit+
Kernel driver in use: virtio-pci
I was thinking about presenting it like this:
<filesystem type='mount'>
<driver type='virtiofs'/>
<source dir='/workspace/distfiles'>
<target dir='distfiles'/>
</filesystem>
There's also an optional <readonly/> element for readonly mounts, which
is also supported by bhyve.
Does this look reasonable?
Roman Bogorodskiy
4 years, 2 months
[libvirt PATCH] Fix incorrect g_new0 conversions
by Ján Tomko
I left in a 'return' or 'goto cleanup' in a few places that
where I did the conversion manually.
Signed-off-by: Ján Tomko <jtomko(a)redhat.com>
Reported-by: John Ferlan <jferlan(a)redhat.com>
---
src/esx/esx_storage_backend_vmfs.c | 1 -
src/libxl/libxl_capabilities.c | 2 --
src/libxl/libxl_driver.c | 1 -
src/qemu/qemu_hotplug.c | 1 -
src/storage/storage_backend_iscsi_direct.c | 1 -
tools/virt-login-shell-helper.c | 1 -
6 files changed, 7 deletions(-)
diff --git a/src/esx/esx_storage_backend_vmfs.c b/src/esx/esx_storage_backend_vmfs.c
index e397853bf7..c7a7863a61 100644
--- a/src/esx/esx_storage_backend_vmfs.c
+++ b/src/esx/esx_storage_backend_vmfs.c
@@ -1195,7 +1195,6 @@ esxStorageVolCreateXMLFrom(virStoragePoolPtr pool,
if (priv->primary->hasQueryVirtualDiskUuid) {
key = g_new0(char, VIR_UUID_STRING_BUFLEN);
- goto cleanup;
if (esxVI_QueryVirtualDiskUuid(priv->primary, datastorePath,
priv->primary->datacenter->_reference,
diff --git a/src/libxl/libxl_capabilities.c b/src/libxl/libxl_capabilities.c
index 622cba1bfc..2f3ed5bc83 100644
--- a/src/libxl/libxl_capabilities.c
+++ b/src/libxl/libxl_capabilities.c
@@ -284,7 +284,6 @@ libxlCapsInitNuma(libxl_ctx *ctx, virCapsPtr caps)
if (nr_cpus_node[node] == 1) {
cpus[node] = g_new0(virCapsHostNUMACellCPU, 1);
- goto cleanup;
} else {
if (VIR_REALLOC_N(cpus[node], nr_cpus_node[node]) < 0)
goto cleanup;
@@ -323,7 +322,6 @@ libxlCapsInitNuma(libxl_ctx *ctx, virCapsPtr caps)
size_t j;
siblings = g_new0(virCapsHostNUMACellSiblingInfo, nr_siblings);
- goto cleanup;
for (j = 0; j < nr_siblings; j++) {
siblings[j].node = j;
diff --git a/src/libxl/libxl_driver.c b/src/libxl/libxl_driver.c
index 446449fb33..e28c649688 100644
--- a/src/libxl/libxl_driver.c
+++ b/src/libxl/libxl_driver.c
@@ -2762,7 +2762,6 @@ libxlConnectDomainXMLToNative(virConnectPtr conn, const char * nativeFormat,
}
ret = g_new0(char, len);
- goto cleanup;
if (virConfWriteMem(ret, &len, conf) < 0) {
VIR_FREE(ret);
diff --git a/src/qemu/qemu_hotplug.c b/src/qemu/qemu_hotplug.c
index 1aa8b497dd..7a54fcb221 100644
--- a/src/qemu/qemu_hotplug.c
+++ b/src/qemu/qemu_hotplug.c
@@ -1280,7 +1280,6 @@ qemuDomainAttachNetDevice(virQEMUDriverPtr driver,
tapfd = g_new0(int, tapfdSize);
memset(tapfd, -1, sizeof(*tapfd) * tapfdSize);
vhostfd = g_new0(int, vhostfdSize);
- goto cleanup;
memset(vhostfd, -1, sizeof(*vhostfd) * vhostfdSize);
if (qemuInterfaceEthernetConnect(vm->def, driver, net,
tapfd, tapfdSize) < 0)
diff --git a/src/storage/storage_backend_iscsi_direct.c b/src/storage/storage_backend_iscsi_direct.c
index 66ceb48e6a..12b075db0b 100644
--- a/src/storage/storage_backend_iscsi_direct.c
+++ b/src/storage/storage_backend_iscsi_direct.c
@@ -626,7 +626,6 @@ virStorageBackendISCSIDirectVolWipeZero(virStorageVolDefPtr vol,
if (virISCSIDirectGetVolumeCapacity(iscsi, lun, &block_size, &nb_block))
return ret;
data = g_new0(unsigned char, block_size * BLOCK_PER_PACKET);
- return ret;
while (lba < nb_block) {
const uint64_t to_write = MIN(nb_block - lba + 1, BLOCK_PER_PACKET);
diff --git a/tools/virt-login-shell-helper.c b/tools/virt-login-shell-helper.c
index 0e7987bf82..0522896eee 100644
--- a/tools/virt-login-shell-helper.c
+++ b/tools/virt-login-shell-helper.c
@@ -100,7 +100,6 @@ static int virLoginShellGetShellArgv(virConfPtr conf,
if (rv == 0) {
*shargv = g_new0(char *, 2);
- return -1;
(*shargv)[0] = g_strdup("/bin/sh");
*shargvlen = 1;
} else {
--
2.26.2
4 years, 2 months
[libvirt PATCH 0/9] qemu: use g_new0 (glib chronicles)
by Ján Tomko
With the exception of qemu_migrate_cookie and qemu_slirp which
should be dealt with by Peter's series.
Ján Tomko (9):
qemu: separate out VIR_ALLOC calls
qemu: capabilities: use g_new0
qemu: domain: use g_new0
qemu: driver: use g_new0
qemu: monitor: json: use g_new0
qemu: process: use g_new0
qemu: command: use g_new0
qemu: firmware: use g_new0
qemu: use g_new0
src/qemu/qemu_agent.c | 6 +-
src/qemu/qemu_block.c | 15 ++---
src/qemu/qemu_capabilities.c | 48 +++++---------
src/qemu/qemu_cgroup.c | 6 +-
src/qemu/qemu_command.c | 35 ++++-------
src/qemu/qemu_conf.c | 20 +++---
src/qemu/qemu_domain.c | 55 ++++++----------
src/qemu/qemu_domain_address.c | 3 +-
src/qemu/qemu_driver.c | 62 +++++++-----------
src/qemu/qemu_firmware.c | 34 ++++------
src/qemu/qemu_hotplug.c | 29 ++++-----
src/qemu/qemu_migration.c | 6 +-
src/qemu/qemu_monitor.c | 13 +---
src/qemu/qemu_monitor_json.c | 112 +++++++++++----------------------
src/qemu/qemu_namespace.c | 3 +-
src/qemu/qemu_process.c | 75 +++++++++-------------
src/qemu/qemu_saveimage.c | 3 +-
src/qemu/qemu_vhost_user.c | 17 +++--
18 files changed, 190 insertions(+), 352 deletions(-)
--
2.26.2
4 years, 2 months
[libvirt PATCH] examples: fix storage volume size schema
by Daniel P. Berrangé
There is no such <storage> element, <capacity> and <allocation> exist at
the top level.
Signed-off-by: Daniel P. Berrangé <berrange(a)redhat.com>
---
examples/xml/storage/vol-cow.xml | 6 ++----
examples/xml/storage/vol-qcow.xml | 6 ++----
examples/xml/storage/vol-qcow2.xml | 6 ++----
examples/xml/storage/vol-raw.xml | 6 ++----
examples/xml/storage/vol-sparse.xml | 6 ++----
examples/xml/storage/vol-vmdk.xml | 6 ++----
6 files changed, 12 insertions(+), 24 deletions(-)
diff --git a/examples/xml/storage/vol-cow.xml b/examples/xml/storage/vol-cow.xml
index 1d80a01f4b..f2bf1b4950 100644
--- a/examples/xml/storage/vol-cow.xml
+++ b/examples/xml/storage/vol-cow.xml
@@ -1,9 +1,7 @@
<volume type="file">
<name>cow.img</name>
- <storage>
- <allocation>0</allocation>
- <capacity unit="T">1</capacity>
- </storage>
+ <allocation>0</allocation>
+ <capacity unit="T">1</capacity>
<target>
<format type="cow"/>
</target>
diff --git a/examples/xml/storage/vol-qcow.xml b/examples/xml/storage/vol-qcow.xml
index af2011d66a..6c30329f39 100644
--- a/examples/xml/storage/vol-qcow.xml
+++ b/examples/xml/storage/vol-qcow.xml
@@ -1,9 +1,7 @@
<volume type="file">
<name>qcow.img</name>
- <storage>
- <allocation>0</allocation>
- <capacity unit="T">1</capacity>
- </storage>
+ <allocation>0</allocation>
+ <capacity unit="T">1</capacity>
<target>
<format type="qcow"/>
</target>
diff --git a/examples/xml/storage/vol-qcow2.xml b/examples/xml/storage/vol-qcow2.xml
index 9d944a78d7..14639da796 100644
--- a/examples/xml/storage/vol-qcow2.xml
+++ b/examples/xml/storage/vol-qcow2.xml
@@ -1,9 +1,7 @@
<volume type="file">
<name>qcow2.img</name>
- <storage>
- <allocation>0</allocation>
- <capacity unit="T">1</capacity>
- </storage>
+ <allocation>0</allocation>
+ <capacity unit="T">1</capacity>
<target>
<format type="qcow2"/>
</target>
diff --git a/examples/xml/storage/vol-raw.xml b/examples/xml/storage/vol-raw.xml
index 59d4b457b1..bc4e049a35 100644
--- a/examples/xml/storage/vol-raw.xml
+++ b/examples/xml/storage/vol-raw.xml
@@ -1,7 +1,5 @@
<volume type="file">
<name>raw.img</name>
- <storage>
- <allocation unit="M">10</allocation>
- <capacity unit="M">1000</capacity>
- </storage>
+ <allocation unit="M">10</allocation>
+ <capacity unit="M">1000</capacity>
</volume>
diff --git a/examples/xml/storage/vol-sparse.xml b/examples/xml/storage/vol-sparse.xml
index c529a490d9..2ec9f0b748 100644
--- a/examples/xml/storage/vol-sparse.xml
+++ b/examples/xml/storage/vol-sparse.xml
@@ -1,7 +1,5 @@
<volume type="file">
<name>sparse.img</name>
- <storage>
- <allocation>0</allocation>
- <capacity unit="T">1</capacity>
- </storage>
+ <allocation>0</allocation>
+ <capacity unit="T">1</capacity>
</volume>
diff --git a/examples/xml/storage/vol-vmdk.xml b/examples/xml/storage/vol-vmdk.xml
index 5af0a8499f..05309a1438 100644
--- a/examples/xml/storage/vol-vmdk.xml
+++ b/examples/xml/storage/vol-vmdk.xml
@@ -1,9 +1,7 @@
<volume type="file">
<name>vmdk3.img</name>
- <storage>
- <allocation>0</allocation>
- <capacity unit="T">1</capacity>
- </storage>
+ <allocation>0</allocation>
+ <capacity unit="T">1</capacity>
<target>
<format type="vmdk"/>
</target>
--
2.26.2
4 years, 2 months
[PATCH] mailmap: consolidate my email addresses
by Matt Coleman
Signed-off-by: Matt Coleman <matt(a)datto.com>
---
.mailmap | 1 +
1 file changed, 1 insertion(+)
diff --git a/.mailmap b/.mailmap
index 2b080568bc..9dfb7a832b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -47,6 +47,7 @@
<fidencio(a)redhat.com> <fabiano(a)fidencio.org>
<shi_lei(a)massclouds.com> <shilei.massclouds(a)gmx.com>
<adrian.brzezinski(a)eo.pl> <redhat(a)adrb.pl>
+<matt(a)datto.com> <mcoleman(a)datto.com>
# Name consolidation:
# Preferred author spelling <preferred email>
--
2.27.0
4 years, 2 months