From: Juergen Gross Subject: [PATCH] x86: add feature flags to shared_info page Date: Mon, 2 Mar 2015 13:59:04 +0100 Message-ID: <1425301144-27119-1-git-send-email-jgross@suse.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1YSPwD-0007Gt-0A for xen-devel@lists.xenproject.org; Mon, 02 Mar 2015 12:59:09 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: keir@xen.org, Ian.Campbell@citrix.com, andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com, tim@xen.org, david.vrabel@citrix.com, xen-devel@lists.xenproject.org, jbeulich@suse.com Cc: Juergen Gross List-Id: xen-devel@lists.xenproject.org In order to indicate the Xen tools capability to support the virtual mapped linear p2m list instead the 3 level mfn tree add feature flags to the shared_info page. Signed-off-by: Juergen Gross --- tools/include/xen-foreign/reference.size | 4 ++-- xen/include/public/arch-x86/xen.h | 10 ++++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/tools/include/xen-foreign/reference.size b/tools/include/xen-foreign/reference.size index a0409db..9fb1eda 100644 --- a/tools/include/xen-foreign/reference.size +++ b/tools/include/xen-foreign/reference.size @@ -9,6 +9,6 @@ vcpu_guest_context | 344 344 2800 5168 arch_vcpu_info | 0 0 24 16 vcpu_time_info | 32 32 32 32 vcpu_info | 48 48 64 64 -arch_shared_info | 0 0 28 48 -shared_info | 1088 1088 2344 3136 +arch_shared_info | 0 0 32 56 +shared_info | 1088 1088 2348 3144 diff --git a/xen/include/public/arch-x86/xen.h b/xen/include/public/arch-x86/xen.h index 232d4a5..ee3b5da 100644 --- a/xen/include/public/arch-x86/xen.h +++ b/xen/include/public/arch-x86/xen.h @@ -231,6 +231,9 @@ struct arch_shared_info { * been set to invalid e.g. due to the p2m being too large for the 3-level * p2m tree. In this case the linear mapper p2m list anchored at p2m_vaddr * is to be used. + * There is no need for the guest to set pfn_to_mfn_frame_list_list when + * Xen indicates the support of the linear mapped p2m list by having set + * XEN_FEATURE_P2M_VIRTUAL in features. */ xen_pfn_t pfn_to_mfn_frame_list_list; unsigned long nmi_reason; @@ -259,6 +262,13 @@ struct arch_shared_info { /* There's no room for this field in the generic structure. */ uint32_t wc_sec_hi; #endif + /* Features supported by Xen (hypervisor and/or tools) */ + uint32_t features; + /* + * Xen supports the linear mapped p2m list, pfn_to_mfn_frame_list_list + * isn't required if p2m_cr3 and p2m_vaddr are specified by the guest. + */ +#define XEN_FEATURE_P2M_VIRTUAL (1 << 0) }; typedef struct arch_shared_info arch_shared_info_t; -- 2.1.4