From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tamas K Lengyel Subject: [PATCH for-4.5 v8 02/19] xen: Relocate struct npfec definition into common Date: Tue, 23 Sep 2014 15:14:13 +0200 Message-ID: <1411478070-13836-3-git-send-email-tklengyel@sec.in.tum.de> References: <1411478070-13836-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: <1411478070-13836-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 Acked-by: Tim Deegan --- xen/include/asm-x86/hvm/hvm.h | 2 +- xen/include/asm-x86/mm.h | 21 --------------------- xen/include/xen/mm.h | 21 +++++++++++++++++++++ 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h index 405f1f0..1a9bfd4 100644 --- a/xen/include/asm-x86/hvm/hvm.h +++ b/xen/include/asm-x86/hvm/hvm.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include /* Interrupt acknowledgement sources. */ enum hvm_intsrc { diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h index aae63ee..dca298f 100644 --- a/xen/include/asm-x86/mm.h +++ b/xen/include/asm-x86/mm.h @@ -549,27 +549,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