[libvirt] deadlock in function storageVolLookupByKey and storageVolLookupByPath
by Caizhifeng
root@cvknode-141:~/libvirt1.1.0# diff storage_driver.c storage_driver-new.c
1364c1364,1365
< if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
---
> if (virStorageVolLookupByKeyEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
> virStoragePoolObjUnlock(driver->pools.objs[i]);
1365a1367
> }
1371a1374
> virStoragePoolObjUnlock(driver->pools.objs[i]);
1424c1427,1428
< if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0)
---
> if (virStorageVolLookupByPathEnsureACL(conn, driver->pools.objs[i]->def, vol) < 0) {
> virStoragePoolObjUnlock(driver->pools.objs[i]);
1425a1430
> }
1431a1437
> virStoragePoolObjUnlock(driver->pools.objs[i]);
root@cvknode-141:~/libvirt1.1.0#
-------------------------------------------------------------------------------------------------------------------------------------
本邮件及其附件含有杭州华三通信技术有限公司的保密信息,仅限于发送给上面地址中列出
的个人或群组。禁止任何其他人以任何形式使用(包括但不限于全部或部分地泄露、复制、
或散发)本邮件中的信息。如果您错收了本邮件,请您立即电话或邮件通知发件人并删除本
邮件!
This e-mail and its attachments contain confidential information from H3C, which is
intended only for the person or entity whose address is listed above. Any use of the
information contained herein in any way (including, but not limited to, total or partial
disclosure, reproduction, or dissemination) by persons other than the intended
recipient(s) is prohibited. If you receive this e-mail in error, please notify the sender
by phone or email immediately and delete it!
11 years, 4 months
[libvirt] Reminder: KVM Forum 2013 Call for Participation
by KVM-Forum-2013-PC@redhat.com
Reminder, the KVM Forum CFP closes in less than 2 weeks.
Also, thanks to generous support from our sponsors early registrants
get an awesome discount!
=================================================================
KVM Forum 2013: Call For Participation
October 21-23, 2013 - Edinburgh International Conference Centre - Edinburgh, UK
(All submissions must be received before midnight July 21, 2013)
=================================================================
KVM is an industry leading open source hypervisor that provides an ideal
platform for datacenter virtualization, virtual desktop infrastructure,
and cloud computing. Once again, it's time to bring together the
community of developers and users that define the KVM ecosystem for
our annual technical conference. We will discuss the current state of
affairs and plan for the future of KVM, its surrounding infrastructure,
and management tools. The oVirt Workshop will run in parallel with the
KVM Forum again, bringing in a community focused on enterprise datacenter
virtualization management built on KVM. For topics which overlap we will
have shared sessions. So mark your calendar and join us in advancing KVM.
http://events.linuxfoundation.org/events/kvm-forum/
Once again we are colocated with The Linux Foundation's LinuxCon Europe.
KVM Forum attendees will be able to attend oVirt Workshop sessions and
are eligible to attend LinuxCon Europe for a discounted rate.
http://events.linuxfoundation.org/events/kvm-forum/register
We invite you to lead part of the discussion by submitting a speaking
proposal for KVM Forum 2013.
http://events.linuxfoundation.org/cfp
Suggested topics:
KVM/Kernel
- Scaling and performance
- Nested virtualization
- I/O improvements
- VFIO, device assignment, SR-IOV
- Driver domains
- Time keeping
- Resource management (cpu, memory, i/o)
- Memory management (page sharing, swapping, huge pages, etc)
- Network virtualization
- Security
- Architecture ports
QEMU
- Device model improvements
- New devices and chipsets
- Scaling and performance
- Desktop virtualization
- Spice
- Increasing robustness and hardening
- Security model
- Management interfaces
- QMP protocol and implementation
- Image formats
- Firmware (SeaBIOS, OVMF, UEFI, etc)
- Live migration
- Live snapshots and merging
- Fault tolerance, high availability, continuous backup
- Real-time guest support
Virtio
- Speeding up existing devices
- Alternatives
- Virtio on non-Linux or non-virtualized
Management infrastructure
- oVirt (shared track w/ oVirt Workshop)
- Libvirt
- KVM autotest
- OpenStack
- Network virtualization management
- Enterprise storage management
Cloud computing
- Scalable storage
- Virtual networking
- Security
- Provisioning
SUBMISSION REQUIREMENTS
Abstracts due: July 21, 2013
Notification: August 1, 2013
Please submit a short abstract (~150 words) describing your presentation
proposal. In your submission please note how long your talk will take.
Slots vary in length up to 45 minutes. Also include in your proposal
the proposal type -- one of:
- technical talk
- end-user talk
- birds of a feather (BOF) session
Submit your proposal here:
http://events.linuxfoundation.org/cfp
You will receive a notification whether or not your presentation proposal
was accepted by Aug 1st.
END-USER COLLABORATION
One of the big challenges as developers is to know what, where and how
people actually use our software. We will reserve a few slots for end
users talking about their deployment challenges and achievements.
If you are using KVM in production you are encouraged submit a speaking
proposal. Simply mark it as an end-user collaboration proposal. As an
end user, this is a unique opportunity to get your input to developers.
BOF SESSION
We will reserve some slots in the evening after the main conference
tracks, for birds of a feather (BOF) sessions. These sessions will be
less formal than presentation tracks and targetted for people who would
like to discuss specific issues with other developers and/or users.
If you are interested in getting developers and/or uses together to
discuss a specific problem, please submit a BOF proposal.
HOTEL / TRAVEL
The KVM Forum 2013 will be held in Edinburgh, UK at the Edinburgh
International Conference Centre.
http://events.linuxfoundation.org/events/kvm-forum/hotel
Thank you for your interest in KVM. We're looking forward to your
submissions and seeing you at the KVM Forum 2013 in October!
Thanks,
-your KVM Forum 2013 Program Committee
11 years, 4 months
[libvirt] [PATCH v2] 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 -device 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
---
src/qemu/qemu_capabilities.c | 5 ++--
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 8 ++++--
.../qemuxml2argv-kvm-pit-delay.args | 4 +++
.../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, 81 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 baaaefe..31bd19c 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -233,6 +233,7 @@ VIR_ENUM_IMPL(virQEMUCaps, QEMU_CAPS_LAST,
"mlock",
"vnc-share-policy", /* 150 */
+ "kvm-pit",
);
struct _virQEMUCaps {
@@ -1381,6 +1382,7 @@ struct virQEMUCapsStringFlags virQEMUCapsObjectTypes[] = {
{ "pci-bridge", QEMU_CAPS_DEVICE_PCI_BRIDGE },
{ "vfio-pci", QEMU_CAPS_DEVICE_VFIO_PCI },
{ "scsi-generic", QEMU_CAPS_DEVICE_SCSI_GENERIC },
+ { "kvm-pit", QEMU_CAPS_DEVICE_KVM_PIT },
};
static struct virQEMUCapsStringFlags virQEMUCapsObjectPropsVirtioBlk[] = {
@@ -2446,13 +2448,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 7088747..9c21811 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -189,6 +189,7 @@ enum virQEMUCapsFlags {
QEMU_CAPS_DRIVE_DISCARD = 148, /* -drive discard=off(ignore)|on(unmap) */
QEMU_CAPS_MLOCK = 149, /* -realtime mlock=on|off */
QEMU_CAPS_VNC_SHARE_POLICY = 150, /* set display sharing policy */
+ QEMU_CAPS_DEVICE_KVM_PIT = 151, /* -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 0e517f2..0b640c0 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -6994,11 +6994,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, "-device",
+ "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..326c582
--- /dev/null
+++ b/tests/qemuxml2argvdata/qemuxml2argv-kvm-pit-delay.args
@@ -0,0 +1,4 @@
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /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..cb7c951
--- /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 /usr/bin/qemu -S \
+-M pc -m 214 -smp 2 -nographic \
+-monitor unix:/tmp/test-monitor,server,nowait \
+-device 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 7d7332f..e6aa793 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -1018,6 +1018,10 @@ mymain(void)
DO_TEST_PARSE_ERROR("pci-bridge-negative-index-invalid",
QEMU_CAPS_DEVICE, QEMU_CAPS_DEVICE_PCI_BRIDGE);
+ 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, 4 months
[libvirt] [PATCH v4 0/9] Chardev hotplug
by Michal Privoznik
The fourth round of my chardev hotplug patches.
Michal Privoznik (9):
domain_conf: Introduce chardev hotplug helpers
qemu: Implement chardev hotplug on config level
qemu_monitor_json: Move InetSocketAddress build to a separate function
qemu_monitor: Introduce qemuMonitorAttachCharDev
qemu_monitor: Introduce qemuMonitorDetachCharDev
qemu_command: Honour chardev alias assignment with a function
qemu: Introduce qemuBuildChrDeviceStr
qemu: Implement chardev hotplug on live level
qemuhotplugtest: Introduce test for chardev hotplug
src/conf/domain_conf.c | 149 ++++++++++-
src/conf/domain_conf.h | 15 ++
src/libvirt_private.syms | 4 +
src/qemu/qemu_command.c | 276 +++++++++++++++++----
src/qemu/qemu_command.h | 15 +-
src/qemu/qemu_driver.c | 59 ++++-
src/qemu/qemu_hotplug.c | 108 ++++++++
src/qemu/qemu_hotplug.h | 6 +
src/qemu/qemu_monitor.c | 41 +++
src/qemu/qemu_monitor.h | 5 +
src/qemu/qemu_monitor_json.c | 249 +++++++++++++++++--
src/qemu/qemu_monitor_json.h | 5 +
tests/qemuhotplugtest.c | 194 ++++++++++++---
.../qemuhotplug-console-virtio.xml | 5 +
tests/qemumonitorjsontest.c | 106 ++++++++
.../qemuxml2argv-console-compat-2.xml | 122 +++++++++
16 files changed, 1243 insertions(+), 116 deletions(-)
create mode 100644 tests/qemuhotplugtestdata/qemuhotplug-console-virtio.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-console-compat-2.xml
--
1.8.1.5
11 years, 4 months
[libvirt] Notes on configuring Open vSwitch, Linux bridge and Libvirt
by Kashyap Chamarthy
Heya Laine,
Here's some quick notes to associate libvirt guests to Open vSwitch.
Configure Open vSwitch
----------------------
Now that a regular Linux bridge is configured, let's try to configure an
OVS brdige and get IP addresses from that space:
Create an Open vSwitch bridge device called 'ovsbr', and display the
current state of OpenvSwitch database contents:
$ ovs-vsctl add-br ovsbr
$ ovs-vsctl show
Add a virtual ethernet interface called 'veth0' with
$ ip link add name veth0 \
type veth peer name veth1
Add 'veth0' ethernet device to the Linux bridge 'br0', and enumerate all
bridge devices:
$ brctl addif br0 veth0
$ brctl show
Now, associate virtual ethernet device 'veth1' to the OVS bridge,
and display the current state of OpenvSwitch database contents
$ ovs-vsctl add-port ovsbr veth1
$ ovs-vsctl show
Bring up both the virtual ethernet interfaces 'veth0' and 'veth1'
$ ip link set veth0 up && \
ip link set veth1 up
Update libvirt guest's bridge source to OVS
-------------------------------------------
Install a minimal Fedora guest with Oz (or any other mechanism):
$ wget \
https://github.com/kashyapc/virt-scripts/blob/master/oz/oz-jeos.bash
$ ./oz-jeos f19-min f19
Once install is finished, define the guest XML from the current dir:
$ virsh define f19-minJul_12_2013-12
Now let's edit libvirt's guest XML file to reflect its bridge source is
OVS bridge:
$ virsh edit f19-min
The contents of the guest XML should reflect something along the below
lines:
$ virsh dumpxml f19-min | grep bridge -A8
<interface type='bridge'>
<mac address='52:54:00:a6:08:70'/>
<source bridge='ovsbr'/>
<virtualport type='openvswitch'>
<parameters interfaceid='ecdff22d-ce80-4ae7-a008-42994415084e'/>
</virtualport>
<target dev='vnet2'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
</interface>
Start the guest, and check the IP of it:
$ virsh start f19-jeos --console
$ ifconfig eth0
Please note, this is just a simple test, I haven't done any further experiments with VLAN
tagging, etc.
Slightly verbose notes:
http://kashyapc.fedorapeople.org/virt/openvswitch-and-libvirt-kvm.txt
--
/kashyap
11 years, 4 months
[libvirt] [PATCH] domain controller index check
by Jincheng Miao
The index of the controller should not be limited in [zero, INT_MAX].
So use virStrToLong_ui() and check the limit of the controller
index in virDomainControllerDefParseXML().
---
src/conf/domain_conf.c | 6 +++---
src/conf/domain_conf.h | 2 +-
src/qemu/qemu_command.c | 2 +-
src/vmx/vmx.c | 3 +--
4 files changed, 6 insertions(+), 7 deletions(-)
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 402e6e9..d4c1054 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -2655,7 +2655,7 @@ virDomainDefRejectDuplicateControllers(virDomainDefPtr def)
for (i = 0; i < def->ncontrollers; i++) {
cont = def->controllers[i];
- if (cont->idx > max_idx[cont->type])
+ if ((int)cont->idx > max_idx[cont->type])
max_idx[cont->type] = cont->idx;
}
@@ -2663,7 +2663,7 @@ virDomainDefRejectDuplicateControllers(virDomainDefPtr def)
max_idx[VIR_DOMAIN_CONTROLLER_TYPE_USB] = -1;
for (i = 0; i < VIR_DOMAIN_CONTROLLER_TYPE_LAST; i++) {
- if (max_idx[i] >= 0 && !(bitmaps[i] = virBitmapNew(max_idx[i] + 1)))
+ if (max_idx[i] >= 0 && !(bitmaps[i] = virBitmapNew((size_t)max_idx[i] + 1)))
goto no_memory;
nbitmaps++;
}
@@ -5593,7 +5593,7 @@ virDomainControllerDefParseXML(xmlNodePtr node,
idx = virXMLPropString(node, "index");
if (idx) {
- if (virStrToLong_i(idx, NULL, 10, &def->idx) < 0) {
+ if (virStrToLong_ui(idx, NULL, 10, &def->idx) < 0 || def->idx > INT_MAX) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("Cannot parse controller index %s"), idx);
goto error;
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index da83eb6..7897b4b 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -790,7 +790,7 @@ struct _virDomainVirtioSerialOpts {
/* Stores the virtual disk controller configuration */
struct _virDomainControllerDef {
int type;
- int idx;
+ unsigned int idx;
int model; /* -1 == undef */
unsigned int queues;
union {
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index 46db28a..7fd1cbf 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1585,7 +1585,7 @@ qemuDomainAssignPCIAddresses(virDomainDefPtr def,
for (i = 0; i < def->ncontrollers; i++) {
if (def->controllers[i]->type == VIR_DOMAIN_CONTROLLER_TYPE_PCI) {
- if (def->controllers[i]->idx > max_idx)
+ if ((int)def->controllers[i]->idx > max_idx)
max_idx = def->controllers[i]->idx;
}
}
diff --git a/src/vmx/vmx.c b/src/vmx/vmx.c
index 5464d13..deddfaa 100644
--- a/src/vmx/vmx.c
+++ b/src/vmx/vmx.c
@@ -1664,8 +1664,7 @@ virVMXParseConfig(virVMXContext *ctx,
for (controller = 0; controller < def->ncontrollers; ++controller) {
if (def->controllers[controller]->type == VIR_DOMAIN_CONTROLLER_TYPE_SCSI) {
- if (def->controllers[controller]->idx < 0 ||
- def->controllers[controller]->idx > 3) {
+ if (def->controllers[controller]->idx > 3) {
virReportError(VIR_ERR_INTERNAL_ERROR,
_("SCSI controller index %d out of [0..3] range"),
def->controllers[controller]->idx);
--
1.8.3.1
11 years, 4 months
[libvirt] ANNOUNCE: libvirt 1.0.5.3 maintenance release
by Cole Robinson
libvirt 1.0.5.3 maintenance release is now available. This is
libvirt 1.0.5 with additional bugfixes that have accumulated
upstream since the initial release.
This release can be downloaded at:
http://libvirt.org/sources/stable_updates/libvirt-1.0.5.3.tar.gz
Changes in this version:
* pci: initialize virtual_functions array pointer to avoid segfault
* qemu: check if block I/O limits fit into long long
* network: increase max number of routes
* qemu: allow restore with non-migratable XML input
* qemu_migrate: Dispose listen address if set from config
* iscsi: pass hostnames to iscsiadm instead of resolving them
* qemu: Report the offset from host UTC for RTC_CHANGE event
* storage: Provide better error message if metadata pre-alloc is
unsupported
* usb: don't spoil decimal addresses
* Check for existence of interface prior to setting terminate flag
* qemu: snapshot: Don't kill access to disk if snapshot creation fails
* Fix blkdeviotune for shutoff domain
* Ensure non-root can read /proc/meminfo file in LXC containers
* LXC: Create /dev/tty within a container
* qemu: Implement new QMP command for cpu hotplug
* udev: fix crash in libudev logging
* Don't mount selinux fs in LXC if selinux is disabled
* Re-add selinux/selinux.h to lxc_container.c
* Fix failure to detect missing cgroup partitions
* Fix starting domains when kernel has no cgroups support
* Escaping leading '.' in cgroup names
* Add docs about cgroups layout and usage
* Cope with missing swap cgroup controls
* libxl: fix build with Xen4.3
* qemu: fix return value of qemuDomainBlockPivot on errors
* storage: return -1 when fs pool can't be mounted
* Fix vPort management: FC vHBA creation
* bridge: don't crash on bandwidth unplug with no bandwidth
* Fix invalid read in virCgroupGetValueStr
* virsh: edit: don't leak XML string on reedit or redefine
* lxc: Resolve issue with GetScheduler APIs for non running domain
* qemu: Resolve issue with GetScheduler APIs for non running domain
* conf: fix use after free in virChrdevOpen
* qemu: Avoid leaking uri in qemuMigrationPrepareDirect
* virtlockd: fix socket path
* nodedev: fix vport detection for FC HBA
For info about past maintenance releases, see:
http://wiki.libvirt.org/page/Maintenance_Releases
Thanks,
Cole
11 years, 4 months
[libvirt] [PATCH] virsh: Mention --driver in man page for nodedev-detach
by Peter Krempa
Commit d923f6c8 introduced the --driver option but didn't document it in
the man page. The docs are borrowed from the public API documentation.
---
tools/virsh.pod | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/tools/virsh.pod b/tools/virsh.pod
index 94fe897..51644d9 100644
--- a/tools/virsh.pod
+++ b/tools/virsh.pod
@@ -2113,7 +2113,7 @@ name or wwn pair in "wwnn,wwpn" format (only works for HBA). Note
that this makes libvirt quit managing a host device, and may even make
that device unusable by the rest of the physical host until a reboot.
-=item B<nodedev-detach> I<nodedev>
+=item B<nodedev-detach> I<nodedev> [I<--driver backend_driver>]
Detach I<nodedev> from the host, so that it can safely be used by
guests via <hostdev> passthrough. This is reversed with
@@ -2121,6 +2121,12 @@ B<nodedev-reattach>, and is done automatically for managed devices.
For compatibility purposes, this command can also be spelled
B<nodedev-dettach>.
+Different backend drivers expect the device to be bound to different
+dummy devices. For example, QEMU's "kvm" backend driver (the default)
+expects the device to be bound to pci-stub, but its "vfio" backend
+driver expects the device to be bound to vfio-pci. The I<--driver>
+parameter can be used to specify the desired backend driver.
+
=item B<nodedev-dumpxml> I<device>
Dump a <device> XML representation for the given node device, including
--
1.8.3.2
11 years, 4 months
[libvirt] [PATCH] Fix crash when multiple event callbacks were registered
by Ján Tomko
CVE-2013-2230
Don't overwrite the callback ID returned by
virDomainEventStateRegisterID in ret by 0.
Introduced by abf75aea.
---
src/qemu/qemu_driver.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index 571d1f8..b0180c9 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -10043,9 +10043,7 @@ qemuConnectDomainEventRegisterAny(virConnectPtr conn,
driver->domainEventState,
dom, eventID,
callback, opaque, freecb, &ret) < 0)
- goto cleanup;
-
- ret = 0;
+ ret = -1;
cleanup:
return ret;
--
1.8.1.5
11 years, 4 months