[libvirt] [PATCH V2 0/4] Extend <hap> to a tristate

An expanded V2 of https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html In V2, the <hap> feature is extended with a state='on|off' attribute to allow differentiating the 'on' and 'off' states with not set (or hypervisor default). Obviously post 1.3.2 material. See individual patches for details. Jim Fehlig (4): conf: add 'state' attribute to <hap> feature xenconfig: change 'hap' setting to align with Xen behavior Xen drivers: show hap enabled by default in capabilities libxl: support enabling and disabling <hap> feature docs/formatdomain.html.in | 6 ++- docs/schemas/domaincommon.rng | 6 ++- src/conf/domain_conf.c | 4 +- src/libxl/libxl_conf.c | 20 ++++++-- src/xen/xen_hypervisor.c | 2 +- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 48 files changed, 202 insertions(+), 52 deletions(-) create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.xml create mode 100755 tests/xmconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xmconfigdata/test-fullvirt-nohap.xml -- 2.1.4

Most hypervisors use Hardware Assisted Paging by default and don't require specifying the feature in domain conf. But some hypervisors support disabling HAP on a per-domain basis. To enable HAP by default yet provide a knob to disable it, extend the <hap> feature with a 'state=on|off' attribute, similar to <pvspinlock> and <vmport> features. In the absence of <hap>, the hypervisor default (on) is used. <hap> without the state attribute would be the same as <hap state='on'/> for backwards compatibility. And of course <hap state='off'/> disables hap. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/formatdomain.html.in | 6 ++++-- docs/schemas/domaincommon.rng | 6 +++++- src/conf/domain_conf.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 5016772..c06bcf3 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1494,8 +1494,10 @@ Interrupt) for the guest. </dd> <dt><code>hap</code></dt> - <dd>Enable use of Hardware Assisted Paging if available in - the hardware. + <dd>Depending on the <code>state</code> attribute (values <code>on</code>, + <code>off</code>) enable or disable use of Hardware Assisted Paging. + The default is <code>on</code> if the hypervisor detects availability + of Hardware Assisted Paging. </dd> <dt><code>viridian</code></dt> <dd>Enable Viridian hypervisor extensions for paravirtualizing diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 67af93a..dd6e93a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4108,7 +4108,11 @@ </optional> <optional> <element name="hap"> - <empty/> + <optional> + <attribute name="state"> + <ref name="virOnOff"/> + </attribute> + </optional> </element> </optional> <optional> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 79758d4..714bbfc 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15296,7 +15296,6 @@ virDomainDefParseXML(xmlDocPtr xml, /* fallthrough */ case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: - case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_PRIVNET: case VIR_DOMAIN_FEATURE_HYPERV: @@ -15321,6 +15320,7 @@ virDomainDefParseXML(xmlDocPtr xml, ctxt->node = node; break; + case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_PMU: case VIR_DOMAIN_FEATURE_PVSPINLOCK: case VIR_DOMAIN_FEATURE_VMPORT: @@ -22043,7 +22043,6 @@ virDomainDefFormatInternal(virDomainDefPtr def, switch ((virDomainFeature) i) { case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: - case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_PRIVNET: switch ((virTristateSwitch) def->features[i]) { @@ -22065,6 +22064,7 @@ virDomainDefFormatInternal(virDomainDefPtr def, break; + case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_PMU: case VIR_DOMAIN_FEATURE_PVSPINLOCK: case VIR_DOMAIN_FEATURE_VMPORT: -- 2.1.4

Most hypervisors use Hardware Assisted Paging by default and don't require specifying the feature in domain conf. But some hypervisors support disabling HAP on a per-domain basis. To enable HAP by default yet provide a knob to disable it, extend the <hap> feature with a 'state=on|off' attribute, similar to <pvspinlock> and <vmport> features.
In the absence of <hap>, the hypervisor default (on) is used. <hap> without the state attribute would be the same as <hap state='on'/> for backwards compatibility. And of course <hap state='off'/> disables hap.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/formatdomain.html.in | 6 ++++-- docs/schemas/domaincommon.rng | 6 +++++- src/conf/domain_conf.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 5016772..c06bcf3 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1494,8 +1494,10 @@ Interrupt) for the guest. </dd> <dt><code>hap</code></dt> - <dd>Enable use of Hardware Assisted Paging if available in - the hardware. + <dd>Depending on the <code>state</code> attribute (values <code>on</code>, + <code>off</code>) enable or disable use of Hardware Assisted Paging. + The default is <code>on</code> if the hypervisor detects availability + of Hardware Assisted Paging. </dd> <dt><code>viridian</code></dt> <dd>Enable Viridian hypervisor extensions for paravirtualizing diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 67af93a..dd6e93a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4108,7 +4108,11 @@ </optional> <optional> <element name="hap"> - <empty/> + <optional> + <attribute name="state"> + <ref name="virOnOff"/> + </attribute> + </optional> Perhaps <ref name="featurestate"/> would be better (see chunk below) ? That one appears to be a reference of what you are adding above, and it's the same as
On 03/01/2016 04:00 AM, Jim Fehlig wrote: pvspinlock. Though some other elements don't appear to use this, not sure why. diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 89d3a6b..141122c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4132,9 +4132,7 @@ <optional> <element name="hap"> <optional> - <attribute name="state"> - <ref name="virOnOff"/> - </attribute> + <ref name="featurestate"/> </optional> </element> </optional> Other that, Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
</element> </optional> <optional> diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 79758d4..714bbfc 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -15296,7 +15296,6 @@ virDomainDefParseXML(xmlDocPtr xml, /* fallthrough */ case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: - case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_PRIVNET: case VIR_DOMAIN_FEATURE_HYPERV: @@ -15321,6 +15320,7 @@ virDomainDefParseXML(xmlDocPtr xml, ctxt->node = node; break;
+ case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_PMU: case VIR_DOMAIN_FEATURE_PVSPINLOCK: case VIR_DOMAIN_FEATURE_VMPORT: @@ -22043,7 +22043,6 @@ virDomainDefFormatInternal(virDomainDefPtr def, switch ((virDomainFeature) i) { case VIR_DOMAIN_FEATURE_ACPI: case VIR_DOMAIN_FEATURE_PAE: - case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_VIRIDIAN: case VIR_DOMAIN_FEATURE_PRIVNET: switch ((virTristateSwitch) def->features[i]) { @@ -22065,6 +22064,7 @@ virDomainDefFormatInternal(virDomainDefPtr def,
break;
+ case VIR_DOMAIN_FEATURE_HAP: case VIR_DOMAIN_FEATURE_PMU: case VIR_DOMAIN_FEATURE_PVSPINLOCK: case VIR_DOMAIN_FEATURE_VMPORT:

Joao Martins wrote:
Most hypervisors use Hardware Assisted Paging by default and don't require specifying the feature in domain conf. But some hypervisors support disabling HAP on a per-domain basis. To enable HAP by default yet provide a knob to disable it, extend the <hap> feature with a 'state=on|off' attribute, similar to <pvspinlock> and <vmport> features.
In the absence of <hap>, the hypervisor default (on) is used. <hap> without the state attribute would be the same as <hap state='on'/> for backwards compatibility. And of course <hap state='off'/> disables hap.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- docs/formatdomain.html.in | 6 ++++-- docs/schemas/domaincommon.rng | 6 +++++- src/conf/domain_conf.c | 4 ++-- 3 files changed, 11 insertions(+), 5 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index 5016772..c06bcf3 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -1494,8 +1494,10 @@ Interrupt) for the guest. </dd> <dt><code>hap</code></dt> - <dd>Enable use of Hardware Assisted Paging if available in - the hardware. + <dd>Depending on the <code>state</code> attribute (values <code>on</code>, + <code>off</code>) enable or disable use of Hardware Assisted Paging. + The default is <code>on</code> if the hypervisor detects availability + of Hardware Assisted Paging. </dd> <dt><code>viridian</code></dt> <dd>Enable Viridian hypervisor extensions for paravirtualizing diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 67af93a..dd6e93a 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4108,7 +4108,11 @@ </optional> <optional> <element name="hap"> - <empty/> + <optional> + <attribute name="state"> + <ref name="virOnOff"/> + </attribute> + </optional> Perhaps <ref name="featurestate"/> would be better (see chunk below) ? That one appears to be a reference of what you are adding above, and it's the same as
On 03/01/2016 04:00 AM, Jim Fehlig wrote: pvspinlock. Though some other elements don't appear to use this, not sure why.
Ah, thanks for catching that. 'featurestate' is definitely the better choice here.
diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index 89d3a6b..141122c 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -4132,9 +4132,7 @@ <optional> <element name="hap"> <optional> - <attribute name="state"> - <ref name="virOnOff"/> - </attribute> + <ref name="featurestate"/> </optional> </element> </optional>
Other that,
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>
Thanks. I've squashed in your diff, but should probably wait for any additional comments before pushing this series. Regards, Jim

hap is enabled by default in xm and xl config and usually only specified when it is desirable to disable hap (hap = 0). Change the xm,xl <-> xml converter to behave similarly. I.e. only produce 'hap = 0' when <hap state='off'/> and vice versa. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 43 files changed, 173 insertions(+), 43 deletions(-) diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 828c8e9..4dcd484 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -528,11 +528,11 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def) else if (val) def->features[VIR_DOMAIN_FEATURE_APIC] = VIR_TRISTATE_SWITCH_ON; - if (xenConfigGetBool(conf, "hap", &val, 0) < 0) + if (xenConfigGetBool(conf, "hap", &val, 1) < 0) return -1; - else if (val) - def->features[VIR_DOMAIN_FEATURE_HAP] = VIR_TRISTATE_SWITCH_ON; + else if (!val) + def->features[VIR_DOMAIN_FEATURE_HAP] = VIR_TRISTATE_SWITCH_OFF; if (xenConfigGetBool(conf, "viridian", &val, 0) < 0) return -1; @@ -1572,10 +1572,10 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def) VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) return -1; - if (xenConfigSetInt(conf, "hap", - (def->features[VIR_DOMAIN_FEATURE_HAP] == - VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) - return -1; + if (def->features[VIR_DOMAIN_FEATURE_HAP] == VIR_TRISTATE_SWITCH_OFF) { + if (xenConfigSetInt(conf, "hap", 0) < 0) + return -1; + } if (xenConfigSetInt(conf, "viridian", (def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] == diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.cfg b/tests/xlconfigdata/test-disk-positional-parms-full.cfg index 026e451..c5bbb03 100644 --- a/tests/xlconfigdata/test-disk-positional-parms-full.cfg +++ b/tests/xlconfigdata/test-disk-positional-parms-full.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg index 0591037..09eeb94 100644 --- a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg +++ b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg index 83ab975..8012737 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg index f452af6..4ed5a90 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg index 9ebbc89..110f0a0 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.cfg b/tests/xlconfigdata/test-fullvirt-multiusb.cfg index 097de88..003eb2b 100755 --- a/tests/xlconfigdata/test-fullvirt-multiusb.cfg +++ b/tests/xlconfigdata/test-fullvirt-multiusb.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-nohap.cfg b/tests/xlconfigdata/test-fullvirt-nohap.cfg new file mode 100644 index 0000000..44bfa3c --- /dev/null +++ b/tests/xlconfigdata/test-fullvirt-nohap.cfg @@ -0,0 +1,26 @@ +name = "XenGuest2" +uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem = 579 +memory = 394 +vcpus = 1 +pae = 1 +acpi = 1 +apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 +localtime = 0 +on_poweroff = "destroy" +on_reboot = "restart" +on_crash = "restart" +device_model = "/usr/lib/xen/bin/qemu-dm" +sdl = 0 +vnc = 1 +vncunused = 1 +vnclisten = "127.0.0.1" +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,rate=10240KB/s" ] +parallel = "none" +serial = "none" +builder = "hvm" +boot = "d" +disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=qcow2,vdev=hdb,access=rw,backendtype=qdisk,target=/var/lib/libvirt/images/XenGuest2-home", "format=raw,vdev=hdc,access=ro,backendtype=qdisk,devtype=cdrom,target=/root/boot.iso" ] diff --git a/tests/xlconfigdata/test-fullvirt-nohap.xml b/tests/xlconfigdata/test-fullvirt-nohap.xml new file mode 100644 index 0000000..d9dad20 --- /dev/null +++ b/tests/xlconfigdata/test-fullvirt-nohap.xml @@ -0,0 +1,59 @@ +<domain type='xen'> + <name>XenGuest2</name> + <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>592896</memory> + <currentMemory unit='KiB'>403456</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='xenfv'>hvm</type> + <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> + <boot dev='cdrom'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + <hap state='off'/> + </features> + <clock offset='variable' adjustment='0' basis='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/lib/xen/bin/qemu-dm</emulator> + <disk type='block' device='disk'> + <driver name='phy' type='raw'/> + <source dev='/dev/HostVG/XenGuest2'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/XenGuest2-home'/> + <target dev='hdb' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> + </disk> + <disk type='file' device='cdrom'> + <driver name='qemu' type='raw'/> + <source file='/root/boot.iso'/> + <target dev='hdc' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> + </disk> + <controller type='ide' index='0'/> + <interface type='bridge'> + <mac address='00:16:3e:66:92:9c'/> + <source bridge='xenbr1'/> + <bandwidth> + <outbound average='10240'/> + </bandwidth> + <script path='vif-bridge'/> + <model type='e1000'/> + </interface> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + </graphics> + </devices> +</domain> diff --git a/tests/xlconfigdata/test-new-disk.cfg b/tests/xlconfigdata/test-new-disk.cfg index 4a5b66e..b079056 100644 --- a/tests/xlconfigdata/test-new-disk.cfg +++ b/tests/xlconfigdata/test-new-disk.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg index cfe00e5..99f0889 100644 --- a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg +++ b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-spice-features.cfg b/tests/xlconfigdata/test-spice-features.cfg index 8c1ca18..48dcd86 100644 --- a/tests/xlconfigdata/test-spice-features.cfg +++ b/tests/xlconfigdata/test-spice-features.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-spice.cfg b/tests/xlconfigdata/test-spice.cfg index 84b3ae6..7ab23e1 100644 --- a/tests/xlconfigdata/test-spice.cfg +++ b/tests/xlconfigdata/test-spice.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-vif-rate.cfg b/tests/xlconfigdata/test-vif-rate.cfg index 44bfa3c..db932e5 100644 --- a/tests/xlconfigdata/test-vif-rate.cfg +++ b/tests/xlconfigdata/test-vif-rate.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 2668a76..ba1bed0 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -213,6 +213,7 @@ mymain(void) DO_TEST("spice"); DO_TEST("spice-features"); DO_TEST("vif-rate"); + DO_TEST("fullvirt-nohap"); DO_TEST("paravirt-cmdline"); DO_TEST_FORMAT("paravirt-cmdline-extra-root"); diff --git a/tests/xmconfigdata/test-escape-paths.cfg b/tests/xmconfigdata/test-escape-paths.cfg index 98570bd..f13254e 100644 --- a/tests/xmconfigdata/test-escape-paths.cfg +++ b/tests/xmconfigdata/test-escape-paths.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.cfg b/tests/xmconfigdata/test-fullvirt-default-feature.cfg index c9d072d..f72575b 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.cfg +++ b/tests/xmconfigdata/test-fullvirt-default-feature.cfg @@ -7,7 +7,6 @@ builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "d" hpet = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg index b89ed42..d73b4e9 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 hpet = 1 rtc_timeoffset = 0 diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg index 99e6d38..d670d36 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 hpet = 0 rtc_timeoffset = 0 diff --git a/tests/xmconfigdata/test-fullvirt-localtime.cfg b/tests/xmconfigdata/test-fullvirt-localtime.cfg index 5d07423..d51be21 100755 --- a/tests/xmconfigdata/test-fullvirt-localtime.cfg +++ b/tests/xmconfigdata/test-fullvirt-localtime.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 1 diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg index da1d368..254bd93 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg index 67e2511..5e12c5e 100755 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-nohap.cfg b/tests/xmconfigdata/test-fullvirt-nohap.cfg new file mode 100755 index 0000000..67e2511 --- /dev/null +++ b/tests/xmconfigdata/test-fullvirt-nohap.cfg @@ -0,0 +1,28 @@ +name = "XenGuest2" +uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem = 579 +memory = 394 +vcpus = 1 +pae = 1 +acpi = 1 +apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 +localtime = 0 +on_poweroff = "destroy" +on_reboot = "restart" +on_crash = "restart" +device_model = "/usr/lib/xen/bin/qemu-dm" +sdl = 0 +vnc = 1 +vncunused = 1 +vnclisten = "127.0.0.1" +vncpasswd = "123poi" +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] +parallel = "none" +serial = "none" +builder = "hvm" +kernel = "/usr/lib/xen/boot/hvmloader" +boot = "d" +disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ] diff --git a/tests/xmconfigdata/test-fullvirt-nohap.xml b/tests/xmconfigdata/test-fullvirt-nohap.xml new file mode 100644 index 0000000..671c71b --- /dev/null +++ b/tests/xmconfigdata/test-fullvirt-nohap.xml @@ -0,0 +1,51 @@ +<domain type='xen'> + <name>XenGuest2</name> + <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>592896</memory> + <currentMemory unit='KiB'>403456</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='xenfv'>hvm</type> + <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> + <boot dev='cdrom'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + <hap state='off'/> + </features> + <clock offset='variable' adjustment='0' basis='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/lib/xen/bin/qemu-dm</emulator> + <disk type='block' device='disk'> + <driver name='phy'/> + <source dev='/dev/HostVG/XenGuest2'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='cdrom'> + <driver name='file'/> + <source file='/root/boot.iso'/> + <target dev='hdc' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> + </disk> + <controller type='ide' index='0'/> + <interface type='bridge'> + <mac address='00:16:3e:66:92:9c'/> + <source bridge='xenbr1'/> + <script path='vif-bridge'/> + <model type='e1000'/> + </interface> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <memballoon model='xen'/> + </devices> +</domain> diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg index 1bbce56..df7b621 100755 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg index c722792..f4963e1 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg index 4baffe6..2dc3258 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.cfg b/tests/xmconfigdata/test-fullvirt-serial-file.cfg index 3d26e26..d5bd759 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-file.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-file.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.cfg b/tests/xmconfigdata/test-fullvirt-serial-null.cfg index 6b0f2a4..d38f084 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-null.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-null.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg index 2bd8377..9ed3fb7 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg index 022f975..b055f79 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg index c339a94..5fb13cd 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg index 56eefac..2c0f166 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg index d569852..e90b375 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg index b1ef8f5..082215d 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg index 30f0399..2912473 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-sound.cfg b/tests/xmconfigdata/test-fullvirt-sound.cfg index c11336a..6747e69 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.cfg +++ b/tests/xmconfigdata/test-fullvirt-sound.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg index 33738ad..c7eb1c1 100755 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg index 8e222bb..8921e7c 100755 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-utc.cfg b/tests/xmconfigdata/test-fullvirt-utc.cfg index 67e2511..5e12c5e 100755 --- a/tests/xmconfigdata/test-fullvirt-utc.cfg +++ b/tests/xmconfigdata/test-fullvirt-utc.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-no-source-cdrom.cfg b/tests/xmconfigdata/test-no-source-cdrom.cfg index 7098005..4240429 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.cfg +++ b/tests/xmconfigdata/test-no-source-cdrom.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-pci-devs.cfg b/tests/xmconfigdata/test-pci-devs.cfg index 777314f..1369b32 100644 --- a/tests/xmconfigdata/test-pci-devs.cfg +++ b/tests/xmconfigdata/test-pci-devs.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index a5c718b..9b21a13 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -235,6 +235,7 @@ mymain(void) DO_TEST("fullvirt-force-hpet"); DO_TEST("fullvirt-force-nohpet"); + DO_TEST("fullvirt-nohap"); DO_TEST("fullvirt-parallel-tcp"); -- 2.1.4

On 03/01/2016 04:00 AM, Jim Fehlig wrote:
hap is enabled by default in xm and xl config and usually only specified when it is desirable to disable hap (hap = 0). Change the xm,xl <-> xml converter to behave similarly. I.e. only produce 'hap = 0' when <hap state='off'/> and vice versa.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 43 files changed, 173 insertions(+), 43 deletions(-)
diff --git a/src/xenconfig/xen_common.c b/src/xenconfig/xen_common.c index 828c8e9..4dcd484 100644 --- a/src/xenconfig/xen_common.c +++ b/src/xenconfig/xen_common.c @@ -528,11 +528,11 @@ xenParseCPUFeatures(virConfPtr conf, virDomainDefPtr def)
else if (val) def->features[VIR_DOMAIN_FEATURE_APIC] = VIR_TRISTATE_SWITCH_ON; - if (xenConfigGetBool(conf, "hap", &val, 0) < 0) + if (xenConfigGetBool(conf, "hap", &val, 1) < 0) return -1;
- else if (val) - def->features[VIR_DOMAIN_FEATURE_HAP] = VIR_TRISTATE_SWITCH_ON; + else if (!val) + def->features[VIR_DOMAIN_FEATURE_HAP] = VIR_TRISTATE_SWITCH_OFF; if (xenConfigGetBool(conf, "viridian", &val, 0) < 0) return -1;
@@ -1572,10 +1572,10 @@ xenFormatCPUFeatures(virConfPtr conf, virDomainDefPtr def) VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) return -1;
- if (xenConfigSetInt(conf, "hap", - (def->features[VIR_DOMAIN_FEATURE_HAP] == - VIR_TRISTATE_SWITCH_ON) ? 1 : 0) < 0) - return -1; + if (def->features[VIR_DOMAIN_FEATURE_HAP] == VIR_TRISTATE_SWITCH_OFF) { + if (xenConfigSetInt(conf, "hap", 0) < 0) + return -1; + }
if (xenConfigSetInt(conf, "viridian", (def->features[VIR_DOMAIN_FEATURE_VIRIDIAN] == diff --git a/tests/xlconfigdata/test-disk-positional-parms-full.cfg b/tests/xlconfigdata/test-disk-positional-parms-full.cfg index 026e451..c5bbb03 100644 --- a/tests/xlconfigdata/test-disk-positional-parms-full.cfg +++ b/tests/xlconfigdata/test-disk-positional-parms-full.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg index 0591037..09eeb94 100644 --- a/tests/xlconfigdata/test-disk-positional-parms-partial.cfg +++ b/tests/xlconfigdata/test-disk-positional-parms-partial.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg index 83ab975..8012737 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg index f452af6..4ed5a90 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg index 9ebbc89..110f0a0 100644 --- a/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg +++ b/tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-multiusb.cfg b/tests/xlconfigdata/test-fullvirt-multiusb.cfg index 097de88..003eb2b 100755 --- a/tests/xlconfigdata/test-fullvirt-multiusb.cfg +++ b/tests/xlconfigdata/test-fullvirt-multiusb.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-fullvirt-nohap.cfg b/tests/xlconfigdata/test-fullvirt-nohap.cfg new file mode 100644 index 0000000..44bfa3c --- /dev/null +++ b/tests/xlconfigdata/test-fullvirt-nohap.cfg @@ -0,0 +1,26 @@ +name = "XenGuest2" +uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem = 579 +memory = 394 +vcpus = 1 +pae = 1 +acpi = 1 +apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 +localtime = 0 +on_poweroff = "destroy" +on_reboot = "restart" +on_crash = "restart" +device_model = "/usr/lib/xen/bin/qemu-dm" +sdl = 0 +vnc = 1 +vncunused = 1 +vnclisten = "127.0.0.1" +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000,rate=10240KB/s" ] +parallel = "none" +serial = "none" +builder = "hvm" +boot = "d" +disk = [ "format=raw,vdev=hda,access=rw,backendtype=phy,target=/dev/HostVG/XenGuest2", "format=qcow2,vdev=hdb,access=rw,backendtype=qdisk,target=/var/lib/libvirt/images/XenGuest2-home", "format=raw,vdev=hdc,access=ro,backendtype=qdisk,devtype=cdrom,target=/root/boot.iso" ] diff --git a/tests/xlconfigdata/test-fullvirt-nohap.xml b/tests/xlconfigdata/test-fullvirt-nohap.xml new file mode 100644 index 0000000..d9dad20 --- /dev/null +++ b/tests/xlconfigdata/test-fullvirt-nohap.xml @@ -0,0 +1,59 @@ +<domain type='xen'> + <name>XenGuest2</name> + <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>592896</memory> + <currentMemory unit='KiB'>403456</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64' machine='xenfv'>hvm</type> + <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> + <boot dev='cdrom'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + <hap state='off'/> + </features> + <clock offset='variable' adjustment='0' basis='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/lib/xen/bin/qemu-dm</emulator> + <disk type='block' device='disk'> + <driver name='phy' type='raw'/> + <source dev='/dev/HostVG/XenGuest2'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='disk'> + <driver name='qemu' type='qcow2'/> + <source file='/var/lib/libvirt/images/XenGuest2-home'/> + <target dev='hdb' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='1'/> + </disk> + <disk type='file' device='cdrom'> + <driver name='qemu' type='raw'/> + <source file='/root/boot.iso'/> + <target dev='hdc' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> + </disk> + <controller type='ide' index='0'/> + <interface type='bridge'> + <mac address='00:16:3e:66:92:9c'/> + <source bridge='xenbr1'/> + <bandwidth> + <outbound average='10240'/> + </bandwidth> + <script path='vif-bridge'/> + <model type='e1000'/> + </interface> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1'> + <listen type='address' address='127.0.0.1'/> + </graphics> + </devices> +</domain> diff --git a/tests/xlconfigdata/test-new-disk.cfg b/tests/xlconfigdata/test-new-disk.cfg index 4a5b66e..b079056 100644 --- a/tests/xlconfigdata/test-new-disk.cfg +++ b/tests/xlconfigdata/test-new-disk.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg index cfe00e5..99f0889 100644 --- a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg +++ b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-spice-features.cfg b/tests/xlconfigdata/test-spice-features.cfg index 8c1ca18..48dcd86 100644 --- a/tests/xlconfigdata/test-spice-features.cfg +++ b/tests/xlconfigdata/test-spice-features.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-spice.cfg b/tests/xlconfigdata/test-spice.cfg index 84b3ae6..7ab23e1 100644 --- a/tests/xlconfigdata/test-spice.cfg +++ b/tests/xlconfigdata/test-spice.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigdata/test-vif-rate.cfg b/tests/xlconfigdata/test-vif-rate.cfg index 44bfa3c..db932e5 100644 --- a/tests/xlconfigdata/test-vif-rate.cfg +++ b/tests/xlconfigdata/test-vif-rate.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xlconfigtest.c b/tests/xlconfigtest.c index 2668a76..ba1bed0 100644 --- a/tests/xlconfigtest.c +++ b/tests/xlconfigtest.c @@ -213,6 +213,7 @@ mymain(void) DO_TEST("spice"); DO_TEST("spice-features"); DO_TEST("vif-rate"); + DO_TEST("fullvirt-nohap");
DO_TEST("paravirt-cmdline"); DO_TEST_FORMAT("paravirt-cmdline-extra-root"); diff --git a/tests/xmconfigdata/test-escape-paths.cfg b/tests/xmconfigdata/test-escape-paths.cfg index 98570bd..f13254e 100644 --- a/tests/xmconfigdata/test-escape-paths.cfg +++ b/tests/xmconfigdata/test-escape-paths.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-default-feature.cfg b/tests/xmconfigdata/test-fullvirt-default-feature.cfg index c9d072d..f72575b 100644 --- a/tests/xmconfigdata/test-fullvirt-default-feature.cfg +++ b/tests/xmconfigdata/test-fullvirt-default-feature.cfg @@ -7,7 +7,6 @@ builder = "hvm" kernel = "/usr/lib/xen/boot/hvmloader" boot = "d" hpet = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg index b89ed42..d73b4e9 100644 --- a/tests/xmconfigdata/test-fullvirt-force-hpet.cfg +++ b/tests/xmconfigdata/test-fullvirt-force-hpet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 hpet = 1 rtc_timeoffset = 0 diff --git a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg index 99e6d38..d670d36 100644 --- a/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg +++ b/tests/xmconfigdata/test-fullvirt-force-nohpet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 hpet = 0 rtc_timeoffset = 0 diff --git a/tests/xmconfigdata/test-fullvirt-localtime.cfg b/tests/xmconfigdata/test-fullvirt-localtime.cfg index 5d07423..d51be21 100755 --- a/tests/xmconfigdata/test-fullvirt-localtime.cfg +++ b/tests/xmconfigdata/test-fullvirt-localtime.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 1 diff --git a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg index da1d368..254bd93 100644 --- a/tests/xmconfigdata/test-fullvirt-net-netfront.cfg +++ b/tests/xmconfigdata/test-fullvirt-net-netfront.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg index 67e2511..5e12c5e 100755 --- a/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg +++ b/tests/xmconfigdata/test-fullvirt-new-cdrom.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-nohap.cfg b/tests/xmconfigdata/test-fullvirt-nohap.cfg new file mode 100755 index 0000000..67e2511 --- /dev/null +++ b/tests/xmconfigdata/test-fullvirt-nohap.cfg @@ -0,0 +1,28 @@ +name = "XenGuest2" +uuid = "c7a5fdb2-cdaf-9455-926a-d65c16db1809" +maxmem = 579 +memory = 394 +vcpus = 1 +pae = 1 +acpi = 1 +apic = 1 +hap = 0 +viridian = 0 +rtc_timeoffset = 0 +localtime = 0 +on_poweroff = "destroy" +on_reboot = "restart" +on_crash = "restart" +device_model = "/usr/lib/xen/bin/qemu-dm" +sdl = 0 +vnc = 1 +vncunused = 1 +vnclisten = "127.0.0.1" +vncpasswd = "123poi" +vif = [ "mac=00:16:3e:66:92:9c,bridge=xenbr1,script=vif-bridge,model=e1000" ] +parallel = "none" +serial = "none" +builder = "hvm" +kernel = "/usr/lib/xen/boot/hvmloader" +boot = "d" +disk = [ "phy:/dev/HostVG/XenGuest2,hda,w", "file:/root/boot.iso,hdc:cdrom,r" ] diff --git a/tests/xmconfigdata/test-fullvirt-nohap.xml b/tests/xmconfigdata/test-fullvirt-nohap.xml new file mode 100644 index 0000000..671c71b --- /dev/null +++ b/tests/xmconfigdata/test-fullvirt-nohap.xml @@ -0,0 +1,51 @@ +<domain type='xen'> + <name>XenGuest2</name> + <uuid>c7a5fdb2-cdaf-9455-926a-d65c16db1809</uuid> + <memory unit='KiB'>592896</memory> + <currentMemory unit='KiB'>403456</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='i686' machine='xenfv'>hvm</type> + <loader type='rom'>/usr/lib/xen/boot/hvmloader</loader> + <boot dev='cdrom'/> + </os> + <features> + <acpi/> + <apic/> + <pae/> + <hap state='off'/> + </features> + <clock offset='variable' adjustment='0' basis='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>restart</on_crash> + <devices> + <emulator>/usr/lib/xen/bin/qemu-dm</emulator> + <disk type='block' device='disk'> + <driver name='phy'/> + <source dev='/dev/HostVG/XenGuest2'/> + <target dev='hda' bus='ide'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='cdrom'> + <driver name='file'/> + <source file='/root/boot.iso'/> + <target dev='hdc' bus='ide'/> + <readonly/> + <address type='drive' controller='0' bus='1' target='0' unit='0'/> + </disk> + <controller type='ide' index='0'/> + <interface type='bridge'> + <mac address='00:16:3e:66:92:9c'/> + <source bridge='xenbr1'/> + <script path='vif-bridge'/> + <model type='e1000'/> + </interface> + <input type='mouse' bus='ps2'/> + <input type='keyboard' bus='ps2'/> + <graphics type='vnc' port='-1' autoport='yes' listen='127.0.0.1' passwd='123poi'> + <listen type='address' address='127.0.0.1'/> + </graphics> + <memballoon model='xen'/> + </devices> +</domain> diff --git a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg index 1bbce56..df7b621 100755 --- a/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg +++ b/tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg index c722792..f4963e1 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg index 4baffe6..2dc3258 100644 --- a/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-file.cfg b/tests/xmconfigdata/test-fullvirt-serial-file.cfg index 3d26e26..d5bd759 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-file.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-file.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-null.cfg b/tests/xmconfigdata/test-fullvirt-serial-null.cfg index 6b0f2a4..d38f084 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-null.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-null.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg index 2bd8377..9ed3fb7 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-pipe.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg index 022f975..b055f79 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-pty.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-pty.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg index c339a94..5fb13cd 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-stdio.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg index 56eefac..2c0f166 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg index d569852..e90b375 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-tcp.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg index b1ef8f5..082215d 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-udp.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-udp.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg index 30f0399..2912473 100755 --- a/tests/xmconfigdata/test-fullvirt-serial-unix.cfg +++ b/tests/xmconfigdata/test-fullvirt-serial-unix.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-sound.cfg b/tests/xmconfigdata/test-fullvirt-sound.cfg index c11336a..6747e69 100644 --- a/tests/xmconfigdata/test-fullvirt-sound.cfg +++ b/tests/xmconfigdata/test-fullvirt-sound.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg index 33738ad..c7eb1c1 100755 --- a/tests/xmconfigdata/test-fullvirt-usbmouse.cfg +++ b/tests/xmconfigdata/test-fullvirt-usbmouse.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg index 8e222bb..8921e7c 100755 --- a/tests/xmconfigdata/test-fullvirt-usbtablet.cfg +++ b/tests/xmconfigdata/test-fullvirt-usbtablet.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-fullvirt-utc.cfg b/tests/xmconfigdata/test-fullvirt-utc.cfg index 67e2511..5e12c5e 100755 --- a/tests/xmconfigdata/test-fullvirt-utc.cfg +++ b/tests/xmconfigdata/test-fullvirt-utc.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-no-source-cdrom.cfg b/tests/xmconfigdata/test-no-source-cdrom.cfg index 7098005..4240429 100644 --- a/tests/xmconfigdata/test-no-source-cdrom.cfg +++ b/tests/xmconfigdata/test-no-source-cdrom.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigdata/test-pci-devs.cfg b/tests/xmconfigdata/test-pci-devs.cfg index 777314f..1369b32 100644 --- a/tests/xmconfigdata/test-pci-devs.cfg +++ b/tests/xmconfigdata/test-pci-devs.cfg @@ -6,7 +6,6 @@ vcpus = 1 pae = 1 acpi = 1 apic = 1 -hap = 0 viridian = 0 rtc_timeoffset = 0 localtime = 0 diff --git a/tests/xmconfigtest.c b/tests/xmconfigtest.c index a5c718b..9b21a13 100644 --- a/tests/xmconfigtest.c +++ b/tests/xmconfigtest.c @@ -235,6 +235,7 @@ mymain(void)
DO_TEST("fullvirt-force-hpet"); DO_TEST("fullvirt-force-nohpet"); + DO_TEST("fullvirt-nohap");
DO_TEST("fullvirt-parallel-tcp");
Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

Hardware Assisted Paging is enabled by default in Xen. Change the capabilities output to reflect this. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_conf.c | 2 +- src/xen/xen_hypervisor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 93c943b..6efd9b5 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -493,7 +493,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps) if (virCapabilitiesAddGuestFeature(guest, "hap", - 0, + 1, 1) == NULL) return -1; } diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index c1834cb..fc9e1c6 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2206,7 +2206,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch, if ((hv_major == 3 && hv_minor >= 3) || (hv_major > 3)) if (virCapabilitiesAddGuestFeature(guest, "hap", - false, + true, true) == NULL) goto no_memory; -- 2.1.4

On 03/01/2016 04:00 AM, Jim Fehlig wrote:
Hardware Assisted Paging is enabled by default in Xen. Change the capabilities output to reflect this.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_conf.c | 2 +- src/xen/xen_hypervisor.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 93c943b..6efd9b5 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -493,7 +493,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps)
if (virCapabilitiesAddGuestFeature(guest, "hap", - 0, + 1, 1) == NULL) return -1; } diff --git a/src/xen/xen_hypervisor.c b/src/xen/xen_hypervisor.c index c1834cb..fc9e1c6 100644 --- a/src/xen/xen_hypervisor.c +++ b/src/xen/xen_hypervisor.c @@ -2206,7 +2206,7 @@ xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch, if ((hv_major == 3 && hv_minor >= 3) || (hv_major > 3)) if (virCapabilitiesAddGuestFeature(guest, "hap", - false, + true, true) == NULL) goto no_memory;
For the libxl part, Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

Until now, the libxl driver ignored any <hap> setting in domain XML and deferred to libxl, which enables hap if not specified. While this is a good default, it prevents disabling hap if desired. This change allows disabling hap with <hap state='off'/>. hap is explicitly enabled with <hap/> or <hap state='on/>. Absense of <hap> retains current behavior of deferring default state to libxl. Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_conf.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 6efd9b5..116dc22 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -511,10 +511,24 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx, libxl_domain_create_info_init(c_info); - if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) + if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { c_info->type = LIBXL_DOMAIN_TYPE_HVM; - else + switch ((virTristateSwitch) def->features[VIR_DOMAIN_FEATURE_HAP]) { + case VIR_TRISTATE_SWITCH_OFF: + libxl_defbool_set(&c_info->hap, false); + break; + + case VIR_TRISTATE_SWITCH_ON: + libxl_defbool_set(&c_info->hap, true); + break; + + case VIR_TRISTATE_SWITCH_ABSENT: + case VIR_TRISTATE_SWITCH_LAST: + break; + } + } else { c_info->type = LIBXL_DOMAIN_TYPE_PV; + } if (VIR_STRDUP(c_info->name, def->name) < 0) goto error; -- 2.1.4

On 03/01/2016 04:00 AM, Jim Fehlig wrote:
Until now, the libxl driver ignored any <hap> setting in domain XML and deferred to libxl, which enables hap if not specified. While this is a good default, it prevents disabling hap if desired.
This change allows disabling hap with <hap state='off'/>. hap is explicitly enabled with <hap/> or <hap state='on/>. Absense of <hap> retains current behavior of deferring default state to libxl.
Signed-off-by: Jim Fehlig <jfehlig@suse.com> --- src/libxl/libxl_conf.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 6efd9b5..116dc22 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -511,10 +511,24 @@ libxlMakeDomCreateInfo(libxl_ctx *ctx,
libxl_domain_create_info_init(c_info);
- if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) + if (def->os.type == VIR_DOMAIN_OSTYPE_HVM) { c_info->type = LIBXL_DOMAIN_TYPE_HVM; - else + switch ((virTristateSwitch) def->features[VIR_DOMAIN_FEATURE_HAP]) { + case VIR_TRISTATE_SWITCH_OFF: + libxl_defbool_set(&c_info->hap, false); + break; + + case VIR_TRISTATE_SWITCH_ON: + libxl_defbool_set(&c_info->hap, true); + break; + + case VIR_TRISTATE_SWITCH_ABSENT: + case VIR_TRISTATE_SWITCH_LAST: + break; + } + } else { c_info->type = LIBXL_DOMAIN_TYPE_PV; + }
if (VIR_STRDUP(c_info->name, def->name) < 0) goto error;
Tested and Reviewed-by: Joao Martins <joao.m.martins@oracle.com>

On 02/29/2016 09:00 PM, Jim Fehlig wrote:
An expanded V2 of
https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html
In V2, the <hap> feature is extended with a state='on|off' attribute to allow differentiating the 'on' and 'off' states with not set (or hypervisor default).
Any comments about this approach? I essentially followed the same pattern as the <pvspinlock> and <vmport> hypervisor features. Thanks! Regards, Jim
Obviously post 1.3.2 material. See individual patches for details.
Jim Fehlig (4): conf: add 'state' attribute to <hap> feature xenconfig: change 'hap' setting to align with Xen behavior Xen drivers: show hap enabled by default in capabilities libxl: support enabling and disabling <hap> feature
docs/formatdomain.html.in | 6 ++- docs/schemas/domaincommon.rng | 6 ++- src/conf/domain_conf.c | 4 +- src/libxl/libxl_conf.c | 20 ++++++-- src/xen/xen_hypervisor.c | 2 +- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 48 files changed, 202 insertions(+), 52 deletions(-) create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.xml create mode 100755 tests/xmconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xmconfigdata/test-fullvirt-nohap.xml

Ping V2 :-). FYI, Joao has {Reviewed,Tested}-by the series. Thanks! Regards, Jim On 03/07/2016 09:02 PM, Jim Fehlig wrote:
On 02/29/2016 09:00 PM, Jim Fehlig wrote:
An expanded V2 of
https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html
In V2, the <hap> feature is extended with a state='on|off' attribute to allow differentiating the 'on' and 'off' states with not set (or hypervisor default). Any comments about this approach? I essentially followed the same pattern as the <pvspinlock> and <vmport> hypervisor features. Thanks!
Regards, Jim
Obviously post 1.3.2 material. See individual patches for details.
Jim Fehlig (4): conf: add 'state' attribute to <hap> feature xenconfig: change 'hap' setting to align with Xen behavior Xen drivers: show hap enabled by default in capabilities libxl: support enabling and disabling <hap> feature
docs/formatdomain.html.in | 6 ++- docs/schemas/domaincommon.rng | 6 ++- src/conf/domain_conf.c | 4 +- src/libxl/libxl_conf.c | 20 ++++++-- src/xen/xen_hypervisor.c | 2 +- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 48 files changed, 202 insertions(+), 52 deletions(-) create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.xml create mode 100755 tests/xmconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xmconfigdata/test-fullvirt-nohap.xml
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Mon, Feb 29, 2016 at 09:00:44PM -0700, Jim Fehlig wrote:
An expanded V2 of
https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html
In V2, the <hap> feature is extended with a state='on|off' attribute to allow differentiating the 'on' and 'off' states with not set (or hypervisor default).
Obviously post 1.3.2 material. See individual patches for details.
Jim Fehlig (4): conf: add 'state' attribute to <hap> feature xenconfig: change 'hap' setting to align with Xen behavior Xen drivers: show hap enabled by default in capabilities libxl: support enabling and disabling <hap> feature
docs/formatdomain.html.in | 6 ++- docs/schemas/domaincommon.rng | 6 ++- src/conf/domain_conf.c | 4 +- src/libxl/libxl_conf.c | 20 ++++++-- src/xen/xen_hypervisor.c | 2 +- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 48 files changed, 202 insertions(+), 52 deletions(-) create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.xml create mode 100755 tests/xmconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xmconfigdata/test-fullvirt-nohap.xml
ACK series Jan

On 03/21/2016 06:49 AM, Ján Tomko wrote:
On Mon, Feb 29, 2016 at 09:00:44PM -0700, Jim Fehlig wrote:
An expanded V2 of
https://www.redhat.com/archives/libvir-list/2016-February/msg00140.html
In V2, the <hap> feature is extended with a state='on|off' attribute to allow differentiating the 'on' and 'off' states with not set (or hypervisor default).
Obviously post 1.3.2 material. See individual patches for details.
Jim Fehlig (4): conf: add 'state' attribute to <hap> feature xenconfig: change 'hap' setting to align with Xen behavior Xen drivers: show hap enabled by default in capabilities libxl: support enabling and disabling <hap> feature
docs/formatdomain.html.in | 6 ++- docs/schemas/domaincommon.rng | 6 ++- src/conf/domain_conf.c | 4 +- src/libxl/libxl_conf.c | 20 ++++++-- src/xen/xen_hypervisor.c | 2 +- src/xenconfig/xen_common.c | 14 ++--- .../test-disk-positional-parms-full.cfg | 1 - .../test-disk-positional-parms-partial.cfg | 1 - ...est-fullvirt-direct-kernel-boot-bogus-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot-extra.cfg | 1 - .../test-fullvirt-direct-kernel-boot.cfg | 1 - tests/xlconfigdata/test-fullvirt-multiusb.cfg | 1 - tests/xlconfigdata/test-fullvirt-nohap.cfg | 26 ++++++++++ tests/xlconfigdata/test-fullvirt-nohap.xml | 59 ++++++++++++++++++++++ tests/xlconfigdata/test-new-disk.cfg | 1 - tests/xlconfigdata/test-rbd-multihost-noauth.cfg | 1 - tests/xlconfigdata/test-spice-features.cfg | 1 - tests/xlconfigdata/test-spice.cfg | 1 - tests/xlconfigdata/test-vif-rate.cfg | 1 - tests/xlconfigtest.c | 1 + tests/xmconfigdata/test-escape-paths.cfg | 1 - .../xmconfigdata/test-fullvirt-default-feature.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-hpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-force-nohpet.cfg | 1 - tests/xmconfigdata/test-fullvirt-localtime.cfg | 1 - tests/xmconfigdata/test-fullvirt-net-netfront.cfg | 1 - tests/xmconfigdata/test-fullvirt-new-cdrom.cfg | 1 - tests/xmconfigdata/test-fullvirt-nohap.cfg | 28 ++++++++++ tests/xmconfigdata/test-fullvirt-nohap.xml | 51 +++++++++++++++++++ tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg | 1 - .../test-fullvirt-serial-dev-2-ports.cfg | 1 - .../test-fullvirt-serial-dev-2nd-port.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-file.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-null.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pipe.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-pty.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-stdio.cfg | 1 - .../test-fullvirt-serial-tcp-telnet.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-tcp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-udp.cfg | 1 - tests/xmconfigdata/test-fullvirt-serial-unix.cfg | 1 - tests/xmconfigdata/test-fullvirt-sound.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbmouse.cfg | 1 - tests/xmconfigdata/test-fullvirt-usbtablet.cfg | 1 - tests/xmconfigdata/test-fullvirt-utc.cfg | 1 - tests/xmconfigdata/test-no-source-cdrom.cfg | 1 - tests/xmconfigdata/test-pci-devs.cfg | 1 - tests/xmconfigtest.c | 1 + 48 files changed, 202 insertions(+), 52 deletions(-) create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xlconfigdata/test-fullvirt-nohap.xml create mode 100755 tests/xmconfigdata/test-fullvirt-nohap.cfg create mode 100644 tests/xmconfigdata/test-fullvirt-nohap.xml
ACK series
Thanks a lot for taking a look, much appreciated! Pushed now. Regards, Jim
participants (3)
-
Jim Fehlig
-
Joao Martins
-
Ján Tomko