Re: [Libvir] PATCH: Avoid buffer out of bounds access in Xen capabilities

2008-04-29 Thread Daniel Veillard
On Mon, Apr 28, 2008 at 11:42:47PM +0100, Daniel P. Berrange wrote: The Xen driver uses a regex to process the hypervisor capabilities data (xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(x86_32|x86_64|ia64|powerpc64)(p|be)?; notice how the last match group, however, is optional due to the '?'.

Re: [Libvir] PATCH: Add docs on the network XML format

2008-04-29 Thread Daniel Veillard
On Tue, Apr 29, 2008 at 03:27:07AM +0100, Daniel P. Berrange wrote: This patch fills in the network driver XML format page on the website which has been requested many times... Yay ! Thanks, +1 Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard |

[Libvir] [PATCH] Ancient libparted

2008-04-29 Thread Soren Hansen
Some of us are stuck with an ancient libparted, which doesn't know about PED_PARTITION_PROTECTED. This patch allows us to compile libvirt. === modified file 'src/parthelper.c' --- src/parthelper.c2008-04-10 16:53:29 + +++ src/parthelper.c2008-04-29 07:47:08 + @@ -67,8 +67,10 @@

[Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Soren Hansen
Hi! I'd like to propose that the following patch gets applied against libvirt. It adds the option of putting a bus attribute on a disk target. To acommodate this, it also changes the way drives are defined for kvm from the old -hda /path/to/file -boot c style to the new -drive

Re: [Libvir] [PATCH] Allow selection of the NIC model in QEMU/KVM

2008-04-29 Thread Soren Hansen
On Tue, Apr 08, 2008 at 02:57:15PM +0100, Daniel P. Berrange wrote: This patch seems incomplete - there's no code to include the model tag when dumping the XML. FWIW, The patch I applied in Ubuntu to do this, looks like this. It obviously still lack the test case updates and such, though.

Re: [Libvir] [PATCH] Implement SetVcpus and DomainGetMaxVcpus for qemu

2008-04-29 Thread Richard W.M. Jones
On Mon, Apr 28, 2008 at 01:46:28PM -0400, Cole Robinson wrote: [...] Fine except: -if (!strcmp(type, qemu)) +if (!strcasecmp(type, qemu)) return 16; /* XXX future KVM will support SMP. Need to probe kernel to figure out KVM module version i guess */ -if

Re: [Libvir] [PATCH] Ancient libparted

2008-04-29 Thread Richard W.M. Jones
On Tue, Apr 29, 2008 at 09:54:04AM +0200, Soren Hansen wrote: Some of us are stuck with an ancient libparted, which doesn't know about PED_PARTITION_PROTECTED. This patch allows us to compile libvirt. === modified file 'src/parthelper.c' --- src/parthelper.c 2008-04-10 16:53:29 + +++

Re: [Libvir] [PATCH] Implement SetVcpus and DomainGetMaxVcpus for qemu

2008-04-29 Thread Jim Meyering
Cole Robinson [EMAIL PROTECTED] wrote: The attached patch fills in two of the vcpu functions for the qemu driver: virDomainSetVcpus : set the number of vcpus the domain can use virDomainGetMaxVcpus : max number of vcpus that can be assigned to the domain. Code change is only in qemu_driver,

Re: [Libvir] [PATCH] Ancient libparted

2008-04-29 Thread Jim Meyering
Richard W.M. Jones [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 09:54:04AM +0200, Soren Hansen wrote: Some of us are stuck with an ancient libparted, which doesn't know about PED_PARTITION_PROTECTED. This patch allows us to compile libvirt. === modified file 'src/parthelper.c' ---

Re: [Libvir] [PATCH] Ancient libparted

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 02:32:08PM +0200, Jim Meyering wrote: Richard W.M. Jones [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 09:54:04AM +0200, Soren Hansen wrote: Some of us are stuck with an ancient libparted, which doesn't know about PED_PARTITION_PROTECTED. This patch allows us to

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 09:56:13AM +0200, Soren Hansen wrote: Hi! I'd like to propose that the following patch gets applied against libvirt. It adds the option of putting a bus attribute on a disk target. To acommodate this, it also changes the way drives are defined for kvm from the old

Re: [Libvir] [PATCH] Avoid make syntax-check failures.

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 01:04:19PM +0200, Jim Meyering wrote: Including config.h from memory.c is probably required only on um, ... unusual systems, but technically, it is required for the definition of a possibly missing size_t or ptrdiff_t type. Avoid make syntax-check failures.

Re: [Libvir] PATCH: Avoid buffer out of bounds access in Xen capabilities

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 02:46:14AM -0400, Daniel Veillard wrote: On Mon, Apr 28, 2008 at 11:42:47PM +0100, Daniel P. Berrange wrote: The Xen driver uses a regex to process the hypervisor capabilities data (xen|hvm)-[[:digit:]]+\\.[[:digit:]]+-(x86_32|x86_64|ia64|powerpc64)(p|be)?;

[Libvir] also check for useless test-before-xmlFree

2008-04-29 Thread Jim Meyering
Some time ago, Daniel Veillard assured me that xmlFree(NULL) is valid in regular use, and with upstream code since January it's ok even in a debug mode that's not normally available because it's ifdef'd out: http://mail.gnome.org/archives/svn-commits-list/2008-January/msg02233.html Since the

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Soren Hansen
On Tue, Apr 29, 2008 at 02:27:00PM +0100, Daniel P. Berrange wrote: +strcmp((const char *)target, hdd) +strcmp((const char *)target, hdd) These two lines test the same thing ! Quite so. My bad. +strncmp((const char *)target, vd, 2)) { Its probably a better

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 04:10:40PM +0200, Soren Hansen wrote: On Tue, Apr 29, 2008 at 02:27:00PM +0100, Daniel P. Berrange wrote: +if (!bus) +disk-bus = QEMUD_DISK_BUS_IDE; +else if (!strcmp((const char *)bus, ide)) +disk-bus = QEMUD_DISK_BUS_IDE; +else if

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 04:10:40PM +0200, Soren Hansen wrote: On Tue, Apr 29, 2008 at 02:27:00PM +0100, Daniel P. Berrange wrote: +if (!bus) +disk-bus = QEMUD_DISK_BUS_IDE; +else if (!strcmp((const char *)bus, ide)) +

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Jim Meyering
Jim Meyering [EMAIL PROTECTED] wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 04:10:40PM +0200, Soren Hansen wrote: On Tue, Apr 29, 2008 at 02:27:00PM +0100, Daniel P. Berrange wrote: +if (!bus) +disk-bus = QEMUD_DISK_BUS_IDE; +else if

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Soren Hansen
On Tue, Apr 29, 2008 at 03:17:14PM +0100, Daniel P. Berrange wrote: +if (!bus) +disk-bus = QEMUD_DISK_BUS_IDE; +else if (!strcmp((const char *)bus, ide)) +disk-bus = QEMUD_DISK_BUS_IDE; +else if (!strcmp((const char *)bus, scsi)) +disk-bus =

[Libvir] Basic VMWare support

2008-04-29 Thread Marek 'marx' Grac
Hi, I know that there is no support for VMWare ESX yet but I would like to know if someone is working on it. I need just three basic operations: status/power on/power off but I never saw the source code of libvirt :) Do you think it is possible to write this support (using VMWare API) in

Re: [Libvir] [PATCH] Add bus attribute to disk target definition

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 04:42:54PM +0200, Soren Hansen wrote: On Tue, Apr 29, 2008 at 03:17:14PM +0100, Daniel P. Berrange wrote: +if (!bus) +disk-bus = QEMUD_DISK_BUS_IDE; +else if (!strcmp((const char *)bus, ide)) +disk-bus = QEMUD_DISK_BUS_IDE; +else if

Re: [Libvir] also check for useless test-before-xmlFree

2008-04-29 Thread Daniel Veillard
On Tue, Apr 29, 2008 at 04:07:06PM +0200, Jim Meyering wrote: Some time ago, Daniel Veillard assured me that xmlFree(NULL) is valid in regular use, and with upstream code since January it's Yup it points to free() from libc, unless redefined by the user, but I don't expect that in an

[Libvir] make syntax-check fails with bzr checkouts

2008-04-29 Thread Soren Hansen
I seem to be completely unable to get make syntax-checks to function properly with my bzr checkout of libvirt[1]. I've attached the output as as-is.txt. I tried adding hacking bzr support into vc-list-files (see vc-list-files-bzr.patch), but that didn't quite seem to do the trick, as you can see

Re: [Libvir] Basic VMWare support

2008-04-29 Thread Daniel Veillard
On Mon, Apr 28, 2008 at 03:24:00PM +0200, Marek 'marx' Grac wrote: Hi, I know that there is no support for VMWare ESX yet but I would like to know if someone is working on it. I need just three basic operations: status/power on/power off but I never saw the source code of libvirt :) Do

Re: [Libvir] make syntax-check fails with bzr checkouts

2008-04-29 Thread Daniel Veillard
On Tue, Apr 29, 2008 at 05:11:59PM +0200, Soren Hansen wrote: I tried CVS, too, and that also fails (see cvs-syntax-check.log). weird Is it only meant to work with git? Really no, I only use CVS checkouts... Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/

Re: [Libvir] make syntax-check fails with bzr checkouts

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 05:11:59PM +0200, Soren Hansen wrote: I seem to be completely unable to get make syntax-checks to function properly with my bzr checkout of libvirt[1]. I've attached the output as as-is.txt. I tried adding hacking bzr support into vc-list-files (see

[Libvir] PATCH: Support network interface model in Xen and QEMU driver

2008-04-29 Thread Daniel P. Berrange
This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax src/qemu_conf.c | 57 ++-- src/qemu_conf.h |2

[Libvir] [PATCH] remove useless tests before xmlFree

2008-04-29 Thread Jim Meyering
I've just fixed a bug in my useless-if-detecting script, committed in gnulib. Using that new script with today's change adding xmlFree to the list exposed a bunch of useless tests. This first change set removes those tests. Below it is a separate patch that updates gnulib-related files,

Re: [Libvir] [PATCH] remove useless tests before xmlFree

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 09:30:39PM +0200, Jim Meyering wrote: I've just fixed a bug in my useless-if-detecting script, committed in gnulib. Using that new script with today's change adding xmlFree to the list exposed a bunch of useless tests. This first change set removes those tests.

Re: [Libvir] [PATCH] remove useless tests before xmlFree

2008-04-29 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 09:30:39PM +0200, Jim Meyering wrote: I've just fixed a bug in my useless-if-detecting script, committed in gnulib. Using that new script with today's change adding xmlFree to the list exposed a bunch of useless tests. This

[Libvir] Basic VMWare support

2008-04-29 Thread Marek 'marx' Grac
Hi, I know that there is no support for VMWare ESX yet but I would like to know if someone is working on it. I need just three basic operations: status/power on/power off but I never saw the source code of libvirt :) Do you think it is possible to write this support (using VMWare API) in

Re: [Libvir] Basic VMWare support

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 10:22:33PM +0200, Marek 'marx' Grac wrote: Hi, I know that there is no support for VMWare ESX yet but I would like to know if someone is working on it. I need just three basic operations: status/power on/power off but I never saw the source code of libvirt :) Do

Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 06:20:01PM +0100, Daniel P. Berrange wrote: This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax Here is a re-diff following Jim's xmlFree cleanups. Dan. Index:

Re: [Libvir] [PATCH] remove useless tests before xmlFree

2008-04-29 Thread Daniel P. Berrange
On Tue, Apr 29, 2008 at 09:44:50PM +0200, Jim Meyering wrote: Daniel P. Berrange [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 09:30:39PM +0200, Jim Meyering wrote: I've just fixed a bug in my useless-if-detecting script, committed in gnulib. Using that new script with today's change

Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver

2008-04-29 Thread Jim Meyering
Daniel P. Berrange [EMAIL PROTECTED] wrote: On Tue, Apr 29, 2008 at 06:20:01PM +0100, Daniel P. Berrange wrote: This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax Here is a re-diff

Re: [Libvir] PATCH: Support network interface model in Xen and QEMU driver

2008-04-29 Thread Jim Paris
Daniel P. Berrange wrote: This patch finishes off the work from Rich / Soren to support network interface model in both Xen and QEMU drivers, and adds test cases for the new syntax I still think our consensus from when I posted this patch last year (nic model=...) makes more sense ... but