[libvirt] [PATCH] Error out on an address for isa-serial in QEMU driver.
by Ján Tomko
We've never formatted them on the qemu command line.
https://bugzilla.redhat.com/show_bug.cgi?id=1164053
---
src/qemu/qemu_command.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c112619..e7b8c66 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -10409,7 +10409,8 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
virDomainChrSerialTargetTypeToString(serial->targetType),
serial->info.alias, serial->info.alias);
- if (serial->targetType == VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB) {
+ switch (serial->targetType) {
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_USB:
if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_USB_SERIAL)) {
virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
_("usb-serial is not supported in this QEMU binary"));
@@ -10425,6 +10426,15 @@ qemuBuildSerialChrDeviceStr(char **deviceStr,
if (qemuBuildDeviceAddressStr(&cmd, def, &serial->info, qemuCaps) < 0)
goto error;
+ break;
+
+ case VIR_DOMAIN_CHR_SERIAL_TARGET_TYPE_ISA:
+ if (serial->info.type != VIR_DOMAIN_DEVICE_ADDRESS_TYPE_NONE) {
+ virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("no addresses are suported for isa-serial"));
+ goto error;
+ }
+ break;
}
}
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] sanlock: Don't spam logs with "target pid not found"
by Jiri Denemark
Commit v1.2.4-52-gda879e5 fixed issues with domains started before
sanlock driver was enabled by checking whether a running domain is
registered with sanlock and if it's not, sanlock driver is basically
ignored for the domain.
However, it was checking this even for domain which has just been
started and no sanlock_* API was called for them yet. This results in
cmd 9 target pid 2135544 not found
error messages to appear in sanlock.log whenever we start a new domain.
This patch avoids this useless check for freshly started domains.
Signed-off-by: Jiri Denemark <jdenemar(a)redhat.com>
---
src/locking/domain_lock.c | 22 ++++++++++++----------
src/locking/lock_driver.h | 12 +++++++++++-
src/locking/lock_driver_lockd.c | 2 +-
src/locking/lock_driver_sanlock.c | 9 ++++++---
src/locking/lock_manager.c | 2 +-
5 files changed, 31 insertions(+), 16 deletions(-)
diff --git a/src/locking/domain_lock.c b/src/locking/domain_lock.c
index d7b681e..705b132 100644
--- a/src/locking/domain_lock.c
+++ b/src/locking/domain_lock.c
@@ -104,7 +104,8 @@ static int virDomainLockManagerAddImage(virLockManagerPtr lock,
static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
const char *uri,
virDomainObjPtr dom,
- bool withResources)
+ bool withResources,
+ unsigned int flags)
{
virLockManagerPtr lock;
size_t i;
@@ -138,7 +139,7 @@ static virLockManagerPtr virDomainLockManagerNew(virLockManagerPluginPtr plugin,
VIR_LOCK_MANAGER_OBJECT_TYPE_DOMAIN,
ARRAY_CARDINALITY(params),
params,
- 0)))
+ flags)))
goto error;
if (withResources) {
@@ -177,7 +178,8 @@ int virDomainLockProcessStart(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p paused=%d fd=%p",
plugin, dom, paused, fd);
- if (!(lock = virDomainLockManagerNew(plugin, uri, dom, true)))
+ if (!(lock = virDomainLockManagerNew(plugin, uri, dom, true,
+ VIR_LOCK_MANAGER_NEW_STARTED)))
return -1;
if (paused)
@@ -201,7 +203,7 @@ int virDomainLockProcessPause(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p state=%p",
plugin, dom, state);
- if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, true)))
+ if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, true, 0)))
return -1;
ret = virLockManagerRelease(lock, state, 0);
@@ -221,7 +223,7 @@ int virDomainLockProcessResume(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p state=%s",
plugin, dom, NULLSTR(state));
- if (!(lock = virDomainLockManagerNew(plugin, uri, dom, true)))
+ if (!(lock = virDomainLockManagerNew(plugin, uri, dom, true, 0)))
return -1;
ret = virLockManagerAcquire(lock, state, 0, dom->def->onLockFailure, NULL);
@@ -240,7 +242,7 @@ int virDomainLockProcessInquire(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p state=%p",
plugin, dom, state);
- if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, true)))
+ if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, true, 0)))
return -1;
ret = virLockManagerInquire(lock, state, 0);
@@ -260,7 +262,7 @@ int virDomainLockImageAttach(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p src=%p", plugin, dom, src);
- if (!(lock = virDomainLockManagerNew(plugin, uri, dom, false)))
+ if (!(lock = virDomainLockManagerNew(plugin, uri, dom, false, 0)))
return -1;
if (virDomainLockManagerAddImage(lock, src) < 0)
@@ -297,7 +299,7 @@ int virDomainLockImageDetach(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p src=%p", plugin, dom, src);
- if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, false)))
+ if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, false, 0)))
return -1;
if (virDomainLockManagerAddImage(lock, src) < 0)
@@ -334,7 +336,7 @@ int virDomainLockLeaseAttach(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p lease=%p",
plugin, dom, lease);
- if (!(lock = virDomainLockManagerNew(plugin, uri, dom, false)))
+ if (!(lock = virDomainLockManagerNew(plugin, uri, dom, false, 0)))
return -1;
if (virDomainLockManagerAddLease(lock, lease) < 0)
@@ -362,7 +364,7 @@ int virDomainLockLeaseDetach(virLockManagerPluginPtr plugin,
VIR_DEBUG("plugin=%p dom=%p lease=%p",
plugin, dom, lease);
- if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, false)))
+ if (!(lock = virDomainLockManagerNew(plugin, NULL, dom, false, 0)))
return -1;
if (virDomainLockManagerAddLease(lock, lease) < 0)
diff --git a/src/locking/lock_driver.h b/src/locking/lock_driver.h
index a7d9782..f8fd38e 100644
--- a/src/locking/lock_driver.h
+++ b/src/locking/lock_driver.h
@@ -65,6 +65,11 @@ typedef enum {
VIR_LOCK_MANAGER_ACQUIRE_RESTRICT = (1 << 1),
} virLockManagerAcquireFlags;
+typedef enum {
+ /* virLockManagerNew called for a freshly started domain */
+ VIR_LOCK_MANAGER_NEW_STARTED = (1 << 0),
+} virLockManagerNewFlags;
+
enum {
VIR_LOCK_MANAGER_PARAM_TYPE_STRING,
VIR_LOCK_MANAGER_PARAM_TYPE_CSTRING,
@@ -142,13 +147,18 @@ typedef int (*virLockDriverDeinit)(void);
* @type: the type of process to be supervised
* @nparams: number of metadata parameters
* @params: extra metadata parameters
- * @flags: optional flags, currently unused
+ * @flags: bitwise-OR of virLockManagerNewFlags
*
* Initialize a new context to supervise a process, usually
* a virtual machine. The lock driver implementation can use
* the <code>privateData</code> field of <code>man</code>
* to store a pointer to any driver specific state.
*
+ * If @flags contains VIR_LOCK_MANAGER_NEW_STARTED, this API is called for
+ * a domain that has just been started and may therefore skip some actions.
+ * Specifically, checking whether the domain is registered with a lock
+ * daemon is useless in this case.
+ *
* A process of VIR_LOCK_MANAGER_START_DOMAIN will be
* given the following parameters
*
diff --git a/src/locking/lock_driver_lockd.c b/src/locking/lock_driver_lockd.c
index 8d184fe..72a4a0c 100644
--- a/src/locking/lock_driver_lockd.c
+++ b/src/locking/lock_driver_lockd.c
@@ -439,7 +439,7 @@ static int virLockManagerLockDaemonNew(virLockManagerPtr lock,
virLockManagerLockDaemonPrivatePtr priv;
size_t i;
- virCheckFlags(VIR_LOCK_MANAGER_USES_STATE, -1);
+ virCheckFlags(VIR_LOCK_MANAGER_NEW_STARTED, -1);
if (VIR_ALLOC(priv) < 0)
return -1;
diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c
index 60f305c..dbe79bc 100644
--- a/src/locking/lock_driver_sanlock.c
+++ b/src/locking/lock_driver_sanlock.c
@@ -455,7 +455,7 @@ static int virLockManagerSanlockNew(virLockManagerPtr lock,
size_t i;
int resCount = 0;
- virCheckFlags(0, -1);
+ virCheckFlags(VIR_LOCK_MANAGER_NEW_STARTED, -1);
if (!driver) {
virReportError(VIR_ERR_INTERNAL_ERROR, "%s",
@@ -497,8 +497,11 @@ static int virLockManagerSanlockNew(virLockManagerPtr lock,
* if it returns any other error (rv < 0), then we cannot fail due
* to back-compat. So this whole call is non-fatal, because it's
* called from all over the place (it will usually fail). It merely
- * updates privateData. */
- if (sanlock_inquire(-1, priv->vm_pid, 0, &resCount, NULL) >= 0)
+ * updates privateData.
+ * If the process has just been started, we are pretty sure it is not
+ * registered. */
+ if (!(flags & VIR_LOCK_MANAGER_NEW_STARTED) &&
+ sanlock_inquire(-1, priv->vm_pid, 0, &resCount, NULL) >= 0)
priv->registered = true;
lock->privateData = priv;
diff --git a/src/locking/lock_manager.c b/src/locking/lock_manager.c
index f277f22..a002ea8 100644
--- a/src/locking/lock_manager.c
+++ b/src/locking/lock_manager.c
@@ -287,7 +287,7 @@ virLockDriverPtr virLockManagerPluginGetDriver(virLockManagerPluginPtr plugin)
* virLockManagerNew:
* @driver: the lock manager implementation to use
* @type: the type of process to be supervised
- * @flags: optional flags, currently unused
+ * @flags: bitwise-OR of virLockManagerNewFlags
*
* Create a new context to supervise a process, usually
* a virtual machine.
--
2.3.1
9 years, 8 months
[libvirt] [PATCH] tests: fix qemuxml2argvtest to be arch independent
by Pavel Hrdina
Commit 5aee81a0 introduced a new test for disk-serial. The test fails
on i686 arch because there is no need to add "-cpu qemu32" to command
line. To fix the test update emulator in XML to "/usr/bin/qemu" so we
don't add the "-cpu qemu32" to command while running the test on i686 or
x86_64 host.
Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
Pushed as build-breaker patch.
tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args b/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args
index 794b94b..4d64843 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.args
@@ -1,5 +1,5 @@
LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
-/usr/libexec/qemu-kvm -S -M pc -cpu qemu32 -m 214 -smp 1 -nographic -nodefaults \
+/usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefaults \
-monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -usb \
-drive 'file=/dev/HostVG/QEMUGuest1,if=none,\
id=drive-ide0-0-1,serial=\ \ WD-WMAP9A966149' \
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml b/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml
index 0fe75f3..565462e 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-disk-serial.xml
@@ -13,7 +13,7 @@
<on_reboot>restart</on_reboot>
<on_crash>destroy</on_crash>
<devices>
- <emulator>/usr/libexec/qemu-kvm</emulator>
+ <emulator>/usr/bin/qemu</emulator>
<disk type='block' device='disk'>
<source dev='/dev/HostVG/QEMUGuest1'/>
<target dev='hda' bus='ide'/>
--
2.0.5
9 years, 8 months
[libvirt] [PATCH] libvirt-domain.h: changing some unsigned int parameters to the respective enum type.
by Julio Faracco
Recently, some code were cleaned ups. Now, some parameters are being
converted to its respective enum type. For example, there are many functions
that are using int or unsigned int types instead enum types. So, this kind of
cleaning up can be necessary.
Signed-off-by: Julio Faracco <jcfaracco(a)gmail.com>
---
include/libvirt/libvirt-domain.h | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/include/libvirt/libvirt-domain.h b/include/libvirt/libvirt-domain.h
index 9487b80..8016e2a 100644
--- a/include/libvirt/libvirt-domain.h
+++ b/include/libvirt/libvirt-domain.h
@@ -854,7 +854,7 @@ typedef enum {
int virDomainShutdown (virDomainPtr domain);
int virDomainShutdownFlags (virDomainPtr domain,
- unsigned int flags);
+ virDomainShutdownFlagValues flags);
typedef enum {
VIR_DOMAIN_REBOOT_DEFAULT = 0, /* hypervisor choice */
@@ -866,7 +866,7 @@ typedef enum {
} virDomainRebootFlagValues;
int virDomainReboot (virDomainPtr domain,
- unsigned int flags);
+ virDomainRebootFlagValues flags);
int virDomainReset (virDomainPtr domain,
unsigned int flags);
@@ -884,7 +884,7 @@ typedef enum {
} virDomainDestroyFlagsValues;
int virDomainDestroyFlags (virDomainPtr domain,
- unsigned int flags);
+ virDomainDestroyFlagsValues flags);
int virDomainRef (virDomainPtr domain);
int virDomainFree (virDomainPtr domain);
--
1.9.1
9 years, 8 months
[libvirt] [libvirt-perl PATCH] Add virDomainGetIOThreads and virDomainPinIOThread bindings
by John Ferlan
Test results in the following output:
$ perl examples/iothreadsinfo.pl
Addr
VMM type: QEMU
...
Domain: {
ID: 2 'f18iothr'
UUID: fb9f7826-b5d7-4f74-b962-7181ef3fc9ec
IOThread: {
affinity: 0010
number: 1
}
IOThread: {
affinity: 0001
number: 2
}
IOThread: {
affinity: 1100
number: 3
}
}
Signed-off-by: John Ferlan <jferlan(a)redhat.com>
---
Figured I'd post these just to have them "ready" once the pinning options
for IOThreads are done being reviewed. Also running the Perl bindings did
find one issue regarding the already pushed GetIOThreadsInfo with respect
to ReadOnly bit checking (when it shouldn't have been) - a patch to resolve
that has been posted as well.
Changes | 4 ++++
Virt.xs | 43 +++++++++++++++++++++++++++++++++++++++++++
examples/iothreadsinfo.pl | 36 ++++++++++++++++++++++++++++++++++++
lib/Sys/Virt/Domain.pm | 17 +++++++++++++++++
4 files changed, 100 insertions(+)
create mode 100644 examples/iothreadsinfo.pl
diff --git a/Changes b/Changes
index b62ee24..f3e2f83 100644
--- a/Changes
+++ b/Changes
@@ -1,5 +1,9 @@
Revision history for perl module Sys::Virt
+1.2.14 2015-03-06
+
+ - Add virDomainGetIOThreads and virDomainPinIOThread API bindings
+
1.2.14 2015-00-00
- XXX
diff --git a/Virt.xs b/Virt.xs
index f9ec7a4..15d48f7 100644
--- a/Virt.xs
+++ b/Virt.xs
@@ -5014,6 +5014,49 @@ get_emulator_pin_info(dom, flags=0)
RETVAL
+void
+get_iothread_info(dom, flags=0)
+ virDomainPtr dom;
+ unsigned int flags;
+ PREINIT:
+ virDomainIOThreadInfoPtr *iothrinfo;
+ int niothreads;
+ int i;
+ PPCODE:
+ if ((niothreads = virDomainGetIOThreadsInfo(dom, &iothrinfo,
+ flags)) < 0)
+ _croak_error();
+
+ EXTEND(SP, niothreads);
+ for (i = 0 ; i < niothreads ; i++) {
+ HV *rec = newHV();
+ (void)hv_store(rec, "number", 6,
+ newSViv(iothrinfo[i]->iothread_id), 0);
+ (void)hv_store(rec, "affinity", 8,
+ newSVpvn((char*)iothrinfo[i]->cpumap,
+ iothrinfo[i]->cpumaplen), 0);
+ PUSHs(newRV_noinc((SV *)rec));
+ }
+
+ if (iothrinfo)
+ Safefree(iothrinfo);
+
+
+void
+pin_iothread(dom, iothread_id, mask, flags=0)
+ virDomainPtr dom;
+ unsigned int iothread_id;
+ SV *mask;
+ unsigned int flags;
+PREINIT:
+ STRLEN masklen;
+ unsigned char *maps;
+ PPCODE:
+ maps = (unsigned char *)SvPV(mask, masklen);
+ if (virDomainPinVcpuFlags(dom, iothread_id, maps, masklen, flags) < 0)
+ _croak_error();
+
+
int
num_of_snapshots(dom, flags=0)
virDomainPtr dom;
diff --git a/examples/iothreadsinfo.pl b/examples/iothreadsinfo.pl
new file mode 100644
index 0000000..c527e8c
--- /dev/null
+++ b/examples/iothreadsinfo.pl
@@ -0,0 +1,36 @@
+# -*- perl -*-
+use strict;
+use warnings;
+use Sys::Virt;
+
+my $addr = @ARGV ? shift @ARGV : "";
+print "Addr $addr\n";
+my $con = Sys::Virt->new(address => $addr, readonly => 1);
+
+print "VMM type: ", $con->get_type(), "\n";
+
+foreach my $dom (sort { $a->get_id <=> $b->get_id } $con->list_all_domains) {
+ print "Domain: {\n";
+ print " ID: ", $dom->get_id(), " '" , $dom->get_name(), "'\n";
+ print " UUID: ", $dom->get_uuid_string(), "\n";
+ my $nodeinfo = $con->get_node_info;
+ my @info = $dom->get_iothread_info(Sys::Virt::Domain::AFFECT_CONFIG);
+
+ foreach my $info (@info) {
+ print " IOThread: {\n";
+ foreach (sort { $a cmp $b } keys %{$info}) {
+ if ($_ eq "affinity") {
+ print " ", $_, ": ";
+ my @mask = split //, $info->{$_};
+ for (my $p = 0 ; $p < $nodeinfo->{cpus} ; $p++) {
+ print ((ord($mask[$p/8]) & (1 << ($p % 8))) ? 1 : 0);
+ }
+ print "\n";
+ } else {
+ print " ", $_, ": ", $info->{$_}, "\n";
+ }
+ }
+ print " }\n";
+ }
+ print "}\n";
+}
diff --git a/lib/Sys/Virt/Domain.pm b/lib/Sys/Virt/Domain.pm
index 5c8ef47..062c012 100644
--- a/lib/Sys/Virt/Domain.pm
+++ b/lib/Sys/Virt/Domain.pm
@@ -1216,6 +1216,23 @@ the physical CPUa, 8 cpus per character. To create a suitable
bitstring, use the C<vec> function with a value of C<1> for the
C<BITS> parameter.
+=item @iothreadinfo = $dom->get_iothread_info($flags=0)
+
+Obtain information about the state of all IOThreads in a running
+guest domain. The returned list will have one element for each IOThread,
+where each elements contains a hash reference. The keys in the hash
+are, C<number> the IOThread number and C<affinity> giving the allowed
+schedular placement. The value for C<affinity> is a
+string representing a bitmask against physical CPUs, 8 cpus per
+character. To extract the bits use the C<unpack> function with
+the C<b*> template.
+
+=item $dom->pin_iothread($iothread, $mask)
+
+Pin the IOThread given by index C<$iothread> to physical CPUs
+given by C<$mask>. The C<$mask> is a string representing a bitmask
+against physical CPUs, 8 cpus per character.
+
=item my @stats = $dom->get_cpu_stats($startCpu, $numCpus, $flags=0)
Requests the guests host physical CPU usage statistics, starting
--
2.1.0
9 years, 8 months
[libvirt] [PATCH v2 00/24] Drop network driver lock
by Michal Privoznik
Yet another version. This time with:
1) Peter's review worked in
2) Even more patches, that allow even more parallelism. With my
test program [1], I've been able to go from 56s to 23s.
1: https://www.redhat.com/archives/libvir-list/2015-February/msg01214.html
Michal Privoznik (24):
network_conf: Introduce virNetworkObjListForEach
network_conf: Introduce virNetworkObjListGetNames
network_conf: Introduce virNetworkObjListNumOfNetworks
network_conf: Introduce virNetworkObjListPrune
bridge_driver: Adapt to new virNetworkObjList accessors
test_driver: Adapt to new virNetworkObjList accessors
parallels_network: Adapt to new virNetworkObjList accessors
network_conf: Turn virNetworkObjList into virObject
network_conf: Turn struct _virNetworkObjList private
network_conf: Make virNetworkObj actually virObject
virNetworkObjList: Derive from virObjectLockableClass
network_conf: Introduce virNetworkObjEndAPI
bridge_driver: Use virNetworkObjEndAPI
test_driver: Use virNetworkObjEndAPI
parallels_network: Use virNetworkObjEndAPI
network_conf: Introduce locked versions of lookup functions
virNetworkObjListPtr: Make APIs self-locking
virNetworkObjFindBy*: Return an reference to found object
bridge_driver: Drop networkDriverLock() from almost everywhere
test_driver: Drop testDriverLock() from almost everywhere
parallels_network: Drop parallelsDriverLock() from everywhere.
bridge_driver: Use more of networkObjFromNetwork
virNetworkObjUnsetDefTransient: Lock object list if needed
virNetworkObjFindBy*: Don't lock all networks in the list
cfg.mk | 3 -
src/conf/network_conf.c | 422 +++++++++++++++++++++++++-------
src/conf/network_conf.h | 52 ++--
src/libvirt_private.syms | 13 +-
src/network/bridge_driver.c | 500 ++++++++++++++------------------------
src/parallels/parallels_network.c | 135 +++-------
src/test/test_driver.c | 185 +++-----------
tests/networkxml2conftest.c | 4 +-
tests/objectlocking.ml | 2 -
9 files changed, 634 insertions(+), 682 deletions(-)
--
2.0.5
9 years, 8 months
[libvirt] [RFC PATCH v2 0/4] Enable spapr-pci-vfio-host-bridge controllers for VFIO passthrough support
by Shivaprasad G Bhat
The following series of patches enable spapr-pci-vfio-host-bridge
controllers on PPC64-pseries machine which is required for supporting
host device passthrough using VFIO.
There were some initial enablement work on the same at
http://www.redhat.com/archives/libvir-list/2013-September/msg00838.html.
On pseries(ppc64), the vfio host devices(will refer as
hostdevs here on) cannot be assigned to the default emulated pci-host-bus(phb)
controller(like the default pci.0). The hostdevs goto spapr-pci-vfio-host-bridge.
The hostdevs belonging to the same iommu group share the same
spapr-pci-vfio-host-bridge. Henceforth, new spapr-pci-host-bridge needs to be
added for every hostdev belonging to any new iommu group. The hostdevs should
be attached to their respective spapr-pci-vfio-host-bridge.
Libvirt today adds all the devices to the default pci domain. The patch series
take care to add the new controller. A new pci domain in the guest per
controller is created. The hostdevs get their pci address in the respective
domain. The patch series taskes care of device addressing in vfio hostdevs,
SR-IOV interfaces and network interfaces from SRIOV virtual function pools.
Reference:
======
v1: http://www.redhat.com/archives/libvir-list/2014-October/msg00500.html
Changes Since v1:
* Some minor code clean up and rebase to latest code base after review with Prerna
* Patch 2 : Added logic to remove redundant spapr-vfio controllers.
* : Moved domaincommon.rng from Patch 4 to Patch 2.
---
Shivaprasad G Bhat (4):
qemu: Add SPAPR_VFIO_HOST_BRIDGE capability for PPC platform
qemu: parse spapr-vfio-pci controller from xml
qemu: assign addresses for spapr vfio hostdevices and generate cli
qemu: add test case for spapr-pci-vfio-host-bridge
docs/schemas/domaincommon.rng | 28 ++
src/bhyve/bhyve_domain.c | 2
src/conf/domain_addr.c | 8 -
src/conf/domain_addr.h | 2
src/conf/domain_conf.c | 165 +++++++++++-
src/conf/domain_conf.h | 19 +
src/libvirt_private.syms | 2
src/qemu/qemu_capabilities.c | 2
src/qemu/qemu_capabilities.h | 1
src/qemu/qemu_command.c | 276 +++++++++++++++++++-
src/qemu/qemu_command.h | 17 +
src/qemu/qemu_domain.c | 12 -
src/qemu/qemu_driver.c | 6
tests/qemuhotplugtest.c | 2
.../qemuxml2argv-hostdev-spapr-vfio.args | 20 +
.../qemuxml2argv-hostdev-spapr-vfio.xml | 75 +++++
tests/qemuxml2argvtest.c | 8 +
17 files changed, 609 insertions(+), 36 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-spapr-vfio.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-hostdev-spapr-vfio.xml
--
Signature
9 years, 8 months
[libvirt] [PATCHv2 0/7] Automaticaly fill <memory> element for NUMA enabled guests
by Peter Krempa
This series changes the behavior of the <memory> element in case the guest has
NUMA enabled and fills automatically the sum of sizes of numa nodes instead of
relying on the user passing correct data.
Peter Krempa (7):
qemu: Forbid setting maximum memory size with the API with NUMA
enabled
qemu: lxc: Clarify error message when setting current memory
conf: Replace access to def->mem.max_balloon with accessor functions
phyp: Fix error messages mentioning memory
qemu: command: Add helper to align memory sizes
conf: numa: Add helper to count total memory size configured in NUMA
conf: Automatically use NUMA memory size in case NUMA is enabled
src/conf/domain_conf.c | 72 +++++++++++++++++++---
src/conf/domain_conf.h | 4 ++
src/conf/numa_conf.c | 13 ++++
src/conf/numa_conf.h | 2 +
src/hyperv/hyperv_driver.c | 2 +-
src/libvirt_private.syms | 4 ++
src/libxl/libxl_conf.c | 2 +-
src/libxl/libxl_driver.c | 8 +--
src/lxc/lxc_cgroup.c | 2 +-
src/lxc/lxc_driver.c | 28 +++++----
src/lxc/lxc_fuse.c | 4 +-
src/lxc/lxc_native.c | 4 +-
src/openvz/openvz_driver.c | 2 +-
src/parallels/parallels_driver.c | 2 +-
src/parallels/parallels_sdk.c | 12 ++--
src/phyp/phyp_driver.c | 15 +++--
src/qemu/qemu_command.c | 23 ++++---
src/qemu/qemu_domain.c | 21 +++++++
src/qemu/qemu_domain.h | 2 +
src/qemu/qemu_driver.c | 49 ++++++++++-----
src/qemu/qemu_hotplug.c | 8 ++-
src/qemu/qemu_process.c | 2 +-
src/test/test_driver.c | 8 +--
src/uml/uml_driver.c | 8 +--
src/vbox/vbox_common.c | 4 +-
src/vmware/vmware_driver.c | 2 +-
src/vmx/vmx.c | 12 ++--
src/xen/xm_internal.c | 14 ++---
src/xenapi/xenapi_driver.c | 2 +-
src/xenapi/xenapi_utils.c | 4 +-
src/xenconfig/xen_common.c | 8 ++-
src/xenconfig/xen_sxpr.c | 9 +--
.../qemuxml2argv-numatune-memnode.args | 2 +-
33 files changed, 243 insertions(+), 111 deletions(-)
--
2.2.2
9 years, 8 months
[libvirt] ANNOUNCE: Oz 0.13.0 release
by Chris Lalancette
All,
I'm pleased to announce release 0.13.0 of Oz. Oz is a program
for doing automated installation of guest operating systems with
limited input from the user. Release 0.13.0 is a bugfix and feature
release for Oz. Some of the highlights between Oz 0.12.0 and 0.13.0
are:
- For Fedora, if the user specifies a version, but that isn't
supported yet, try the last supported version (in this case), as that
will often work.
- Fix a regression where we forgot to force the qcow2 image type
- Allow installs that use more than one installation device
- Add support for RHEL 6.5
- Rename OEL-6 to OL-6
- Add support for Ubuntu 14.04
- Add Windows 8.1 support
- Add CentOS-7 support
- Add the ability to specify kernel parameters in the TDL
- Make sure to remove dhcp leases from guests after the install
- Fix support for FreeBSD
- Add in support for TDL "precommands"; these are commands that are
run *before* package installation
- Fix up file locking
- Add support for RHEL 5.11
- Remove Ubuntu ssh keys at the end of installation
- Add support for Ubuntu 14.10
- Add support for XInclude, for merging various TDLs together
- Add Fedora 21 support
- Add support for ppc64 and ppc64le
A tarball and zipfile of this release is available on the Github
releases page: https://github.com/clalancette/oz/releases . Packages
for Fedora-20, Fedora-21, Fedora-22, EPEL-6, and EPEL-7 have been
built in Koji and will eventually make their way to stable.
Instructions on how to get and
use Oz are available at http://github.com/clalancette/oz/wiki .
If you have questions or comments about Oz, please feel free to
contact me at clalancette at gmail.com, or open up an issue on the
github page: http://github.com/clalancette/oz/issues .
Thanks to everyone who contributed to this release through bug reports,
patches, and suggestions for improvement.
Chris Lalancette
9 years, 8 months
[libvirt] [PATCH 0/2] Add some tiny tests for latest commits
by Martin Kletzander
Two commits (hashes mentioned in commit messages) were added lately
without tests and I feel like both deserve one, so here goes.
Martin Kletzander (2):
tests: Add test for virtio-mmio address type
tests: Add test for os interleaving
...=> qemuxml2argv-aarch64-aavmf-virtio-mmio.args} | 4 ++--
... => qemuxml2argv-aarch64-aavmf-virtio-mmio.xml} | 27 +++++++++++-----------
...l => qemuxml2argv-bios-nvram-os-interleave.xml} | 2 +-
tests/qemuxml2argvtest.c | 4 ++++
.../qemuxml2xmlout-bios-nvram-os-interleave.xml} | 0
tests/qemuxml2xmltest.c | 2 ++
6 files changed, 23 insertions(+), 16 deletions(-)
copy tests/qemuxml2argvdata/{qemuxml2argv-aarch64-virt-virtio.args => qemuxml2argv-aarch64-aavmf-virtio-mmio.args} (85%)
copy tests/qemuxml2argvdata/{qemuxml2argv-aarch64-virt-virtio.xml => qemuxml2argv-aarch64-aavmf-virtio-mmio.xml} (68%)
copy tests/qemuxml2argvdata/{qemuxml2argv-bios-nvram.xml => qemuxml2argv-bios-nvram-os-interleave.xml} (100%)
copy tests/{qemuxml2argvdata/qemuxml2argv-bios-nvram.xml => qemuxml2xmloutdata/qemuxml2xmlout-bios-nvram-os-interleave.xml} (100%)
--
2.3.0
9 years, 8 months