[PATCH 0/3] free-page-reporting cleanups
by Michal Privoznik
In the end, I decided to not change the attribute name to avoid
confusion (QEMU uses the name for the feature), but if you want me to we
still can do it.
Michal Prívozník (3):
tests: Turn virtio-options-memballoon-freepage-reporting.xml into a
symlink
lib: s/free-page-reporting/free_page_reporting/
docs: Clarify free_page_reporting attribute
docs/formatdomain.rst | 8 ++++---
docs/schemas/domaincommon.rng | 2 +-
src/conf/domain_conf.c | 8 +++----
src/qemu/qemu_validate.c | 2 +-
...-options-memballoon-freepage-reporting.err | 2 +-
...-options-memballoon-freepage-reporting.xml | 2 +-
...-options-memballoon-freepage-reporting.xml | 23 +------------------
7 files changed, 14 insertions(+), 33 deletions(-)
mode change 100644 => 120000 tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml
--
2.26.2
4 years, 1 month
[[RESEND] 0/8] migration/dirtyrate: Introduce APIs for getting domain memory dirty rate
by Hao Wang
Sometimes domain's memory dirty rate is expected by user in order to
decide whether it's proper to be migrated out or not.
We have already completed the QEMU part of the capability:
https://patchew.org/QEMU/1600237327-33618-1-git-send-email-zhengchuan@hua...
And this serial of patches introduce the corresponding LIBVIRT part --
DomainGetDirtyRateInfo API and corresponding virsh api -- "getdirtyrate".
instructions:
bash# virsh getdirtyrate --help
NAME
getdirtyrate - Get a vm's memory dirty rate
SYNOPSIS
getdirtyrate <domain> [--seconds <number>] [--calculate] [--query]
DESCRIPTION
Get memory dirty rate of a domain in order to decide whether it's proper to be migrated out or not.
OPTIONS
[--domain] <string> domain name, id or uuid
--seconds <number> calculate memory dirty rate within specified seconds, a valid range of values is [1, 60], and would default to 1s.
--calculate calculate dirty rate only, can be used together with --query, either or both is expected, otherwise would default to both.
--query query dirty rate only, can be used together with --calculate, either or both is expected, otherwise would default to both.
example:
bash# virsh getdirtyrate --calculate --query --domain vm0 --seconds 1
status: measured
startTime: 820148
calcTime: 1 s
dirtyRate: 6 MB/s
Hao Wang (8):
migration/dirtyrate: Introduce virDomainDirtyRateInfo structure
migration/dirtyrate: Implement qemuMonitorJSONExtractDirtyRateInfo
migration/dirtyrate: Introduce dirty_rate async job
migration/dirtyrate: Implement qemuDomainQueryDirtyRate
migration/dirtyrate: Implement qemuDomainCalculateDirtyRate
migration/dirtyrate: Introduce virDomainDirtyRateFlags
migration/dirtyrate: Introduce DomainGetDirtyRateInfo API
migration/dirtyrate: Introduce getdirtyrate virsh api
include/libvirt/libvirt-domain.h | 65 ++++++++++++++++++
src/driver-hypervisor.h | 7 ++
src/libvirt-domain.c | 46 +++++++++++++
src/libvirt_public.syms | 5 ++
src/qemu/qemu_domainjob.c | 3 +
src/qemu/qemu_domainjob.h | 1 +
src/qemu/qemu_driver.c | 76 +++++++++++++++++++++
src/qemu/qemu_migration.c | 63 +++++++++++++++++
src/qemu/qemu_migration.h | 10 +++
src/qemu/qemu_monitor.c | 24 +++++++
src/qemu/qemu_monitor.h | 8 +++
src/qemu/qemu_monitor_json.c | 97 ++++++++++++++++++++++++++
src/qemu/qemu_monitor_json.h | 8 +++
src/qemu/qemu_process.c | 3 +
src/remote/remote_driver.c | 1 +
src/remote/remote_protocol.x | 21 +++++-
tools/virsh-domain.c | 113 +++++++++++++++++++++++++++++++
17 files changed, 550 insertions(+), 1 deletion(-)
--
2.23.0
4 years, 1 month
Why guest physical addresses are not the same as the corresponding host virtual addresses in QEMU/KVM? Thanks!
by harry harry
Hi QEMU/KVM developers,
I am sorry if my email disturbs you. I did an experiment and found the
guest physical addresses (GPAs) are not the same as the corresponding
host virtual addresses (HVAs). I am curious about why; I think they
should be the same. I am very appreciated if you can give some
comments and suggestions about 1) why GPAs and HVAs are not the same
in the following experiment; 2) are there any better experiments to
look into the reasons? Any other comments/suggestions are also very
welcome. Thanks!
The experiment is like this: in a single vCPU VM, I ran a program
allocating and referencing lots of pages (e.g., 100*1024) and didn't
let the program terminate. Then, I checked the program's guest virtual
addresses (GVAs) and GPAs through parsing its pagemap and maps files
located at /proc/pid/pagemap and /proc/pid/maps, respectively. At
last, in the host OS, I checked the vCPU's pagemap and maps files to
find the program's HVAs and host physical addresses (HPAs); I actually
checked the new allocated physical pages in the host OS after the
program was executed in the guest OS.
With the above experiment, I found GPAs of the program are different
from its corresponding HVAs. BTW, Intel EPT and other related Intel
virtualization techniques were enabled.
Thanks,
Harry
4 years, 1 month
[PATCH 0/2] hyperv: bump minimum openwsman version to 2.6.3
by Matt Coleman
As Daniel mentioned in the thread for my commit "hyperv: make
Msvm_ComputerSystem WQL queries locale agnostic", we can increase the
minimum openwsman version since all the supported distributions have at
least version 2.6.3.
Comments about older versions have been removed throughout the codebase.
Also, openwsman.h has been removed entirely, since its original purpose
was to work around bugs in earlier (now unsupported) openwsman versions.
Matt Coleman (2):
hyperv: bump minimum openwsman version to 2.6.3
hyperv: remove openwsman.h
libvirt.spec.in | 2 +-
meson.build | 2 +-
src/hyperv/hyperv_driver.c | 5 +---
src/hyperv/hyperv_private.h | 3 ++-
src/hyperv/hyperv_wmi.c | 12 +++------
src/hyperv/hyperv_wmi.h | 1 -
src/hyperv/hyperv_wmi_classes.h | 3 ++-
src/hyperv/openwsman.h | 47 ---------------------------------
8 files changed, 10 insertions(+), 65 deletions(-)
delete mode 100644 src/hyperv/openwsman.h
--
2.27.0
4 years, 1 month
[libvirt PATCH 0/3] Make SEV 'cbitpos' and 'reducedPhysBits' attributes optional
by Erik Skultety
We designed them as mandatory, but these are platform dependent and can be
filled from QEMU capabilities.
Resolves: https://gitlab.com/libvirt/libvirt/-/issues/57
Erik Skultety (3):
qemu_process: sev: Drop an unused variable
qemu: process: sev: Fill missing 'cbitpos' & 'reducedPhysBits' from
caps
conf: domain: sev: Make 'cbitpos' & 'reducedPhysBits' attrs optional
docs/schemas/domaincommon.rng | 16 ++++---
src/conf/domain_conf.c | 46 ++++++++++++-------
src/conf/domain_conf.h | 2 +
src/qemu/qemu_process.c | 43 ++++++++++++++++-
...v-missing-platform-info.x86_64-2.12.0.args | 37 +++++++++++++++
...nch-security-sev-missing-platform-info.xml | 35 ++++++++++++++
tests/qemuxml2argvtest.c | 1 +
7 files changed, 156 insertions(+), 24 deletions(-)
create mode 100644 tests/qemuxml2argvdata/launch-security-sev-missing-platfo=
rm-info.x86_64-2.12.0.args
create mode 100644 tests/qemuxml2argvdata/launch-security-sev-missing-platfo=
rm-info.xml
--=20
2.26.2
4 years, 1 month
[PATCH v2 0/4] qemu: Add support for free-page-reporting
by Nico Pache
gitlab issue: https://gitlab.com/libvirt/libvirt/-/issues/79
The virtio-balloon device now has the ability to report free pages
back to the hypervisor for reuse by other programs.
This kernel feature allows for more stable and resource friendly systems.
This feature is available in QEMU and is enabled with free-page-reporting=on
default virt setting should be off but the user should be able to enable it.
Nico Pache (4):
Document and parser support for the Virtio free page reporting
feature.
QEMU: declare qemu capabilities for the Virtio Free page reporting
feature
QEMU: introduce Virtio free page reporting feature
provide testing for free-page-reporting feature in QEMU
docs/formatdomain.rst | 6 ++++
docs/schemas/domaincommon.rng | 5 +++
src/conf/domain_conf.c | 21 +++++++++++
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 2 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 5 +++
src/qemu/qemu_validate.c | 7 ++++
.../caps_5.1.0.x86_64.xml | 1 +
.../caps_5.2.0.x86_64.xml | 1 +
...-options-memballoon-freepage-reporting.err | 1 +
...loon-freepage-reporting.x86_64-latest.args | 36 +++++++++++++++++++
...-options-memballoon-freepage-reporting.xml | 22 ++++++++++++
tests/qemuxml2argvtest.c | 2 ++
...-options-memballoon-freepage-reporting.xml | 22 ++++++++++++
15 files changed, 133 insertions(+)
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.err
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.x86_64-latest.args
create mode 100644 tests/qemuxml2argvdata/virtio-options-memballoon-freepage-reporting.xml
create mode 100644 tests/qemuxml2xmloutdata/virtio-options-memballoon-freepage-reporting.xml
--
2.18.4
4 years, 1 month
[PATCH] bhyve: implement virtio-9p support
by Roman Bogorodskiy
Recently virtio-9p support was added to bhyve.
On the host side it looks this way:
bhyve .... -s 25:0,virtio-9p,sharename=/path/to/shared/dir
It could also have ",ro" suffix to make share read-only.
In the Linux guest, this share is mounted with:
mount -t 9p sharename /mnt/sharename
In the guest user will see the same permissions and ownership
information for this directory as on the host. No uid/gid remapping is
supported, so those could resolve to wrong user or group names.
The same applies to the other side: chowning/chmodding in the guest will
set specified ownership and permissions on the host.
In libvirt domain XML it's modeled using the 'filesystem' element:
<filesystem type='mount'>
<source dir='/path/to/shared/dir'/>
<target dir='sharename'/>
</filesystem>
Optional 'readonly' sub-element enables read-only mode.
Signed-off-by: Roman Bogorodskiy <bogorodskiy(a)gmail.com>
---
src/bhyve/bhyve_capabilities.c | 14 ++++
src/bhyve/bhyve_capabilities.h | 1 +
src/bhyve/bhyve_command.c | 72 +++++++++++++++++++
src/bhyve/bhyve_device.c | 10 +++
src/libvirt_private.syms | 1 +
.../bhyvexml2argv-fs-9p-readonly.args | 10 +++
.../bhyvexml2argv-fs-9p-readonly.ldargs | 3 +
.../bhyvexml2argv-fs-9p-readonly.xml | 28 ++++++++
...exml2argv-fs-9p-unsupported-accessmode.xml | 27 +++++++
...bhyvexml2argv-fs-9p-unsupported-driver.xml | 28 ++++++++
.../bhyvexml2argv-fs-9p.args | 10 +++
.../bhyvexml2argv-fs-9p.ldargs | 3 +
.../bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml | 27 +++++++
tests/bhyvexml2argvtest.c | 9 ++-
.../bhyvexml2xmlout-fs-9p.xml | 38 ++++++++++
tests/bhyvexml2xmltest.c | 1 +
16 files changed, 281 insertions(+), 1 deletion(-)
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-accessmode.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver.xml
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs
create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml
create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml
diff --git a/src/bhyve/bhyve_capabilities.c b/src/bhyve/bhyve_capabilities.c
index 96cfe8357a..8a9acf52b0 100644
--- a/src/bhyve/bhyve_capabilities.c
+++ b/src/bhyve/bhyve_capabilities.c
@@ -344,6 +344,17 @@ bhyveProbeCapsVNCPassword(unsigned int *caps, char *binary)
}
+static int
+bhyveProbeCapsVirtio9p(unsigned int *caps, char *binary)
+{
+ return bhyveProbeCapsDeviceHelper(caps, binary,
+ "-s",
+ "0,virtio-9p",
+ "pci slot 0:0: unknown device \"hda\"",
+ BHYVE_CAP_VIRTIO_9P);
+}
+
+
int
virBhyveProbeCaps(unsigned int *caps)
{
@@ -378,6 +389,9 @@ virBhyveProbeCaps(unsigned int *caps)
if ((ret = bhyveProbeCapsVNCPassword(caps, binary)))
goto out;
+ if ((ret = bhyveProbeCapsVirtio9p(caps, binary)))
+ goto out;
+
out:
VIR_FREE(binary);
return ret;
diff --git a/src/bhyve/bhyve_capabilities.h b/src/bhyve/bhyve_capabilities.h
index b2a16b0189..1b25c000b5 100644
--- a/src/bhyve/bhyve_capabilities.h
+++ b/src/bhyve/bhyve_capabilities.h
@@ -51,6 +51,7 @@ typedef enum {
BHYVE_CAP_CPUTOPOLOGY = 1 << 6,
BHYVE_CAP_SOUND_HDA = 1 << 7,
BHYVE_CAP_VNC_PASSWORD = 1 << 8,
+ BHYVE_CAP_VIRTIO_9P = 1 << 9,
} virBhyveCapsFlags;
int virBhyveProbeGrubCaps(virBhyveGrubCapsFlags *caps);
diff --git a/src/bhyve/bhyve_command.c b/src/bhyve/bhyve_command.c
index 7526f10fb1..7606840f45 100644
--- a/src/bhyve/bhyve_command.c
+++ b/src/bhyve/bhyve_command.c
@@ -547,6 +547,73 @@ bhyveBuildSoundArgStr(const virDomainDef *def G_GNUC_UNUSED,
return 0;
}
+static int
+bhyveBuildFSArgStr(const virDomainDef *def G_GNUC_UNUSED,
+ virDomainFSDefPtr fs,
+ virCommandPtr cmd)
+{
+ g_auto(virBuffer) params = VIR_BUFFER_INITIALIZER;
+
+ switch ((virDomainFSType) fs->type) {
+ case VIR_DOMAIN_FS_TYPE_MOUNT:
+ break;
+ case VIR_DOMAIN_FS_TYPE_BLOCK:
+ case VIR_DOMAIN_FS_TYPE_FILE:
+ case VIR_DOMAIN_FS_TYPE_TEMPLATE:
+ case VIR_DOMAIN_FS_TYPE_RAM:
+ case VIR_DOMAIN_FS_TYPE_BIND:
+ case VIR_DOMAIN_FS_TYPE_VOLUME:
+ case VIR_DOMAIN_FS_TYPE_LAST:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unsupported filesystem type '%s'"),
+ virDomainFSTypeToString(fs->type));
+ return -1;
+ }
+
+ switch (fs->fsdriver) {
+ case VIR_DOMAIN_FS_DRIVER_TYPE_DEFAULT:
+ /* The only supported driver by bhyve currently */
+ break;
+ case VIR_DOMAIN_FS_DRIVER_TYPE_VIRTIOFS:
+ case VIR_DOMAIN_FS_DRIVER_TYPE_PATH:
+ case VIR_DOMAIN_FS_DRIVER_TYPE_HANDLE:
+ case VIR_DOMAIN_FS_DRIVER_TYPE_LOOP:
+ case VIR_DOMAIN_FS_DRIVER_TYPE_NBD:
+ case VIR_DOMAIN_FS_DRIVER_TYPE_PLOOP:
+ case VIR_DOMAIN_FS_DRIVER_TYPE_LAST:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unsupported filesystem driver '%s'"),
+ virDomainFSDriverTypeToString(fs->fsdriver));
+ return -1;
+ }
+
+ switch (fs->accessmode) {
+ case VIR_DOMAIN_FS_ACCESSMODE_PASSTHROUGH:
+ /* This is the only supported mode for now, does not need specific configuration */
+ break;
+ case VIR_DOMAIN_FS_ACCESSMODE_MAPPED:
+ case VIR_DOMAIN_FS_ACCESSMODE_SQUASH:
+ case VIR_DOMAIN_FS_ACCESSMODE_LAST:
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED,
+ _("unsupported filesystem accessmode '%s'"),
+ virDomainFSAccessModeTypeToString(fs->accessmode));
+ return -1;
+ }
+
+ if (fs->readonly)
+ virBufferAddLit(¶ms, ",ro");
+
+ virCommandAddArg(cmd, "-s");
+ virCommandAddArgFormat(cmd, "%d:%d,virtio-9p,%s=%s%s",
+ fs->info.addr.pci.slot,
+ fs->info.addr.pci.function,
+ fs->src->path,
+ fs->dst,
+ virBufferCurrentContent(¶ms));
+
+ return 0;
+}
+
virCommandPtr
virBhyveProcessBuildBhyveCmd(bhyveConnPtr driver, virDomainDefPtr def,
bool dryRun)
@@ -699,6 +766,11 @@ virBhyveProcessBuildBhyveCmd(bhyveConnPtr driver, virDomainDefPtr def,
goto error;
}
+ for (i = 0; i < def->nfss; i++) {
+ if (bhyveBuildFSArgStr(def, def->fss[i], cmd) < 0)
+ goto error;
+ }
+
if (bhyveBuildConsoleArgStr(def, cmd) < 0)
goto error;
diff --git a/src/bhyve/bhyve_device.c b/src/bhyve/bhyve_device.c
index e2e1efd97e..f8c7522d26 100644
--- a/src/bhyve/bhyve_device.c
+++ b/src/bhyve/bhyve_device.c
@@ -175,6 +175,16 @@ bhyveAssignDevicePCISlots(virDomainDefPtr def,
return -1;
}
+ for (i = 0; i < def->nfss; i++) {
+ if (!virDeviceInfoPCIAddressIsWanted(&def->fss[i]->info))
+ continue;
+ if (virDomainPCIAddressReserveNextAddr(addrs,
+ &def->fss[i]->info,
+ VIR_PCI_CONNECT_TYPE_PCI_DEVICE,
+ -1) < 0)
+ return -1;
+ }
+
return 0;
}
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 7cf8bea962..ae82172b90 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -402,6 +402,7 @@ virDomainDiskSourceFormat;
virDomainDiskTranslateSourcePool;
virDomainFeatureTypeFromString;
virDomainFeatureTypeToString;
+virDomainFSAccessModeTypeToString;
virDomainFSCacheModeTypeToString;
virDomainFSDefFree;
virDomainFSDefNew;
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args
new file mode 100644
index 0000000000..193895574d
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \
+-s 4:0,virtio-9p,/shared/dir=shared_dir,ro bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs
new file mode 100644
index 0000000000..32538b558e
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.ldargs
@@ -0,0 +1,3 @@
+/usr/sbin/bhyveload \
+-m 214 \
+-d /tmp/freebsd.img bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml
new file mode 100644
index 0000000000..6341236654
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-readonly.xml
@@ -0,0 +1,28 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='52:54:00:b9:94:02'/>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <filesystem>
+ <source dir='/shared/dir'/>
+ <target dir='shared_dir'/>
+ <readonly/>
+ </filesystem>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-accessmode.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-accessmode.xml
new file mode 100644
index 0000000000..f7d8ce5712
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-accessmode.xml
@@ -0,0 +1,27 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='52:54:00:b9:94:02'/>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <filesystem accessmode='mapped'>
+ <source dir='/shared/dir'/>
+ <target dir='shared_dir'/>
+ </filesystem>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver.xml
new file mode 100644
index 0000000000..3072e6a687
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p-unsupported-driver.xml
@@ -0,0 +1,28 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='52:54:00:b9:94:02'/>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <filesystem>
+ <driver type='loop'/>
+ <source dir='/shared/dir'/>
+ <target dir='shared_dir'/>
+ </filesystem>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args
new file mode 100644
index 0000000000..0d27954432
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.args
@@ -0,0 +1,10 @@
+/usr/sbin/bhyve \
+-c 1 \
+-m 214 \
+-u \
+-H \
+-P \
+-s 0:0,hostbridge \
+-s 2:0,ahci,hd:/tmp/freebsd.img \
+-s 3:0,virtio-net,faketapdev,mac=52:54:00:b9:94:02 \
+-s 4:0,virtio-9p,/shared/dir=shared_dir bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs
new file mode 100644
index 0000000000..32538b558e
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.ldargs
@@ -0,0 +1,3 @@
+/usr/sbin/bhyveload \
+-m 214 \
+-d /tmp/freebsd.img bhyve
diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml
new file mode 100644
index 0000000000..22b8edc69f
--- /dev/null
+++ b/tests/bhyvexml2argvdata/bhyvexml2argv-fs-9p.xml
@@ -0,0 +1,27 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory>219136</memory>
+ <vcpu>1</vcpu>
+ <os>
+ <type>hvm</type>
+ </os>
+ <devices>
+ <disk type='file'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <interface type='bridge'>
+ <mac address='52:54:00:b9:94:02'/>
+ <model type='virtio'/>
+ <source bridge="virbr0"/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ <filesystem>
+ <source dir='/shared/dir'/>
+ <target dir='shared_dir'/>
+ </filesystem>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c
index def2acc15c..be816e554f 100644
--- a/tests/bhyvexml2argvtest.c
+++ b/tests/bhyvexml2argvtest.c
@@ -167,7 +167,7 @@ mymain(void)
BHYVE_CAP_NET_E1000 | BHYVE_CAP_LPC_BOOTROM | \
BHYVE_CAP_FBUF | BHYVE_CAP_XHCI | \
BHYVE_CAP_CPUTOPOLOGY | BHYVE_CAP_SOUND_HDA | \
- BHYVE_CAP_VNC_PASSWORD;
+ BHYVE_CAP_VNC_PASSWORD | BHYVE_CAP_VIRTIO_9P;
DO_TEST("base");
DO_TEST("wired");
@@ -208,6 +208,13 @@ mymain(void)
DO_TEST("sound");
DO_TEST("isa-controller");
DO_TEST_FAILURE("isa-multiple-controllers");
+ DO_TEST("fs-9p");
+ DO_TEST("fs-9p-readonly");
+ DO_TEST_FAILURE("fs-9p-unsupported-type");
+ DO_TEST_FAILURE("fs-9p-unsupported-driver");
+ DO_TEST_FAILURE("fs-9p-unsupported-accessmode");
+ driver.bhyvecaps &= ~BHYVE_CAP_VIRTIO_9P;
+ DO_TEST_FAILURE("fs-9p");
/* Address allocation tests */
DO_TEST("addr-single-sata-disk");
diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml
new file mode 100644
index 0000000000..db3faf29ef
--- /dev/null
+++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-fs-9p.xml
@@ -0,0 +1,38 @@
+<domain type='bhyve'>
+ <name>bhyve</name>
+ <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>1</vcpu>
+ <os>
+ <type arch='x86_64'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'/>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <disk type='file' device='disk'>
+ <driver name='file' type='raw'/>
+ <source file='/tmp/freebsd.img'/>
+ <target dev='hda' bus='sata'/>
+ <address type='drive' controller='0' bus='0' target='2' unit='0'/>
+ </disk>
+ <controller type='pci' index='0' model='pci-root'/>
+ <controller type='sata' index='0'>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
+ </controller>
+ <filesystem type='mount' accessmode='passthrough'>
+ <source dir='/shared/dir'/>
+ <target dir='shared_dir'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
+ </filesystem>
+ <interface type='bridge'>
+ <mac address='52:54:00:b9:94:02'/>
+ <source bridge='virbr0'/>
+ <model type='virtio'/>
+ <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
+ </interface>
+ </devices>
+</domain>
diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c
index 8808d5a8fa..eb9b108704 100644
--- a/tests/bhyvexml2xmltest.c
+++ b/tests/bhyvexml2xmltest.c
@@ -112,6 +112,7 @@ mymain(void)
DO_TEST_DIFFERENT("msrs");
DO_TEST_DIFFERENT("sound");
DO_TEST_DIFFERENT("isa-controller");
+ DO_TEST_DIFFERENT("fs-9p");
/* Address allocation tests */
DO_TEST_DIFFERENT("addr-single-sata-disk");
--
2.28.0
4 years, 1 month
[PATCH v2 0/9] docs: Fix migration.html generation and report such errors next time
by Peter Krempa
This version refactors the XSLT transformation command a bit more
carefully and thoroughly. A semantic difference in v2 is that the output
HTMLs are no longer reformatted.
Don't apply/revert first patch to see the build failure:
[59/144] Generating migration.html with a meson_exe.py custom command
FAILED: docs/migration.html
/usr/bin/meson --internal exe --capture docs/migration.html -- /bin/xsltproc --stringparam pagesrc docs/migration.html.in --stringparam builddir /home/pipo/build/libvirt/gcc --stringparam timestamp 'Tue Oct 13 16:16:15 2020 UTC' --nonet ../../../libvirt/docs/site.xsl ../../../libvirt/docs/migration.html.in
../../../libvirt/docs/migration.html.in:664: parser error : Opening and ending tag mismatch: p line 649 and body
</body>
^
../../../libvirt/docs/migration.html.in:665: parser error : Opening and ending tag mismatch: body line 649 and html
</html>
^
../../../libvirt/docs/migration.html.in:666: parser error : EndTag: '</' not found
^
unable to parse ../../../libvirt/docs/migration.html.in
[84/144] Generating hacking.html with a meson_exe.py custom command
ninja: build stopped: subcommand failed.
Peter Krempa (9):
docs: migration: Fix syntax
scripts/meson-html-gen.py: Don't rereformat output files
docs: meson.build: Limit html files depending on 'aclperms.htmlinc'
docs: meson.build: Generate HTML files directly by meson
docs: meson.build: Prepare for use of identical code for XSLT
processing of htmls
docs/internals/meson.build: Use template code for XSLT processing
docs/kbase/meson.build: Use template code for XSLT processing
docs/manpages/meson.build: Use template code for XSLT processing
scripts: meson-html-gen: Remove
docs/internals/meson.build | 55 ++++++++++++++++----------
docs/kbase/meson.build | 56 ++++++++++++++++----------
docs/manpages/meson.build | 55 +++++++++++++++++---------
docs/meson.build | 80 +++++++++++++++++++++++---------------
docs/migration.html.in | 1 +
scripts/meson-html-gen.py | 37 ------------------
scripts/meson.build | 1 -
7 files changed, 157 insertions(+), 128 deletions(-)
delete mode 100755 scripts/meson-html-gen.py
--
2.26.2
4 years, 1 month
[PATCH v2 0/4] support memory failure
by zhenwei pi
v1->v2:
Seperate a 'all in one' patch into 4 patches.
Use a 'flags' with bit definition instead of 'action_required'
& 'recursive' for extention.
Queue event directly without internal job.
Add full test method in commit.
v1:
Since QEMU 5.2 (commit-77b285f7f6), QEMU supports 'memory failure'
event, posts event to monitor if hitting a hardware memory error.
zhenwei pi (4):
API: introduce memory failure
qemu: process: implement domainMemoryFailure
qemu: monitor: handle memory failure event
virsh: implement memory failure event
examples/c/misc/event-test.c | 16 ++++++++
include/libvirt/libvirt-domain.h | 82 +++++++++++++++++++++++++++++++++++++
src/conf/domain_event.c | 80 ++++++++++++++++++++++++++++++++++++
src/conf/domain_event.h | 12 ++++++
src/libvirt_private.syms | 2 +
src/qemu/qemu_monitor.c | 21 +++++++++-
src/qemu/qemu_monitor.h | 39 ++++++++++++++++++
src/qemu/qemu_monitor_json.c | 49 ++++++++++++++++++++++
src/qemu/qemu_process.c | 59 ++++++++++++++++++++++++++
src/remote/remote_daemon_dispatch.c | 32 +++++++++++++++
src/remote/remote_driver.c | 32 +++++++++++++++
src/remote/remote_protocol.x | 16 +++++++-
src/remote_protocol-structs | 8 ++++
tools/virsh-domain.c | 40 ++++++++++++++++++
14 files changed, 486 insertions(+), 2 deletions(-)
--
2.11.0
4 years, 1 month
[libvirt][PATCH v1 0/1] introduce an attribute "migratable" to numatune memory element
by Luyao Zhong
RFC discussion record link:
https://www.redhat.com/archives/libvir-list/2020-August/msg00960.html
Luyao Zhong (1):
introduce an attribute "migratable" to numatune memory element
docs/formatdomain.rst | 8 +++-
docs/schemas/domaincommon.rng | 5 +++
src/conf/numa_conf.c | 45 +++++++++++++++++++
src/conf/numa_conf.h | 3 ++
src/libvirt_private.syms | 1 +
src/qemu/qemu_command.c | 6 ++-
src/qemu/qemu_process.c | 21 +++++++++
.../numatune-memory-migratable.args | 34 ++++++++++++++
.../numatune-memory-migratable.err | 1 +
.../numatune-memory-migratable.xml | 33 ++++++++++++++
tests/qemuxml2argvtest.c | 5 +++
11 files changed, 160 insertions(+), 2 deletions(-)
create mode 100644 tests/qemuxml2argvdata/numatune-memory-migratable.args
create mode 100644 tests/qemuxml2argvdata/numatune-memory-migratable.err
create mode 100644 tests/qemuxml2argvdata/numatune-memory-migratable.xml
--
2.25.4
4 years, 1 month