Re: [libvirt] [PATCH] virsh: Use option alias for outmoded "--persistent"

2012-03-07 Thread Eric Blake
On 03/07/2012 03:17 AM, Osier Yang wrote: > Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created, > all new virsh commands use "--config" to represents the > persistent changing. This patch add "--config" option > for the old commands which still use "--persistent", > and "--persistent" is now

Re: [libvirt] [PATCHv2 15/15] virsh: improve memory unit parsing

2012-03-07 Thread Eric Blake
On 03/07/2012 06:14 AM, Peter Krempa wrote: > On 03/06/2012 01:34 AM, Eric Blake wrote: >> The last vestige of the inaccurate 'kilobytes' when we meant 1024 is >> now gone. And virsh is now useful for setting memory in units other >> than KiB. >> >> >> +static int >> +cmdMemtuneGetSize(const vshCm

Re: [libvirt] [PATCHv2 14/15] virsh: improve storage unit parsing

2012-03-07 Thread Eric Blake
On 03/07/2012 05:45 AM, Peter Krempa wrote: > On 03/06/2012 01:34 AM, Eric Blake wrote: >> Now can now do: >> >> virsh vol-resize $vol 10M >> virsh blockresize $dom $vol 10M >> >> to get both interfaces to resize to 10MiB. The remaining wart >> is that vol-resize defaults to bytes, but blockresize

Re: [libvirt] [PATCHv2 09/15] xml: use better types for memory values

2012-03-07 Thread Eric Blake
On 03/06/2012 09:34 AM, Peter Krempa wrote: > On 03/06/2012 01:34 AM, Eric Blake wrote: >> Using 'unsigned long' for memory values is risky on 32-bit platforms, >> as a PAE guest can have more than 4GiB memory. Our API is >> (unfortunately) locked at 'unsigned long' and a scale of 1024, but >> the

Re: [libvirt] [Qemu-devel] Qemu, libvirt, and CPU models

2012-03-07 Thread Eric Blake
On 03/07/2012 03:26 PM, Eduardo Habkost wrote: > Thanks a lot for the explanations, Daniel. > > Comments about specific items inline. > >>> - How can we make sure there is no confusion between libvirt and Qemu >>> about the CPU models? For example, what if cpu_map.xml says model >>> 'M

Re: [libvirt] [Qemu-devel] Qemu, libvirt, and CPU models

2012-03-07 Thread Eduardo Habkost
Thanks a lot for the explanations, Daniel. Comments about specific items inline. On Wed, Mar 07, 2012 at 02:18:28PM +, Daniel P. Berrange wrote: > > I have two main points I would like to understand/discuss: > > > > 1) The relationship between libvirt's cpu_map.xml and the Qemu CPU model > >

Re: [libvirt] [PATCHv2 11/15] virsh: add option aliases

2012-03-07 Thread Eric Blake
On 03/06/2012 10:46 AM, Peter Krempa wrote: > On 03/06/2012 01:34 AM, Eric Blake wrote: >> In the past, we have created some virsh options with less-than-stellar >> names. For back-compat reasons, those names must continue to parse, >> but we don't want to document them in help output. This intro

Re: [libvirt] [PATCH 1/3 V7] add nodeGetCPUmap() for getting available CPU IDs in a cpumap.

2012-03-07 Thread Eric Blake
On 03/07/2012 03:36 AM, Richard W.M. Jones wrote: > TBH I found the documentation for virDomainGetCPUStats to be very > confusing indeed. I couldn't really tell if virt-top is calling the > API correctly or not, so I simply used Fujitsu's code directly. That's a shame about the documentation not

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-07 Thread Laine Stump
On 03/07/2012 12:48 PM, Michal Privoznik wrote: > Some nits are generated during XML parse (e.g. MAC address of > an interface); However, with current implementation, if we > are plugging a device both to persistent and live config, > we parse given XML twice: first time for live, second for config

Re: [libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-07 Thread Eric Blake
On 03/07/2012 10:48 AM, Michal Privoznik wrote: > Some nits are generated during XML parse (e.g. MAC address of s/nits/members/ > an interface); However, with current implementation, if we > are plugging a device both to persistent and live config, > we parse given XML twice: first time for live,

Re: [libvirt] [PATCH] qemu: Fix startupPolicy for snapshot-revert

2012-03-07 Thread Eric Blake
On 03/07/2012 11:19 AM, Michal Privoznik wrote: > Currently, startupPolicy='requisite' was determining cold boot > by migrateForm != NULL. That means, if domain was started up > with migrateForm set we didn't require disk source path and allowed s/migrateForm/migrateFrom/ (twice) > it to be dropp

[libvirt] [PATCH] util: fix build mingw (and all non-linux) build failure

2012-03-07 Thread Laine Stump
ATTRIBUTE_UNUSED was accidentally forgotten on one arg of a stub function for functionality that's not present on non-linux platforms. This causes a non-linux build with --enable-compile-warnings=error to fail. --- Pushed under build-breaker rule. src/util/pci.c |3 ++- 1 files changed, 2 in

[libvirt] [PATCH] qemu: Fix startupPolicy for snapshot-revert

2012-03-07 Thread Michal Privoznik
Currently, startupPolicy='requisite' was determining cold boot by migrateForm != NULL. That means, if domain was started up with migrateForm set we didn't require disk source path and allowed it to be dropped. However, on snapshot-revert domain wasn't migrated but according to documentation, requis

[libvirt] [PATCH] qemu: Don't parse device twice in attach/detach

2012-03-07 Thread Michal Privoznik
Some nits are generated during XML parse (e.g. MAC address of an interface); However, with current implementation, if we are plugging a device both to persistent and live config, we parse given XML twice: first time for live, second for config. This is wrong then as the second time we are not guara

Re: [libvirt] Per-guest configurable user/group for QEMU processes

2012-03-07 Thread Marcelo Henrique Cerri
On Mon, 27 Feb 2012 12:48:55 -0300 Marcelo Cerri wrote: Just one more point. I'd like to validate the direction that I'm getting. I updated the XML parse and replaced the "seclabel" member in virDomainDef with: size_t nseclabels; virSecurityLabelDefPtr *seclabels; I also added a "mode

Re: [libvirt] [PATCH] sanlock: Fix condition left crippled while debugging

2012-03-07 Thread Eric Blake
On 03/07/2012 07:36 AM, Peter Krempa wrote: > --- > Extra context for review. > > src/locking/lock_driver_sanlock.c |2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) ACK. -- Eric Blake ebl...@redhat.com+1-919-301-3266 Libvirt virtualization library http://libvirt.org signa

Re: [libvirt] [PATCH] sanlock: Use STREQ_NULLABLE instead of STREQ on strings that may be null

2012-03-07 Thread Eric Blake
On 03/07/2012 07:30 AM, Peter Krempa wrote: > The function sanlock_inquire can return NULL in the state string if the > message consists only of a header. The return value is arbitrary and > sent by the server. We should proceed carefully while touching such > pointers. > --- > src/locking/lock_dr

Re: [libvirt] [PATCH RFC v2] qemu: Support numad

2012-03-07 Thread Osier Yang
On 2012年03月07日 23:47, Bill Gray wrote: Note numad will attempt to manage / balance processes after they're launched, but the ideal case is libvirt pre-places them in a good spot and they never move So we can add something like "dynamic" as the new placement mode if the interface for query

Re: [libvirt] [PATCH RFC v2] qemu: Support numad

2012-03-07 Thread Bill Gray
Note numad will attempt to manage / balance processes after they're launched, but the ideal case is libvirt pre-places them in a good spot and they never move On 03/07/2012 10:38 AM, Osier Yang wrote: On 2012年03月07日 21:48, Daniel P. Berrange wrote: On Wed, Mar 07, 2012 at 09:55:16PM +08

Re: [libvirt] [PATCH RFC v2] qemu: Support numad

2012-03-07 Thread Osier Yang
On 2012年03月07日 21:48, Daniel P. Berrange wrote: On Wed, Mar 07, 2012 at 09:55:16PM +0800, Osier Yang wrote: numad is an user-level daemon that monitors NUMA topology and processes resource consumption to facilitate good NUMA resource alignment of applications/virtual machines to improve performa

[libvirt] [PATCH] sanlock: Fix condition left crippled while debugging

2012-03-07 Thread Peter Krempa
--- Extra context for review. src/locking/lock_driver_sanlock.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/locking/lock_driver_sanlock.c b/src/locking/lock_driver_sanlock.c index f2623a0..d344d6a 100644 --- a/src/locking/lock_driver_sanlock.c +++ b/src/locking/

[libvirt] [PATCH] sanlock: Use STREQ_NULLABLE instead of STREQ on strings that may be null

2012-03-07 Thread Peter Krempa
The function sanlock_inquire can return NULL in the state string if the message consists only of a header. The return value is arbitrary and sent by the server. We should proceed carefully while touching such pointers. --- src/locking/lock_driver_sanlock.c |4 ++-- 1 files changed, 2 insertion

Re: [libvirt] Qemu, libvirt, and CPU models

2012-03-07 Thread Daniel P. Berrange
On Tue, Mar 06, 2012 at 03:27:53PM -0300, Eduardo Habkost wrote: > Hi, > > Sorry for the long message, but I didn't find a way to summarize the > questions and issues and make it shorter. > > For people who don't know me: I have started to work recently on the > Qemu CPU model code. I have been l

Re: [libvirt] [PATCH] rpc: allow truncated return for virDomainGetCPUStats

2012-03-07 Thread Eric Blake
On 03/07/2012 12:18 AM, Osier Yang wrote: > On 03/07/2012 02:46 PM, Osier Yang wrote: >> On 03/07/2012 12:48 PM, Eric Blake wrote: >>> The RPC code assumed that the array returned by the driver would be >>> fully populated; that is, ncpus on entry resulted in ncpus * return >>> value on exit. Howev

Re: [libvirt] [PATCH RFC v2] qemu: Support numad

2012-03-07 Thread Daniel P. Berrange
On Wed, Mar 07, 2012 at 09:55:16PM +0800, Osier Yang wrote: > numad is an user-level daemon that monitors NUMA topology and > processes resource consumption to facilitate good NUMA resource > alignment of applications/virtual machines to improve performance > and minimize cost of remote memory late

[libvirt] [PATCH] cpu: Add cpu definition for Intel Sandy Bridge cpu type

2012-03-07 Thread Peter Krempa
This patch adds support for the new tsc-deadline feature flag and a new model to the supported model list describing the Intel Sandy Bridge platform. --- Patches adding the SandyBridge cpu type in qemu are on review and not upstream yet. Please don't prioritize this patch. I sent it for review as

Re: [libvirt] [PATCHv2 11/15] virsh: add option aliases

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: In the past, we have created some virsh options with less-than-stellar names. For back-compat reasons, those names must continue to parse, but we don't want to document them in help output. This introduces a new option type, an alias, which points to a

Re: [libvirt] [PATCHv2 15/15] virsh: improve memory unit parsing

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: The last vestige of the inaccurate 'kilobytes' when we meant 1024 is now gone. And virsh is now useful for setting memory in units other than KiB. * tools/virsh.c (cmdSetmem, cmdSetmaxmem): Use new helper routine, allow passing bogus arguments on to hyp

[libvirt] [PATCH RFC v2] qemu: Support numad

2012-03-07 Thread Osier Yang
numad is an user-level daemon that monitors NUMA topology and processes resource consumption to facilitate good NUMA resource alignment of applications/virtual machines to improve performance and minimize cost of remote memory latencies. It provides a pre-placement advisory interface, so significan

Re: [libvirt] [PATCHv2 14/15] virsh: improve storage unit parsing

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Now can now do: virsh vol-resize $vol 10M virsh blockresize $dom $vol 10M to get both interfaces to resize to 10MiB. The remaining wart is that vol-resize defaults to bytes, but blockresize defaults to KiB, but we can't break existing scripts; oh well,

Re: [libvirt] [Patch]: spice agent-mouse support [v3]

2012-03-07 Thread Zhou Peng
Sorry my git send-email failed to the list :-( Signed-off-by: Zhou Peng spice agent-mouse support Usage: diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 6fcca94..b63f6a0 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2809,6 +2809,13 @@

[libvirt] [PATCH] Ensure max_id is initialized in linuxParseCPUmap()

2012-03-07 Thread Daniel P. Berrange
From: "Daniel P. Berrange" Pushing as a build-breaker fix --- src/nodeinfo.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/nodeinfo.c b/src/nodeinfo.c index 709e94a..61a5925 100644 --- a/src/nodeinfo.c +++ b/src/nodeinfo.c @@ -581,7 +581,7 @@ linuxParseCPUmap(int

[libvirt] [PATCH libvirt-glib] Fix generation of docs in a VPATH builder

2012-03-07 Thread Daniel P. Berrange
From: "Daniel P. Berrange" The DOC_SOURCE_DIR variable was missing the $(top_srcdir) variable so it could not find the source files when run from a VPATH build. Empirically the previous comment saying that $(top_srcdir) was not needed is wrong. --- docs/libvirt-gconfig/Makefile.am |4 +--- d

[libvirt] ANNOUNCE: libvirt-glib release 0.0.6

2012-03-07 Thread Daniel P. Berrange
I am pleased to announce that a new release of the libvirt-glib package, version 0.0.6 is now available from ftp://libvirt.org/libvirt/glib/ The packages are GPG signed with Key fingerprint: DAF3 A6FD B26B 6291 2D0E 8E3F BE86 EBB4 1510 4FDF (4096R) New in this release: - Add binding f

Re: [libvirt] [PATCH 1/3 V7] add nodeGetCPUmap() for getting available CPU IDs in a cpumap.

2012-03-07 Thread Richard W.M. Jones
On Tue, Mar 06, 2012 at 10:02:15PM -0700, Eric Blake wrote: > On 03/06/2012 05:10 AM, Richard W.M. Jones wrote: > > > > This all appears to work. I built my own libvirt with the three > > remaining patches and was able to read pCPU information for a running > > domain. > > The libvirt side is no

Re: [libvirt] [PATCHv2 13/15] virsh: add command aliases, and rename nodedev-detach

2012-03-07 Thread Peter Krempa
On 03/06/2012 01:34 AM, Eric Blake wrote: Just because our public API has a typo doesn't mean that virsh has to keep the typo. * tools/virsh.c (VSH_CMD_FLAG_ALIAS): New flag. (nodedevCmds): Use it. (cmdHelp): Omit alias commands. (cmdNodeDeviceDettach): Rename... (cmdNodeDeviceDetach): ...to thi

[libvirt] [PATCH] virsh: Use option alias for outmoded "--persistent"

2012-03-07 Thread Osier Yang
Since VIR_DOMAIN_AFFECT_{LIVE,CONFIG,CURRENT} was created, all new virsh commands use "--config" to represents the persistent changing. This patch add "--config" option for the old commands which still use "--persistent", and "--persistent" is now alias of "--config". tools/virsh.c: (use "--config

Re: [libvirt] [PATCH 1/3] virsh: add option aliases

2012-03-07 Thread Osier Yang
On 03/07/2012 03:33 PM, Osier Yang wrote: On 03/03/2012 09:02 AM, Eric Blake wrote: In the past, we have created some virsh options with less-than-stellar names. For back-compat reasons, those names must continue to parse, but we don't want to document them in help output. This introduces a new

Re: [libvirt] [libvirt-glib] Keep domain devices list sorted

2012-03-07 Thread Daniel P. Berrange
On Wed, Mar 07, 2012 at 12:27:53AM +0200, Zeeshan Ali (Khattak) wrote: > From: "Zeeshan Ali (Khattak)" > > While we don't guarantee the order of devices in the list returned from > gvir_domain_get_devices(), its not a bad idea to keep them sorted the > same way we get them from configuration (XML