|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [PATCH v8 06/12] x86/HVM: make hvmemul_blk() capable of handling r/o operations
In preparation for handling e.g. FLDENV or {F,FX,X}RSTOR here as well.
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v8: New (could be folded into "x86emul: support MOVDIR{I,64B} insns",
but would invalidate Paul's R-b there).
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -1453,7 +1453,7 @@ static int hvmemul_blk(
struct hvm_emulate_ctxt *hvmemul_ctxt =
container_of(ctxt, struct hvm_emulate_ctxt, ctxt);
unsigned long addr;
- uint32_t pfec = PFEC_page_present | PFEC_write_access;
+ uint32_t pfec = PFEC_page_present;
int rc;
void *mapping = NULL;
@@ -1462,6 +1462,9 @@ static int hvmemul_blk(
if ( rc != X86EMUL_OKAY || !bytes )
return rc;
+ if ( x86_insn_is_mem_write(state, ctxt) )
+ pfec |= PFEC_write_access;
+
if ( is_x86_system_segment(seg) )
pfec |= PFEC_implicit;
else if ( hvmemul_ctxt->seg_reg[x86_seg_ss].dpl == 3 )
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |