From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas K Lengyel Subject: [PATCH v4 03/16] xen: Relocate struct npfec definition into common Date: Fri, 5 Sep 2014 10:58:31 +0200 Message-ID: <1409907524-12509-4-git-send-email-tklengyel@sec.in.tum.de> References: <1409907524-12509-1-git-send-email-tklengyel@sec.in.tum.de> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1409907524-12509-1-git-send-email-tklengyel@sec.in.tum.de> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel@lists.xen.org Cc: ian.campbell@citrix.com, tim@xen.org, julien.grall@linaro.org, ian.jackson@eu.citrix.com, stefano.stabellini@citrix.com, andres@lagarcavilla.org, jbeulich@suse.com, dgdegra@tycho.nsa.gov, Tamas K Lengyel List-Id: xen-devel@lists.xenproject.org Nested page fault exception code definitions can be reused on ARM as well. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- xen/include/asm-x86/hvm/hvm.h | 1 + xen/include/asm-x86/mm.h | 21 --------------------- xen/include/xen/mm.h | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 21 deletions(-) diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 74e66f8..2701e35 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -27,6 +27,7 @@ #include #include #include +#include #include /* Interrupt acknowledgement sources. */ diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index ebd482d..bafd28c 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -551,27 +551,6 @@ void audit_domains(void); #endif -/* - * Extra fault info types which are used to further describe - * the source of an access violation. - */ -typedef enum { - npfec_kind_unknown, /* must be first */ - npfec_kind_in_gpt, /* violation in guest page table */ - npfec_kind_with_gla /* violation with guest linear address */ -} npfec_kind_t; - -/* - * Nested page fault exception codes. - */ -struct npfec { - unsigned int read_access:1; - unsigned int write_access:1; - unsigned int insn_fetch:1; - unsigned int gla_valid:1; - unsigned int kind:2; /* npfec_kind_t */ -}; - int new_guest_cr3(unsigned long pfn); void make_cr3(struct vcpu *v, unsigned long mfn); void update_cr3(struct vcpu *v); diff --git a/xen/include/xen/mm.h b/xen/include/xen/mm.h index 7c0efc7..74a65a6 100644 --- a/xen/include/xen/mm.h +++ b/xen/include/xen/mm.h @@ -88,6 +88,27 @@ int assign_pages( /* Dump info to serial console */ void arch_dump_shared_mem_info(void); +/* + * Extra fault info types which are used to further describe + * the source of an access violation. + */ +typedef enum { + npfec_kind_unknown, /* must be first */ + npfec_kind_in_gpt, /* violation in guest page table */ + npfec_kind_with_gla /* violation with guest linear address */ +} npfec_kind_t; + +/* + * Nested page fault exception codes. + */ +struct npfec { + unsigned int read_access:1; + unsigned int write_access:1; + unsigned int insn_fetch:1; + unsigned int gla_valid:1; + unsigned int kind:2; /* npfec_kind_t */ +}; + /* memflags: */ #define _MEMF_no_refcount 0 #define MEMF_no_refcount (1U<<_MEMF_no_refcount) -- 2.1.0