[libvirt] PATCH: pci-subsystem: ixgbe: SR-IOV: kernel way to order driver's virtfn -entries is odd causing libvirt failures.
by Niilona
Hi.
As Bjorn Helgaas recommend, this might be the item to discuss in the wider area.
-----------------------------------
There is a behavior effecting virtfn -entries in sysfs, when amount of
them increases over 10.
Run VM's through LIBVIRT -> QEMU/KVM, this causes :
- MAC address setting by LIBVIRT disordered ie. setting targeted to wrong VF.
- VLAN setting by LIBVIRT overall failed
Basics of this are in "/libvirt-x.x.x/src/util/virpci.c" ; in function below,
which don't order virtfn entries correctly.
/*
* Returns virtual functions of a physical function
*/
int
virPCIGetVirtualFunctions(const char *sysfs_path,
virPCIDeviceAddressPtr **virtual_functions,
unsigned int *num_virtual_functions)
{
But I let you to decide which is best way to fix this, as if every
application reads "virtfn" entries from PF's directory, they all need
to sort entries in alphabet. order to avoid this
influence.
So personally I did get over this by adding pre-zeroes to names to
have them in sorted order in PF's directory.
----------------------------
Tested :
- kernel 3.8.0-21
- libvirt 1.0.2 & libvirt 1.1.3
- ixgbe 3.11.33-k, ixgbe 3.17-3 & ixgbe 3.18.7
After applying this MAC/VLAN seen to work and VM's get contacted using
MAC's & VLAN's, which been checked using tcpdump.
P.S. Tested with 3.8.0-21, but patch constructed against
"https://github.com/torvalds/linux.git", so there is possibilty this
works in latest kernel, but haven't checked it.
At least ordering scheme seen in "iov.c" in same form as before.
-----------------------------
>From fac886b86099dca1937730026da24c34857c4077 Mon Sep 17 00:00:00 2001
From: Niilo Minkkinen <niilo.minkkinen(a)tieto.com>
Date: Wed, 23 Oct 2013 14:50:07 +0300
Subject: [PATCH 1/1] Fixes ordering of virtfn -entries on drivers with more
than 10 entries ( virtfn0...virtfn9 ).
This effects on drivers like Intel 82599 "ixgbe", which have max 31
VF's (Virtual Function) on
one PF (Physical Function).
Currently, ordering is "diffused", which in case causes MAC/VLAN
-settings on libvirt based
to PCI -addressing failed.
Signed-off-by: Niilo Minkkinen <niilo.minkkinen(a)tieto.com>
Signed-off-by: Tommy Varre <tommy.varre(a)tieto.com>
---
drivers/pci/iov.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/pci/iov.c b/drivers/pci/iov.c
index 21a7182..fbd1209 100644
--- a/drivers/pci/iov.c
+++ b/drivers/pci/iov.c
@@ -106,7 +106,7 @@ static int virtfn_add(struct pci_dev *dev, int id,
int reset)
mutex_unlock(&iov->dev->sriov->lock);
rc = pci_bus_add_device(virtfn);
- sprintf(buf, "virtfn%u", id);
+ sprintf(buf, "virtfn%02u", id);
rc = sysfs_create_link(&dev->dev.kobj, &virtfn->dev.kobj, buf);
if (rc)
goto failed1;
@@ -149,7 +149,7 @@ static void virtfn_remove(struct pci_dev *dev, int
id, int reset)
__pci_reset_function(virtfn);
}
- sprintf(buf, "virtfn%u", id);
+ sprintf(buf, "virtfn%02u", id);
sysfs_remove_link(&dev->dev.kobj, buf);
/*
* pci_stop_dev() could have been called for this virtfn already,
--
1.8.1.2
-----------------------------
What you think ?
Niilo Minkkinen
niilo.minkkinen(a)tieto.com
11 years
[libvirt] [PATCH v3] qemu: don't use deprecated -no-kvm-pit-reinjection
by Ján Tomko
Since qemu-kvm 1.1 [1] (since 1.3. in upstream QEMU [2])
'-no-kvm-pit-reinjection' has been deprecated.
Use -global kvm-pit.lost_tick_policy=discard instead.
https://bugzilla.redhat.com/show_bug.cgi?id=978719
[1] http://git.kernel.org/cgit/virt/kvm/qemu-kvm.git/commit/?id=4e4fa39
[2] http://git.qemu.org/?p=qemu.git;a=commitdiff;h=c21fb4f
---
v3: use -global instead of trying to add another -device
re: https://www.redhat.com/archives/libvir-list/2013-July/msg00833.html
Unsetting the QEMU_CAPS_NO_KVM_PIT capability for QEMU >1.2 seems to work
okay with libvirtd upgrades.
v2: https://www.redhat.com/archives/libvir-list/2013-July/msg00821.html
v1: https://www.redhat.com/archives/libvir-list/2013-July/msg00045.html
src/qemu/qemu_capabilities.c | 5 ++--
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 8 ++++--
.../qemuxml2argv-kvm-pit-delay.args | 5 ++++
.../qemuxml2argv-kvm-pit-delay.xml | 29 ++++++++++++++++++++++
.../qemuxml2argv-kvm-pit-device.args | 5 ++++
.../qemuxml2argv-kvm-pit-device.xml | 29 ++++++++++++++++++++++
tests/qemuxml2argvtest.c | 4 +++
8 files changed, 82 insertions(+), 4 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.xml
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index dc8f0be..06b71b5 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -242,6 +242,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"usb-storage.removable",
"virtio-mmio",
"ich9-intel-hda",
+ "kvm-pit",
);
struct _virQEMUCaps {
@@ -1393,6 +1394,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "usb-storage", QEMU_CAPS_DEVICE_USB_STORAGE },
{ "virtio-mmio", QEMU_CAPS_DEVICE_VIRTIO_MMIO },
{ "ich9-intel-hda", QEMU_CAPS_DEVICE_ICH9_INTEL_HDA },
+ { "kvm-pit", QEMU_CAPS_DEVICE_KVM_PIT },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
@@ -2477,13 +2479,12 @@ virQEMUCapsInitArchQMPBasic(virQEMUCapsPtr qemuCaps,
/*
* Currently only x86_64 and i686 support PCI-multibus,
- * -no-acpi and -no-kvm-pit-reinjection.
+ * -no-acpi
*/
if (qemuCaps->arch == VIR_ARCH_X86_64 ||
qemuCaps->arch == VIR_ARCH_I686) {
virQEMUCapsSet(qemuCaps, QEMU_CAPS_PCI_MULTIBUS);
virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI);
- virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_KVM_PIT);
}
ret = 0;
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index f8dc728..770744e 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -197,6 +197,7 @@ enum virQEMUCapsFlags {
QEMU_CAPS_USB_STORAGE_REMOVABLE = 156, /* usb-storage.removable */
QEMU_CAPS_DEVICE_VIRTIO_MMIO = 157, /* -device virtio-mmio */
QEMU_CAPS_DEVICE_ICH9_INTEL_HDA = 158, /* -device ich9-intel-hda */
+ QEMU_CAPS_DEVICE_KVM_PIT = 159, /* -device kvm-pit */
QEMU_CAPS_LAST, /* this must always be the last item */
};
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index ba102f4..c988646 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -7966,11 +7966,15 @@ qemuBuildCommandLine(virConnectPtr conn,
case VIR_DOMAIN_TIMER_TICKPOLICY_DELAY:
/* delay is the default if we don't have kernel
(-no-kvm-pit), otherwise, the default is catchup. */
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT))
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_KVM_PIT))
+ virCommandAddArgList(cmd, "-global",
+ "kvm-pit.lost_tick_policy=discard", NULL);
+ else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT))
virCommandAddArg(cmd, "-no-kvm-pit-reinjection");
break;
case VIR_DOMAIN_TIMER_TICKPOLICY_CATCHUP:
- if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT)) {
+ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_KVM_PIT) ||
+ virQEMUCapsGet(qemuCaps, QEMU_CAPS_DEVICE_KVM_PIT)) {
/* do nothing - this is default for kvm-pit */
} else if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_TDF)) {
/* -tdf switches to 'catchup' with userspace pit. */
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.args b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.args
new file mode 100644
index 0000000..ca5823f
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.args
@@ -0,0 +1,5 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/bin/qemu -S -M pc -m 214 -smp 2 -nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-no-kvm-pit-reinjection -no-acpi -boot c -usb -hda /dev/HostVG/QEMUGuest1 \
+-net none -serial none -parallel none
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.xml b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.xml
new file mode 100644
index 0000000..7835a1b
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.xml
@@ -0,0 +1,29 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'>
+ <timer name='pit' tickpolicy='delay'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.args b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.args
new file mode 100644
index 0000000..f03840f
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.args
@@ -0,0 +1,5 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test QEMU_AUDIO_DRV=none \
+/usr/bin/qemu -S -M pc -m 214 -smp 2 -nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-global kvm-pit.lost_tick_policy=discard -no-acpi -boot c -usb \
+-hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.xml
new file mode 100644
index 0000000..7835a1b
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-device.xml
@@ -0,0 +1,29 @@
+<domain type='qemu'>
+ <name>QEMUGuest1</name>
+ <uuid>c7a5fdbd-edaf-9455-926a-d65c16db1809</uuid>
+ <memory unit='KiB'>219136</memory>
+ <currentMemory unit='KiB'>219136</currentMemory>
+ <vcpu placement='static'>2</vcpu>
+ <os>
+ <type arch='i686' machine='pc'>hvm</type>
+ <boot dev='hd'/>
+ </os>
+ <clock offset='utc'>
+ <timer name='pit' tickpolicy='delay'/>
+ </clock>
+ <on_poweroff>destroy</on_poweroff>
+ <on_reboot>restart</on_reboot>
+ <on_crash>destroy</on_crash>
+ <devices>
+ <emulator>/usr/bin/qemu</emulator>
+ <disk type='block' device='disk'>
+ <source dev='/dev/HostVG/QEMUGuest1'/>
+ <target dev='hda' bus='ide'/>
+ <address type='drive' controller='0' bus='0' target='0' unit='0'/>
+ </disk>
+ <controller type='usb' index='0'/>
+ <controller type='ide' index='0'/>
+ <controller type='pci' index='0' model='pci-root'/>
+ <memballoon model='virtio'/>
+ </devices>
+</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index 0b808a4..58eb3e9 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1080,6 +1080,10 @@ mymain(void)
QEMU_CAPS_DRIVE, QEMU_CAPS_DEVICE_VIRTIO_MMIO,
QEMU_CAPS_DEVICE_VIRTIO_RNG, QEMU_CAPS_OBJECT_RNG_RANDOM);
+ DO_TEST("kvm-pit-device", QEMU_CAPS_DEVICE_KVM_PIT);
+ DO_TEST("kvm-pit-delay", QEMU_CAPS_NO_KVM_PIT);
+ DO_TEST("kvm-pit-device", QEMU_CAPS_NO_KVM_PIT, QEMU_CAPS_DEVICE_KVM_PIT);
+
virObjectUnref(driver.config);
virObjectUnref(driver.caps);
virObjectUnref(driver.xmlopt);
--
1.8.1.5
11 years
[libvirt] Host local_host running without virtualization hardware acceleration
by Sandro Bonazzola
Hi,
I had to reinstall ovirt yesterday and now it seems that it doesn't work anymore.
I'm running nightly on Fedora 18.
kernel-3.11.4-101.fc18.x86_64
sanlock-2.8-1.fc18.x86_64
libvirt-1.1.4-1.fc18.x86_64
qemu-1.5.1-1.fc18.x86_64
vdsm-4.13.0-93.gitea8c8f0.fc18.x86_64
ovirt-engine-3.4.0-0.2.master.20131104192919.git3b65870.fc18.noarch
engine-setup with all-in-one detects hardware virtualization and allow me to configure the system.
(it fails detecting engine health status due probably to recent changes in its URL, I'm already looking into it)
Once added localhost to the engine, it has been moved to non operational mode saying
I don't have virtualization hardware acceleration anymore.
I've found that:
# modinfo kvm
filename: /lib/modules/3.11.4-101.fc18.x86_64/kernel/arch/x86/kvm/kvm.ko
license: GPL
author: Qumranet
depends:
intree: Y
vermagic: 3.11.4-101.fc18.x86_64 SMP mod_unload
parm: min_timer_period_us:uint
parm: ignore_msrs:bool
parm: tsc_tolerance_ppm:uint
parm: allow_unsafe_assigned_interrupts:Enable device assignment on platforms without interrupt remapping support. (bool)
# /usr/bin/qemu-kvm
Could not access KVM kernel module: No such file or directory
failed to initialize KVM: No such file or directory
looking at strace:
open("/dev/kvm", O_RDWR|O_CLOEXEC) = -1 ENOENT (No such file or directory)
Any clue on what may be happened?
--
Sandro Bonazzola
Better technology. Faster innovation. Powered by community collaboration.
See how it works at redhat.com
11 years
[libvirt] Fwd: Re: [PATCH] virsh domxml-from-native to treat SCSI as the bus type for pseries by default
by Shivaprasad bhat
Hi Eric,
I realised you have not received my mails due to some problem with IMAP
server.
I sent out second version of my patch with your suggestions last week.
https://www.redhat.com/archives/libvir-list/2013-October/msg01110.html
Could you please help me reviewing the V2 ?
Thanks and Regards,
Shiva
---------- Forwarded message ----------
From: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
Date: Tue, Nov 5, 2013 at 12:07 PM
Subject: Fwd: Re: [libvirt] [PATCH] virsh domxml-from-native to treat SCSI
as the bus type for pseries by default
To: Shivaprasad G Bhat <shivaprasadbhat(a)gmail.com>
-------- Original Message -------- Message-ID:
<526E1EB5.5050902(a)linux.vnet.ibm.com>
<526E1EB5.5050902(a)linux.vnet.ibm.com> Date:
Mon, 28 Oct 2013 13:52:13 +0530 From: Shivaprasad G Bhat
<sbhat(a)linux.vnet.ibm.com> <sbhat(a)linux.vnet.ibm.com> User-Agent: Mozilla/5.0
(X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version:
1.0 To: Eric Blake <eblake(a)redhat.com> <eblake(a)redhat.com>, Shivaprasad G
Bhat <shivaprasadbhat(a)gmail.com> <shivaprasadbhat(a)gmail.com>,
libvir-list(a)redhat.com, zhlcindy(a)linux.vnet.ibm.com CC:
bpradip(a)in.ibm.com Subject:
Re: [libvirt] [PATCH] virsh domxml-from-native to treat SCSI as the bus
type for pseries by default References:
<20131024070709.13853.10308.stgit(a)localhost.localdomain><20131024070709.13853.10308.stgit(a)localhost.localdomain>
<5268CB8C.3090404(a)redhat.com> <5268CB8C.3090404(a)redhat.com> In-Reply-To:
<5268CB8C.3090404(a)redhat.com> <5268CB8C.3090404(a)redhat.com>
Content-Type: multipart/alternative;
boundary="------------050306080405050600030204"
Thanks Eric and Li. Sending out the v2 with the recommended changes.
Regards,
Shiva
On 10/24/2013 12:56 PM, Eric Blake wrote:
On 10/24/2013 08:07 AM, Shivaprasad G Bhat wrote:
From: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com> <sbhat(a)linux.vnet.ibm.com>
The bus type IDE being enum Zero, the bus type on pseries system
appears as IDE for all the disk types. Pseries platform needs this to
appear as SCSI instead of IDE.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
<sbhat(a)linux.vnet.ibm.com>
---
src/qemu/qemu_command.c | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index abb62e9..728409f 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -9995,6 +9995,7 @@ error:
static virDomainDiskDefPtr
qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
const char *val,
+ virDomainDefPtr dom,
TAB damage. Please run 'make syntax-check' and fix that.
int nvirtiodisk,
bool old_style_ceph_args)
{
@@ -10018,7 +10019,11 @@ qemuParseCommandLineDisk(virDomainXMLOptionPtr xmlopt,
if (VIR_ALLOC(def) < 0)
goto cleanup;
- def->bus = VIR_DOMAIN_DISK_BUS_IDE;
+ if (((dom->os.arch == VIR_ARCH_PPC64) &&
+ dom->os.machine && STREQ(dom->os.machine, "pseries")))
+ def->bus = VIR_DOMAIN_DISK_BUS_SCSI;
+ else
+ def->bus = VIR_DOMAIN_DISK_BUS_IDE;
I'm wondering if we should reuse our post-XML-parse callbacks here,
rather than open-coding a machine check. In other words, since we
already have code that knows how to do per-machine fixups to a domain
definition, we should be reusing those instead of open-coding duplicate
checks. (Actually, domxml-from-native needs a LOT of TLC, there's much
more wrong with it, even on non-pseries machines, than what you are
trying to patch).
--
libvir-list mailing
listlibvir-list@redhat.comhttps://www.redhat.com/mailman/listinfo/libvir-list
11 years
[libvirt] [PATCHv2 0/3] glusterfs storage pool
by Eric Blake
Fixes some problems identified in v1:
https://www.redhat.com/archives/libvir-list/2013-October/msg01354.html
Eric Blake (3):
storage: initial support for linking with libgfapi
storage: document gluster pool
storage: implement rudimentary glusterfs pool refresh
configure.ac | 21 +++
docs/formatstorage.html.in | 11 +-
docs/schemas/storagepool.rng | 21 +++
docs/storage.html.in | 90 ++++++++++-
libvirt.spec.in | 15 ++
m4/virt-gluster.m4 | 26 +++
po/POTFILES.in | 1 +
src/Makefile.am | 9 ++
src/conf/storage_conf.c | 20 ++-
src/conf/storage_conf.h | 3 +-
src/storage/storage_backend.c | 6 +
src/storage/storage_backend.h | 6 +-
src/storage/storage_backend_gluster.c | 228 +++++++++++++++++++++++++++
src/storage/storage_backend_gluster.h | 29 ++++
tests/storagepoolxml2xmlin/pool-gluster.xml | 8 +
tests/storagepoolxml2xmlout/pool-gluster.xml | 11 ++
tests/storagepoolxml2xmltest.c | 1 +
17 files changed, 493 insertions(+), 13 deletions(-)
create mode 100644 m4/virt-gluster.m4
create mode 100644 src/storage/storage_backend_gluster.c
create mode 100644 src/storage/storage_backend_gluster.h
create mode 100644 tests/storagepoolxml2xmlin/pool-gluster.xml
create mode 100644 tests/storagepoolxml2xmlout/pool-gluster.xml
--
1.8.3.1
11 years
[libvirt] libvirt-1.4.4 is out
by Daniel Veillard
As planned I tagged the git tree earlier today and pushed tarballs and
rpms to the usual place:
ftp://libvirt.org/libvirt/
The release is a bit smaller than usual in terms of commited patches
probably due to a large part of the team travelling to KVM Forum !
This is mostly a bug fix and maintainance release, it includes 4
important security patches in addition to the usual set of bug and
leak fixes. To note the added support for ARM 64 bits arch, and quite
a large set of portability fixes:
Features:
- Add support for AArch64 architecture (Pranavkumar Sawargaonkar)
- Various improvements on test code and test driver (many people)
Security:
- Don't link virt-login-shell against libvirt.so (CVE-2013-4400) (Daniel P. Berrange)
- Close all non-stdio FDs in virt-login-shell (CVE-2013-4400) (Daniel P. Berrange)
- Only allow 'stderr' log output when running setuid (CVE-2013-4400) (Daniel P. Berrange)
- Fix perms for virConnectDomainXML{To,From}Native (CVE-2013-4401) (Daniel P. Berrange)
Documentation:
- generate links from plain text documentation (Claudio Bley)
- define style of code blocks inside descriptions (Claudio Bley)
- add class "description" to div's containing descriptions (Claudio Bley)
- process code blocks similar to Markdown (Claudio Bley)
- fix typos in formatnwfilter (Chen Hanxiao)
- fix a typo in formatdomain (Chen Hanxiao)
- virsh: fix doc typos (Eric Blake)
- maint: typo fixes (Eric Blake)
- fix some typos about 'informations' (Chen Hanxiao)
- fix a typo in formatdomain (Chen Hanxiao)
- Expand description of host-model CPU mode (Jiri Denemark)
- virsh: fix a typo in virsh-domain (Chen Hanxiao)
- storage: document existing pools (Eric Blake)
- remote-driver: Fix 'leav' typo in comment (Christophe Fergeau)
- change the minimum weight description for blkio (Chen Hanxiao)
- Add some notes about secure usage of libvirt (Daniel P. Berrange)
- lxc: Fix an improper comment in lxc_process.c (Chen Hanxiao)
- nwfilter: fix a typo in nwfilter_gentech_driver.c (Hongwei Bi)
- cgroup: fix a comment typo in vircgroup.c (Chen Hanxiao)
- fix typo in HACKING (Chen Hanxiao)
- aclpolkit: Fix a heading typo (Cole Robinson)
Portability:
- virnetsocket: fix getsockopt on FreeBSD (Ryota Ozaki)
- MacOS: Handle changes to xdrproc_t definition (Doug Goldstein)
- fix api changes in xen restore (Bamvor Jian Zhang)
- MacOS: Re-add support for QEMU backend (Doug Goldstein)
- rpc: Retrieve peer PID via new getsockopt() for Mac (Doug Goldstein)
- build: fix build of virt-login-shell on systems with older gnutls (Jim Fehlig)
- build: fix linking virt-login-shell (Jim Fehlig)
- nodeinfo: fix physical memory size on Mac OS X (Ryota Ozaki)
- Add stub getegid impl for platforms lacking it (Daniel P. Berrange)
- better error checking for LOCAL_PEERCRED (Brian Candler)
- Add support for detecting PPC little endian arches (Daniel P. Berrange)
- xenapi: Fix build after const correctnes changes (Peter Krempa)
- rpc: Fix getsockopt on Snow Leopard and lower (Doug Goldstein)
- build: fix linker error on FreeBSD (Giuseppe Scrivano)
- tests: avoid compile failure on linux kernels older than 2.6.19 (Giuseppe Scrivano)
- nodeinfo: make freebsdNodeGetCPUCount work on Mac OS X (Ryota Ozaki)
- rpc: fix getsockopt for LOCAL_PEERCRED on Mac OS X (Ryota Ozaki)
- build: fix build on 32-bit platforms (Eric Blake)
- build: fix build on RHEL 5 (Eric Blake)
- build: fix build --without-remote (Eric Blake)
Bug fixes:
- Fix race in starting transient VMs (Daniel P. Berrange)
- Use a port from the migration range for NBD as well (Ján Tomko)
- nodedev_hal: fix segfault when virDBusGetSystemBus fails (Ryota Ozaki)
- Fix race condition reconnecting to vms & loading configs (Daniel P. Berrange)
- Don't update dom->persistent without lock held (Daniel P. Berrange)
- storage: fix incorrect typedef (Eric Blake)
- apparmor: Fix typo in function name in driver struct initialization (Peter Krempa)
- qemu: fix well-formed migration URI formatting (Michael Chapman)
- LXC: don't free tty before using it in lxcContainerSetupDevices (Gao feng)
- python: Fix Create*WithFiles filefd passing (Marian Neagul)
- networkStartDhcpDaemon: Check for dnsmasqCapsRefresh failure (Hongwei Bi)
- virsh: Fix job watching when STDIN is not a tty (Peter Krempa)
- qemu: fix removal of <interface type='hostdev'> (Laine Stump)
- Fix a problem introduced by commit 99889012 (Geoff Hickey)
- qemu: Avoid assigning unavailable migration ports (Wang Yufei)
- viralloc.h: Fix typo in VIR_APPEND_ELEMENT_COPY_QUIT (Michal Privoznik)
- remote: fix regression in event deregistration (Zhou Yimin)
- daemon: don't free domain if it's null (Chen Hanxiao)
- Remove ATTRIBUTE_NONNULL(3) from qemuMonitorJSONDrivePivot (John Ferlan)
- rpc: Correct the wrong payload size checking (Osier Yang)
- Fix typo breaking cgroups for NBD backed filesystems (Daniel P. Berrange)
- Ignore thin pool LVM devices. (Dusty Mabe)
- domain_conf.c: Initialize arrVar and cntVar (Michal Privoznik)
- vbox: handle 'saved' state of VMs (Ryota Ozaki)
- esx: Fix floppy.fileName handling in the vmx file parser (Geoff Hickey)
- Convert uuid to a string before printing it (Ján Tomko)
- Initialize threading & error layer in LXC controller (Daniel P. Berrange)
- Don't ignore all dbus connection errors (Daniel P. Berrange)
- Fix exit status of lxc controller (Daniel P. Berrange)
- Fix flaw in detecting log format (Daniel P. Berrange)
- qemu_migration: Avoid crashing if domain dies too quickly (Michal Privoznik)
- util: fix two virCompareLimitUlong bugs (Bing Bu Cao)
- storage_backend: Fix issue with allocation of 0 length volume (John Ferlan)
- qemu: Init @pcidevs in qemuPrepareHostdevPCIDevices (Michal Privoznik)
- LXC: Fix handling of RAM filesystem size units (Ján Tomko)
- Don't clobber 'ret' variable in testCompareXMLToXMLHelper (Daniel P. Berrange)
- Adjust legacy max payload size to account for header information (Claudio Bley)
- storage: fix file allocation behavior in file cloning (Oskari Saarenmaa)
- virfile: safezero: fix buffer allocation max size (Oskari Saarenmaa)
- test: Fix coverity warnings (Cole Robinson)
- nodedev: Resolve Relax-NG validity error (John Ferlan)
- Free cmd in virNetDevVethCreate (Gao feng)
- Free cmd in virNetDevVethDelete (Gao feng)
- qemu: check actual netdev type rather than config netdev type during init (Laine Stump)
- qemuMonitorTestFree: Join worker thread (Michal Privoznik)
- Avoid deleting NULL veth device name (Daniel P. Berrange)
- qemuMonitorJSONSendKey: Avoid double free (Michal Privoznik)
- qemuMonitorJSONGetVirtType: Fix error message (Michal Privoznik)
- qemu: cgroup: Fix crash if starting nographics guest (Cole Robinson)
- selinux: Only close the selabel_handle once (Ján Tomko)
- Fix handling of IPv6 listen addresses in cmdDomDisplay (Ján Tomko)
- util: recognize SMB/CIFS filesystems as shared (Laine Stump)
- Fix leak of objects when reconnecting to QEMU instances (Daniel P. Berrange)
Improvements:
- libxl: fix dubious cpumask handling in libxlDomainSetVcpuAffinities (Jeremy Fitzhardinge)
- Improve debugging of QEMU start/stop (Daniel P. Berrange)
- Improve debugging of job enter/exit code (Daniel P. Berrange)
- storage: use correct type for array count (Eric Blake)
- maint: avoid further typedef accidents (Eric Blake)
- libvirt.c: indent code of virDomainGetMemoryParameters's documentation (Claudio Bley)
- libvirt.c: add 2 spaces of indentation to example code of virStreamSend (Claudio Bley)
- Add '+' to uid/gid printing for label processing (John Ferlan)
- Push RPM deps down into libvirt-daemon-driver-XXXX sub-RPMs (Daniel P. Berrange)
- capabilities: add baselabel per sec driver/virt type to secmodel (Giuseppe Scrivano)
- security: add new internal function "virSecurityManagerGetBaseLabel" (Giuseppe Scrivano)
- security: use a single function to set DAC user and group (Giuseppe Scrivano)
- virsh: new environment variable VIRSH_HISTSIZE (Pavel Raiskup)
- maint: update to latest gnulib (Eric Blake)
- Skip debug message in lxcContainerSetID if no map is set. (Chen Hanxiao)
- Avoid Coverity DEADCODE warning (John Ferlan)
- virsh: allow alias to expand to opt=value pair (Eric Blake)
- Ignore GNU Global tag files (Martin Kletzander)
- build: Fix prohibit_int_ijk (and iijjkk) on RHEL 5 (Martin Kletzander)
- Get rid of shadowed booleans (Michal Privoznik)
- vircgroupmock: Mock access() to some more files (Michal Privoznik)
- tests: Use lv_abs_top_builddir instead of bare abs_top_builddir (Michal Privoznik)
- qemu: move qemuDomainRemoveNetDevice to avoid forward reference (Laine Stump)
- qemu: simplify calling qemuDomainHostdevNetConfigRestore (Laine Stump)
- Move virt-login-shell into libvirt-login-shell sub-RPM (Daniel P. Berrange)
- Block all use of libvirt.so in setuid programs (Daniel P. Berrange)
- Remove (nearly) all use of getuid()/getgid() (Daniel P. Berrange)
- Don't allow remote driver daemon autostart when running setuid (Daniel P. Berrange)
- Only allow the UNIX transport in remote driver when setuid (Daniel P. Berrange)
- Block all use of getenv with syntax-check (Daniel P. Berrange)
- Remove all direct use of getenv (Daniel P. Berrange)
- Make virCommand env handling robust in setuid env (Daniel P. Berrange)
- Set a sane $PATH for virt-login-shell (Daniel P. Berrange)
- Add helpers for getting env vars in a setuid environment (Daniel P. Berrange)
- qemu: Fix augeas support for migration ports (Michal Privoznik)
- qemu: Make migration port range configurable (Jiri Denemark)
- netcf: Don't complain when cleanup is called before init (Christophe Fergeau)
- virsh: improve usability of '--print-xml' flag for attach-disk command (Chen Hanxiao)
- esx: Remove unnecessary NULL comparisons (3/3) (Geoff Hickey)
- esx: Remove unnecessary NULL comparisons (2/3) (Geoff Hickey)
- esx: Remove unnecessary NULL comparisons (1/3) (Geoff Hickey)
- Add support for enabling SASL for SPICE guests (Daniel P. Berrange)
- qemuDomainCleanupRemove: s/memmove/VIR_DELETE_ELEMENT_INPLACE/ (Michal Privoznik)
- build: use the gnulib version of the .m4 files when present (Giuseppe Scrivano)
- storage: allow interleave in pool XML (Eric Blake)
- Add some logging to LXC disk/fs nbd/loop setup (Daniel P. Berrange)
- Add logging to LXC cgroup devices setup (Daniel P. Berrange)
- Add log statement when NBD device is setup (Daniel P. Berrange)
- AArch64: Add qemu capabilities schemeta for test. (Pranavkumar Sawargaonkar)
- Implement minimal sysinfo for AArch64 platforms. (Pranavkumar Sawargaonkar)
- AArch64: Parse cputopology from /proc/cpuinfo. (Pranavkumar Sawargaonkar)
- AArch64: CPU Support for AArch64 (ARMv8 64bit). (Pranavkumar Sawargaonkar)
- AArch64: Add AArch64 architecture to list of valid arches. (Pranavkumar Sawargaonkar)
- cpu: x86: Clean up error messages in x86VendorLoad() (Peter Krempa)
- cpu: x86: Use whitespace to clarify context and use consistent labels (Peter Krempa)
- cpu: x86: Fix function header formatting and whitespace (Peter Krempa)
- cpu: x86: Fix return types of x86cpuidMatch and x86cpuidMatchMasked (Peter Krempa)
- cpu: x86: Rename data_iterator and DATA_ITERATOR_INIT (Peter Krempa)
- cpu: x86: Rename x86DataAddCpuid as virCPUx86DataAddCPUID (Jiri Denemark)
- cpu: x86: Rename x86MakeCPUData as virCPUx86MakeData (Jiri Denemark)
- cpu: x86: Rename x86DataFree() as virCPUx86DataFree() (Jiri Denemark)
- cpu: x86: Rename struct cpuX86Data as virCPUx86Data (Jiri Denemark)
- cpu: x86: Rename struct cpuX86cpuid as virCPUx86CPUID (Jiri Denemark)
- cpu: Add support for loading and storing CPU data (Jiri Denemark)
- qemu: command: Fix macro indentation (Peter Krempa)
- conf: Mark user provided strings in error messages when parsing XML (Peter Krempa)
- schema: Rename option 'hypervtristate' to 'featurestate' (Peter Krempa)
- fix typo in lxc_driver.c and virsh-nodedev.c (Hongwei Bi)
- build: Add lxc testcase to dist list (Daniel Hansel)
- cgroup: leave blkio cgroup value checking to kernel (Chen Hanxiao)
- cgroup: show error when EINVAL is returned (Chen Hanxiao)
- vbox: merge duplicate state conversions (Ryota Ozaki)
- build: syntax check to avoid 'const fooPtr' (Eric Blake)
- maint: avoid 'const fooPtr' in all remaining places (Eric Blake)
- maint: avoid 'const fooPtr' in qemu (Eric Blake)
- maint: avoid 'const fooPtr' in security (Eric Blake)
- maint: avoid 'const fooPtr' in conf (Eric Blake)
- maint: avoid 'const fooPtr' in domain_conf (Eric Blake)
- maint: fix awkward typing of virDomainChrGetDomainPtrs (Eric Blake)
- maint: avoid 'const fooPtr' in python bindings (Eric Blake)
- maint: avoid 'const fooPtr' in tests (Eric Blake)
- maint: avoid 'const fooPtr' in nwfilter files (Eric Blake)
- maint: avoid 'const fooPtr' in cpu files (Eric Blake)
- maint: avoid 'const fooPtr' in virnet files (Eric Blake)
- maint: avoid 'const fooPtr' in several util files (Eric Blake)
- maint: avoid 'const fooPtr' in hashes (Eric Blake)
- maint: avoid 'const fooPtr' in public API (Eric Blake)
- Improve log filtering in virLXCProcessReadLogOutputData (Daniel P. Berrange)
- Ensure lxcContainerResolveSymlinks reports errors (Daniel P. Berrange)
- Ensure lxcContainerMain reports errors on stderr (Daniel P. Berrange)
- VMX: Serial devices don't have to be attached (Doug Goldstein)
- Revert "VMX: Some serial ports are not actually connected" (Doug Goldstein)
- qemu: snapshot: Add support for compressing external snapshot memory (Peter Krempa)
- qemu: managedsave: Add support for compressing managed save images (Peter Krempa)
- Improve error reporting with LXC controller (Daniel P. Berrange)
- Make LXC controller use a private dbus connection & close it (Daniel P. Berrange)
- Add a method for closing the dbus system bus connection (Daniel P. Berrange)
- Allow use of a private dbus bus connection (Daniel P. Berrange)
- VMware: Do version detection earlier (Doug Goldstein)
- VMware: Simplify array walk for driver type (Doug Goldstein)
- qemu: Include listenAddress in debug prints (Michal Privoznik)
- Move virNetDevVPort enum impl into virnetdevvportprofile.c (Daniel P. Berrange)
- qemu_conf: Introduce "migration_address" (Michal Privoznik)
- qemu: Implement support for VIR_MIGRATE_PARAM_LISTEN_ADDRESS (Michal Privoznik)
- virsocket: Introduce virSocketAddrIsWildcard (Michal Privoznik)
- Migration: Introduce VIR_MIGRATE_PARAM_LISTEN_ADDRESS (Michal Privoznik)
- qemu: Introduce qemuDomainDefCheckABIStability (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONSendKey (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetVirtType (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetCPUInfo (Michal Privoznik)
- qemumonitorjsontest: Extend the test for yet another monitor commands (Michal Privoznik)
- qemu: Prefer VFIO for PCI device passthrough (Peter Krempa)
- qemu: hostdev: Add checks if PCI passthrough is available in the host (Peter Krempa)
- qemu: hostdev: Fix function spacing and header formatting (Peter Krempa)
- qemu: refactor qemuCompressProgramAvailable() (Peter Krempa)
- qemu: Fix coding style in qemuDomainSaveFlags() (Peter Krempa)
- storage: Use bool instead of int (Ján Tomko)
- tests: Add qemu test for multiple timers (Cole Robinson)
- qemu: hostdev: Refactor PCI passhrough handling (Peter Krempa)
- virerror: s/VIR_ERR_STORAGE_VOL_EXISTS/VIR_ERR_STORAGE_VOL_EXISTS/ (Michal Privoznik)
- fix a ambiguous output of the command:'virsh vol-create-as' (Hongwei Bi)
- build: add configure --without-readline (Eric Blake)
- build: move readline check into its own macro (Eric Blake)
- build: kill maintainer mode, always rebuild by default (Eric Blake)
- Remove use of virConnectPtr from all remaining nwfilter code (Daniel P. Berrange)
- Don't pass virConnectPtr in nwfilter 'struct domUpdateCBStruct' (Daniel P. Berrange)
- Remove virConnectPtr arg from virNWFilterDefParse* (Daniel P. Berrange)
- qemu: Use maximum guest memory size when getting NUMA placement advice (Peter Krempa)
- virfile: safezero: fall back to writing block by block if mmap fails (Oskari Saarenmaa)
- test: snapshot: Add REDEFINE support (Cole Robinson)
- qemu: snapshot: Break out redefine preparation to shared function (Cole Robinson)
- test: Implement snapshot create/delete/revert APIs (Cole Robinson)
- test: Allow specifying domainsnapshot XML (Cole Robinson)
- qemu: snapshots: Simplify REDEFINE flag check (Cole Robinson)
- qemucapabilitiesdata: Add qemu-1.6.50 data (Michal Privoznik)
- qemucapabilitiesdata: Add qemu-1.6.0 data (Michal Privoznik)
- qemucapabilitiesdata: Add qemu-1.4.2 data (Michal Privoznik)
- qemucapabilitiesdata: Add qemu-1.3.1 data (Michal Privoznik)
- qemucapabilitiesdata: Add qemu-1.2.2 data (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONSystemPowerdown (Michal Privoznik)
- Use 'vnet' as prefix for veth devices (Daniel P. Berrange)
- Retry veth device creation on failure (Daniel P. Berrange)
- Avoid reporting an error if veth device is already deleted (Daniel P. Berrange)
- Don't set netdev offline in container cleanup (Daniel P. Berrange)
- qemumonitorjsontest: Test qemuMonitorJSONGetMigrationCapability (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetTargetArch (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONSetBlockIoThrottle (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetPtyPaths (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetSpiceMigrationStatus (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetMigrationStatus (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetMigrationCacheSize (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetBlockStatsInfo (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetBlockInfo (Michal Privoznik)
- qemumonitorjsontest: Test qemuMonitorJSONGetBalloonInfo (Michal Privoznik)
- qemu_hotplug: Allow QoS update in qemuDomainChangeNet (Michal Privoznik)
- virNetDevBandwidthEqual: Make it more robust (Michal Privoznik)
- test: Implement readonly snapshot APIs (Cole Robinson)
- test: Wire up managed save APIs (Cole Robinson)
- test: Allow specifying object transient state in driver XML (Cole Robinson)
- tests: Introduce qemucapabilitiestest (Michal Privoznik)
- qemuMonitorTest: Make check for monitor command match optional (Michal Privoznik)
- tests: Learn qemuMonitorTestNew optional greeting (Michal Privoznik)
- qemu_capabilities: Introduce virQEMUCapsInitQMPMonitor (Michal Privoznik)
Cleanups:
- xenapi: fix coding style in xenapi_driver.c (Hongwei Bi)
- virsh: undocument --shareable (--mode already covers it) (Eric Blake)
- Remove test case average timing (Daniel P. Berrange)
- Remove existing OOM test impl (Daniel P. Berrange)
Thanks everybody for everyone who helped for this release, be it for
documentation, bug reports, patches, etc ...
Enjoy !
Daniel
--
Daniel Veillard | Open Source and Standards, Red Hat
veillard(a)redhat.com | libxml Gnome XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | virtualization library http://libvirt.org/
11 years
[libvirt] [PATCHv2 0/8] Introduce paravirtual spinlock support
by Peter Krempa
Version 2 fixes stuff pointed out in Dan's review
Jiri Denemark (2):
cpu: Export few x86-specific APIs
qemu: Add monitor APIs to fetch CPUID data from QEMU
Peter Krempa (6):
cpu_x86: Refactor storage of CPUID data to add support for KVM
features
cpu: x86: Parse the CPU feature map only once
cpu: x86: Add internal CPUID features support and KVM feature bits
conf: Refactor storing and usage of feature flags
qemu: Add support for paravirtual spinlocks in the guest
qemu: process: Validate specific CPUID flags of a guest
docs/formatdomain.html.in | 8 +
docs/schemas/domaincommon.rng | 10 +-
src/conf/domain_conf.c | 195 +++++++++---
src/conf/domain_conf.h | 3 +-
src/cpu/cpu_x86.c | 350 +++++++++++----------
src/cpu/cpu_x86.h | 9 +
src/cpu/cpu_x86_data.h | 20 +-
src/libvirt_private.syms | 6 +
src/libxl/libxl_conf.c | 9 +-
src/lxc/lxc_container.c | 6 +-
src/qemu/qemu_command.c | 28 +-
src/qemu/qemu_monitor.c | 35 +++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_monitor_json.c | 145 +++++++++
src/qemu/qemu_monitor_json.h | 2 +
src/qemu/qemu_process.c | 53 ++++
src/vbox/vbox_tmpl.c | 45 ++-
src/xenapi/xenapi_driver.c | 10 +-
src/xenapi/xenapi_utils.c | 22 +-
src/xenxs/xen_sxpr.c | 20 +-
src/xenxs/xen_xm.c | 30 +-
tests/Makefile.am | 1 +
.../qemumonitorjson-getcpu-full.data | 5 +
.../qemumonitorjson-getcpu-full.json | 46 +++
.../qemumonitorjson-getcpu-host.data | 6 +
.../qemumonitorjson-getcpu-host.json | 45 +++
tests/qemumonitorjsontest.c | 76 +++++
.../qemuxml2argv-pv-spinlock-disabled.args | 5 +
.../qemuxml2argv-pv-spinlock-disabled.xml | 26 ++
.../qemuxml2argv-pv-spinlock-enabled.args | 5 +
.../qemuxml2argv-pv-spinlock-enabled.xml | 26 ++
tests/qemuxml2argvtest.c | 2 +
tests/qemuxml2xmltest.c | 2 +
33 files changed, 952 insertions(+), 304 deletions(-)
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-full.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-full.json
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-host.data
create mode 100644 tests/qemumonitorjsondata/qemumonitorjson-getcpu-host.json
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-disabled.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-disabled.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-enabled.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-pv-spinlock-enabled.xml
--
1.8.3.2
11 years
[libvirt] [RFC] net-dhcp-leases: Query: Reg: Leases API Script
by Nehal J Wani
Q1. The --dhcp-script option will require libvirt to provide a script
or executable file to be run. Now as the man page says, this file is
executed "Whenever a new DHCP ease is created, or an old one
destroyed". Life was easy with the script, as it used the command sed
to remove the destroyed lease. eblake had suggested me to use a C
program instead. So I wanted to finalize whether to go with C or
continue with shell script.
Q2. The above executable file will be writing the custom formatted
lease parameters to a file "dnsmasq-ip-mac.status" (suggestion open
for name). This newly created/updated file will be parsed by the API.
We need to decide the format for the file. Do we continue with space
separated parameters as before?
Q3. What should be the location of the above two files? Is there any
example that I can follow in libvirt for deploying custom-script
files/C programs which are not to be linked?
Script is attached.
--
Nehal J Wani
11 years
[libvirt] pvpanic plans?
by Paolo Bonzini
The thread from yesterday has died off (perhaps also because of
my inappropriate answer to Michael, for which I apologize to him
and everyone). I took some time to discuss the libvirt requirements
further with Daniel Berrange and Eric Blake on IRC. If anyone is
interested, I can give logs. This is a suggestion for how to
proceed in both QEMU and libvirt.
== Builtin pvpanic ==
QEMU will remove pvpanic from pc-1.5 in 1.6.1 and 1.5.4. This does not
break migration.
== Support in libvirt for current functionality ==
libvirt will add a <panic-notifier/> element, and possibly a capability
for it accessible via "virsh capabilities". There are two possibilities:
1) On QEMU 1.5.4/1.6.1 and newer (and on QEMU 1.6.0 with a machine type
other than pc-1.5), <on_crash> will only work if the element is there.
On QEMU 1.5.0->1.5.3, and on QEMU 1.6.0 with the pc-1.5 machine type,
<on_crash> will be obeyed always, and may override e.g. reboot-on-panic
if a guest driver exist.
2) On all versions, <on_crash> will only work if the element is there.
In turn, there are two ways to implement (2):
2a) libvirt will always add -global pvpanic.iobase=0 to neutralize
the builtin pvpanic device if present. <panic-notifier/>
will create the device with -device pvpanic,iobase=0x505
Advantage: no changes to QEMU
Disadvantage 1: writes to port 0 with QEMU 1.{5.0,5.1,5.2,5.3,6.0}
and pc-1.5 machine type will write to a pvpanic device instead of
the DMA controller. Probably harmless, and limited to some QEMU
versions.
Disadvantage 2: libvirt has knowledge of the pvpanic port number
2b) QEMU will provide a way for libvirt to detect that no machine type
has the builtin pvpanic. If some machine type may have the builtin
pvpanic, and <panic-notifier/> is absent, libvirt will add
"-global pvpanic.iobase=0" to neutralize it. Otherwise, libvirt
will create the device normally.
A possible way for libvirt to detect "good" machine types is a
dummy property. This is a bit ugly in that the property would not
affect the behavior of the device. The property would remain in
the long term.
Another possibility is for QEMU to rename the device, e.g. to
isa-pvpanic. This is also somewhat gross, but not visible in the
long term when the "pvpanic" name will be lost in history.
Advantage 1: libvirt has no knowledge of the pvpanic port number
Disadvantage 1: same as above
Disadvantage 2: need a somewhat gross change in QEMU
This method also provides an (also somewhat gross on the QEMU side)
way to detect other changes in the pvpanic semantics. One example
mentioned below, is making the panicked state temporary.
== Possible improvements to pvpanic ==
The current implementation of pvpanic supports three modes: reset system
on panic, destroy domain on panic, preserve domain with no possibility
to resume it. (Optionally a domain can be dumped too).
Long term, the choice to include pvpanic should not be on the guest
admin's shoulders, but rather in libosinfo. Thus, it would be nice to
have a fourth mode where the panic is logged but the guest otherwise
keeps running. This mode would let libosinfo add pvpanic by default
without affecting the guest's behavior on panic.
With this change, <on_crash>ignore</on_crash> will behave as follows
for the three possibilities above:
(1) With QEMU 1.5.0 to 1.6.1, <on_crash> will _not_ obey the setting,
never (even if no <panic-notifier/> is specified).
libvirt will have to pick a fallback action.
advantage of destroy as fallback: it is the default (but
note that restart is the default for virt-install)
advantage of preserve as fallback: lets the admin examine
the panic
advantage of restart as fallback: maximum availability of
the VM, it is the default for virt-install
(2a) With QEMU 1.5.0 to 1.6.1, <on_crash> will _not_ obey the setting
if <panic-notifier/> is specified. libvirt has _no way_ to learn
about this, so the capability would always be present with these
QEMU versions and libosinfo would always add <panic-notifier/> with
these versions. Given the libosinfo scenario being considered here,
this is not very different from (1).
(2b) With QEMU 1.5.0 to 1.6.1, the <panic-notifier/> element will not
be available and not exposed in libvirt capabilities. Thus with
this version libosinfo would omit <panic-notifier/> from the XML.
Guest policy will always be followed correctly.
The problem in both (1) and (2a) can be summarized as follows. First,
libvirt will have to implement and document a fallback action for buggy
QEMU. Second, even though the problems would be limited to some version
of QEMU, they would be relatively hard to debug for a casual user, could
start happening randomly by updating any one of QEMU, libvirt, libosinfo
or the guest kernel, and there is no fallback action for libvirt that is
always correct.
Thus, considering future libosinfo support for pvpanic, (2b) is preferrable
in my opinion.
Now, making pvpanic reversible requires a change in QEMU (patch already
posted). Andreas proposed using a pvpanic property to determine whether
the panicked state is temporary or definitive. libvirt could piggyback
on such a property to detect the "goodness" of machine types (as mentioned
regarding solution 2b above). However:
First, this would require a more intrusive patch, less appealing for
1.5 and 1.6 stable branches. Second, there is no reason why libvirt would
want to make the panicked state definitive. To achieve the same effect,
libvirt can just not issue the "continue" monitor command when the guest
is panicked. Thus the new property would be useless except to communicate
pvpanic behavior---and renaming the device still seems preferrable to me.
Thanks for reading up to here!
Paolo
11 years