[libvirt] [RFC] Support for CPUID masking

2009-09-02 Thread Jiri Denemark
Hi, We need to provide support for CPU ID masking. Xen and VMware ESX are examples of current hypervisors which support such masking. My proposal is to define new 'cpuid' feature advertised in guest capabilities: ... When a driver supports cpuid

Re: [libvirt] [RFC] Support for CPUID masking

2009-09-03 Thread Jiri Denemark
> > We need to provide support for CPU ID masking. Xen and VMware ESX are > > examples > > of current hypervisors which support such masking. > > > > My proposal is to define new 'cpuid' feature advertised in guest > > capabilities: > ... > > > > ... > > > > > > > >

[libvirt] [RFC] Support for CPUID masking v2

2009-09-04 Thread Jiri Denemark
Hi, This is an attempt to provide similar flexibility to CPU ID masking without being x86-specific and unfriendly to users. As suggested by Dan, we need a way to specify both CPU flags and topology to achieve this goal. Firstly, CPU topology and all (actually all that libvirt knows about) CPU fe

Re: [libvirt] [RFC] Support for CPUID masking v2

2009-09-13 Thread 'Jiri Denemark'
> > I'm not sure how to deal with named CPUs suggested by Dan. Either we need > > to come up with global set of named CPUs and document what they mean or > > let drivers specify their own named CPUs and advertise them through guest > > capabilities: > > > > ... > > > >

Re: [libvirt] [RFC] Support for CPUID masking v2

2009-09-22 Thread Jiri Denemark
> > I'm not 100% sure we should represent CPU features as > > NAME > > especially because some features are currently advertised as . > > However, > > extending XML schema every time a new feature is introduced doesn't look > > like > > a good idea at all. The problem is we can't get rid of -sty

[libvirt] [PATCH] Fix a typo in virDiskHasValidPciAddr()

2009-09-23 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/conf/domain_conf.h |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 09368d9..d494e54 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -125,7 +125,7 @@ struct

[libvirt] [PATCH] Fix build in separate build directory

2009-10-01 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- cfg.mk |2 +- examples/domain-events/events-c/Makefile.am |2 +- examples/hellolibvirt/Makefile.am |2 +- tools/Makefile.am |2 +- 4 files changed, 4 insertions(+), 4

[libvirt] [PATCH 0/2] CPU flags capabilities and domain configuration

2009-11-03 Thread Jiri Denemark
Hi, These are two initial patches for CPU flags/masks support for libvirt. The first patch contains changes to schemas and describes semantics of new elements and attributes. The second patch introduces internal API functions for XML parsing and formating. Jiri Denemark (2): XML schema for

[libvirt] [PATCH 1/2] XML schema for CPU flags

2009-11-03 Thread Jiri Denemark
hen migrated to another host, the policy changes to 'require' as we can't take the feature away from a running guest. Default policy for features provided by host CPU but not specified in domain configuration is set using match attribute of cpu tag. If 'minimum' match is req

[libvirt] [PATCH 2/2] XML parsing/formating code for CPU flags

2009-11-03 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/virterror.h |1 + src/Makefile.am |9 +- src/conf/capabilities.c | 31 - src/conf/capabilities.h |6 + src/conf/cpu_conf.c | 345 +++ src/conf/cpu_conf.h

[libvirt] [PATCH] Xen: Add support for interface model='xenpv'

2009-11-26 Thread Jiri Denemark
d for an HVM guest on xen newer then XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU. No type would be configured when model is missing in domains XML. If you think this is a good idea, I'll prepare a second version of the patch. Signed-off-by: Jiri Denemark --- src/xen/xend_internal.c | 25

Re: [libvirt] [PATCH] Xen: Add support for interface model='xenpv'

2009-11-26 Thread Jiri Denemark
> > A possible addition to this would be to force type=ioemu for all other > > models which would result in only emulated network device to be provided > > for an HVM guest on xen newer then XEND_CONFIG_MAX_VERS_NET_TYPE_IOEMU. > > No type would be configured when model is missing in domains XML. >

[libvirt] [PATCH 0/2] Xen: Add support for interface model='netfront'

2009-11-27 Thread Jiri Denemark
ooked more like kvm/qemu's virtio. However, you can find several tips how to force PV network interface for HVM guest by using type="netfront" so I changed it to conform with those tips. It also matches guest's driver name used for that device. Jiri Denemark (2): Suppor

[libvirt] [PATCH 1/2] Support for interface model='netfront'

2009-11-27 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/xen/xend_internal.c | 32 src/xen/xm_internal.c | 38 +- 2 files changed, 57 insertions(+), 13 deletions(-) diff --git a/src/xen/xend_internal.c b/src/xen/xend_internal.c index

[libvirt] [PATCH 2/2] Tests for interface type/model configuration

2009-11-27 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.sexpr |1 + tests/sexpr2xmldata/sexpr2xml-fv-net-ioemu.xml | 42 +++ .../sexpr2xmldata/sexpr2xml-fv-net-netfront.sexpr |1 + tests/sexpr2xmldata/sexpr2xml-fv-net-netfront.xml | 42

Re: [libvirt] [PATCH 2/2] add --live support to "virsh dump"

2009-11-30 Thread Jiri Denemark
> > In Xen it is buggy, so I chose to not support it. > > Well some versions of Xen are buggy, but not neccessarily all of > them. IMHO we should support it in libvirt because it is a trivial > change to make. This at least lets users try the functionality and > see if there are bugs in their vers

[libvirt] [PATCH] Export all symbols from xml.h for internal use

2009-12-04 Thread Jiri Denemark
Some of the very useful calls for XML parsing provided by util/xml.[ch] were not exported as private symbols. This patch fixes this. Signed-off-by: Jiri Denemark --- src/libvirt_private.syms |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/src/libvirt_private.syms b

[libvirt] [PATCH] Fix use of virEventAddHandleImpl()

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/node_device/node_device_udev.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/node_device/node_device_udev.c b/src/node_device/node_device_udev.c index cf23be1..6b6e244 100644 --- a/src/node_device/node_device_udev.c

[libvirt] [PATCH 00/14] CPU selection patches

2009-12-14 Thread Jiri Denemark
Hi, Here it is, finally. Jirka Jiri Denemark (14): XML schema for CPU flags XML parsing/formating code for CPU flags Public API Internal driver API Public API implementation Wire protocol format Remote driver Server side dispatcher CPU selection infrastructure CPU map for

[libvirt] [PATCH 01/14] XML schema for CPU flags

2009-12-14 Thread Jiri Denemark
ed to another host, the policy changes to 'require' as we can't take the feature away from a running guest. Default policy for features provided by host CPU but not specified in domain configuration is set using match attribute of cpu tag. If 'minimum' match is requested, a

[libvirt] [PATCH 02/14] XML parsing/formating code for CPU flags

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/virterror.h |1 + src/Makefile.am |9 +- src/conf/capabilities.c | 31 - src/conf/capabilities.h |6 + src/conf/cpu_conf.c | 366 +++ src/conf/cpu_conf.h

[libvirt] [PATCH 03/14] Public API

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/libvirt.h.in | 15 +++ src/libvirt_public.syms |6 ++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 6c3aded..ec7f475 100644 --- a

[libvirt] [PATCH 04/14] Internal driver API

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/driver.h | 20 src/libvirt_private.syms |1 + 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 09ce8e2..16bf9bf 100644 --- a/src/driver.h +++ b/src/driver.h @@ -349,6

[libvirt] [PATCH 05/14] Public API implementation

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/virterror.h |1 + src/libvirt.c | 129 +++ src/util/virterror.c|5 ++ 3 files changed, 135 insertions(+), 0 deletions(-) diff --git a/include/libvirt/virterror.h b/include

[libvirt] [PATCH 07/14] Remote driver

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/remote/remote_driver.c | 125 1 files changed, 125 insertions(+), 0 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index affeb0f..b60d6d4 100644 --- a/src/remote

[libvirt] [PATCH 06/14] Wire protocol format

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- daemon/remote_dispatch_prototypes.h | 16 src/remote/remote_protocol.c| 27 +++ src/remote/remote_protocol.x| 18 +- 3 files changed, 60 insertions(+), 1 deletions(-) diff --git a

[libvirt] [PATCH 08/14] Server side dispatcher

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- daemon/remote.c | 42 ++ 1 files changed, 42 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 7a43046..7a3 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -5226,6 +5226,48

[libvirt] [PATCH 10/14] CPU map for models and features

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/Makefile.am |2 + src/cpu/cpu_map.xml | 304 +++ 2 files changed, 306 insertions(+), 0 deletions(-) create mode 100644 src/cpu/cpu_map.xml diff --git a/src/Makefile.am b/src/Makefile.am index 471e403

[libvirt] [PATCH 11/14] CPU driver implementation

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- daemon/Makefile.am |2 + daemon/libvirtd.c|3 + src/Makefile.am | 20 +- src/cpu/cpu_driver.c | 190 ++ src/cpu/cpu_driver.h | 40 +++ src/datatypes.h |2 + 6 files

[libvirt] [PATCH 09/14] CPU selection infrastructure

2009-12-14 Thread Jiri Denemark
odel names: cpuDecode(conn, guest, data, n_allowed_models, allowed_models) - pass guest->model and guest->features to the hypervisor Signed-off-by: Jiri Denemark --- configure.in | 20 + src/Makefile.am | 12 + src/cpu/cpu.c| 206 + src/cpu/cp

[libvirt] [PATCH 12/14] Set getHostCPU handler in drivers

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/esx/esx_driver.c |1 + src/lxc/lxc_driver.c |1 + src/openvz/openvz_driver.c |1 + src/test/test_driver.c |1 + src/uml/uml_driver.c |1 + src/vbox/vbox_tmpl.c |1 + 6 files changed, 6 insertions(+), 0

[libvirt] [PATCH 13/14] Implement CPU selection in QEMU driver

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_conf.c | 401 +--- src/qemu/qemu_conf.h |7 + src/qemu/qemu_driver.c | 37 -- 3 files changed, 415 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH 14/14] Implement virsh commands

2009-12-14 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tools/virsh.c | 65 + 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8f96ca8..e992999 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -6836,6

Re: [libvirt] [PATCH 00/14] CPU selection patches

2009-12-15 Thread Jiri Denemark
> Jiri Denemark (14): > XML schema for CPU flags > XML parsing/formating code for CPU flags > Public API > Internal driver API > Public API implementation > Wire protocol format > Remote driver > Server side dispatcher > CPU selection infrastruct

[libvirt] [PATCH v2 00/13] CPU selection patches

2009-12-15 Thread Jiri Denemark
CompareXML() internal function to make virConnectCompareCPU() simpler Jirka Jiri Denemark (13): XML schema for CPU flags XML parsing/formating code for CPU flags Public API Internal driver API Public API implementation Wire protocol format Remote driver Server side dispatcher CPU

[libvirt] [PATCH v2 01/13] XML schema for CPU flags

2009-12-15 Thread Jiri Denemark
ed to another host, the policy changes to 'require' as we can't take the feature away from a running guest. Default policy for features provided by host CPU but not specified in domain configuration is set using match attribute of cpu tag. If 'minimum' match is requested, a

[libvirt] [PATCH v2 02/13] XML parsing/formating code for CPU flags

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/virterror.h |1 + src/Makefile.am |9 +- src/conf/capabilities.c | 31 - src/conf/capabilities.h |6 + src/conf/cpu_conf.c | 366 +++ src/conf/cpu_conf.h

[libvirt] [PATCH v2 03/13] Public API

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/libvirt.h.in | 13 + src/libvirt_public.syms |5 + 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 6c3aded..473d2a2 100644 --- a/include

[libvirt] [PATCH v2 04/13] Internal driver API

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/driver.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 09ce8e2..c9177fa 100644 --- a/src/driver.h +++ b/src/driver.h @@ -349,6 +349,10 @@ typedef int typedef int

[libvirt] [PATCH v2 05/13] Public API implementation

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/libvirt.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 008e322..ef4431f 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -10701,3 +10701,44 @@ error

[libvirt] [PATCH v2 06/13] Wire protocol format

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/remote/remote_protocol.x | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 92f7010..3d7ac45 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote

[libvirt] [PATCH v2 07/13] Remote driver

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/remote/remote_driver.c | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index affeb0f..c767c28 100644 --- a/src/remote/remote_driver.c +++ b/src/remote

[libvirt] [PATCH v2 08/13] Server side dispatcher

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- daemon/remote.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 7a43046..a6f4bec 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -5226,6 +5226,28 @@ static int

[libvirt] [PATCH v2 09/13] CPU selection infrastructure

2009-12-15 Thread Jiri Denemark
(conn, host_cpu, guest_cpu_config, &data) - decode raw data into virCPUDefPtr with a possible restriction on allowed model names: cpuDecode(conn, guest, data, n_allowed_models, allowed_models) - pass guest->model and guest->features to the hypervisor Signed-off-by: Jiri Den

[libvirt] [PATCH v2 10/13] CPU map for models and features

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/Makefile.am |2 + src/cpu/cpu_map.xml | 304 +++ 2 files changed, 306 insertions(+), 0 deletions(-) create mode 100644 src/cpu/cpu_map.xml diff --git a/src/Makefile.am b/src/Makefile.am index 471e403

[libvirt] [PATCH v2 11/13] Set cpuCompare handler in drivers

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/esx/esx_driver.c |1 + src/lxc/lxc_driver.c |1 + src/openvz/openvz_driver.c |1 + src/test/test_driver.c |1 + src/uml/uml_driver.c |1 + src/vbox/vbox_tmpl.c |1 + 6 files changed, 6 insertions(+), 0

[libvirt] [PATCH v2 12/13] Implement CPU selection in QEMU driver

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_conf.c | 401 +--- src/qemu/qemu_conf.h |7 + src/qemu/qemu_driver.c | 43 -- 3 files changed, 421 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH v2 13/13] Implement virsh commands

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tools/virsh.c | 65 + 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8f96ca8..e992999 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -6836,6

[libvirt] [PATCH v3 03/13] Public API

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/libvirt.h.in | 13 + src/libvirt_public.syms |5 + 2 files changed, 18 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 6c3aded..473d2a2 100644 --- a/include

[libvirt] [PATCH v3 00/13] CPU selection patches

2009-12-15 Thread Jiri Denemark
mplemented directly by hypervisor drivers - new cpuCompareXML() internal function to make virConnectCompareCPU() simpler Jirka Jiri Denemark (13): XML schema for CPU flags XML parsing/formating code for CPU flags Public API Internal driver API Public API implementation Wire proto

[libvirt] [PATCH v3 04/13] Internal driver API

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/driver.h |5 + 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/src/driver.h b/src/driver.h index 09ce8e2..c9177fa 100644 --- a/src/driver.h +++ b/src/driver.h @@ -349,6 +349,10 @@ typedef int typedef int

[libvirt] [PATCH v3 02/13] XML parsing/formating code for CPU flags

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/virterror.h |1 + src/Makefile.am |9 +- src/conf/capabilities.c | 31 - src/conf/capabilities.h |6 + src/conf/cpu_conf.c | 366 +++ src/conf/cpu_conf.h

[libvirt] [PATCH v3 01/13] XML schema for CPU flags

2009-12-15 Thread Jiri Denemark
ed to another host, the policy changes to 'require' as we can't take the feature away from a running guest. Default policy for features provided by host CPU but not specified in domain configuration is set using match attribute of cpu tag. If 'minimum' match is requested, a

[libvirt] [PATCH v3 08/13] Server side dispatcher

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- daemon/remote.c | 22 ++ 1 files changed, 22 insertions(+), 0 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 7a43046..a6f4bec 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -5226,6 +5226,28 @@ static int

[libvirt] [PATCH v3 06/13] Wire protocol format

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/remote/remote_protocol.x | 12 +++- 1 files changed, 11 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_protocol.x b/src/remote/remote_protocol.x index 92f7010..3d7ac45 100644 --- a/src/remote/remote_protocol.x +++ b/src/remote

[libvirt] [PATCH v3 07/13] Remote driver

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/remote/remote_driver.c | 27 +++ 1 files changed, 27 insertions(+), 0 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index 77962fe..db481dd 100644 --- a/src/remote/remote_driver.c +++ b/src/remote

[libvirt] [PATCH v3 11/13] Set cpuCompare handler in drivers

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/esx/esx_driver.c |1 + src/lxc/lxc_driver.c |1 + src/openvz/openvz_driver.c |1 + src/test/test_driver.c |1 + src/uml/uml_driver.c |1 + src/vbox/vbox_tmpl.c |1 + 6 files changed, 6 insertions(+), 0

[libvirt] [PATCH v3 05/13] Public API implementation

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/libvirt.c | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index 103b331..4d9cb33 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -10706,3 +10706,44 @@ error

[libvirt] [PATCH v3 10/13] CPU map for models and features

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/Makefile.am |2 + src/cpu/cpu_map.xml | 304 +++ 2 files changed, 306 insertions(+), 0 deletions(-) create mode 100644 src/cpu/cpu_map.xml diff --git a/src/Makefile.am b/src/Makefile.am index 471e403

[libvirt] [PATCH v3 13/13] Implement virsh commands

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tools/virsh.c | 65 + 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8f96ca8..e992999 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -6836,6

[libvirt] [PATCH v3 12/13] Implement CPU selection in QEMU driver

2009-12-15 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_conf.c | 401 +--- src/qemu/qemu_conf.h |7 + src/qemu/qemu_driver.c | 43 -- 3 files changed, 421 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH v3 09/13] CPU selection infrastructure

2009-12-15 Thread Jiri Denemark
(conn, host_cpu, guest_cpu_config, &data) - decode raw data into virCPUDefPtr with a possible restriction on allowed model names: cpuDecode(conn, guest, data, n_allowed_models, allowed_models) - pass guest->model and guest->features to the hypervisor Signed-off-by: Jiri Den

Re: [libvirt] [PATCH v3 01/13] XML schema for CPU flags

2009-12-16 Thread Jiri Denemark
> > > > - > > + > >[0-9]+ > > > > > > Hum, why do you change this ? Because you wanted me to do so last time you reviewed this patch :-) > But basically if you use http://www.w3.org/TR/xmlschema-2/#unsignedInt > as the base type then the pattern restriction is sup

Re: [libvirt] [PATCH v3 00/13] CPU selection patches

2009-12-17 Thread Jiri Denemark
> > Changes in version 3: > > - fix build and segfault on i386 > > > > Changes in version 2: > > - virConnectGetHostCPU() API call was completely removed > > - 'CPU driver implementation' (11/14) patch was dropped > > - virConnectCompareCPU() API call is implemented directly by hypervisor > >  driv

Re: [libvirt] [PATCH v3 11/13] Set cpuCompare handler in drivers

2009-12-17 Thread Jiri Denemark
... > > diff --git a/src/vbox/vbox_tmpl.c b/src/vbox/vbox_tmpl.c > > index d6b681c..bede574 100644 > > --- a/src/vbox/vbox_tmpl.c > > +++ b/src/vbox/vbox_tmpl.c > > @@ -7049,6 +7049,7 @@ virDriver NAME(Driver) = { > > vboxIsSecure, > > vboxDomainIsActive, > > vboxDomainIsPersistent,

Re: [libvirt] [PATCH v3 03/13] Public API

2009-12-17 Thread Jiri Denemark
> > +/* > > + * CPU specification API > > + */ > > + > > +typedef enum { > > +VIR_CPU_COMPARE_ERROR = -1, > > +VIR_CPU_COMPARE_INCOMPATIBLE= 0, > > +VIR_CPU_COMPARE_IDENTICAL = 1, > > +VIR_CPU_COMPARE_SUPERSET= 2 > > +} virCPUCompareResult; > > + > > +int

Re: [libvirt] [PATCH v3 12/13] Implement CPU selection in QEMU driver

2009-12-17 Thread Jiri Denemark
> > diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c > > + > > +int > > +qemudProbeCPUModels(const char *qemu, > > +const char *arch, > > +unsigned int *count, > > +const char ***cpus) > > +{ ... > > +qemudParseCPUModels parse;

[libvirt] [PATCH v4 09/11] CPU map for models and features

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/Makefile.am |2 + src/cpu/cpu_map.xml | 345 +++ 2 files changed, 347 insertions(+), 0 deletions(-) create mode 100644 src/cpu/cpu_map.xml diff --git a/src/Makefile.am b/src/Makefile.am index 471e403

[libvirt] [PATCH v4 11/11] Implement virsh commands

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- tools/virsh.c | 65 + 1 files changed, 65 insertions(+), 0 deletions(-) diff --git a/tools/virsh.c b/tools/virsh.c index 8f96ca8..1030ca2 100644 --- a/tools/virsh.c +++ b/tools/virsh.c @@ -6836,6

[libvirt] [PATCH v4 05/11] Public API implementation

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/libvirt.c | 43 +++ 1 files changed, 43 insertions(+), 0 deletions(-) diff --git a/src/libvirt.c b/src/libvirt.c index cad33c2..8d5152c 100644 --- a/src/libvirt.c +++ b/src/libvirt.c @@ -10759,3 +10759,46 @@ error

[libvirt] [PATCH v4 03/11] Public API

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/libvirt.h.in | 25 + src/libvirt_public.syms |5 + 2 files changed, 30 insertions(+), 0 deletions(-) diff --git a/include/libvirt/libvirt.h.in b/include/libvirt/libvirt.h.in index 6c3aded..2046f38 100644

[libvirt] [PATCH v4 07/11] Remote driver

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/remote/remote_driver.c | 28 +++- 1 files changed, 27 insertions(+), 1 deletions(-) diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c index e7799bf..db481dd 100644 --- a/src/remote/remote_driver.c +++ b/src

[libvirt] [PATCH v4 00/11] CPU selection patches

2009-12-17 Thread Jiri Denemark
) internal function to make virConnectCompareCPU() simpler Jirka Jiri Denemark (11): XML schema for CPU flags XML parsing/formating code for CPU flags Public API Internal driver API Public API implementation Wire protocol format and server side dispatcher Remote driver CPU

[libvirt] [PATCH v4 10/11] Implement CPU selection in QEMU driver

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_conf.c | 398 +--- src/qemu/qemu_conf.h |7 + src/qemu/qemu_driver.c | 44 -- 3 files changed, 419 insertions(+), 30 deletions(-) diff --git a/src/qemu/qemu_conf.c b/src/qemu/qemu_conf.c

[libvirt] [PATCH v4 04/11] Internal driver API

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/driver.h|5 + src/esx/esx_driver.c|1 + src/lxc/lxc_driver.c|1 + src/opennebula/one_driver.c |1 + src/openvz/openvz_driver.c |1 + src/phyp/phyp_driver.c |1 + src/qemu/qemu_driver.c

[libvirt] [PATCH v4 02/11] XML parsing/formating code for CPU flags

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- include/libvirt/virterror.h |1 + proxy/Makefile.am |1 + src/Makefile.am |9 +- src/conf/capabilities.c | 31 - src/conf/capabilities.h |6 + src/conf/cpu_conf.c | 368

[libvirt] [PATCH v4 06/11] Wire protocol format and server side dispatcher

2009-12-17 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- daemon/remote.c | 22 ++ src/remote/remote_protocol.x | 13 - 2 files changed, 34 insertions(+), 1 deletions(-) diff --git a/daemon/remote.c b/daemon/remote.c index 7a43046..1b6be42 100644 --- a/daemon/remote.c

[libvirt] [PATCH v4 08/11] CPU selection infrastructure

2009-12-17 Thread Jiri Denemark
(conn, host_cpu, guest_cpu_config, &data) - decode raw data into virCPUDefPtr with a possible restriction on allowed model names: cpuDecode(conn, guest, data, n_allowed_models, allowed_models) - pass guest->model and guest->features to the hypervisor Signed-off-by: Jiri Den

[libvirt] [PATCH v4 01/11] XML schema for CPU flags

2009-12-17 Thread Jiri Denemark
ed to another host, the policy changes to 'require' as we can't take the feature away from a running guest. Default policy for features provided by host CPU but not specified in domain configuration is set using match attribute of cpu tag. If 'minimum' match is requested, a

[libvirt] [PATCH] Fix typo in qemudDomainAttachHostPciDevice()

2009-12-21 Thread Jiri Denemark
The 'if' statement is supposed to check return value of pci = pciGetDevice(conn, ...); Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 890aa8

[libvirt] [PATCH 3/3] Use pciDeviceIsAssignable in qemu driver

2009-12-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/qemu_driver.c |9 - 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c index 60dea9c..0a8744f 100644 --- a/src/qemu/qemu_driver.c +++ b/src/qemu/qemu_driver.c @@ -1746,6 +1746,7

[libvirt] [PATCH 0/3] Block assignment of PCI devices below non-ACS capable switch

2009-12-21 Thread Jiri Denemark
PCI check. This code is a port of that check to libvirt. Jiri Denemark (3): Tests for ACS in PCIe switches New 'permissive' attribute for hostdev Use pciDeviceIsAssignable in qemu driver docs/schemas/domain.rng |8 +++ src/conf/domain_conf.c | 14 - src/conf/domain_co

[libvirt] [PATCH 2/3] New 'permissive' attribute for hostdev

2009-12-21 Thread Jiri Denemark
When it is set to 'yes', some check whether a device is safe to be assigned to a guest will be weakened. Signed-off-by: Jiri Denemark --- docs/schemas/domain.rng |8 src/conf/domain_conf.c | 14 -- src/conf/domain_conf.h |1 + 3 files changed, 21

[libvirt] [PATCH 1/3] Tests for ACS in PCIe switches

2009-12-21 Thread Jiri Denemark
bound to a stub driver. Signed-off-by: Jiri Denemark --- src/libvirt_private.syms |3 + src/util/pci.c | 147 ++ src/util/pci.h |7 ++ 3 files changed, 157 insertions(+), 0 deletions(-) diff --git a/src

[libvirt] [PATCH] Install cpu_map.xml

2009-12-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/Makefile.am |6 -- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 7d731de..42108c0 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,7 @@ INCLUDES

[libvirt] [PATCH] Only probe for CPU models if required

2009-12-21 Thread Jiri Denemark
CPU models where probe everytime a qemu command line was built. But it only makes sense to do so when a guest's XML contains CPU model. Signed-off-by: Jiri Denemark --- src/qemu/qemu_conf.c |7 --- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_conf.c

[libvirt] [PATCH] Add cpu_map.xml to libvirt.spec

2009-12-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- libvirt.spec.in |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index dd067ad..e1d4e53 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -687,6 +687,8 @@ fi %{_datadir}/libvirt/networks/default.xml

[libvirt] [PATCH] Add myself to AUTHORS :-)

2009-12-21 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- AUTHORS |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/AUTHORS b/AUTHORS index 8bb652f..bff1b20 100644 --- a/AUTHORS +++ b/AUTHORS @@ -80,6 +80,7 @@ Patches have also been contributed by: Satoru SATOH Paolo Bonzini

Re: [libvirt] [PATCH 2/3] New 'permissive' attribute for hostdev

2009-12-21 Thread Jiri Denemark
> > When it is set to 'yes', some check whether a device is safe to be > > assigned to a guest will be weakened. > > I think this is a rather ill-defined concept to be adding the guest XML, > since there are many checks done for assignment, and this is only impacting > one of them. Whether to allo

Re: [libvirt] [PATCH 2/3] New 'permissive' attribute for hostdev

2009-12-22 Thread Jiri Denemark
On Tue, Dec 22, 2009 at 10:04:16 +, Daniel P. Berrange wrote: > On Tue, Dec 22, 2009 at 10:51:15AM +0100, Daniel Veillard wrote: > > On Mon, Dec 21, 2009 at 07:09:08PM +, Daniel P. Berrange wrote: > > > On Mon, Dec 21, 2009 at 02:27:18PM +0100, Jiri Denemark wrote: >

Re: [libvirt] [PATCH] cpu: Fix memory leaks in x86FeatureLoad and x86ModelLoad

2009-12-22 Thread Jiri Denemark
> > diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c > > index af0a65b..7c50261 100644 > > --- a/src/cpu/cpu_x86.c > > +++ b/src/cpu/cpu_x86.c > > @@ -274,6 +274,7 @@ x86FeatureLoad(xmlXPathContextPtr ctxt, > > { > > struct x86_map *map = data; > > xmlNodePtr *nodes = NULL; > > +xm

[libvirt] [PATCH] Rename DATADIR to PKGDATADIR to fix win32 build

2009-12-22 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/Makefile.am |2 +- src/cpu/cpu_map.c |2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 42108c0..51a40b6 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -16,7 +16,7 @@ INCLUDES

[libvirt] [PATCH] Move cpu_map.xml to -client RPM

2009-12-22 Thread Jiri Denemark
All the cpu code is part of libvirt library and it might be used by drivers which do not require libvirtd to be running. Signed-off-by: Jiri Denemark --- libvirt.spec.in |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libvirt.spec.in b/libvirt.spec.in index e1d4e53

[libvirt] [PATCH v2 0/2] Block assignment of PCI devices below non-ACS capable switch

2009-12-22 Thread Jiri Denemark
PCI check. This code is a port of that check to libvirt. Changes in version 2: - permissive attribute for was removed - new 'relaxed_acs_check' config option in qemu.conf for relaxing the check Jiri Denemark (2): Tests for ACS in PCIe switches Use pciDeviceIsAssignable

[libvirt] [PATCH v2 1/2] Tests for ACS in PCIe switches

2009-12-22 Thread Jiri Denemark
bound to a stub driver. Signed-off-by: Jiri Denemark --- src/libvirt_private.syms |1 + src/util/pci.c | 151 ++ src/util/pci.h |4 + 3 files changed, 156 insertions(+), 0 deletions(-) diff --git a/src/libvirt_private.syms

[libvirt] [PATCH v2 2/2] Use pciDeviceIsAssignable in qemu driver

2009-12-22 Thread Jiri Denemark
Signed-off-by: Jiri Denemark --- src/qemu/libvirtd_qemu.aug |1 + src/qemu/qemu.conf |6 ++ src/qemu/qemu_conf.c|4 src/qemu/qemu_conf.h|2 ++ src/qemu/qemu_driver.c |6 +- src/qemu/test_libvirtd_qemu.aug |6

Re: [libvirt] cannot start a qemu64 model on an Intel host

2010-01-06 Thread Jiri Denemark
> If I specify > > > qemu64 > > > according to the new cpu schema, I get > error: internal error guest CPU is not compatible with host CPU > because qemu64 supports svm, and my host does not. > > However, the error remains when I explicitly ask to disable svm with > > > I am not

[libvirt] [PATCH] Add debug messages for CPU incompatibility

2010-01-12 Thread Jiri Denemark
When comparing incompatible CPUs, the reason for this incompatibility is logged as a debug message. Signed-off-by: Jiri Denemark --- src/cpu/cpu_x86.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 7c50261..50c03ad

[libvirt] [PATCH] Allow for CPU topology specification without model

2010-01-12 Thread Jiri Denemark
with the restriction that 'match' attribute has to be set when 'model' is present. Signed-off-by: Jiri Denemark --- docs/schemas/domain.rng | 24 src/conf/cpu_conf.c | 55 -- 2 files changed, 52 insertion

[libvirt] [PATCH] Implement CPU topology support for QEMU driver

2010-01-12 Thread Jiri Denemark
QEMU's command line equivalent for the following domain XML fragment 2 ... is -smp 2,sockets=1,cores=2,threads=1 This syntax was introduced in QEMU-0.12. Signed-off-by: Jiri Denemark --- src/qemu/qemu_conf.c |

  1   2   3   4   5   6   7   8   9   10   >