Re: [libvirt] [RFC] Interface for disk hotadd/remove

2009-08-13 Thread Wolfgang Mauerer
Hi, On Thu, Aug 13, 2009 at 8:31 PM, Daniel P. Berrange wrote: > On Thu, Aug 13, 2009 at 12:54:00PM +0200, Wolfgang Mauerer wrote: >> I'm currently interested in implementing hard disk hot-add and -remove >> support >> for qemu (as opposed to controller-based hotplugging), and this brings up the

Re: [libvirt] [PATCH] Support for defining/dumping video device in VirtualBox

2009-08-13 Thread Daniel P. Berrange
On Mon, Aug 10, 2009 at 01:55:03PM +0200, Pritesh Kothari wrote: > Hi All, > > I have added support for defining/dumping video device in VirtualBox. The > patch > for the same is attached here. Also this patch depends on the earlier patch > "Support for 3d Acceleration in video tag". > > Regar

Re: [libvirt] [PATCH] Support for 3d Acceleration in video tag

2009-08-13 Thread Daniel P. Berrange
On Mon, Aug 10, 2009 at 01:51:44PM +0200, Pritesh Kothari wrote: > Hi All, > > I have added support for 3d Acceleration in the video tag, the patch for the > same is attached here. I recall you said there might be other options /settings related to 3d acceleration in virtualbox in the future. If

Re: [libvirt] [PATCH 8/8] Check active domain hostdevs before allowing PCI reset

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:37PM +0100, Mark McLoughlin wrote: > If a PCI device reset causes other devices to be reset, allow it so long > as those other devices are note assigned to another active domain. > > Note, we need to take the driver lock qemudNodeDeviceReset() because the > check func

Re: [libvirt] [PATCH 7/8] Allow pciResetDevice() to reset multiple devices

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:36PM +0100, Mark McLoughlin wrote: > When using a Secondary Bus Reset, all devices on the bus are reset. > > Extend the pciResetDevice() API so that a 'check' callback can be > supplied which will verify that it is safe to reset the other devices > on the bus. > > Th

Re: [libvirt] [PATCH 6/8] Improve PCI host device reset error message

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:35PM +0100, Mark McLoughlin wrote: > Currently, if we are unable to reset a PCI device we return a fairly > generic 'No PCI reset capability available' error message. > > Fix that by returning an error from the individual reset messages and > using that error to const

Re: [libvirt] [PATCH 5/8] Reset and re-attach PCI host devices on guest shutdown

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:34PM +0100, Mark McLoughlin wrote: > When the guest shuts down, we should attempt to restore all PCI host > devices to a sane state. > > In the case of managed hostdevs, we should reset and re-attach the > devices. In the case of unmanaged hostdevs, we should just res

Re: [libvirt] [PATCH 4/8] Allow PM reset on multi-function PCI devices

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:33PM +0100, Mark McLoughlin wrote: > It turns out that a PCI Power Management reset only affects individual > functions, and not the whole device. > > The PCI Power Management spec talks about resetting the 'device' rather > than the 'function', but Intel's Dexuan Cui

Re: [libvirt] [PATCH 3/8] Detect KVM's PCI device assignment support

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:32PM +0100, Mark McLoughlin wrote: > PCI device assignment is only supported in KVM's fork of qemu, so we > should really detect its availability and give a nice error if its > not supported. > > * src/qemu_conf.[ch]: introduce QEMUD_CMD_FLAG_PCIDEVICE indicating >

Re: [libvirt] [PATCH 2/8] Add host PCI device hotplug support

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:31PM +0100, Mark McLoughlin wrote: > Attaching a host PCI device to a qemu guest is done with a > straightforward 'pci_add auto host host=XX:XX.X' command. > > Like with NIC and disk hotplug, we need to retain the guest PCI address > assigned by qemu so that we can us

Re: [libvirt] [PATCH 1/8] Re-factor hostdev hotplug

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 05:44:30PM +0100, Mark McLoughlin wrote: > Re-factor the hostdev hotplug code so that we can easily add PCI > hostdev hotplug to qemudDomainAttachHostDevice(). > > * src/qemu_driver.c: rename qemudDomainAttachHostDevice() to > qemudDomainAttachHostUsbDevice(); make qemudD

Re: [libvirt] [PATCH 2/2]: VirtualBox: Updated vboxNetworkUndefine() and vboxNetworkDestroy()

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 03:32:45PM +0200, Pritesh Kothari wrote: > Hi All, > > I have made some changes to the functions vboxNetworkCreateXML(), > vboxNetworkDefineXML(), vboxNetworkUndefine() and vboxNetworkDestroy() to > handle > multiple host only interfaces as multiple host only interfaces

Re: [libvirt] [PATCH 1/2]: VirtualBox: Updated vboxNetworkCreateXML() and vboxNetworkDefineXML()

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 03:32:36PM +0200, Pritesh Kothari wrote: > Hi All, > > I have made some changes to the functions vboxNetworkCreateXML(), > vboxNetworkDefineXML(), vboxNetworkUndefine() and vboxNetworkDestroy() to > handle > multiple host only interfaces as multiple host only interfaces

Re: [libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 10:47:18AM +0200, Chris Lalancette wrote: > Implement a compressed save image format for qemu. While ideally > we would have the choice between compressed/non-compressed > available to the libvirt API, unfortunately there is no "flags" > parameter to the virDomainSave() API

Re: [libvirt] [PATCH] Fix up connection reference counting.

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 10:51:46AM +0200, Chris Lalancette wrote: > Currently the reference counting for connections is busted. I > first noticed it while trying to use virConnectRef; it would > eventually cause a crash in the remote_internal driver, although > that was really just a victim. Real

Re: [libvirt] [RFC] Interface for disk hotadd/remove

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 12:54:00PM +0200, Wolfgang Mauerer wrote: > I'm currently interested in implementing hard disk hot-add and -remove support > for qemu (as opposed to controller-based hotplugging), and this brings up the > question how to best support this feature in libvirt. Many SCSI-Contro

[libvirt] [PATCH 2/8] Add host PCI device hotplug support

2009-08-13 Thread Mark McLoughlin
Attaching a host PCI device to a qemu guest is done with a straightforward 'pci_add auto host host=XX:XX.X' command. Like with NIC and disk hotplug, we need to retain the guest PCI address assigned by qemu so that we can use it for hot-unplug. Identifying a device for detach is done using the hos

[libvirt] [PATCH 7/8] Allow pciResetDevice() to reset multiple devices

2009-08-13 Thread Mark McLoughlin
When using a Secondary Bus Reset, all devices on the bus are reset. Extend the pciResetDevice() API so that a 'check' callback can be supplied which will verify that it is safe to reset the other devices on the bus. The virDomainObjPtr parameter is needed so that when the check function iterates

[libvirt] [PATCH 8/8] Check active domain hostdevs before allowing PCI reset

2009-08-13 Thread Mark McLoughlin
If a PCI device reset causes other devices to be reset, allow it so long as those other devices are note assigned to another active domain. Note, we need to take the driver lock qemudNodeDeviceReset() because the check function will iterate over the domain list. * src/qemu_conf.c: add qemuCheckPc

[libvirt] [PATCH 4/8] Allow PM reset on multi-function PCI devices

2009-08-13 Thread Mark McLoughlin
It turns out that a PCI Power Management reset only affects individual functions, and not the whole device. The PCI Power Management spec talks about resetting the 'device' rather than the 'function', but Intel's Dexuan Cui informs me that it is actually a per-function reset. Also, Yu Zhao has ad

[libvirt] [PATCH 3/8] Detect KVM's PCI device assignment support

2009-08-13 Thread Mark McLoughlin
PCI device assignment is only supported in KVM's fork of qemu, so we should really detect its availability and give a nice error if its not supported. * src/qemu_conf.[ch]: introduce QEMUD_CMD_FLAG_PCIDEVICE indicating that the -pcidevice command line option is available * tests/*: update the t

[libvirt] [PATCH 0/8] Various KVM PCI device assignment improvements

2009-08-13 Thread Mark McLoughlin
Hi, Here's a fairly mixed set of KVM PCI device assignment improvements: - Add hotplug support - Allow PM reset on multi-function devices - Allow Secondary Bus Reset even if it causes other devices to be reset, so long as those other devices are in use by the same VM or ar

[libvirt] [PATCH 5/8] Reset and re-attach PCI host devices on guest shutdown

2009-08-13 Thread Mark McLoughlin
When the guest shuts down, we should attempt to restore all PCI host devices to a sane state. In the case of managed hostdevs, we should reset and re-attach the devices. In the case of unmanaged hostdevs, we should just reset them. Note, KVM will already reset assigned devices when the guest shut

[libvirt] [PATCH 6/8] Improve PCI host device reset error message

2009-08-13 Thread Mark McLoughlin
Currently, if we are unable to reset a PCI device we return a fairly generic 'No PCI reset capability available' error message. Fix that by returning an error from the individual reset messages and using that error to construct the higher level error mesage. * src/pci.c: set errors in pciTryPower

[libvirt] [PATCH 1/8] Re-factor hostdev hotplug

2009-08-13 Thread Mark McLoughlin
Re-factor the hostdev hotplug code so that we can easily add PCI hostdev hotplug to qemudDomainAttachHostDevice(). * src/qemu_driver.c: rename qemudDomainAttachHostDevice() to qemudDomainAttachHostUsbDevice(); make qemudDomainAttachHostDevice() handle all hostdev types * src/libvirt_private.s

[libvirt] [PATCH 2/2]: VirtualBox: Updated vboxNetworkUndefine() and vboxNetworkDestroy()

2009-08-13 Thread Pritesh Kothari
Hi All, I have made some changes to the functions vboxNetworkCreateXML(), vboxNetworkDefineXML(), vboxNetworkUndefine() and vboxNetworkDestroy() to handle multiple host only interfaces as multiple host only interfaces are supported by VirtualBox 3.0 and greater. The patch's are as below: PAT

[libvirt] [PATCH 1/2]: VirtualBox: Updated vboxNetworkCreateXML() and vboxNetworkDefineXML()

2009-08-13 Thread Pritesh Kothari
Hi All, I have made some changes to the functions vboxNetworkCreateXML(), vboxNetworkDefineXML(), vboxNetworkUndefine() and vboxNetworkDestroy() to handle multiple host only interfaces as multiple host only interfaces are supported by VirtualBox 3.0 and greater. The patch's are as below: PAT

Re: [libvirt] PATCH: Make UML/LXC drivers robust with bad NUMA data

2009-08-13 Thread Daniel P. Berrange
On Thu, Aug 13, 2009 at 01:08:01PM +0200, Daniel Veillard wrote: > On Thu, Aug 13, 2009 at 11:58:16AM +0100, Daniel P. Berrange wrote: > > commit e2052c24f39c71b3b8e92a983287f72176d73c77 > > Author: Daniel P. Berrange > > Date: Thu Aug 13 11:56:31 2009 +0100 > > > > Make LXC / UML drivers r

Re: [libvirt] [PATCH] unify popen/fopen qemu wrappers

2009-08-13 Thread Paolo Bonzini
On 08/13/2009 01:18 PM, Daniel Veillard wrote: On Tue, Aug 11, 2009 at 06:30:36PM +0200, Paolo Bonzini wrote: While reading Chris's code for fd migration I noticed the duplication between QEMUFilePopen and QEMUFileStdio. This fixes it, and makes qemu_fopen more similar qemu_fdopen. Looks f

Re: [libvirt] [PATCH] unify popen/fopen qemu wrappers

2009-08-13 Thread Daniel Veillard
On Tue, Aug 11, 2009 at 06:30:36PM +0200, Paolo Bonzini wrote: > While reading Chris's code for fd migration I noticed the duplication > between QEMUFilePopen and QEMUFileStdio. This fixes it, and makes > qemu_fopen more similar qemu_fdopen. Looks fine to me, but what led to the initial duplica

Re: [libvirt] PATCH: Make UML/LXC drivers robust with bad NUMA data

2009-08-13 Thread Daniel Veillard
On Thu, Aug 13, 2009 at 11:58:16AM +0100, Daniel P. Berrange wrote: > commit e2052c24f39c71b3b8e92a983287f72176d73c77 > Author: Daniel P. Berrange > Date: Thu Aug 13 11:56:31 2009 +0100 > > Make LXC / UML drivers robust against NUMA topology brokenness > > Some kernel versions expo

[libvirt] PATCH: Make UML/LXC drivers robust with bad NUMA data

2009-08-13 Thread Daniel P. Berrange
commit e2052c24f39c71b3b8e92a983287f72176d73c77 Author: Daniel P. Berrange Date: Thu Aug 13 11:56:31 2009 +0100 Make LXC / UML drivers robust against NUMA topology brokenness Some kernel versions expose broken NUMA topology for some machines. This causes the LXC/UML drivers to

[libvirt] [RFC] Interface for disk hotadd/remove

2009-08-13 Thread Wolfgang Mauerer
Hi, I'm currently interested in implementing hard disk hot-add and -remove support for qemu (as opposed to controller-based hotplugging), and this brings up the question how to best support this feature in libvirt. Many SCSI-Controllers in real machines, for instance, allow to add and remove disks

Re: [libvirt] virConnectClose() sometimes seg faults libvirt 0.7.0

2009-08-13 Thread Daniel Veillard
On Wed, Aug 12, 2009 at 05:27:35PM -0700, Kaitlin Rupert wrote: > Hi, > > I'm trying to track down a seg fault I'm seeing with the > libvirt-0.7.0-3.fc12.x86_64 rawhide version of libvirt. > > I'm having trouble finding the exact set of steps, as I see the behavior > when interacting with the l

Re: [libvirt] libvirt-java in the maven repo

2009-08-13 Thread Daniel Veillard
On Wed, Aug 12, 2009 at 07:35:33PM -0400, Bryan Kearney wrote: > The java bindings made it into the central repo > (http://repo1.maven.org/maven2/org/libvirt/). So.. they should be > replicated to your favorite mirror "real soon". Yay ! Thanks for pushing the issue :-) Daniel -- Daniel Ve

[libvirt] [PATCH] Fix up connection reference counting.

2009-08-13 Thread Chris Lalancette
Currently the reference counting for connections is busted. I first noticed it while trying to use virConnectRef; it would eventually cause a crash in the remote_internal driver, although that was really just a victim. Really, we should only call the close callbacks on the methods when the refere

[libvirt] Connection refcounting fix?

2009-08-13 Thread Chris Lalancette
DanB, is this the sort of idea you had to fix up the connection refcounting? -- Libvir-list mailing list Libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

[libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-13 Thread Chris Lalancette
Implement a compressed save image format for qemu. While ideally we would have the choice between compressed/non-compressed available to the libvirt API, unfortunately there is no "flags" parameter to the virDomainSave() API. Therefore, implement this as a qemu.conf option. Both gzip and bzip2 a

Re: [libvirt] [PATCH] Compressed save image format for Qemu.

2009-08-13 Thread Chris Lalancette
Daniel P. Berrange wrote: > On Wed, Aug 12, 2009 at 12:21:48PM +0100, Mark McLoughlin wrote: >> On Wed, 2009-08-12 at 12:04 +0100, Daniel P. Berrange wrote: >>> On Tue, Aug 11, 2009 at 01:25:59PM +0200, Chris Lalancette wrote: struct qemud_save_header { char magic[sizeof(QEMUD_SAVE_