Displaying 1 result from an estimated 1 matches for "readonly_gfn".
2009 Aug 06
2
[PATCH] hvm emul: fix cmpxchg emulation to use an atomic operation
...hvm/emulate.c Sun Aug 02 13:43:15 2009 +0100
+++ b/xen/arch/x86/hvm/emulate.c Thu Aug 06 11:39:37 2009 +0100
@@ -520,6 +520,183 @@
return X86EMUL_OKAY;
}
+/* Translate a VA to an MFN, injecting a page-fault if we fail */
+#define BAD_GVA_TO_GFN (~0UL)
+#define BAD_GFN_TO_MFN (~1UL)
+#define READONLY_GFN (~2UL)
+static mfn_t emulate_gva_to_mfn(
+ struct vcpu *v,
+ unsigned long vaddr)
+{
+ unsigned long gfn;
+ mfn_t mfn;
+ p2m_type_t p2mt;
+ uint32_t pfec = PFEC_page_present | PFEC_write_access;
+
+ /* Translate the VA to a GFN */
+ gfn = paging_gva_to_gfn(v, vaddr, &p...