From: Joao Martins <joao.m.martins@oracle.com>
To: Jim Fehlig <jfehlig@suse.com>
Cc: libvir-list@redhat.com, xen-devel@lists.xen.org
Subject: Re: [libvirt] [PATCH V2 1/4] conf: add 'state' attribute to <hap> feature
Date: Tue, 8 Mar 2016 16:37:11 +0000 [thread overview]
Message-ID: <56DEFFB7.8030001@oracle.com> (raw)
In-Reply-To: <1456804848-13127-2-git-send-email-jfehlig@suse.com>
On 03/01/2016 04:00 AM, Jim Fehlig 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
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:
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-03-08 16:37 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-01 4:00 [PATCH V2 0/4] Extend <hap> to a tristate Jim Fehlig
2016-03-01 4:00 ` [PATCH V2 1/4] conf: add 'state' attribute to <hap> feature Jim Fehlig
2016-03-08 16:37 ` Joao Martins [this message]
2016-03-08 20:21 ` [libvirt] " Jim Fehlig
2016-03-01 4:00 ` [PATCH V2 2/4] xenconfig: change 'hap' setting to align with Xen behavior Jim Fehlig
2016-03-08 16:37 ` [libvirt] " Joao Martins
2016-03-01 4:00 ` [PATCH V2 3/4] Xen drivers: show hap enabled by default in capabilities Jim Fehlig
2016-03-08 16:37 ` [libvirt] " Joao Martins
2016-03-01 4:00 ` [PATCH V2 4/4] libxl: support enabling and disabling <hap> feature Jim Fehlig
2016-03-08 16:37 ` [libvirt] " Joao Martins
2016-03-08 4:02 ` [libvirt] [PATCH V2 0/4] Extend <hap> to a tristate Jim Fehlig
[not found] ` <56DE4ED8.4060905@suse.com>
2016-03-16 21:06 ` Jim Fehlig
2016-03-21 12:49 ` Ján Tomko
2016-03-21 15:45 ` Jim Fehlig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56DEFFB7.8030001@oracle.com \
--to=joao.m.martins@oracle.com \
--cc=jfehlig@suse.com \
--cc=libvir-list@redhat.com \
--cc=xen-devel@lists.xen.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.