From patchwork Tue Mar 1 04:00:45 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jim Fehlig X-Patchwork-Id: 8461671 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id AD9469F38C for ; Tue, 1 Mar 2016 04:03:50 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id CBB5F20172 for ; Tue, 1 Mar 2016 04:03:49 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFAC520160 for ; Tue, 1 Mar 2016 04:03:48 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aabUo-0005yo-FX; Tue, 01 Mar 2016 04:01:14 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.84) (envelope-from ) id 1aabUm-0005wz-Ns for xen-devel@lists.xen.org; Tue, 01 Mar 2016 04:01:12 +0000 Received: from [85.158.139.211] by server-16.bemta-5.messagelabs.com id F5/22-02988-70415D65; Tue, 01 Mar 2016 04:01:11 +0000 X-Env-Sender: jfehlig@suse.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1456804869!25807679!1 X-Originating-IP: [137.65.250.81] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 8.11; banners=-,-,- X-VirusChecked: Checked Received: (qmail 55277 invoked from network); 1 Mar 2016 04:01:10 -0000 Received: from smtp2.provo.novell.com (HELO smtp2.provo.novell.com) (137.65.250.81) by server-5.tower-206.messagelabs.com with DHE-RSA-AES256-GCM-SHA384 encrypted SMTP; 1 Mar 2016 04:01:10 -0000 Received: from talkeetna.gns.novell.com (prv-ext-foundry1int.gns.novell.com [137.65.251.240]) by smtp2.provo.novell.com with ESMTP (NOT encrypted); Mon, 29 Feb 2016 21:00:58 -0700 From: Jim Fehlig To: libvir-list@redhat.com Date: Mon, 29 Feb 2016 21:00:45 -0700 Message-Id: <1456804848-13127-2-git-send-email-jfehlig@suse.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1456804848-13127-1-git-send-email-jfehlig@suse.com> References: <1456804848-13127-1-git-send-email-jfehlig@suse.com> Cc: Jim Fehlig , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH V2 1/4] conf: add 'state' attribute to feature X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 feature with a 'state=on|off' attribute, similar to and features. In the absence of , the hypervisor default (on) is used. without the state attribute would be the same as for backwards compatibility. And of course disables hap. Signed-off-by: Jim Fehlig --- 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.
hap
-
Enable use of Hardware Assisted Paging if available in - the hardware. +
Depending on the state attribute (values on, + off) enable or disable use of Hardware Assisted Paging. + The default is on if the hypervisor detects availability + of Hardware Assisted Paging.
viridian
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 @@ - + + + + + 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: