[libvirt] How should libvirt apps enable virtio-pci for aarch64?
by Cole Robinson
Hi all,
I'm trying to figure out how apps should request virtio-pci for libvirt + qemu
+ arm/aarch64. Let me provide some background.
qemu's arm/aarch64 original virtio support is via virtio-mmio, libvirt XML
<address type='virtio-mmio'/>. Currently this is what libvirt sets as the
address default for all arm/aarch64 virtio devices in the XML. Long term
though all arm virt will likely be using virtio-pci: it's faster, enables
hotplug, is more x86 like, etc.
Support for virtio-pci is newer and not as widespread. qemu has had the
necessary support since 2.4 at least, but the guest side isn't well
distributed yet. For example, Fedora 23 and earlier don't work out of the box
with virtio-pci. Internal RHELSA (RHEL Server for Aarch64) builds have it
recently working AFAIK.
Libvirt has some support for enabling virtio-pci with aarch64, commits added
by Pavel Fedin in v1.2.19. (See e8d55172544c1fafe31a9e09346bdebca4f0d6f9). The
patches add a PCIe controller automatically to the XML (and qemu commandline)
if qemu-system-aarch64 supports it. However virtio-mmio is still used as the
default virtio address, given the current lack of OS support.
So we are at the point where libvirt apps want to enable this, but presently
there isn't a good solution; the only option is to fully allocate <address
type='pci' ...> for each virtio device in the XML. This is suboptimal for 2
reasons:
#1) apps need to duplicate libvirt's non-trivial address type=pci allocation logic
#2) apps have to add an <address> block for every virtio device, which is less
friendly than the x86 case where this is rarely required. Any XML device
snippets that work for x86 likely won't give the desired result for aarch64,
since they will default to virtio-mmio. Think virsh attach-device/attach-disk
commands
Here are some possible solutions:
* Drop the current behavior of adding a PCIe controller unconditionally, and
instead require apps to specify it in the XML. Then, if libvirt sees a PCIe
controller in the XML, default the virtio address type to pci. Apps will know
if the OS they are installing supports virtio-pci (eventually via libosinfo),
so this is the way we can implicitly ask libvirt 'allocate us pci addresses'
Upsides:
- Solves both the stated problems.
- Simplest addition for applications IMO
Downsides:
- Requires a libvirt behavior change, no longer adding the PCIe controller by
default. But in practice I don't think it will really affect anyone, since
there isn't really any OS support for virtio-pci yet, and no apps support it
either AFAIK.
- The PCIe controller is not strictly about virtio-pci, it's for enabling
plain emulated PCI devices as well. So there is a use case for using the PCIe
controller for a graphics card even while your OS doesn't yet support
virtio-pci. In the big picture though this is a small time window with current
OS, and users can work around it by manually requesting <address
type='virtio-mmio'/>, so medium/long term this isn't a big deal IMO
- The PCIe controller XML is:
<controller type='pci' index='0' model='pcie-root'/>
<controller type='pci' index='1' model='dmi-to-pci-bridge'/>
<controller type='pci' index='2' model='pci-bridge'/>
I have no idea if that's always going to be the expected XML, maybe it's not
wise to hardcode that in apps. Laine?
* Next idea: Users specify something like like <address type='pci'/> and
libvirt fills in the address for us.
Upsides:
- We can stick with the current PCIe controller default and avoid some of the
problems mentioned above.
- An auto address feature may be useful in other contexts as well.
Downsides:
- Seems potentially tricky to implement in libvirt code. There's many places
that check type=pci and key off that, seems like it would be easy to miss
updating a check and cause regressions. Maybe we could add a new type like
auto-pci to make it explicit. There's probably some implementation trick to
make this safe, but at first glance it looked a little dicey.
- Doesn't really solve problem #2 mentioned up above... maybe we could change
the address allocation logic to default to virtio-pci if there's already a
virtio-pci device in the XML. But it's more work.
- More work for apps, but nothing horrible.
* Change the default address type from virtio-mmio to pci, if qemu supports
it. I'm listing this for completeness. In the short term this doesn't make
sense as there isn't any OS releases that will work with this default. However
it might be worth considering for the future, maybe keying off a particular
qemu version or machine type. I suspect 2 years from now no one is going to be
using virtio-mmio so long term it's not an ideal default.
I think the first option is best (keying off the PCIe controller specified by
the user), with a longer term plan to change the default from mmio to pci. But
I'm not really sold on anything either way. So I'm interested if anyone else
has ideas.
Thanks,
Cole
9 years
[libvirt] [PATCH] util: Fixup virnetdevmacvlan.h ATTRIBUTE_NONNULL's
by John Ferlan
Commit id '56e2171c6' removed a variable from the argument list, but
neglected to update the ATTRIBUTE_NONNULL values, so when commit id
'08da97bfb' added a couple of arguments, the values were off.
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Pushed as build breaker (coverity) and trivial.
src/util/virnetdevmacvlan.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/util/virnetdevmacvlan.h b/src/util/virnetdevmacvlan.h
index 2844a44..70e3b01 100644
--- a/src/util/virnetdevmacvlan.h
+++ b/src/util/virnetdevmacvlan.h
@@ -74,8 +74,8 @@ int virNetDevMacVLanCreateWithVPortProfile(const char *ifname,
int *tapfd,
size_t tapfdSize,
unsigned int flags)
- ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(6)
- ATTRIBUTE_NONNULL(8) ATTRIBUTE_NONNULL(12) ATTRIBUTE_RETURN_CHECK;
+ ATTRIBUTE_NONNULL(2) ATTRIBUTE_NONNULL(3) ATTRIBUTE_NONNULL(5)
+ ATTRIBUTE_NONNULL(7) ATTRIBUTE_NONNULL(9) ATTRIBUTE_RETURN_CHECK;
int virNetDevMacVLanDeleteWithVPortProfile(const char *ifname,
const virMacAddr *macaddress,
--
2.5.0
9 years
[libvirt] [PATCH v2 00/10] Make loading domains with invalid XML possible
by Martin Kletzander
We always had to deal with new parsing errors in a weird way. All of
them needed to go into functions starting the domains. That messes up
the code, it's confusing to newcomers and so on.
I once had an idea that we can handle this stuff. We know what
failed, we have the XML that failed parsing and if the problem is not
in the domain name nor UUID, we can create a domain object out of that
as well. This way we are able to do something we weren't with this
series applied. Example follows.
Assume "dummy" is a domain with invalid XML (I just modified the
file). Now, just for the purpose of this silly example, let's say we
allowed domains with archtecture x86_*, but now we've realized that
x86_64 is the only one we want to allow, but there already is a domain
defined that has <type arch='x86_256' .../>. With the current master,
the domain would be lost, so we would need to modify the funstion
starting the domain (e.g. qemuProcessStart for qemu domain). However,
with this series, it behaves like this:
# virsh list --all --reason
Id Name State Reason
---------------------------------------------------------------
- dummy shut off invalid XML
# virsh domstate --reason dummy
shut off (invalid XML)
# virsh start dummy
error: Failed to start domain dummy
error: XML error: domain 'dummy' was not loaded due to an XML error
(unsupported configuration: Unknown architecture x86_256), please
redefine it
# VISUAL='sed -i s/x86_256/x86_64/' virsh edit dummy
Domain dummy XML configuration edited.
# virsh domstate --reason dummy
shut off (unknown)
# virsh start dummy
Domain dummy started
This is a logical next step for us to clean and separate parsing and
starting, getting rid of some old code without sacrifying compatibility
and maybe generating parser code in the future.
v2:
- rebased on top of current master (with virdomainobjlist.c)
- only disallow starting domains with invalid definitions (change
done in v1), but allow re-defining them
- add support for "virsh list --reason" to better excercise the
feature added in this patchset
v1:
- rebase
- don't allow starting domains with invalid state
- https://www.redhat.com/archives/libvir-list/2015-November/msg01127.html
RFC: https://www.redhat.com/archives/libvir-list/2015-September/msg00698.html
Martin Kletzander (10):
conf, virsh: Add new domain shutoff reason
virsh: Refactor the table output of the list command
virsh: Add support for list -reason
qemu: Few whitespace cleanups
conf: Extract name-parsing into its own function
conf: Extract UUID parsing into its own function
conf: Optionally keep domains with invalid XML, but don't allow
starting them
qemu: Don't lookup invalid domains unless specified otherwise
qemu: Prepare basic APIs to handle invalid defs
qemu: Load domains with invalid XML on start
include/libvirt/libvirt-domain.h | 2 +
src/bhyve/bhyve_driver.c | 2 +
src/conf/domain_conf.c | 121 +++++++++++++++++++++++++++++++--------
src/conf/domain_conf.h | 7 +++
src/conf/virdomainobjlist.c | 71 +++++++++++++++++++++--
src/conf/virdomainobjlist.h | 1 +
src/libvirt_private.syms | 1 +
src/libxl/libxl_driver.c | 3 +
src/lxc/lxc_driver.c | 3 +
src/qemu/qemu_driver.c | 64 +++++++++++++++++----
src/uml/uml_driver.c | 2 +
tests/virshtest.c | 30 +++++++---
tools/virsh-domain-monitor.c | 60 ++++++++++++-------
tools/virsh.pod | 5 +-
14 files changed, 303 insertions(+), 69 deletions(-)
--
2.6.3
9 years
[libvirt] [PATCH v4 00/10] Few VFIO related fixes
by Shivaprasad G Bhat
The series fixes few VFIO related host crash issues. The patches 3, 4, 9 and 10
are actual fixes. Patch 7 and 8 are test changes to allow testing patch 9.
Rest of the patches are mostly code movements except for patch 2.
---
Changes from v3 -> v4
- Andrea's suggestion not to overload the usage of stubDriver to set it in
virPCINew is addressed. Not setting it any more. Fetch it fresh from
sysfs.
- The test case added in old P7 is improvised
- Old P7 is split into 3 patches where I have moved the virpcimock
changes to support iommu into a new patch.
Shivaprasad G Bhat (10):
Implement virPCIIsKnownStub function
Add iommu group number info to virPCIDevice
Refuse to reattach from vfio if the iommu group is in use by any domain
Wait for vfio-pci device cleanups before reassinging the device to host driver
Split reprobe action from the virPCIUnbindFromStub into a new function
Pass activeDevs and inactiveDevs to virPCIDeviceUnbindFromStub and virPCIDeviceBindToStub
Change the negative test case to try pciback instead of vfio-pci
Add iommu info for pci on mocked sysfs
Postpone reprobing till all the devices in iommu group are unbound from vfio
Wait for iommmu device to go away before reprobing the host driver
src/util/virhostdev.c | 28 ++++-
src/util/virpci.c | 297 +++++++++++++++++++++++++++++++++++++++++--------
tests/virpcimock.c | 193 +++++++++++++++++++++++++++++---
tests/virpcitest.c | 117 +++++++++++++++++++
4 files changed, 566 insertions(+), 69 deletions(-)
--
Signature
9 years
[libvirt] [PATCH v3] storage sheepdog: allow to specify redundancy level
by Vasiliy Tolstov
Completely fix tests and check that all works on production env
Vasiliy Tolstov (1):
storage sheepdog: allow to specify redundancy level
docs/schemas/storagevol.rng | 3 +
src/conf/storage_conf.c | 2 +
src/storage/storage_backend_sheepdog.c | 143 +++++++++++++++++-----------
src/util/virstoragefile.c | 4 +-
src/util/virstoragefile.h | 2 +
tests/storagebackendsheepdogtest.c | 104 ++++++++++----------
tests/storagevolxml2xmlin/vol-sheepdog.xml | 1 +
tests/storagevolxml2xmlout/vol-sheepdog.xml | 1 +
8 files changed, 153 insertions(+), 107 deletions(-)
--
2.5.0
9 years
[libvirt] [PATCH] test: qemuxml2argv: Mock virMemoryMaxValue to remove 32/64 bit difference
by Peter Krempa
Always return LLONG_MAX even on 32 bit systems. The limitation
originates from our use of "unsigned long" in several APIs. The internal
data type is unsigned long long. Make the test suite deterministic by
removing the architecture difference.
Flaw was introduced in 645881139b3d2c86acf9d644c3a1471520bc9e57 where
I've added a test that uses too large numbers.
---
I've tested this by changing the mock value to the number returned on 32-bit
systems and got the same error. I didn't test it on an actual 32 bit system
though.
src/util/virutil.c | 2 ++
tests/qemuxml2argvmock.c | 10 ++++++++++
2 files changed, 12 insertions(+)
diff --git a/src/util/virutil.c b/src/util/virutil.c
index fe65faf..9d56d66 100644
--- a/src/util/virutil.c
+++ b/src/util/virutil.c
@@ -2639,6 +2639,8 @@ virMemoryLimitIsSet(unsigned long long value)
* @capped: whether the value must fit into unsigned long
* (long long is assumed otherwise)
*
+ * Note: This function is mocked in tests/qemuxml2argvmock.c for test stability
+ *
* Returns the maximum possible memory value in bytes.
*/
unsigned long long
diff --git a/tests/qemuxml2argvmock.c b/tests/qemuxml2argvmock.c
index e58b8ce..8426108 100644
--- a/tests/qemuxml2argvmock.c
+++ b/tests/qemuxml2argvmock.c
@@ -74,3 +74,13 @@ virTPMCreateCancelPath(const char *devpath)
return path;
}
+
+/**
+ * Large values for memory would fail on 32 bit systems, despite having
+ * variables that support it.
+ */
+unsigned long long
+virMemoryMaxValue(bool capped ATTRIBUTE_UNUSED)
+{
+ return LLONG_MAX;
+}
--
2.6.2
9 years
[libvirt] [PATCH] vz: Allow to create container based on template
by Mikhail Feoktistov
We shouldn't delete disk from default config if we create container based on template,
because we don't have the new disk from XML, only template name.
And don't add template section from XML as new filesystem,
we use PrlVmCfg_SetOsTemplate function to set template name.
---
src/vz/vz_sdk.c | 33 +++++++++++++++++++++++++++++----
1 file changed, 29 insertions(+), 4 deletions(-)
diff --git a/src/vz/vz_sdk.c b/src/vz/vz_sdk.c
index 89c9e89..865cabe 100644
--- a/src/vz/vz_sdk.c
+++ b/src/vz/vz_sdk.c
@@ -2096,12 +2096,14 @@ prlsdkCheckUnsupportedParams(PRL_HANDLE sdkdom, virDomainDefPtr def)
return 0;
}
-static int prlsdkClearDevices(PRL_HANDLE sdkdom)
+static int prlsdkClearDevices(PRL_HANDLE sdkdom, bool skipdisk)
{
PRL_RESULT pret;
PRL_UINT32 n, i;
PRL_HANDLE devList;
PRL_HANDLE dev;
+ PRL_DEVICE_TYPE devType;
+ PRL_VM_DEV_EMULATION_TYPE emul;
int ret = -1;
pret = PrlVmCfg_SetVNCMode(sdkdom, PRD_DISABLED);
@@ -2117,6 +2119,18 @@ static int prlsdkClearDevices(PRL_HANDLE sdkdom)
pret = PrlHndlList_GetItem(devList, i, &dev);
prlsdkCheckRetGoto(pret, cleanup);
+ if (skipdisk) {
+ pret = PrlVmDev_GetType(dev, &devType);
+ prlsdkCheckRetGoto(pret, cleanup);
+
+ pret = PrlVmDev_GetEmulatedType(dev, &emul);
+ prlsdkCheckRetGoto(pret, cleanup);
+
+ if (devType == PDE_HARD_DISK) {
+ PrlHandle_Free(dev);
+ continue;
+ }
+ }
pret = PrlVmDev_Remove(dev);
PrlHandle_Free(dev);
}
@@ -3465,6 +3479,7 @@ prlsdkDoApplyConfig(virConnectPtr conn,
char uuidstr[VIR_UUID_STRING_BUFLEN + 2];
bool needBoot = true;
char *mask = NULL;
+ bool skipdisk = false;
if (prlsdkCheckUnsupportedParams(sdkdom, def) < 0)
return -1;
@@ -3514,7 +3529,11 @@ prlsdkDoApplyConfig(virConnectPtr conn,
}
prlsdkCheckRetGoto(pret, error);
- if (prlsdkClearDevices(sdkdom) < 0)
+ if (def->nfss == 1 &&
+ def->fss[0]->type == VIR_DOMAIN_FS_TYPE_TEMPLATE)
+ skipdisk = true;
+
+ if (prlsdkClearDevices(sdkdom, skipdisk) < 0)
goto error;
if (prlsdkRemoveBootDevices(sdkdom) < 0)
@@ -3544,6 +3563,8 @@ prlsdkDoApplyConfig(virConnectPtr conn,
for (i = 0; i < def->nfss; i++) {
if (STREQ(def->fss[i]->dst, "/"))
needBoot = false;
+ if (def->fss[i]->type == VIR_DOMAIN_FS_TYPE_TEMPLATE)
+ continue;
if (prlsdkAddFS(sdkdom, def->fss[i]) < 0)
goto error;
}
@@ -3655,6 +3676,7 @@ prlsdkCreateCt(virConnectPtr conn, virDomainDefPtr def)
int ret = -1;
int useTemplate = 0;
size_t i;
+ PRL_UINT32 flags = 0;
if (def->nfss > 1) {
/* Check all filesystems */
@@ -3696,8 +3718,11 @@ prlsdkCreateCt(virConnectPtr conn, virDomainDefPtr def)
if (ret)
goto cleanup;
- job = PrlVm_RegEx(sdkdom, "",
- PACF_NON_INTERACTIVE_MODE | PRNVM_PRESERVE_DISK);
+ flags = PACF_NON_INTERACTIVE_MODE;
+ if (!useTemplate)
+ flags = flags | PRNVM_PRESERVE_DISK;
+
+ job = PrlVm_RegEx(sdkdom, "", flags);
if (PRL_FAILED(waitJob(job)))
ret = -1;
--
1.8.3.1
9 years
[libvirt] [PATCH 0/7] cleanup the input device code
by Pavel Hrdina
This patch series is an attempt to make the code for input devices cleaner and
readable and also follow some good practices whit rule that one function should
do only one thing. We are really bad at this and our code is sometimes really
hard to follow.
Pavel Hrdina (7):
vmware/vmx: use virDomainDefPostParse after parsing vmx config
lxc: use virDomainDefPostParse for parsing LXC config string
xen: use virDomainDefPostParse for parsing XM/XL/SEXPR cofings
xen: fix timer bug found by updated test
libxl: copy persistent domain definition while starting a guest
device: cleanup input device code
qemu_domain: cleanup default input device code
src/Makefile.am | 2 +-
src/conf/domain_conf.c | 77 +---------------------
src/esx/esx_driver.c | 4 +-
src/libxl/libxl_domain.c | 8 +++
src/libxl/libxl_driver.c | 8 ++-
src/lxc/lxc_driver.c | 5 +-
src/lxc/lxc_native.c | 8 ++-
src/lxc/lxc_native.h | 4 +-
src/qemu/qemu_domain.c | 47 ++++++++-----
src/qemu/qemu_domain.h | 1 +
src/qemu/qemu_process.c | 3 +
src/vmware/vmware_conf.c | 3 +-
src/vmware/vmware_driver.c | 2 +-
src/vmx/vmx.c | 5 ++
src/vmx/vmx.h | 1 +
src/xen/xen_driver.c | 5 +-
src/xen/xend_internal.c | 10 +++
src/xen/xm_internal.c | 2 +-
src/xenapi/xenapi_driver.c | 8 +++
src/xenconfig/xen_common.c | 24 +++++++
src/xenconfig/xen_common.h | 2 +
src/xenconfig/xen_sxpr.c | 18 ++++-
src/xenconfig/xen_sxpr.h | 8 ++-
src/xenconfig/xen_xl.c | 9 ++-
src/xenconfig/xen_xl.h | 4 +-
src/xenconfig/xen_xm.c | 7 +-
src/xenconfig/xen_xm.h | 2 +-
tests/Makefile.am | 2 +-
tests/lxcconf2xmldata/lxcconf2xml-blkiotune.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-cpusettune.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-cputune.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-idmap.xml | 3 +-
.../lxcconf2xmldata/lxcconf2xml-macvlannetwork.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-memtune.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-nonenetwork.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-nonetwork.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-physnetwork.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-simple.xml | 3 +-
tests/lxcconf2xmldata/lxcconf2xml-vlannetwork.xml | 3 +-
tests/lxcconf2xmltest.c | 18 ++++-
.../qemuxml2argv-graphics-listen-network.xml | 2 -
.../qemuxml2argv-graphics-listen-network2.xml | 2 -
.../qemuxml2argv-graphics-sdl-fullscreen.xml | 2 -
.../qemuxml2argvdata/qemuxml2argv-graphics-sdl.xml | 2 -
...qemuxml2argv-graphics-spice-agent-file-xfer.xml | 1 -
.../qemuxml2argv-graphics-spice-compression.xml | 2 -
.../qemuxml2argv-graphics-spice-listen-network.xml | 1 -
.../qemuxml2argv-graphics-spice-qxl-vga.xml | 2 -
.../qemuxml2argv-graphics-spice-sasl.xml | 1 -
.../qemuxml2argv-graphics-spice-timeout.xml | 2 -
.../qemuxml2argv-graphics-spice.xml | 2 -
.../qemuxml2argv-graphics-vnc-policy.xml | 2 -
.../qemuxml2argv-graphics-vnc-sasl.xml | 2 -
.../qemuxml2argv-graphics-vnc-socket.xml | 2 -
.../qemuxml2argv-graphics-vnc-tls.xml | 2 -
.../qemuxml2argv-graphics-vnc-websocket.xml | 2 -
.../qemuxml2argvdata/qemuxml2argv-graphics-vnc.xml | 2 -
.../qemuxml2argv-pci-autoadd-addr.xml | 1 -
.../qemuxml2argv-pci-autoadd-idx.xml | 1 -
.../qemuxml2argvdata/qemuxml2argv-pseries-disk.xml | 2 +-
.../qemuxml2xmlout-graphics-listen-network2.xml | 2 -
.../qemuxml2xmlout-graphics-spice-timeout.xml | 2 -
tests/sexpr2xmldata/sexpr2xml-boot-grub.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-bridge-ipaddr.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-curmem.xml | 3 +-
.../sexpr2xml-disk-block-shareable.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-disk-block.xml | 1 +
.../sexpr2xml-disk-drv-blktap-qcow.xml | 1 +
.../sexpr2xml-disk-drv-blktap-raw.xml | 1 +
.../sexpr2xml-disk-drv-blktap2-raw.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-disk-file.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-autoport.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-empty-kernel.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-hpet.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-force-nohpet.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-kernel.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-fv-legacy-vfb.xml | 2 +
tests/sexpr2xmldata/sexpr2xml-fv-localtime.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-parallel-tcp.xml | 5 +-
.../sexpr2xml-fv-serial-dev-2-ports.xml | 5 +-
.../sexpr2xml-fv-serial-dev-2nd-port.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-file.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-null.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pipe.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-pty.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-stdio.xml | 5 +-
.../sexpr2xml-fv-serial-tcp-telnet.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-tcp.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-udp.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-serial-unix.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound-all.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-sound.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbmouse.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-usbtablet.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-utc.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv-v2.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-fv.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-net-bridged.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-net-e1000.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-net-routed.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-no-source-cdrom.xml | 5 +-
tests/sexpr2xmldata/sexpr2xml-pci-devs.xml | 1 +
.../sexpr2xml-pv-bootloader-cmdline.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-bootloader.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-localtime.xml | 1 +
tests/sexpr2xmldata/sexpr2xml-pv-vcpus.xml | 1 +
.../sexpr2xml-pv-vfb-new-vncdisplay.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-new.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv-vfb-orig.xml | 3 +-
.../sexpr2xmldata/sexpr2xml-pv-vfb-type-crash.xml | 3 +-
tests/sexpr2xmldata/sexpr2xml-pv.xml | 1 +
tests/sexpr2xmltest.c | 10 ++-
tests/vmx2xmldata/vmx2xml-graphics-vnc.xml | 2 -
tests/vmx2xmltest.c | 2 +-
.../test-fullvirt-direct-kernel-boot.xml | 4 +-
tests/xlconfigdata/test-fullvirt-multiusb.xml | 4 +-
tests/xlconfigdata/test-new-disk.xml | 5 +-
tests/xlconfigdata/test-spice-features.xml | 4 +-
tests/xlconfigdata/test-spice.xml | 4 +-
tests/xlconfigtest.c | 2 +-
tests/xmconfigdata/test-escape-paths.xml | 6 +-
.../xmconfigdata/test-fullvirt-default-feature.xml | 5 +-
tests/xmconfigdata/test-fullvirt-force-hpet.xml | 5 +-
tests/xmconfigdata/test-fullvirt-force-nohpet.xml | 5 +-
tests/xmconfigdata/test-fullvirt-localtime.xml | 5 +-
tests/xmconfigdata/test-fullvirt-net-ioemu.xml | 5 +-
tests/xmconfigdata/test-fullvirt-net-netfront.xml | 5 +-
tests/xmconfigdata/test-fullvirt-new-cdrom.xml | 5 +-
tests/xmconfigdata/test-fullvirt-old-cdrom.xml | 5 +-
tests/xmconfigdata/test-fullvirt-parallel-tcp.xml | 5 +-
.../test-fullvirt-serial-dev-2-ports.xml | 5 +-
.../test-fullvirt-serial-dev-2nd-port.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-file.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-null.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-pipe.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-pty.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-stdio.xml | 5 +-
.../test-fullvirt-serial-tcp-telnet.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-tcp.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-udp.xml | 5 +-
tests/xmconfigdata/test-fullvirt-serial-unix.xml | 5 +-
tests/xmconfigdata/test-fullvirt-sound.xml | 5 +-
tests/xmconfigdata/test-fullvirt-usbmouse.xml | 5 +-
.../test-fullvirt-usbtablet-no-bus.xml | 4 +-
tests/xmconfigdata/test-fullvirt-usbtablet.xml | 5 +-
tests/xmconfigdata/test-fullvirt-utc.xml | 5 +-
tests/xmconfigdata/test-no-source-cdrom.xml | 5 +-
tests/xmconfigdata/test-paravirt-net-e1000.xml | 3 +-
tests/xmconfigdata/test-paravirt-net-vifname.xml | 3 +-
.../test-paravirt-new-pvfb-vncdisplay.xml | 3 +-
tests/xmconfigdata/test-paravirt-new-pvfb.xml | 3 +-
.../test-paravirt-old-pvfb-vncdisplay.xml | 3 +-
tests/xmconfigdata/test-paravirt-old-pvfb.xml | 3 +-
tests/xmconfigdata/test-paravirt-vcpu.xml | 1 +
tests/xmconfigdata/test-pci-devs.xml | 5 +-
tests/xmconfigtest.c | 3 +-
158 files changed, 429 insertions(+), 309 deletions(-)
--
2.6.3
9 years
[libvirt] [PATCH 0/7] tests: Always fake root directory
by Andrea Bolognani
When mocking filesystem access in the test suite, we have always
assumed it to be some subdirectory of /sys depending on the needs
of the specific test case.
This limits our flexibility, and will be a problem once we need
to start mocking eg. /dev as well, or simply two different parts
of the /sys filesystem at the same time[1].
Solve the issue by always using the temporary directory as the
root directory for the mocked filesystem.
The series is organized as follows:
1-2: Tiny cleanups
3-4: Change the mock libraries so that they build the proper
directory structure
5: Change the name of the environment variable used to pass
the temporary directory name to the mock libraries
6: Make it so we'll be able to mock different parts of the
/sys filesystem at the same time
7: Update scsihosttest to use the same directory structure
Cheers.
[1] https://www.redhat.com/archives/libvir-list/2015-November/msg00532.html
is an example of why we would need to do that
Andrea Bolognani (7):
tests: scsihost: Don't set LIBVIRT_FAKE_SYSFS_DIR
tests: pcimock: Remove check for fakesysfsdir
tests: pcimock: Use the temporary directory as fake root
tests: cgroupmock: Use the temporary directory as fake root
tests: Rename LIBVIRT_FAKE_SYSFS_DIR to LIBVIRT_FAKE_ROOT_DIR
tests: Use more specific names for variables
tests: scsihost: Use fakerootdir instead of fakesysfsdir
tests/scsihosttest.c | 17 ++++++---
tests/vircgroupmock.c | 99 ++++++++++++++++++++++++++++----------------------
tests/vircgrouptest.c | 16 ++++----
tests/virhostdevtest.c | 16 ++++----
tests/virpcimock.c | 69 +++++++++++++++++++----------------
tests/virpcitest.c | 16 ++++----
6 files changed, 129 insertions(+), 104 deletions(-)
--
2.5.0
9 years
[libvirt] [PATCH v2 0/8] Add perf and Intel CMT feature support
by Qiaowei Ren
The series mainly adds Intel CMT feature support into libvirt. CMT is
new introduced PQos (Platform Qos) feature to monitor the usage of
cache by applications running on the platform.
Currently CMT patches has been merged into Linux kernel mainline.
The CMT implementation in Linux kernel is based on perf mechanism and
there is no support for perf in libvirt, and so this series firstly
add perf support into libvirt, including two public API and a set of
util interfaces. And based on these APIs and interfaces, thie series
implements CMT perf event support.
TODO:
1. add support for new APIs into libvirt-python library.
Changes since v1:
* change perf APIs implementation to match new style of the API.
* add new xml element
* reenable all perf events previously enabled when libvirtd daemon
restart.
* redesign perf util functions.
Qiaowei Ren (8):
perf: add new public APIs for perf event
perf: implement the remote protocol for perf event
perf: implement a set of util functions for perf event
qemu_driver: add support to perf event
perf: add new xml element
perf: reenable perf events when libvirtd restart
virsh: implement new command to support perf
virsh: extend domstats command
daemon/remote.c | 47 ++++++
docs/schemas/domaincommon.rng | 27 ++++
include/libvirt/libvirt-domain.h | 19 +++
include/libvirt/virterror.h | 1 +
src/Makefile.am | 1 +
src/conf/domain_conf.c | 37 +++++
src/conf/domain_conf.h | 10 ++
src/driver-hypervisor.h | 12 ++
src/libvirt-domain.c | 93 ++++++++++++
src/libvirt_private.syms | 12 ++
src/libvirt_public.syms | 6 +
src/qemu/qemu_domain.h | 3 +
src/qemu/qemu_driver.c | 206 +++++++++++++++++++++++++++
src/qemu/qemu_process.c | 9 ++
src/remote/remote_driver.c | 39 +++++
src/remote/remote_protocol.x | 30 +++-
src/remote_protocol-structs | 18 +++
src/util/virerror.c | 1 +
src/util/virperf.c | 298 +++++++++++++++++++++++++++++++++++++++
src/util/virperf.h | 61 ++++++++
tools/virsh-domain-monitor.c | 7 +
tools/virsh-domain.c | 125 ++++++++++++++++
tools/virsh.pod | 25 +++-
23 files changed, 1084 insertions(+), 3 deletions(-)
create mode 100644 src/util/virperf.c
create mode 100644 src/util/virperf.h
--
1.9.1
9 years