[libvirt] [PATCH 3/4 v3] interface: Add functions to get sriov PF/VF relationship of a net interface

2011-08-15 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds the following functions to get PF/VF relationship of an SRIOV network interface: ifaceIsVirtualFunction: Function to check if a network interface is a SRIOV VF ifaceGetVirtualFunctionIndex: Function to get VF index if a network interface is a SRIOV VF ifaceGetP

[libvirt] [PATCH 2/4 v3] pci: Add helper functions for sriov devices

2011-08-15 Thread Roopa Prabhu
From: Roopa Prabhu This patch adds the following helper functions: pciDeviceIsVirtualFunction: Function to check if a pci device is a sriov VF pciGetVirtualFunctionIndex: Function to get the VF index of a sriov VF pciDeviceNetName: Function to get the network device name of a pci device pciConfig

[libvirt] [PATCH 4/4 v3] macvtap: Fix getPhysfn to get the PF of a direct attach network interface

2011-08-15 Thread Roopa Prabhu
From: Roopa Prabhu This patch renames getPhysfn to getPhysfnDev and adds code to get the Physical function and Virtual Function index of the direct attach linkdev (if the direct attach interface is a SRIOV VF). The idea is to send the port profile message to a PF if the direct attach interface is

[libvirt] [PATCH 1/4 v3] pci: Move some pci sriov helper code out of node device driver to util/pci

2011-08-15 Thread Roopa Prabhu
From: Roopa Prabhu This patch moves some of the sriov related pci code from node_device driver to src/util/pci.[ch]. Some functions had to go thru name and argument list change to accommodate the move. Signed-off-by: Roopa Prabhu Signed-off-by: Christian Benvenuti Signed-off-by: David Wang --

[libvirt] [PATCH 0/4 v3] macvtap: Support for sending port profile message for a SRIOV VF to its PF

2011-08-15 Thread Roopa Prabhu
This patch tries to fix getPhysFn in macvtap.c to get the physical function(PF) of the direct attach interface, if the interface is a SR-IOV VF. It moves some of the sriov pci device handling code from node_device_driver to src/util/pci.[ch]. This patch series implements the following 01/4 -

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Osier Yang
于 2011年08月16日 00:40, Adam Litke 写道: Hi Osier, Just to be clear, this is a cleanup not a bugfix right? The current code should be working properly as written. No, "virDomainMemoryStats" will return empty result if libvirt communicates to qemu monitor in text mode. Actually this is reported by

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Osier Yang
于 2011年08月16日 00:27, Adam Litke 写道: > On 08/15/2011 08:23 AM, Osier Yang wrote: >> 于 2011年08月15日 21:58, Osier Yang 写道: >>> * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as >>> "balloon: actual=", which cause "actual=" is stripped early before >>> the real parsing. This patch changes BA

Re: [libvirt] [PATCH 0/2] about Virsh Command Reference

2011-08-15 Thread Hu Tao
On Tue, Jul 26, 2011 at 11:03:52AM +0800, Hu Tao wrote: > Hi, > >We now have libvirt advanced at 0.9.3, but there is almost no >progress has been made on Virsh Command Reference. I'm now >starting on updating Virsh Command Reference to get it synced >with libvirt/virsh, but since I

Re: [libvirt] RFC (V2) New virDomainBlockPull API family to libvirt

2011-08-15 Thread Zhi Yong Wu
On Tue, Aug 16, 2011 at 6:52 AM, Stefan Hajnoczi wrote: > On Mon, Aug 15, 2011 at 1:36 PM, Adam Litke wrote: >> On 08/14/2011 11:40 PM, Zhi Yong Wu wrote: >>> HI, Deniel and Adam. >>> >>> Have the patchset been merged into libvirt upstream? >> >> Yes they have.  However, the functionality is stil

Re: [libvirt] RFC (V2) New virDomainBlockPull API family to libvirt

2011-08-15 Thread Zhi Yong Wu
On Mon, Aug 15, 2011 at 8:36 PM, Adam Litke wrote: > On 08/14/2011 11:40 PM, Zhi Yong Wu wrote: >> HI, Deniel and Adam. >> >> Have the patchset been merged into libvirt upstream? > > Yes they have.  However, the functionality is still missing from qemu. > The two communities have agreed upon the i

[libvirt] [PATCHv2 24/26] snapshot: add 2 attributes to domain xml for disks

2011-08-15 Thread Eric Blake
As discussed here: https://www.redhat.com/archives/libvir-list/2011-August/msg00361.html https://www.redhat.com/archives/libvir-list/2011-August/msg00552.html Adds: ... * docs/schemas/domaincommon.rng (snapshot): New define. (disk): Add snapshot and persistent attributes. * docs

[libvirt] [PATCHv2 07/26] snapshot: track current snapshot across restarts

2011-08-15 Thread Eric Blake
Audit all changes to the qemu vm->current_snapshot, and make them update the saved xml file for both the previous and the new snapshot, so that there is always at most one snapshot with 1 in the xml, and that snapshot is used as the current snapshot even across libvirtd restarts. * src/conf/domain

[libvirt] [PATCHv2 20/26] snapshot: refactor domain xml output

2011-08-15 Thread Eric Blake
Minor semantic change - allow domain xml to be generated in place within a larger buffer, rather than having to go through a temporary string. * src/conf/domain_conf.c (virDomainDefFormatInternal): Add parameter. (virDomainDefFormat, virDomainObjFormat): Update callers. --- src/conf/domain_conf.c

[libvirt] [PATCHv2 06/26] snapshot: only pass snapshot to qemu command line when reverting

2011-08-15 Thread Eric Blake
Changing the current vm, and writing that change to the file system, all before a new qemu starts, is risky; it's hard to roll back if starting the new qemu fails for some reason. Instead of abusing vm->current_snapshot and making the command line generator decide whether the current snapshot warra

[libvirt] [PATCHv2 16/26] snapshot: cache qemu-img location

2011-08-15 Thread Eric Blake
As more clients start to want to know this information, doing a PATH stat walk and malloc for every client adds up. * src/qemu/qemu_conf.h (qemud_driver): Add member. * src/qemu/qemu_driver.c (qemudShutdown): Cleanup. (qemuFindQemuImgBinary): Add an argument, and cache result. (qemuDomainSnapshotD

[libvirt] [PATCHv2 22/26] snapshot: update rng to support full domain in xml

2011-08-15 Thread Eric Blake
* docs/schemas/domain.rng: Move guts... * docs/schemas/domaincommon.rng: ...to new file. * docs/schemas/domainsnapshot.rng: Allow new xml. * docs/schemas/Makefile.am (schema_DATA): Distribute new file. * tests/domainsnapshotxml2xmlout/full_domain.xml: New test. --- Email shortened by eliding some

[libvirt] [PATCHv2 26/26] snapshot: wire up new qemu monitor command

2011-08-15 Thread Eric Blake
No one uses this yet, but it will be important once virDomainSnapshotCreateXML learns a VIR_DOMAIN_SNAPSHOT_DISK_ONLY flag, and the xml allows passing in the new file names. * src/qemu/qemu_monitor.h (qemuMonitorDiskSnapshot): New prototype. * src/qemu/qemu_monitor_text.h (qemuMonitorTextDiskSnaps

[libvirt] [PATCHv2 17/26] snapshot: support new undefine flags in qemu

2011-08-15 Thread Eric Blake
A nice benefit of deleting all snapshots at undefine time is that you don't have to do any reparenting or subtree identification - since everything goes, this is an O(n) process whereas using multiple virDomainSnapshotDelete calls would be O(n^2) or worse. * src/qemu/qemu_driver.c (qemuDomainDestr

[libvirt] [PATCHv2 25/26] snapshot: reject transient disks where code is not ready

2011-08-15 Thread Eric Blake
The previous patch introduced new config, but if a hypervisor does not support that new config, someone can write XML that does not behave as documented. This prevents some of those cases by explicitly rejecting transient disks for several hypervisors. Disk snapshots will require a new flag to ac

[libvirt] [PATCHv2 23/26] snapshot: store qemu domain details in xml

2011-08-15 Thread Eric Blake
When reverting to a snapshot, the inactive domain configuration has to be rolled back to what it was at the time of the snapshot. Additionally, if the VM is active and the snapshot was active, this now adds a failure if the two configurations are ABI incompatible, rather than risking qemu confusion

[libvirt] [PATCHv2 21/26] snapshot: allow full domain xml in snapshot

2011-08-15 Thread Eric Blake
Just like VM saved state images (virsh save), snapshots MUST track the inactive domain xml to detect any ABI incompatibilities. The indentation is not perfect, but functionality comes before form. Later patches will actually supply a full domain; for now, this wires up the storage to support one,

[libvirt] [PATCHv2 15/26] snapshot: refactor some qemu code

2011-08-15 Thread Eric Blake
Prepare for code sharing. No semantic change. * src/qemu/qemu_driver.c (qemuFindQemuImgBinary) (qemuDomainSnapshotWriteMetadata) (qemuDomainSnapshotDiscard): Float up. (qemuDomainSnapshotDiscardDescendant): Likewise, and rename... (qemuDomainSnapshotDiscardAll): ...for generic use. (qemuDomainSna

[libvirt] [PATCHv2 04/26] snapshot: properly revert qemu to offline snapshots

2011-08-15 Thread Eric Blake
qemuDomainSnapshotRevertInactive has the same FIXMEs as qemuDomainSnapshotCreateInactive, so algorithmic fixes to properly handle partial loop iterations should be applied later to both functions, but we're not making the situation any worse in this patch. * src/qemu/qemu_driver.c (qemuDomainRever

[libvirt] [PATCHv2 18/26] snapshot: teach virsh about new undefine flags

2011-08-15 Thread Eric Blake
Similar to 'undefine --managed-save' (commit 83e849c1), we must assume that the old API is unsafe, and emulate it ourselves. Additionally, we have the wrinkle that while virDomainUndefineFlags and managed save cleanup were introduced in 0.9.4, it wasn't until 0.9.5 that snapshots block undefine of

[libvirt] [PATCHv2 19/26] snapshot: prevent migration from stranding snapshot data

2011-08-15 Thread Eric Blake
Migration is another case of stranding metadata. And since snapshot metadata is arbitrarily large, there's no way to shoehorn it into the migration cookie of migration v3. A future patch will make it possible to manually recreate the snapshot metadata on the destination. But even that is limited

[libvirt] [PATCHv2 13/26] snapshot: identify qemu snapshot roots

2011-08-15 Thread Eric Blake
Filtering for roots is pretty easy to do. * src/conf/domain_conf.h (virDomainSnapshotObjListGetNames) (virDomainSnapshotObjListNum): Update prototype. * src/conf/domain_conf.c (virDomainSnapshotObjListCopyNames) (virDomainSnapshotObjListGetNames, virDomainSnapshotObjListCount) (virDomainSnapshotOb

[libvirt] [PATCHv2 10/26] snapshot: simplify acting on just children

2011-08-15 Thread Eric Blake
Similar to the last patch in isolating the filtering from the client actions, so that clients don't have to reinvent the filtering. * src/conf/domain_conf.h (virDomainSnapshotForEachChild): New prototype. * src/libvirt_private.syms (domain_conf.h): Export it. * src/conf/domain_conf.c (virDomainSna

[libvirt] [PATCHv2 09/26] snapshot: avoid crash when deleting qemu snapshots

2011-08-15 Thread Eric Blake
This one's nasty. Ever since we fixed virHashForEach to prevent nested hash iterations for safety reasons, virDomainSnapshotDelete with VIR_DOMAIN_SNAPSHOT_DELETE_CHILDREN has been broken for qemu: it deletes children, while leaving grandchildren intact but pointing to a no-longer-present parent.

[libvirt] [PATCHv2 11/26] snapshot: let qemu discard only snapshot metadata

2011-08-15 Thread Eric Blake
Adding this was trivial compared to the previous patch for fixing qemu snapshot deletion in the first place. * src/qemu/qemu_driver.c (qemuDomainSnapshotDiscard): Add parameter. (qemuDomainSnapshotDiscardDescendant, qemuDomainSnapshotDelete): Update callers. --- src/qemu/qemu_driver.c | 78

[libvirt] [PATCHv2 12/26] snapshot: identify which snapshots have metadata

2011-08-15 Thread Eric Blake
To make it easier to know when undefine will fail because of existing snapshot metadata, we need to know how many snapshots have metadata. Also, it is handy to filter the list of snapshots to just those that have no parents; document that flag now, but implement it in later patches. * include/lib

[libvirt] [PATCHv2 05/26] snapshot: one less point of failure in qemu

2011-08-15 Thread Eric Blake
https://bugzilla.redhat.com/show_bug.cgi?id=727709 mentions that if qemu fails to create the snapshot (such as what happens on Fedora 15 qemu, which has qmp but where savevm is only in hmp, and where libvirt is old enough to not try the hmp fallback), then 'virsh snapshot-list dom' will show a garb

[libvirt] [PATCHv2 14/26] snapshot: prevent stranding snapshot data on domain destruction

2011-08-15 Thread Eric Blake
Just as leaving managed save metadata behind can cause problems when creating a new domain that happens to collide with the name of the just-deleted domain, the same is true of leaving any snapshot metadata behind. For safety sake, extend the semantic change of commit b26a9fa9 to also cover snapsh

[libvirt] [PATCHv2 01/26] virsh: concatenate qemu-monitor-command arguments

2011-08-15 Thread Eric Blake
Call me lazy, but: virsh qemu-monitor-command dom --hmp info status is nicer than: virsh qemu-monitor-command dom --hmp 'info status' * tools/virsh.c (cmdQemuMonitorCommand): Allow multiple arguments, for convenience. --- tools/virsh.c | 19 +++ tools/virsh.pod |6 -

[libvirt] [PATCHv2 03/26] snapshot: improve reverting to qemu paused snapshots

2011-08-15 Thread Eric Blake
If you take a checkpoint snapshot of a running domain, then pause qemu, then restore the snapshot, the result should be a running domain, but the code was leaving things paused. Furthermore, if you take a checkpoint of a paused domain, then run, then restore, there was a brief but non-deterministi

[libvirt] [PATCHv2 08/26] snapshot: allow deletion of just snapshot metadata

2011-08-15 Thread Eric Blake
A future patch will make it impossible to remove a domain if it would leave behind any libvirt-tracked metadata about snapshots, since stale metadata interferes with a new domain by the same name. But requiring snaphot contents to be deleted before removing a domain is harsh; with qemu, qemu-img c

[libvirt] [PATCHv2 00/26] revised round of snapshot patches

2011-08-15 Thread Eric Blake
Many, but not all, of these patches have been previously submitted. I've rebased the series, and added in some additional patches throughout. It still isn't complete, and could probably use more testing after about patch 20 or so, but I'd like to get reviews on some of these to start getting thes

[libvirt] [PATCHv2 02/26] snapshot: better event when reverting qemu to paused snapshot

2011-08-15 Thread Eric Blake
When reverting a running domain to a paused snapshot, the event that fires should mention that the domain is suspended. * include/libvirt/libvirt.h.in (VIR_DOMAIN_EVENT_SUSPENDED_FROM_SNAPSHOT): New sub-event. * src/qemu/qemu_driver.c (qemuDomainRevertToSnapshot): Use it. --- include/libvirt/libv

Re: [libvirt] RFC (V2) New virDomainBlockPull API family to libvirt

2011-08-15 Thread Stefan Hajnoczi
On Mon, Aug 15, 2011 at 1:36 PM, Adam Litke wrote: > On 08/14/2011 11:40 PM, Zhi Yong Wu wrote: >> HI, Deniel and Adam. >> >> Have the patchset been merged into libvirt upstream? > > Yes they have.  However, the functionality is still missing from qemu. > The two communities have agreed upon the i

[libvirt] [PATCH] maint: ignore generated file

2011-08-15 Thread Eric Blake
* .gitignore: Ignore qemu-sanlock.conf. --- I backported the latest sanlock-devel and netcf-devel from rawhide back to F14, so that I can test more code without upgrading distros, and noticed this file in 'git status'. Pushing under the trivial rule. .gitignore |1 + 1 files changed, 1 ins

Re: [libvirt] [PATCH] Ensure stream is aborted when exiting console

2011-08-15 Thread Dave Allan
On Mon, Aug 15, 2011 at 10:12:54AM -0700, Daniel P. Berrange wrote: > From: "Daniel P. Berrange" > > After running 'virsh console' in interactive mode, there was a > missing call to virStreamAbort, which meant the server kept the > stream resources open The combination of this patch and the othe

Re: [libvirt] [PATCH] Fix domxml-from-native xen-sxpr for domain/clock/ @offset='localtime'

2011-08-15 Thread Philipp Hahn
Hello Eric, Am Freitag 12 August 2011 23:40:34 schrieb Eric Blake: > On 04/27/2011 07:20 AM, Philipp Hahn wrote: > > At least Xen-3.4.3 translates the /vm/localtime SXPR value to > > /domain/platform/localtime and /domain/image/{linux,hvm}/localtime when > > the domain is defined. > > When reading

Re: [libvirt] [PATCH v2] Ensure client streams are closed when marking a client for close

2011-08-15 Thread Eric Blake
On 08/15/2011 11:15 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" NB, previous patch was borked due to bad rebase Every active stream results in a reference being held on the virNetServerClientPtr object. This meant that if a client quit with any streams active, although all I/O was

Re: [libvirt] [PATCH] Ensure stream is aborted when exiting console

2011-08-15 Thread Eric Blake
On 08/15/2011 11:12 AM, Daniel P. Berrange wrote: From: "Daniel P. Berrange" After running 'virsh console' in interactive mode, there was a missing call to virStreamAbort, which meant the server kept the stream resources open * tools/console.c: Abort stream when exiting --- tools/console.c |

Re: [libvirt] [PATCH 3/4 v2] interface: Add functions to get sriov PF/VF relationship of a net interface

2011-08-15 Thread Roopa Prabhu
On 8/15/11 4:13 AM, "Stefan Berger" wrote: > On 08/12/2011 07:14 PM, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> This patch adds the following functions to get PF/VF relationship of an SRIOV >> network interface: >> ifaceIsVirtualFunction: Function to check if a network interface is a SRI

Re: [libvirt] [PATCH 2/4 v2] pci: Add helper functions for sriov devices

2011-08-15 Thread Roopa Prabhu
On 8/15/11 4:03 AM, "Stefan Berger" wrote: > On 08/12/2011 07:14 PM, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> This patch adds the following helper functions: >> pciDeviceIsVirtualFunction: Function to check if a pci device is a sriov VF >> pciGetVirtualFunctionIndex: Function to get th

[libvirt] [PATCH v2] Ensure client streams are closed when marking a client for close

2011-08-15 Thread Daniel P. Berrange
From: "Daniel P. Berrange" NB, previous patch was borked due to bad rebase Every active stream results in a reference being held on the virNetServerClientPtr object. This meant that if a client quit with any streams active, although all I/O was stopped the virNetServerClientPtr object would leak

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Adam Litke
On 08/15/2011 11:50 AM, Daniel P. Berrange wrote: > On Mon, Aug 15, 2011 at 11:27:43AM -0500, Adam Litke wrote: >> On 08/15/2011 08:23 AM, Osier Yang wrote: >>> 于 2011年08月15日 21:58, Osier Yang 写道: * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as "balloon: actual=", which ca

Re: [libvirt] [PATCH 1/4 v2] pci: Move some pci sriov helper code out of node device driver to util/pci

2011-08-15 Thread Roopa Prabhu
On 8/15/11 3:47 AM, "Stefan Berger" wrote: > On 08/12/2011 07:14 PM, Roopa Prabhu wrote: >> From: Roopa Prabhu >> >> This patch moves some of the sriov related pci code from node_device driver >> to src/util/pci.[ch]. Some functions had to go thru name and argument list >> change to accommoda

[libvirt] [PATCH] Ensure stream is aborted when exiting console

2011-08-15 Thread Daniel P. Berrange
From: "Daniel P. Berrange" After running 'virsh console' in interactive mode, there was a missing call to virStreamAbort, which meant the server kept the stream resources open * tools/console.c: Abort stream when exiting --- tools/console.c |6 -- 1 files changed, 4 insertions(+), 2 del

[libvirt] [PATCH] Ensure client streams are closed when marking a client for close

2011-08-15 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Every active stream results in a reference being held on the virNetServerClientPtr object. This meant that if a client quit with any streams active, although all I/O was stopped the virNetServerClientPtr object would leak. This causes libvirtd to leak any file handles a

Re: [libvirt] [PATCH 1/4 v2] pci: Move some pci sriov helper code out of node device driver to util/pci

2011-08-15 Thread Roopa Prabhu
On 8/15/11 3:58 AM, "Stefan Berger" wrote: > On 08/12/2011 07:14 PM, Roopa Prabhu wrote: >> >> -get_physical_function(sysfs_path, d); >> -get_virtual_functions(sysfs_path, d); >> +if >> (!pciGetPhysicalFunction(sysfs_path,&d->pci_dev.physical_function)) >> +

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Daniel P. Berrange
On Mon, Aug 15, 2011 at 11:27:43AM -0500, Adam Litke wrote: > On 08/15/2011 08:23 AM, Osier Yang wrote: > > 于 2011年08月15日 21:58, Osier Yang 写道: > >> * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as > >> "balloon: actual=", which cause "actual=" is stripped early before > >> the real pa

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Adam Litke
Hi Osier, Just to be clear, this is a cleanup not a bugfix right? The current code should be working properly as written. On 08/15/2011 08:58 AM, Osier Yang wrote: > * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as > "balloon: actual=", which cause "actual=" is stripped early before

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Adam Litke
On 08/15/2011 08:23 AM, Osier Yang wrote: > 于 2011年08月15日 21:58, Osier Yang 写道: >> * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as >> "balloon: actual=", which cause "actual=" is stripped early before >> the real parsing. This patch changes BALLOON_PREFIX into "balloon: ", >> and modi

Re: [libvirt] [PATCH] qemu: error message should show uri instead of (null)

2011-08-15 Thread Osier Yang
于 2011年08月15日 21:43, Daniel Veillard 写道: On Mon, Aug 15, 2011 at 02:58:47PM +0200, Peter Krempa wrote: Fix pointer for error message uri if domain migration fails. BZ# 730244 --- src/qemu/qemu_migration.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu

Re: [libvirt] [PATCH] qemu: error message should show uri instead of (null)

2011-08-15 Thread Eric Blake
On 08/15/2011 07:43 AM, Daniel Veillard wrote: qemuReportError(VIR_ERR_OPERATION_FAILED, -_("Failed to connect to remote libvirt URI %s"), uri); +_("Failed to connect to remote libvirt URI %s"), dconnuri); return -1; }

Re: [libvirt] [PATCH] qemu: error message should show uri instead of (null)

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 02:58:47PM +0200, Peter Krempa wrote: > Fix pointer for error message uri if domain migration fails. > > BZ# 730244 > --- > src/qemu/qemu_migration.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_m

Re: [libvirt] [PATCH 0/6] Use fd: protocol for migration

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 09:58:10 +0200, Jiri Denemark wrote: > Since qemu doesn't give us any reasonable errors when migration fails because > of connection issues, we now create a connection to destination qemu ourselves > and just pass the created socket to qemu. > > Daniel P. Berrange (1): >

Re: [libvirt] [PATCH] qemu: error message should show uri instead of (null)

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 14:58:47 +0200, Peter Krempa wrote: > Fix pointer for error message uri if domain migration fails. > > BZ# 730244 > --- > src/qemu/qemu_migration.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_mig

Re: [libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Osier Yang
于 2011年08月15日 21:58, Osier Yang 写道: > * src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as > "balloon: actual=", which cause "actual=" is stripped early before > the real parsing. This patch changes BALLOON_PREFIX into "balloon: ", > and modifies related functions, also renames > "qemuMoni

[libvirt] [PATCH] qemu: Get memory balloon info correctly for text monitor

2011-08-15 Thread Osier Yang
* src/qemu/qemu_monitor_text.c: BALLOON_PREFIX was defined as "balloon: actual=", which cause "actual=" is stripped early before the real parsing. This patch changes BALLOON_PREFIX into "balloon: ", and modifies related functions, also renames "qemuMonitorParseExtraBalloonInfo" to "qemuMonitorParse

Re: [libvirt] [PATCH] qemu: support event_idx parameter for virtio disk and net devices

2011-08-15 Thread Daniel Veillard
On Sun, Aug 14, 2011 at 03:43:52AM -0400, Laine Stump wrote: > In some versions of qemu, both virtio-blk-pci and virtio-net-pci > devices can have an event_idx setting that determines some details of > event processing. When it is enabled, it "reduces the number of > interrupts and exits for the gu

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Eric Blake
On 08/15/2011 06:57 AM, Jiri Denemark wrote: Except you missed one change I had pointed out there: bootstrap.conf needs to list 'fcntl' in the list of gnulib modules (without it, gnulib doesn't guarantee that F_DUPFD_CLOEXEC will work on mingw). Hmm, I saw fcntl-h in bootstrap.conf, is that som

[libvirt] [PATCH] qemu: error message should show uri instead of (null)

2011-08-15 Thread Peter Krempa
Fix pointer for error message uri if domain migration fails. BZ# 730244 --- src/qemu/qemu_migration.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 4d0e062..d900020 100644 --- a/src/qemu/qemu_migration.c +++ b

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 06:49:58 -0600, Eric Blake wrote: > On 08/15/2011 03:43 AM, Jiri Denemark wrote: > > On Mon, Aug 15, 2011 at 09:58:11 +0200, Jiri Denemark wrote: > >> From: "Daniel P. Berrange" > >> > >> * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add > >>virNetSocketDupFD() > >>

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Eric Blake
On 08/15/2011 03:43 AM, Jiri Denemark wrote: On Mon, Aug 15, 2011 at 09:58:11 +0200, Jiri Denemark wrote: From: "Daniel P. Berrange" * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add virNetSocketDupFD() * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add virNetClientDupFD() and virN

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 06:42:15 -0600, Eric Blake wrote: > On 08/15/2011 01:58 AM, Jiri Denemark wrote: > > @@ -710,6 +711,23 @@ int virNetSocketGetFD(virNetSocketPtr sock) > > } > > > > > > +int virNetSocketDupFD(virNetSocketPtr sock, bool cloexec) > > +{ > > +int fd; > > + > > +if (clo

Re: [libvirt] [PATCH 6/6] qemu: Use fd: protocol for migration

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 18:04:07 +0800, Daniel Veillard wrote: > On Mon, Aug 15, 2011 at 09:58:16AM +0200, Jiri Denemark wrote: > > By opening a connection to remote qemu process ourselves and passing the > > socket to qemu we get much better errors than just "migration failed" > > when the connect

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Eric Blake
On 08/15/2011 01:58 AM, Jiri Denemark wrote: @@ -710,6 +711,23 @@ int virNetSocketGetFD(virNetSocketPtr sock) } +int virNetSocketDupFD(virNetSocketPtr sock, bool cloexec) +{ +int fd; + +if (cloexec) +fd = fcntl(sock->fd, F_DUPFD_CLOEXEC, (long) 0); The third argument is unne

Re: [libvirt] [PATCH 5/6] qemu: Use virNetSocket for tunneled migration

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 17:55:33 +0800, Daniel Veillard wrote: > On Mon, Aug 15, 2011 at 09:58:15AM +0200, Jiri Denemark wrote: > > --- > > src/qemu/qemu_migration.c | 50 > > +++- > > 1 files changed, 8 insertions(+), 42 deletions(-) > > > > diff --git

Re: [libvirt] [PATCH 4/6] qemu: Refactor do{Tunnel, Native}Migrate functions

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 17:48:03 +0800, Daniel Veillard wrote: > On Mon, Aug 15, 2011 at 09:58:14AM +0200, Jiri Denemark wrote: > > The core of these two functions is very similar and most of it is even > > exactly the same. Factor out the core functionality into a separate > > function to remove c

Re: [libvirt] RFC (V2) New virDomainBlockPull API family to libvirt

2011-08-15 Thread Adam Litke
On 08/14/2011 11:40 PM, Zhi Yong Wu wrote: > HI, Deniel and Adam. > > Have the patchset been merged into libvirt upstream? Yes they have. However, the functionality is still missing from qemu. The two communities have agreed upon the interface and semantics, but work continues on the qemu implem

Re: [libvirt] [PATCH 3/6] Support changing UNIX socket owner in virNetSocketNewListenUNIX

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 17:38:47 +0800, Daniel Veillard wrote: > On Mon, Aug 15, 2011 at 09:58:13AM +0200, Jiri Denemark wrote: > > This patch allows owner's UID to be changed as well. > > --- > > src/rpc/virnetserverservice.c |2 +- > > src/rpc/virnetsocket.c|7 --- > > src/rp

Re: [libvirt] [PATCH 3/4 v2] interface: Add functions to get sriov PF/VF relationship of a net interface

2011-08-15 Thread Stefan Berger
On 08/12/2011 07:14 PM, Roopa Prabhu wrote: From: Roopa Prabhu This patch adds the following functions to get PF/VF relationship of an SRIOV network interface: ifaceIsVirtualFunction: Function to check if a network interface is a SRIOV VF ifaceGetVirtualFunctionIndex: Function to get VF index if

Re: [libvirt] [PATCH 4/4 v2] macvtap: Fix getPhysfn to get the PF of a direct attach network interface

2011-08-15 Thread Stefan Berger
On 08/12/2011 07:14 PM, Roopa Prabhu wrote: From: Roopa Prabhu This patch renames getPhysfn to getPhysfnDev and adds code to get the Physical function and Virtual Function index of the direct attach linkdev (if the direct attach interface is a SRIOV VF). The idea is to send the port profile mess

Re: [libvirt] [PATCH 2/4 v2] pci: Add helper functions for sriov devices

2011-08-15 Thread Stefan Berger
On 08/12/2011 07:14 PM, Roopa Prabhu wrote: From: Roopa Prabhu This patch adds the following helper functions: pciDeviceIsVirtualFunction: Function to check if a pci device is a sriov VF pciGetVirtualFunctionIndex: Function to get the VF index of a sriov VF pciDeviceNetName: Function to get the

Re: [libvirt] [PATCH 1/4 v2] pci: Move some pci sriov helper code out of node device driver to util/pci

2011-08-15 Thread Stefan Berger
On 08/12/2011 07:14 PM, Roopa Prabhu wrote: -get_physical_function(sysfs_path, d); -get_virtual_functions(sysfs_path, d); +if (!pciGetPhysicalFunction(sysfs_path,&d->pci_dev.physical_function)) +d->pci_dev.flags |= VIR_NODE_DEV_CAP_FLAG_PCI_PHYSICAL_FUNCTION;

Re: [libvirt] [PATCH 1/4 v2] pci: Move some pci sriov helper code out of node device driver to util/pci

2011-08-15 Thread Stefan Berger
On 08/12/2011 07:14 PM, Roopa Prabhu wrote: From: Roopa Prabhu This patch moves some of the sriov related pci code from node_device driver to src/util/pci.[ch]. Some functions had to go thru name and argument list change to accommodate the move. Signed-off-by: Roopa Prabhu Signed-off-by: Christ

Re: [libvirt] [PATCH 6/6] qemu: Use fd: protocol for migration

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 09:58:16AM +0200, Jiri Denemark wrote: > By opening a connection to remote qemu process ourselves and passing the > socket to qemu we get much better errors than just "migration failed" > when the connection is opened by qemu. > --- > src/qemu/qemu_migration.c | 128 > +++

Re: [libvirt] [PATCH 5/6] qemu: Use virNetSocket for tunneled migration

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 09:58:15AM +0200, Jiri Denemark wrote: > --- > src/qemu/qemu_migration.c | 50 +++- > 1 files changed, 8 insertions(+), 42 deletions(-) > > diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c > index 1cabbe0..c29ea9e

Re: [libvirt] [PATCH 4/6] qemu: Refactor do{Tunnel, Native}Migrate functions

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 09:58:14AM +0200, Jiri Denemark wrote: > The core of these two functions is very similar and most of it is even > exactly the same. Factor out the core functionality into a separate > function to remove code duplication and make further changes easier. > --- > src/qemu/qemu

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 09:58:11 +0200, Jiri Denemark wrote: > From: "Daniel P. Berrange" > > * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add > virNetSocketDupFD() > * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add > virNetClientDupFD() and virNetClientGetFD() > --- Ah, I forgot t

Re: [libvirt] [PATCH 3/6] Support changing UNIX socket owner in virNetSocketNewListenUNIX

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 09:58:13AM +0200, Jiri Denemark wrote: > This patch allows owner's UID to be changed as well. > --- > src/rpc/virnetserverservice.c |2 +- > src/rpc/virnetsocket.c|7 --- > src/rpc/virnetsocket.h|1 + > tests/virnetsockettest.c |4 ++

Re: [libvirt] [PATCH 2/6] Add backlog parameter to virNetSocketListen

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 09:58:12AM +0200, Jiri Denemark wrote: > So that callers can change the default value. > --- > src/rpc/virnetserverservice.c |4 ++-- > src/rpc/virnetsocket.c|4 ++-- > src/rpc/virnetsocket.h|2 +- > tests/virnetsockettest.c |6 +++--- >

Re: [libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Daniel Veillard
On Mon, Aug 15, 2011 at 09:58:11AM +0200, Jiri Denemark wrote: > From: "Daniel P. Berrange" > > * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add > virNetSocketDupFD() > * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add > virNetClientDupFD() and virNetClientGetFD() > --- > src/rpc/vi

[libvirt] [PATCH 4/6] qemu: Refactor do{Tunnel, Native}Migrate functions

2011-08-15 Thread Jiri Denemark
The core of these two functions is very similar and most of it is even exactly the same. Factor out the core functionality into a separate function to remove code duplication and make further changes easier. --- src/qemu/qemu_migration.c | 499 ++--- 1 file

[libvirt] [PATCH 1/6] Add API for duplicating a socket/client file descriptor

2011-08-15 Thread Jiri Denemark
From: "Daniel P. Berrange" * src/rpc/virnetsocket.c, src/rpc/virnetsocket.h: Add virNetSocketDupFD() * src/rpc/virnetclient.c, src/rpc/virnetclient.h: Add virNetClientDupFD() and virNetClientGetFD() --- src/rpc/virnetclient.c | 20 src/rpc/virnetclient.h |3 +++ sr

[libvirt] [PATCH 3/6] Support changing UNIX socket owner in virNetSocketNewListenUNIX

2011-08-15 Thread Jiri Denemark
This patch allows owner's UID to be changed as well. --- src/rpc/virnetserverservice.c |2 +- src/rpc/virnetsocket.c|7 --- src/rpc/virnetsocket.h|1 + tests/virnetsockettest.c |4 ++-- 4 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/rpc/

[libvirt] [PATCH 6/6] qemu: Use fd: protocol for migration

2011-08-15 Thread Jiri Denemark
By opening a connection to remote qemu process ourselves and passing the socket to qemu we get much better errors than just "migration failed" when the connection is opened by qemu. --- src/qemu/qemu_migration.c | 128 ++--- 1 files changed, 98 insertions(+

[libvirt] [PATCH 2/6] Add backlog parameter to virNetSocketListen

2011-08-15 Thread Jiri Denemark
So that callers can change the default value. --- src/rpc/virnetserverservice.c |4 ++-- src/rpc/virnetsocket.c|4 ++-- src/rpc/virnetsocket.h|2 +- tests/virnetsockettest.c |6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/rpc/virne

[libvirt] [PATCH 5/6] qemu: Use virNetSocket for tunneled migration

2011-08-15 Thread Jiri Denemark
--- src/qemu/qemu_migration.c | 50 +++- 1 files changed, 8 insertions(+), 42 deletions(-) diff --git a/src/qemu/qemu_migration.c b/src/qemu/qemu_migration.c index 1cabbe0..c29ea9e 100644 --- a/src/qemu/qemu_migration.c +++ b/src/qemu/qemu_migration.c @@

[libvirt] [PATCH 0/6] Use fd: protocol for migration

2011-08-15 Thread Jiri Denemark
Since qemu doesn't give us any reasonable errors when migration fails because of connection issues, we now create a connection to destination qemu ourselves and just pass the created socket to qemu. Daniel P. Berrange (1): Add API for duplicating a socket/client file descriptor Jiri Denemark (5

Re: [libvirt] [PATCH] libvirtd.init.in: stop/restart() - wrong return value in case of fail

2011-08-15 Thread Daniel Veillard
On Sat, Aug 13, 2011 at 11:28:42PM -0400, Douglas Schilling Landgraf wrote: > Currently the function stop() always return 0 (OK) from killproc() even in > case of > error. > > Signed-off-by: Douglas Schilling Landgraf > --- > daemon/libvirtd.init.in |2 ++ > 1 files changed, 2 insertions(+)

Re: [libvirt] [PATCH] daemon: Fix regression of libvirtd reloading support

2011-08-15 Thread Osier Yang
于 2011年08月15日 15:39, Jiri Denemark 写道: On Mon, Aug 15, 2011 at 15:50:46 +0800, Osier Yang wrote: This is introduced by commit df0b57a95a, which forgot to add signal handler for SIGHUP. A simple reproduce method: 1) Create a domain XML under /etc/libvirt/qemu 2) % kill -SIGHUP $(pidof libvirtd)

Re: [libvirt] [PATCH] daemon: Fix regression of libvirtd reloading support

2011-08-15 Thread Jiri Denemark
On Mon, Aug 15, 2011 at 15:50:46 +0800, Osier Yang wrote: > This is introduced by commit df0b57a95a, which forgot to > add signal handler for SIGHUP. > > A simple reproduce method: > > 1) Create a domain XML under /etc/libvirt/qemu > 2) % kill -SIGHUP $(pidof libvirtd) > 3) % virsh list --all (th

[libvirt] [PATCH] daemon: Fix regression of libvirtd reloading support

2011-08-15 Thread Osier Yang
This is introduced by commit df0b57a95a, which forgot to add signal handler for SIGHUP. A simple reproduce method: 1) Create a domain XML under /etc/libvirt/qemu 2) % kill -SIGHUP $(pidof libvirtd) 3) % virsh list --all (the new created domain XML is not listed) --- daemon/libvirtd.c | 13