[libvirt] [PATCH 1/3] libxl: send lifecycle event on suspend

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_domain.c | 20 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/libxl/libxl_domain.c b/src/libxl/libxl_domain.c index 2ab78ac..b800bc9 100644 --- a/src/libxl/libxl_domain.c +++ b/src/libxl

[libvirt] [PATCH] Fix libvirt-driver-libxl check

2018-08-05 Thread Marek Marczykowski-Górecki
Fix saving CFLAGS in LIBVIRT_DRIVER_CHECK_LIBXL - LIBVIRT_CHECK_LIB will override old_CFLAGS, so use a different name. Signed-off-by: Marek Marczykowski-Górecki --- m4/virt-driver-libxl.m4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/m4/virt-driver-libxl.m4 b/m4/virt

[libvirt] [PATCH 00/10] libxl: PVHv2 support

2018-08-05 Thread Marek Marczykowski-Górecki
. How it should be handled, if at all? First few preparatory patches can be applied independently. [1] https://www.redhat.com/archives/libvir-list/2016-August/msg00376.html Marek Marczykowski-Górecki (10): docs: don't refer to deprecated 'linux' ostype in example docs: add documentation of arch e

[libvirt] [PATCH 08/10] tests: add basic Xen PVH test

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- tests/libxlxml2domconfigdata/basic-pvh.json | 49 ++- tests/libxlxml2domconfigdata/basic-pvh.xml | 28 +- tests/libxlxml2domconfigtest.c | 1 +- 3 files changed, 78 insertions(+) create mode 100644

[libvirt] [PATCH 09/10] xenconfig: add support for parsing type= xl config entry

2018-08-05 Thread Marek Marczykowski-Górecki
builder="hvm" is deprecated since Xen 4.10, new syntax is type="hvm" (or type="pv", which is default). Since the old one is still supported, still use it when writing native config, so the config will work on older Xen too (and will also not complicate tests). Sig

[libvirt] [PATCH 10/10] xenconfig: add support for type="pvh"

2018-08-05 Thread Marek Marczykowski-Górecki
Handle PVH domain type in both directions (xen-xl->xml, xml->xen-xl). And add a test for it. Signed-off-by: Marek Marczykowski-Górecki --- Does domain_conf.c (virDomainDefFormatInternal) still need to silently convert VIR_DOMAIN_OSTYPE_XEN to VIR_DOMAIN_OSTYPE_LINUX? In case

[libvirt] [PATCH 07/10] libxl: add support for PVH

2018-08-05 Thread Marek Marczykowski-Górecki
-off-by: Marek Marczykowski-Górecki --- docs/formatcaps.html.in| 4 +-- docs/schemas/domaincommon.rng | 1 +- src/libxl/libxl_capabilities.c | 23 ++-- src/libxl/libxl_conf.c | 41 ++- src/libxl/libxl_driver.c | 6 +++-- 5

[libvirt] [PATCH 02/10] docs: add documentation of arch element of capabilities.xml

2018-08-05 Thread Marek Marczykowski-Górecki
Specifically, list sub-elements and where they can be used. In addition, describe supported machine types for Xen. Signed-off-by: Marek Marczykowski-Górecki --- docs/formatcaps.html.in | 20 +++- docs/formatdomain.html.in | 8 2 files changed, 23 insertions(+), 5

[libvirt] [PATCH 04/10] libxl: set shadow memory for any guest type, not only HVM

2018-08-05 Thread Marek Marczykowski-Górecki
Otherwise starting PVH guest will result in "arch_setup_bootlate: mapping shared_info failed (pfn=..., rc=-1, errno: 12): Internal error". After this change the behavior is the same as in `xl`. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_conf.c

[libvirt] [PATCH 05/10] libxl: prefer new location of nested_hvm in libxl_domain_build_info

2018-08-05 Thread Marek Marczykowski-Górecki
If available, use b_info->nested_hvm instead of b_info->u.hvm.nested_hvm. This will make nested HVM config available also for PVH domains. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_conf.c | 13 - tests/libxlxml2domconfigdata/fu

[libvirt] [PATCH 01/10] docs: don't refer to deprecated 'linux' ostype in example

2018-08-05 Thread Marek Marczykowski-Górecki
Use preferred name: 'xen'. Signed-off-by: Marek Marczykowski-Górecki --- docs/formatdomain.html.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 19b7312..8043c7c 100644 --- a/docs/formatdomain.html.in +++ b

[libvirt] [PATCH 06/10] libxl: reorder libxlMakeDomBuildInfo for upcoming PVH support

2018-08-05 Thread Marek Marczykowski-Górecki
Make it easier to share HVM and PVH code where relevant. No functional change. Signed-off-by: Marek Marczykowski-Górecki --- src/libxl/libxl_conf.c | 26 ++ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c

[libvirt] [PATCH 03/10] docs: update domain schema for machine attribute

2018-08-05 Thread Marek Marczykowski-Górecki
Signed-off-by: Marek Marczykowski-Górecki --- docs/schemas/domaincommon.rng | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index ac04af5..eded1ca 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Marek Marczykowski-Górecki
On Tue, Apr 17, 2018 at 04:04:01PM -0600, Jim Fehlig wrote: > On 04/17/2018 02:20 PM, Marek Marczykowski-Górecki wrote: > > On Tue, Apr 17, 2018 at 02:00:25PM -0600, Jim Fehlig wrote: > > > Your response in the V6 thread about "conflicting types (with > > >

Re: [libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-17 Thread Marek Marczykowski-Górecki
t m4/virt-driver-libxl.m4, I think it's because saved old_CFLAGS is overridden by LIBVIRT_CHECK_LIB with actual CFLAGS (now containing -DLIBXL_API_VERSION=0x040400). -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally re

[libvirt] [PATCH v7 7/9] tests: check CPU features handling in libxl driver

2018-04-15 Thread Marek Marczykowski-Górecki
Test enabling/disabling individual CPU features and also setting nested HVM support, which is also controlled by CPU features node. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> Reviewed-by: Daniel P. Ber

[libvirt] [PATCH v7 4/9] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-04-15 Thread Marek Marczykowski-Górecki
-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> --- Changes since v6: - really allow per-domain override - fix default value in tests Changes since v4: - add

[libvirt] [PATCH v7 0/9] Add setting CPU features (CPUID) with libxenlight driver.

2018-04-15 Thread Marek Marczykowski-Górecki
4.html v4 of this patch series: https://www.redhat.com/archives/libvir-list/2018-February/msg00504.html v5 of this patch series: https://www.redhat.com/archives/libvir-list/2018-March/msg00796.html v6 of this patch series: https://www.redhat.com/archives/libvir-list/2018-March/msg01310.html Marek Ma

[libvirt] [PATCH v7 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-11 Thread Marek Marczykowski-Górecki
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. Signed-off-by: Marek Marczykowski-Górecki <ma

[libvirt] [PATCH v7 6/9] libxl: add support for CPUID features policy

2018-04-11 Thread Marek Marczykowski-Górecki
Nested HVM (vmx and svm features) is handled separately, so exclude it from translation. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Changes since v4: - added spec-ctrl/ibrsb Changes since v2: - drop s

[libvirt] [PATCH v7 1/9] libxl: fix libxlDriverConfigDispose for partially constructed object

2018-04-11 Thread Marek Marczykowski-Górecki
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> Reviewed-by: Daniel

[libvirt] [PATCH v7 5/9] xenconfig: do not override def->cpu if already set elsewhere

2018-04-11 Thread Marek Marczykowski-Górecki
This will help with adding cpuid support. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Changes since v4: - patch separated from "libxl: do not enable nested HVM unless global nested_h

[libvirt] [PATCH v7 8/9] xenconfig: add CPUID handling to domXML <-> xl.cfg conversion

2018-04-11 Thread Marek Marczykowski-Górecki
Only "libxl" format supported for now. Special care needed around vmx/svm, because those two are translated into "nestedhvm" setting. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com>

[libvirt] [PATCH v7 3/9] libxl: warn about ignored CPU mode=custom

2018-04-11 Thread Marek Marczykowski-Górecki
When support for mode=custom will be added in the future, semantics of current config will change. Reduce the surprise by emitting a warning. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Chan

[libvirt] [PATCH v7 9/9] tests: add test case for CPUID in xenconfig driver

2018-04-11 Thread Marek Marczykowski-Górecki
Check conversion of "cpuid" setting, check all supported policy settings ("1", "0", "x"). Also, check interaction with "nestedhvm" - should not be included as "vmx=1" in "cpuid" setting. Signed-off-by: Marek Marczykowski-G

Re: [libvirt] [PATCH v6.1 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-04-06 Thread Marek Marczykowski-Górecki
On Wed, Mar 28, 2018 at 01:42:47PM -0600, Jim Fehlig wrote: > On 03/27/2018 05:55 PM, Marek Marczykowski-Górecki wrote: > > diff --git a/tests/virmocklibxl.c b/tests/virmocklibxl.c > > index 747f9f8..28281b6 100644 > > --- a/tests/virmocklibxl.c > > +++ b/tests/virmoc

[libvirt] [PATCH v6.1 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-27 Thread Marek Marczykowski-Górecki
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. Signed-off-by: Marek Marczykowski-Górecki <ma

Re: [libvirt] [PATCH v6 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-27 Thread Marek Marczykowski-Górecki
On Wed, Mar 28, 2018 at 12:38:22AM +0200, Marek Marczykowski-Górecki wrote: > On Tue, Mar 27, 2018 at 04:34:27PM -0600, Jim Fehlig wrote: > > Did you have an opportunity to look at this problem on Xen 4.5? > > Actually I'm on it right now. Getting Xen 4.5 built using moder

Re: [libvirt] [PATCH v6 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-27 Thread Marek Marczykowski-Górecki
ported Xen version to 4.6 as > I've done in this patchset > > https://www.redhat.com/archives/libvir-list/2018-March/msg01704.html -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting s

Re: [libvirt] [PATCH v6 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-22 Thread Marek Marczykowski-Górecki
On Thu, Mar 22, 2018 at 04:48:48PM -0600, Jim Fehlig wrote: > On 03/22/2018 04:44 PM, Jim Fehlig wrote: > > On 03/21/2018 10:32 AM, Marek Marczykowski-Górecki wrote: > > > Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo > > > needs

Re: [libvirt] [PATCH v6 7/9] tests: check CPU features handling in libxl driver

2018-03-22 Thread Marek Marczykowski-Górecki
On Thu, Mar 22, 2018 at 10:03:50AM +, Daniel P. Berrangé wrote: > On Wed, Mar 21, 2018 at 05:32:31PM +0100, Marek Marczykowski-Górecki wrote: > > Test enabling/disabling individual CPU features and also setting > > nested HVM support, which is also controlled by CP

Re: [libvirt] [PATCH v6 4/9] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-03-21 Thread Marek Marczykowski-Górecki
On Wed, Mar 21, 2018 at 06:12:39PM -0600, Jim Fehlig wrote: > Ok. No need to send the whole series again. Just a followup to this patch > will do. Thanks! Just sent, but I've failed to connect it to this thread... It's marked as v6.1. -- Best Regards, Marek Marczykowski-Górecki Invisible

[libvirt] [PATCH v6.1 4/9] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-03-21 Thread Marek Marczykowski-Górecki
-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Changes since v6: - really allow per-domain override Changes since v4: - add nested_hvm option to test_libvirtd_libxl.aug.in and libvirtd_libxl.aug - make

Re: [libvirt] [PATCH v6 4/9] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-03-21 Thread Marek Marczykowski-Górecki
On Wed, Mar 21, 2018 at 05:55:28PM -0600, Jim Fehlig wrote: > On 03/21/2018 10:32 AM, Marek Marczykowski-Górecki wrote: > > Introduce global libxl option for enabling nested HVM feature, similar > > to kvm module parameter. This will prevent enabling experimental feature >

[libvirt] [PATCH v6 8/9] xenconfig: add CPUID handling to domXML <-> xl.cfg conversion

2018-03-21 Thread Marek Marczykowski-Górecki
Only "libxl" format supported for now. Special care needed around vmx/svm, because those two are translated into "nestedhvm" setting. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v5: - adjust for ignoring mode=c

[libvirt] [PATCH v6 4/9] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-03-21 Thread Marek Marczykowski-Górecki
-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Changes since v4: - add nested_hvm option to test_libvirtd_libxl.aug.in and libvirtd_libxl.aug - make it possible to override nested_hvm=0 with explicit - spl

[libvirt] [PATCH v6 0/9] Add setting CPU features (CPUID) with libxenlight driver.

2018-03-21 Thread Marek Marczykowski-Górecki
4.html v4 of this patch series: https://www.redhat.com/archives/libvir-list/2018-February/msg00504.html v5 of this patch series: https://www.redhat.com/archives/libvir-list/2018-March/msg00796.html Marek Marczykowski-Górecki (9): libxl: fix libxlDriverConfigDispose for partially constructed object l

[libvirt] [PATCH v6 6/9] libxl: add support for CPUID features policy

2018-03-21 Thread Marek Marczykowski-Górecki
Nested HVM (vmx and svm features) is handled separately, so exclude it from translation. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Changes since v4: - added spec-ctrl/ibrsb Changes since v2: - drop s

[libvirt] [PATCH v6 1/9] libxl: fix libxlDriverConfigDispose for partially constructed object

2018-03-21 Thread Marek Marczykowski-Górecki
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> Reviewed-by: Daniel

[libvirt] [PATCH v6 3/9] libxl: warn about ignored CPU mode=custom

2018-03-21 Thread Marek Marczykowski-Górecki
When support for mode=custom will be added in the future, semantics of current config will change. Reduce the surprise by emitting a warning. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v5: - new patch, instead of "libxl

[libvirt] [PATCH v6 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-21 Thread Marek Marczykowski-Górecki
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. Signed-off-by: Marek Marczykowski-Górecki <ma

[libvirt] [PATCH v6 5/9] xenconfig: do not override def->cpu if already set elsewhere

2018-03-21 Thread Marek Marczykowski-Górecki
This will help with adding cpuid support. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> --- Changes since v4: - patch separated from "libxl: do not enable nested HVM unless global nested_h

[libvirt] [PATCH v6 7/9] tests: check CPU features handling in libxl driver

2018-03-21 Thread Marek Marczykowski-Górecki
Test enabling/disabling individual CPU features and also setting nested HVM support, which is also controlled by CPU features node. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> --- Changes since v3: - adjust

[libvirt] [PATCH v6 9/9] tests: add test case for CPUID in xenconfig driver

2018-03-21 Thread Marek Marczykowski-Górecki
Check conversion of "cpuid" setting, check all supported policy settings ("1", "0", "x"). Also, check interaction with "nestedhvm" - should not be included as "vmx=1" in "cpuid" setting. Signed-off-by: Marek Marczykowski-G

Re: [libvirt] [PATCH v5 7/9] tests: check CPU features handling in libxl driver

2018-03-19 Thread Marek Marczykowski-Górecki
On Mon, Mar 19, 2018 at 02:11:02PM +, Daniel P. Berrangé wrote: > On Fri, Mar 16, 2018 at 08:54:42PM +0100, Marek Marczykowski-Górecki wrote: > > On Fri, Mar 16, 2018 at 05:44:28PM +, Daniel P. Berrangé wrote: > > > Since Xen lets you specify raw "cpuid"

Re: [libvirt] [PATCH v5 3/9] libxl: error out on not supported CPU mode, instead of silently ignoring

2018-03-16 Thread Marek Marczykowski-Górecki
On Fri, Mar 16, 2018 at 05:39:35PM +, Daniel P. Berrangé wrote: > On Wed, Mar 14, 2018 at 03:26:10AM +0100, Marek Marczykowski-Górecki wrote: > > This change make libvirt XML with plain element invalid for libxl, > > which affect not only upcoming CPUID support, but als

Re: [libvirt] [PATCH v5 7/9] tests: check CPU features handling in libxl driver

2018-03-16 Thread Marek Marczykowski-Górecki
s://www.redhat.com/archives/libvir-list/2017-June/msg01304.html And this, from... you: https://www.redhat.com/archives/libvir-list/2017-June/msg01308.html This is not only about 'x'. But also about setting '1' where hardware does not really support given feature. This will also result in "b

Re: [libvirt] [PATCH v5 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-16 Thread Marek Marczykowski-Górecki
On Fri, Mar 16, 2018 at 05:36:44PM +, Daniel P. Berrangé wrote: > On Wed, Mar 14, 2018 at 03:26:09AM +0100, Marek Marczykowski-Górecki wrote: > > @@ -48,6 +49,19 @@ VIR_MOCK_IMPL_RET_ARGS(xc_interface_open, > > } > > > > > > +VIR_MOCK_IMP

[libvirt] [PATCH v5 3/9] libxl: error out on not supported CPU mode, instead of silently ignoring

2018-03-15 Thread Marek Marczykowski-Górecki
, add PostParse hook to update (previously ignored) default mode 'custom' to 'host-passthrough'. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v4: - add PostParse hook to automatically set host-passthrough mode, if was the default one before (

[libvirt] [PATCH v5 2/9] libxl: pass driver config to libxlMakeDomBuildInfo

2018-03-15 Thread Marek Marczykowski-Górecki
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. Signed-off-by: Marek Marczykowski-Górecki <ma

[libvirt] [PATCH v5 4/9] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-03-15 Thread Marek Marczykowski-Górecki
-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v4: - add nested_hvm option to test_libvirtd_libxl.aug.in and libvirtd_libxl.aug - make it possible to override nested_hvm=0 with explicit - split xenconfig changes into separate commits Changes si

[libvirt] [PATCH v5 5/9] xenconfig: do not override def->cpu if already set elsewhere

2018-03-15 Thread Marek Marczykowski-Górecki
This will help with adding cpuid support. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v4: - patch separated from "libxl: do not enable nested HVM unless global nested_hvm option enabled" --- src/xenconf

[libvirt] [PATCH v5 6/9] libxl: add support for CPUID features policy

2018-03-15 Thread Marek Marczykowski-Górecki
Nested HVM (vmx and svm features) is handled separately, so exclude it from translation. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v4: - added spec-ctrl/ibrsb Changes since v2: - drop spurious changes - move libxlTranslateCPUFeature function to

[libvirt] [PATCH v5 0/9] Add setting CPU features (CPUID) with libxenlight driver.

2018-03-15 Thread Marek Marczykowski-Górecki
4.html v4 of this patch series: https://www.redhat.com/archives/libvir-list/2018-February/msg00504.html Marek Marczykowski-Górecki (9): libxl: fix libxlDriverConfigDispose for partially constructed object libxl: pass driver config to libxlMakeDomBuildInfo libxl: error out on not supported CPU mod

[libvirt] [PATCH v5 8/9] xenconfig: add CPUID handling to domXML <-> xl.cfg conversion

2018-03-15 Thread Marek Marczykowski-Górecki
Only "libxl" format supported for now. Special care needed around vmx/svm, because those two are translated into "nestedhvm" setting. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> --- Ch

[libvirt] [PATCH v5 9/9] tests: add test case for CPUID in xenconfig driver

2018-03-15 Thread Marek Marczykowski-Górecki
Check conversion of "cpuid" setting, check all supported policy settings ("1", "0", "x"). Also, check interaction with "nestedhvm" - should not be included as "vmx=1" in "cpuid" setting. Signed-off-by: Marek Marczykowski-G

[libvirt] [PATCH v5 7/9] tests: check CPU features handling in libxl driver

2018-03-15 Thread Marek Marczykowski-Górecki
Test enabling/disabling individual CPU features and also setting nested HVM support, which is also controlled by CPU features node. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> --- Changes since v3: - adjust

[libvirt] [PATCH v5 1/9] libxl: fix libxlDriverConfigDispose for partially constructed object

2018-03-15 Thread Marek Marczykowski-Górecki
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> Reviewed-by: Jim Fehlig <jfeh...@suse.com> --- Changes sinc

Re: [libvirt] [PATCH v4 4/8] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-02-26 Thread Marek Marczykowski-Górecki
On Mon, Feb 26, 2018 at 04:23:18PM -0700, Jim Fehlig wrote: > On 02/26/2018 04:10 PM, Marek Marczykowski-Górecki wrote: > > On Mon, Feb 26, 2018 at 03:47:11PM -0700, Jim Fehlig wrote: > > > On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote: > > > > + > &

Re: [libvirt] [PATCH v4 5/8] libxl: add support for CPUID features policy

2018-02-26 Thread Marek Marczykowski-Górecki
On Mon, Feb 26, 2018 at 04:08:44PM -0700, Jim Fehlig wrote: > On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote: > > +const char * > > +xenTranslateCPUFeature(const char *feature_name, bool from_libxl) > > +{ > > +static const char *translation_table[][2]

Re: [libvirt] [PATCH v4 4/8] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-02-26 Thread Marek Marczykowski-Górecki
On Mon, Feb 26, 2018 at 03:47:11PM -0700, Jim Fehlig wrote: > On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote: > > + > > +# Nested HVM global control. In order to use nested HVM feature, this > > option > > +# needs to be enabled, in addition to specifyin

Re: [libvirt] [PATCH v4 3/8] libxl: error out on not supported CPU mode, instead of silently ignoring

2018-02-26 Thread Marek Marczykowski-Górecki
On Mon, Feb 26, 2018 at 01:20:49PM -0700, Jim Fehlig wrote: > On 02/15/2018 02:47 PM, Marek Marczykowski-Górecki wrote: > > On Tue, Feb 13, 2018 at 09:02:35AM -0700, Jim Fehlig wrote: > > > It looks like we never answered my question from V3, i.e. should we change >

Re: [libvirt] [PATCH v4 3/8] libxl: error out on not supported CPU mode, instead of silently ignoring

2018-02-15 Thread Marek Marczykowski-Górecki
On Tue, Feb 13, 2018 at 09:02:35AM -0700, Jim Fehlig wrote: > On 02/08/2018 03:58 PM, Marek Marczykowski-Górecki wrote: > > This change make libvirt XML with plain element invalid for libxl, > > which affect not only upcoming CPUID support, but also NUMA. In fact, > > defau

[libvirt] [PATCH v4 3/8] libxl: error out on not supported CPU mode, instead of silently ignoring

2018-02-08 Thread Marek Marczykowski-Górecki
This change make libvirt XML with plain element invalid for libxl, which affect not only upcoming CPUID support, but also NUMA. In fact, default mode 'custom' does not match what the driver actually does, so it was a bug. Adjust xenconfig driver accordingly. But nevertheless this commit break

[libvirt] [PATCH v4 4/8] libxl: do not enable nested HVM unless global nested_hvm option enabled

2018-02-08 Thread Marek Marczykowski-Górecki
Introduce global libxl option for enabling nested HVM feature, similar to kvm module parameter. This will prevent enabling experimental feature by mere presence of element in domain config, unless explicitly enabled. element may be used to configure other features, like NUMA, or CPUID. Also,

[libvirt] [PATCH v4 5/8] libxl: add support for CPUID features policy

2018-02-08 Thread Marek Marczykowski-Górecki
Nested HVM (vmx and svm features) is handled separately, so exclude it from translation. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v2: - drop spurious changes - move libxlTranslateCPUFeature function to xen_xl.c, to be reused by xenconfig

[libvirt] [PATCH v4 1/8] libxl: fix libxlDriverConfigDispose for partially constructed object

2018-02-08 Thread Marek Marczykowski-Górecki
libxlDriverConfigNew() use libxlDriverConfigDispose() for cleanup in case of errors. Do not call libxlLoggerFree() on not allocated logger (NULL). --- Changes since v3: - new patch, mostly unrelated, but found while adjusting tests --- src/libxl/libxl_conf.c | 3 ++- 1 file changed, 2

[libvirt] [PATCH v4 6/8] tests: check CPU features handling in libxl driver

2018-02-08 Thread Marek Marczykowski-Górecki
Test enabling/disabling individual CPU features and also setting nested HVM support, which is also controlled by CPU features node. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v3: - adjust for modified nested HVM handling Changes si

[libvirt] [PATCH v4 8/8] tests: add test case for CPUID in xenconfig driver

2018-02-08 Thread Marek Marczykowski-Górecki
Check conversion of "cpuid" setting, check all supported policy settings ("1", "0", "x"). Also, check interaction with "nestedhvm" - should not be included as "vmx=1" in "cpuid" setting. --- Changes since v3: - adjust for nested HVM enabled by just element Changes since v2: - new patch ---

[libvirt] [PATCH v4 0/8] Add setting CPU features (CPUID) with libxenlight driver.

2018-02-08 Thread Marek Marczykowski-Górecki
enabling it in libxl.conf. Nested HVM is still in "preview" state, so better be explicit here. v2 of this patch series: https://www.redhat.com/archives/libvir-list/2017-July/msg00050.html v3 of this patch series: https://www.redhat.com/archives/libvir-list/2017-December/msg00314.h

[libvirt] [PATCH v4 7/8] xenconfig: add CPUID handling to domXML <-> xl.cfg conversion

2018-02-08 Thread Marek Marczykowski-Górecki
Only "libxl" format supported for now. Special care needed around vmx/svm, because those two are translated into "nestedhvm" setting. --- Changes since v3: - improve error reporting (VIR_ERR_CONF_SYNTAX) - ignore empty cpuid option - same as libxl - fix cleanup on error Changes since v2: -

[libvirt] [PATCH v4 2/8] libxl: pass driver config to libxlMakeDomBuildInfo

2018-02-08 Thread Marek Marczykowski-Górecki
Preparation for global nestedhvm configuration - libxlMakeDomBuildInfo needs access to libxlDriverConfig. No functional change. Adjusting tests require slightly more mockup functions, because of libxlDriverConfigNew() call. --- Changes since v3: - new patch, preparation ---

Re: [libvirt] [PATCH v3.1 3/6] libxl: add support for CPUID features policy

2018-01-03 Thread Marek Marczykowski-Górecki
On Wed, Jan 03, 2018 at 05:00:10PM -0700, Jim Fehlig wrote: > On 12/19/2017 06:19 AM, Joao Martins wrote: > > On 12/13/2017 07:09 PM, Marek Marczykowski-Górecki wrote: > > > +/* > > > + * Translate CPU feature name from libvirt to libxl (from_libxl=false) > > >

Re: [libvirt] [PATCH v3 2/6] libxl: do not enable nested HVM by mere presence of element

2017-12-19 Thread Marek Marczykowski-Górecki
orry for double posting, but I mistakenly forgot to include libvirt > > >> list) > > >> > > >> +WimT +Daniel > > >> > > >> On 12/10/2017 02:10 AM, Marek Marczykowski-Górecki wrote: > > >>> element may be used to configure o

[libvirt] [PATCH] xenconfig: fix issues found by coverity in multiple IP support

2017-12-13 Thread Marek Marczykowski-Górecki
- virStringSplit may return NULL - VIR_ALLOC_N initialize the array already Cc: John Ferlan <jfer...@redhat.com> Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- src/xenconfig/xen_common.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff

[libvirt] [PATCH v3.1 3/6] libxl: add support for CPUID features policy

2017-12-13 Thread Marek Marczykowski-Górecki
ce" and "required" policy (there is only "force") and also between "forbid" and "disable" (there is only "disable"). So, merge them appropriately. If anything, "require" and "forbid" should be enforced outside of specific drive

Re: [libvirt] [PATCH v2 1/3] libxl: add support for multiple IP addresses

2017-12-11 Thread Marek Marczykowski-Górecki
On Mon, Dec 11, 2017 at 08:55:50AM -0500, John Ferlan wrote: > > > On 12/11/2017 08:37 AM, Marek Marczykowski-Górecki wrote: > > On Mon, Dec 11, 2017 at 07:58:54AM -0500, John Ferlan wrote: > >>> +char * > >>> +xenMakeIPList(virNetDevIPInfoPt

Re: [libvirt] [PATCH v2 1/3] libxl: add support for multiple IP addresses

2017-12-11 Thread Marek Marczykowski-Górecki
y notes that address_array is leaked. May I sugguest > "virStringListFree()" on address array? Then I should initialize each entry to NULL first (which will be overridden a moment later). Is it ok? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up

[libvirt] [PATCH v3 5/6] xenconfig: add CPUID handling to domXML <-> xl.cfg conversion

2017-12-09 Thread Marek Marczykowski-Górecki
Only "libxl" format supported for now. Special care needed around vmx/svm, because those two are translated into "nestedhvm" setting. --- Changes since v2: - new patch --- src/xenconfig/xen_xl.c | 168 ++- 1 file changed, 168 insertions(+) diff --git

[libvirt] [PATCH v3 4/6] tests: check CPU features handling in libxl driver

2017-12-09 Thread Marek Marczykowski-Górecki
Test enabling/disabling individual CPU features and also setting nested HVM support, which is also controlled by CPU features node. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v1: - rewritten to Jim's test suite for libxl_domain_config gen

[libvirt] [PATCH v3 2/6] libxl: do not enable nested HVM by mere presence of element

2017-12-09 Thread Marek Marczykowski-Górecki
element may be used to configure other features, like NUMA, or CPUID. Do not enable nested HVM (which is in "preview" state after all) by mere presence of element, but require explicit (or 'svm'). Also, adjust xenconfig driver to appropriately translate to/from nestedhvm=1. While at it, adjust

[libvirt] [PATCH v3 3/6] libxl: add support for CPUID features policy

2017-12-09 Thread Marek Marczykowski-Górecki
ce" and "required" policy (there is only "force") and also between "forbid" and "disable" (there is only "disable"). So, merge them appropriately. If anything, "require" and "forbid" should be enforced outside of specific driver. Signe

[libvirt] [PATCH v3 0/6] Add setting CPU features (CPUID) with libxenlight driver.

2017-12-09 Thread Marek Marczykowski-Górecki
explicit enabling "vmx" or "svm" bits. Nested HVM is still in "preview" state, so better be explicit here. v2 of this patch series: https://www.redhat.com/archives/libvir-list/2017-July/msg00050.html Marek Marczykowski-Górecki (6): libxl: error out on not supported

[libvirt] [PATCH v3 6/6] tests: add test case for CPUID in xenconfig driver

2017-12-09 Thread Marek Marczykowski-Górecki
Check conversion of "cpuid" setting, check all supported policy settings ("1", "0", "x"). Also, check interaction with "nestedhvm" - should not be included as "vmx=1" in "cpuid" setting. --- Changes since v2: - new patch --- tests/xlconfigdata/test-fullvirt-cpuid.cfg | 25 -

[libvirt] [PATCH v3 1/6] libxl: error out on not supported CPU mode, instead of silently ignoring

2017-12-09 Thread Marek Marczykowski-Górecki
This change make libvirt XML with plain element invalid for libxl, which affect not only upcoming CPUID support, but also NUMA. In fact, default mode 'custom' does not match what the driver actually does, so it was a bug. Adjust xenconfig driver accordingly. But nevertheless this commit break

[libvirt] [PATCH v2 1/3] libxl: add support for multiple IP addresses

2017-12-06 Thread Marek Marczykowski-Górecki
vif-* scripts support it for a long time, and expect addresses to be separated by spaces. Add appropriate support to libxl driver. --- changed in v2: - moved libxlMakeIPList function to xenconfig/xen_common.c and renamed to xenMakeIPList --- src/libxl/libxl_conf.c | 5 +++--

[libvirt] [PATCH v2 3/3] tests: add test for multiple IPs for libxl and xenconfig driver

2017-12-06 Thread Marek Marczykowski-Górecki
--- changed in v2: - add tests for xenconfig driver too --- tests/libxlxml2domconfigdata/multiple-ip.json | 37 +++- tests/libxlxml2domconfigdata/multiple-ip.xml | 22 +- tests/libxlxml2domconfigtest.c| 1 +- tests/xlconfigdata/test-vif-multi-ip.cfg |

[libvirt] [PATCH v2 2/3] xenconfig: add support for multiple IP addresses

2017-12-06 Thread Marek Marczykowski-Górecki
--- new patch in v2 --- src/xenconfig/xen_common.c | 32 +--- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 7f838b6..40b1483 100644 --- a/src/xenconfig/xen_common.c +++

Re: [libvirt] [PATCH 1/2] libxl: add support for multiple IP addresses

2017-12-04 Thread Marek Marczykowski-Górecki
On Mon, Dec 04, 2017 at 03:14:33PM -0700, Jim Fehlig wrote: > On 12/04/2017 02:53 PM, Marek Marczykowski-Górecki wrote: > > On Mon, Dec 04, 2017 at 02:46:58PM -0700, Jim Fehlig wrote: > > > There's another instance of this check in xenFormatNet() in > > > src/xencon

Re: [libvirt] [PATCH 1/2] libxl: add support for multiple IP addresses

2017-12-04 Thread Marek Marczykowski-Górecki
o? Where should I put helper function to not duplicate it across those two drivers? -- Best Regards, Marek Marczykowski-Górecki Invisible Things Lab A: Because it messes up the order in which people normally read text. Q: Why is top-posting such a bad thing? signature.asc Description: PGP s

[libvirt] [PATCH 2/2] tests: add test for multiple IPs for libxl driver

2017-12-02 Thread Marek Marczykowski-Górecki
--- tests/libxlxml2domconfigdata/multiple-ip.json | 37 - tests/libxlxml2domconfigdata/multiple-ip.xml | 22 - tests/libxlxml2domconfigtest.c| 1 +- 3 files changed, 60 insertions(+) create mode 100644

[libvirt] [PATCH 1/2] libxl: add support for multiple IP addresses

2017-12-02 Thread Marek Marczykowski-Górecki
vif-* scripts support it for a long time, and expect addresses to be separated by spaces. Add appropriate support to libxl driver. --- src/libxl/libxl_conf.c | 29 +++-- src/libxl/libxl_domain.c | 12 2 files changed, 27 insertions(+), 14 deletions(-) diff

[libvirt] [PATCH v3] libxl: Add a test suite for libxl_domain_config generator

2017-08-01 Thread Marek Marczykowski-Górecki
config object and then back to json provides a simple way to account for any changes or additions to the json representation across Xen releases. Signed-off-by: Jim Fehlig <jfeh...@suse.com> [update to v3.5.0-rc1, improve error reporting, use /bin/true emulator] Signed-off-by: Marek Marczyko

Re: [libvirt] [PATCH 0/3] libxl: Add a test suite for libxl_domain_config generator

2017-07-28 Thread Marek Marczykowski-Górecki
On Fri, Jul 28, 2017 at 05:24:10PM -0600, Jim Fehlig wrote: > On 07/27/2017 04:51 PM, Marek Marczykowski-Górecki wrote: > > On Thu, Jul 27, 2017 at 03:24:38PM -0600, Jim Fehlig wrote: > > > >> Did you have any comment on the approach taken in the attachments to this &

Re: [libvirt] [PATCH 0/3] libxl: Add a test suite for libxl_domain_config generator

2017-07-27 Thread Marek Marczykowski-Górecki
On Thu, Jul 27, 2017 at 03:24:38PM -0600, Jim Fehlig wrote: > On 07/26/2017 05:07 PM, Marek Marczykowski-Górecki wrote: > > On Fri, Jul 14, 2017 at 05:59:57PM -0600, Jim Fehlig wrote: > > > On 07/01/2017 08:16 PM, Marek Marczykowski-Górecki wrote: > > > > On Sun, Fe

Re: [libvirt] [PATCH 0/3] libxl: Add a test suite for libxl_domain_config generator

2017-07-26 Thread Marek Marczykowski-Górecki
On Fri, Jul 14, 2017 at 05:59:57PM -0600, Jim Fehlig wrote: > On 07/01/2017 08:16 PM, Marek Marczykowski-Górecki wrote: > > On Sun, Feb 26, 2017 at 07:02:24PM -0700, Jim Fehlig wrote: > > > Long ago danpb posted some patches to test libvirt domXML to > > > lib

Re: [libvirt] [PATCH v2 2/4] libxl: add support for CPUID features policy

2017-07-17 Thread Marek Marczykowski-Górecki
On Mon, Jul 17, 2017 at 03:57:17PM -0600, Jim Fehlig wrote: > On 07/03/2017 09:03 PM, Marek Marczykowski-Górecki wrote: > > Convert CPU features policy into libxl cpuid policy settings. Use new > > ("libxl") syntax, which allow to enable/disable specific bits, usi

Re: [libvirt] [PATCH v2 0/4] Add setting CPU features (CPUID) with libxenlight driver.

2017-07-13 Thread Marek Marczykowski-Górecki
On Tue, Jul 04, 2017 at 05:03:43AM +0200, Marek Marczykowski-Górecki wrote: > Tests (patches 3 and 4) depends on libxl_domain_config test suite: > https://www.redhat.com/archives/libvir-list/2017-February/msg01477.html > > But first two patches can be applied independently. Anything

Re: [libvirt] [PATCH 0/3] libxl: Add a test suite for libxl_domain_config generator

2017-07-13 Thread Marek Marczykowski-Górecki
On Sun, Jul 02, 2017 at 04:16:02AM +0200, Marek Marczykowski-Górecki wrote: > On Sun, Feb 26, 2017 at 07:02:24PM -0700, Jim Fehlig wrote: > > Long ago danpb posted some patches to test libvirt domXML to > > libxl_domain_config conversion > > > > https://www.redhat.co

[libvirt] [PATCH v2 1/4] cpu: define sub-leaf 0 for leaf 7 in cpu_map.xml

2017-07-03 Thread Marek Marczykowski-Górecki
CPUID leaf 7 is sub-leaf aware. Add missing attribute. Signed-off-by: Marek Marczykowski-Górecki <marma...@invisiblethingslab.com> --- Changes since v1: - format ecx_in='0x00' --- src/cpu/cpu_map.xml | 58 +++--- 1 file changed, 29 insertions(

<    1   2   3   4   >