Skip to contentSkip to conversation

Extend <hap> to a tristate

PATCH In review Jim Fehlig 3 participants 14 messages Mar 1, 2016 – Mar 21, 2016 1 message not in the archive

lore
Share & tools
lore

Jim Fehlig

author
#0 lore raw

v2 cover 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
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
author
#1 lore raw

PATCH v2 1/4 conf: add 'state' attribute to <hap> feature

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.

---
 docs/formatdomain.html.in     | 6 ++++--
 docs/schemas/domaincommon.rng | 6 +++++-
 src/conf/domain_conf.c        | 4 ++--
 3 files changed, 11 insertions(+), 5 deletions(-)
docs/formatdomain.html.in +4 -2
index 5016772..c06bcf3 100644
@@ -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
docs/schemas/domaincommon.rng +5 -1
index 67af93a..dd6e93a 100644
@@ -4108,7 +4108,11 @@
           </optional>
           <optional>
             <element name="hap">
-              <empty/>
+              <optional>
+                <attribute name="state">
+                  <ref name="virOnOff"/>
+                </attribute>
+              </optional>
             </element>
           </optional>
           <optional>
src/conf/domain_conf.c +2 -2
index 79758d4..714bbfc 100644
@@ -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:
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v2 1/4
#2 lore raw

Re: [libvirt] [PATCH V2 1/4] conf: add 'state' attribute to <hap> feature

Quoted 39 lines · Jim Fehlig

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.

---
 docs/formatdomain.html.in     | 6 ++++--
 docs/schemas/domaincommon.rng | 6 +++++-
 src/conf/domain_conf.c        | 4 ++--
 3 files changed, 11 insertions(+), 5 deletions(-)
docs/formatdomain.html.in +4 -2
index 5016772..c06bcf3 100644
@@ -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
docs/schemas/domaincommon.rng +0 -0
index 67af93a..dd6e93a 100644

docs/schemas/domaincommon.rng line 4115

Quoted 9 lines
docs/schemas/domaincommon.rng +5 -1
@@ -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 pvspinlock. Though some other elements don't appear to use this, not sure why.

docs/schemas/domaincommon.rng +1 -3
index 89d3a6b..141122c 100644
@@ -4132,9 +4132,7 @@
           <optional>
             <element name="hap">
               <optional>
-                <attribute name="state">
-                  <ref name="virOnOff"/>
-                </attribute>
+                <ref name="featurestate"/>
               </optional>
             </element>
           </optional>

Other that,

Quoted 33 lines
docs/schemas/domaincommon.rng +0 -0
             </element>
           </optional>
           <optional>
src/conf/domain_conf.c +1 -2
index 79758d4..714bbfc 100644
@@ -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]) {

src/conf/domain_conf.c virDomainDefFormatInternal(virDomainDefPtr def, · line 22070

Quoted 7 lines
src/conf/domain_conf.c +1 -0
@@ -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:

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#3 lore raw

Re: [libvirt] [PATCH V2 1/4] conf: add 'state' attribute to <hap> feature

Quoted 45 lines · Joao Martins
Quoted 43 lines · Jim Fehlig

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.

---
 docs/formatdomain.html.in     | 6 ++++--
 docs/schemas/domaincommon.rng | 6 +++++-
 src/conf/domain_conf.c        | 4 ++--
 3 files changed, 11 insertions(+), 5 deletions(-)
docs/formatdomain.html.in +4 -2
index 5016772..c06bcf3 100644
@@ -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
docs/schemas/domaincommon.rng +0 -1
index 67af93a..dd6e93a 100644
@@ -4108,7 +4108,11 @@
           </optional>
           <optional>
             <element name="hap">
-              <empty/>
Quoted 8 lines

docs/schemas/domaincommon.rng line 4115

Quoted 5 lines
docs/schemas/domaincommon.rng +5 -0
+              <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 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.

Quoted 17 lines
docs/schemas/domaincommon.rng +1 -3
index 89d3a6b..141122c 100644
@@ -4132,9 +4132,7 @@
           <optional>
             <element name="hap">
               <optional>
-                <attribute name="state">
-                  <ref name="virOnOff"/>
-                </attribute>
+                <ref name="featurestate"/>
               </optional>
             </element>
           </optional>
Quoted 3 lines

Other that,

Thanks. I've squashed in your diff, but should probably wait for any additional comments before pushing this series.

Regards,
Jim

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#4 lore raw

PATCH v2 2/4 xenconfig: change 'hap' setting to align with Xen behavior

In reply to Jim Fehlig

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.

---
 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(-)
src/xenconfig/xen_common.c +7 -7
index 828c8e9..4dcd484 100644
@@ -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] ==
tests/xlconfigdata/test-disk-positional-parms-full.cfg +0 -1
index 026e451..c5bbb03 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-disk-positional-parms-partial.cfg +0 -1
index 0591037..09eeb94 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg +0 -1
index 83ab975..8012737 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg +0 -1
index f452af6..4ed5a90 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg +0 -1
index 9ebbc89..110f0a0 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-multiusb.cfg +0 -1
index 097de88..003eb2b 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-nohap.cfg new file +26 -0
new file mode 100644
index 0000000..44bfa3c
@@ -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" ]
tests/xlconfigdata/test-fullvirt-nohap.xml new file +59 -0

59 lines not on this page · raw message

tests/xlconfigdata/test-new-disk.cfg +0 -1
index 4a5b66e..b079056 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-rbd-multihost-noauth.cfg +0 -1
index cfe00e5..99f0889 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-spice-features.cfg +0 -1
index 8c1ca18..48dcd86 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-spice.cfg +0 -1
index 84b3ae6..7ab23e1 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-vif-rate.cfg +0 -1
index 44bfa3c..db932e5 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigtest.c +1 -0
index 2668a76..ba1bed0 100644
@@ -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");
tests/xmconfigdata/test-escape-paths.cfg +0 -1
index 98570bd..f13254e 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-default-feature.cfg +0 -1
index c9d072d..f72575b 100644
@@ -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
tests/xmconfigdata/test-fullvirt-force-hpet.cfg +0 -1
index b89ed42..d73b4e9 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 hpet = 1
 rtc_timeoffset = 0
tests/xmconfigdata/test-fullvirt-force-nohpet.cfg +0 -1
index 99e6d38..d670d36 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 hpet = 0
 rtc_timeoffset = 0
tests/xmconfigdata/test-fullvirt-localtime.cfg +0 -1
index 5d07423..d51be21 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 1
tests/xmconfigdata/test-fullvirt-net-netfront.cfg +0 -1
index da1d368..254bd93 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg +0 -1
index 67e2511..5e12c5e 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-nohap.cfg new file +28 -0
new file mode 100755
index 0000000..67e2511
@@ -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" ]
tests/xmconfigdata/test-fullvirt-nohap.xml new file +51 -0

51 lines not on this page · raw message

tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg +0 -1
index 1bbce56..df7b621 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg +0 -1
index c722792..f4963e1 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg +0 -1
index 4baffe6..2dc3258 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-file.cfg +0 -1
index 3d26e26..d5bd759 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-null.cfg +0 -1
index 6b0f2a4..d38f084 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-pipe.cfg +0 -1
index 2bd8377..9ed3fb7 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-pty.cfg +0 -1
index 022f975..b055f79 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-stdio.cfg +0 -1
index c339a94..5fb13cd 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg +0 -1
index 56eefac..2c0f166 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-tcp.cfg +0 -1
index d569852..e90b375 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-udp.cfg +0 -1
index b1ef8f5..082215d 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-unix.cfg +0 -1
index 30f0399..2912473 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-sound.cfg +0 -1
index c11336a..6747e69 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-usbmouse.cfg +0 -1
index 33738ad..c7eb1c1 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-usbtablet.cfg +0 -1
index 8e222bb..8921e7c 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-utc.cfg +0 -1
index 67e2511..5e12c5e 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-no-source-cdrom.cfg +0 -1
index 7098005..4240429 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-pci-devs.cfg +0 -1
index 777314f..1369b32 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigtest.c +1 -0
index a5c718b..9b21a13 100644
@@ -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");
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v2 2/4
#5 lore raw

Re: [libvirt] [PATCH V2 2/4] xenconfig: change 'hap' setting to align with Xen behavior

Quoted 724 lines · Jim Fehlig

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.

---
 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(-)
src/xenconfig/xen_common.c +7 -7
index 828c8e9..4dcd484 100644
@@ -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] ==
tests/xlconfigdata/test-disk-positional-parms-full.cfg +0 -1
index 026e451..c5bbb03 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-disk-positional-parms-partial.cfg +0 -1
index 0591037..09eeb94 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-bogus-extra.cfg +0 -1
index 83ab975..8012737 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-direct-kernel-boot-extra.cfg +0 -1
index f452af6..4ed5a90 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-direct-kernel-boot.cfg +0 -1
index 9ebbc89..110f0a0 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-multiusb.cfg +0 -1
index 097de88..003eb2b 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-fullvirt-nohap.cfg new file +26 -0
new file mode 100644
index 0000000..44bfa3c
@@ -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" ]
tests/xlconfigdata/test-fullvirt-nohap.xml new file +59 -0
new file mode 100644
index 0000000..d9dad20
@@ -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>
tests/xlconfigdata/test-new-disk.cfg +0 -1
index 4a5b66e..b079056 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-rbd-multihost-noauth.cfg +0 -1
index cfe00e5..99f0889 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-spice-features.cfg +0 -1
index 8c1ca18..48dcd86 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-spice.cfg +0 -1
index 84b3ae6..7ab23e1 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigdata/test-vif-rate.cfg +0 -1
index 44bfa3c..db932e5 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xlconfigtest.c +1 -0
index 2668a76..ba1bed0 100644
@@ -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");
tests/xmconfigdata/test-escape-paths.cfg +0 -1
index 98570bd..f13254e 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-default-feature.cfg +0 -1
index c9d072d..f72575b 100644
@@ -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
tests/xmconfigdata/test-fullvirt-force-hpet.cfg +0 -1
index b89ed42..d73b4e9 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 hpet = 1
 rtc_timeoffset = 0
tests/xmconfigdata/test-fullvirt-force-nohpet.cfg +0 -1
index 99e6d38..d670d36 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 hpet = 0
 rtc_timeoffset = 0
tests/xmconfigdata/test-fullvirt-localtime.cfg +0 -1
index 5d07423..d51be21 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 1
tests/xmconfigdata/test-fullvirt-net-netfront.cfg +0 -1
index da1d368..254bd93 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-new-cdrom.cfg +0 -1
index 67e2511..5e12c5e 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-nohap.cfg new file +28 -0
new file mode 100755
index 0000000..67e2511
@@ -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" ]
tests/xmconfigdata/test-fullvirt-nohap.xml new file +51 -0
new file mode 100644
index 0000000..671c71b
@@ -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>
tests/xmconfigdata/test-fullvirt-parallel-tcp.cfg +0 -1
index 1bbce56..df7b621 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-dev-2-ports.cfg +0 -1
index c722792..f4963e1 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-dev-2nd-port.cfg +0 -1
index 4baffe6..2dc3258 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-file.cfg +0 -1
index 3d26e26..d5bd759 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-null.cfg +0 -1
index 6b0f2a4..d38f084 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-pipe.cfg +0 -1
index 2bd8377..9ed3fb7 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-pty.cfg +0 -1
index 022f975..b055f79 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-stdio.cfg +0 -1
index c339a94..5fb13cd 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-tcp-telnet.cfg +0 -1
index 56eefac..2c0f166 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-tcp.cfg +0 -1
index d569852..e90b375 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-udp.cfg +0 -1
index b1ef8f5..082215d 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-serial-unix.cfg +0 -1
index 30f0399..2912473 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-sound.cfg +0 -1
index c11336a..6747e69 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-usbmouse.cfg +0 -1
index 33738ad..c7eb1c1 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-usbtablet.cfg +0 -1
index 8e222bb..8921e7c 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-fullvirt-utc.cfg +0 -1
index 67e2511..5e12c5e 100755
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-no-source-cdrom.cfg +0 -1
index 7098005..4240429 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigdata/test-pci-devs.cfg +0 -1
index 777314f..1369b32 100644
@@ -6,7 +6,6 @@ vcpus = 1
 pae = 1
 acpi = 1
 apic = 1
-hap = 0
 viridian = 0
 rtc_timeoffset = 0
 localtime = 0
tests/xmconfigtest.c +0 -0
index a5c718b..9b21a13 100644

tests/xmconfigtest.c mymain(void) · line 241

Quoted 7 lines
tests/xmconfigtest.c +1 -0
@@ -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");
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#6 lore raw

PATCH v2 3/4 Xen drivers: show hap enabled by default in capabilities

In reply to Jim Fehlig

Hardware Assisted Paging is enabled by default in Xen. Change the capabilities output to reflect this.

---
 src/libxl/libxl_conf.c   | 2 +-
 src/xen/xen_hypervisor.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/libxl/libxl_conf.c +1 -1
index 93c943b..6efd9b5 100644
@@ -493,7 +493,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps)
 
             if (virCapabilitiesAddGuestFeature(guest,
                                                "hap",
-                                               0,
+                                               1,
                                                1) == NULL)
                 return -1;
         }
src/xen/xen_hypervisor.c +1 -1
index c1834cb..fc9e1c6 100644
@@ -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;
 
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
Reviewed-by on v2 3/4
#7 lore raw

Re: [libvirt] [PATCH V2 3/4] Xen drivers: show hap enabled by default in capabilities

Quoted 28 lines · Jim Fehlig

Hardware Assisted Paging is enabled by default in Xen. Change the capabilities output to reflect this.

---
 src/libxl/libxl_conf.c   | 2 +-
 src/xen/xen_hypervisor.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
src/libxl/libxl_conf.c +1 -1
index 93c943b..6efd9b5 100644
@@ -493,7 +493,7 @@ libxlCapsInitGuests(libxl_ctx *ctx, virCapsPtr caps)
 
             if (virCapabilitiesAddGuestFeature(guest,
                                                "hap",
-                                               0,
+                                               1,
                                                1) == NULL)
                 return -1;
         }
src/xen/xen_hypervisor.c +0 -0
index c1834cb..fc9e1c6 100644

src/xen/xen_hypervisor.c xenHypervisorBuildCapabilities(virConnectPtr conn, virArch hostarch, · line 2212

Quoted 8 lines
src/xen/xen_hypervisor.c +1 -1
@@ -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,

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#8 lore raw

PATCH v2 4/4 libxl: support enabling and disabling <hap> feature

In reply to Jim Fehlig

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.

---
 src/libxl/libxl_conf.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
src/libxl/libxl_conf.c +16 -2
index 6efd9b5..116dc22 100644
@@ -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;
Signature · 7 lines
2.1.4


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel
#9 lore raw

Re: [libvirt] [PATCH V2 4/4] libxl: support enabling and disabling <hap> feature

Quoted 35 lines · Jim Fehlig

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.

---
 src/libxl/libxl_conf.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)
src/libxl/libxl_conf.c +10 -2
index 6efd9b5..116dc22 100644
@@ -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;
+

src/libxl/libxl_conf.c libxlMakeDomCreateInfo(libxl_ctx *ctx, · line 534

Quoted 10 lines
src/libxl/libxl_conf.c +6 -0
+        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 <[email protected]>

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#10 lore raw
In reply to Jim Fehlig
Quoted 7 lines · Jim Fehlig

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

Quoted 54 lines

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 -
Quoted 9 lines
 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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#12 lore raw

Ping V2 :-).

FYI, Joao has {Reviewed,Tested}-by the series. Thanks!

Regards,
Jim

Quoted 76 lines · Jim Fehlig
Quoted 7 lines · Jim Fehlig

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

Quoted 53 lines

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 -
Quoted 9 lines
 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
Quoted 5 lines

--
libvir-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/libvir-list

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#13 lore raw
In reply to Jim Fehlig
Quoted 61 lines · Jim Fehlig

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 -
Quoted 9 lines
 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

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#14 lore raw
Quoted 71 lines · Ján Tomko
Quoted 61 lines · Jim Fehlig

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 -
Quoted 9 lines
 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
Quoted 1 line

ACK series

Thanks a lot for taking a look, much appreciated! Pushed now.

Regards,
Jim

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel