qemu-e2k/target-i386
Paolo Bonzini 44d066a2f7 target-i386: check for PKU even for non-writable pages
Xiao Guangrong ran kvm-unit-tests on an actual machine with PKU and
found that it fails:

test pte.p pte.user pde.p pde.user pde.a pde.pse pkru.wd pkey=1 user write efer.nx cr4.pke: FAIL: error code 27 expected 7
Dump mapping: address: 0x123400000000
------L4: 2ebe007
------L3: 2ebf007
------L2: 8000000020000a5

(All failures are combinations of "pde.user pde.p pkru.wd pkey=1",
plus either "pde.pse" or "pte.p pte.user", plus one of "user cr0.wp",
"cr0.wp" or "user", plus unimportant bits such as accessed/dirty or
efer.nx).

So PFEC.PKEY is set even if the ordinary check failed (which it did
because pde.w is zero).  Adjust QEMU to match behavior of silicon.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2016-04-08 00:07:56 +02:00
..
Makefile.objs target-i386: Enable control registers for MPX 2016-02-13 07:59:59 +11:00
TODO target-i386: fix {min,max}{pd,ps,sd,ss} SSE2 instructions 2012-01-11 09:55:28 +01:00
arch_dump.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
arch_memory_mapping.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
bpt_helper.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
cc_helper.c target-i386: Perform set/reset_inhibit_irq inline 2016-02-13 07:59:59 +11:00
cc_helper_template.h target-i386: Implement BLSR, BLSMSK, BLSI 2013-02-18 15:52:05 -08:00
cpu-qom.h all: Clean up includes 2016-02-23 12:43:05 +00:00
cpu.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
cpu.h target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
excp_helper.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
fpu_helper.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
gdbstub.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
helper.c target-i386: check for PKU even for non-writable pages 2016-04-08 00:07:56 +02:00
helper.h target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
hyperv.c target-i386/kvm: Hyper-V VMBus hypercalls blank handlers 2016-04-05 11:46:52 +02:00
hyperv.h target-i386/hyperv: Hyper-V SynIC SINT routing and vcpu exit 2015-12-17 15:24:34 +01:00
int_helper.c target-i386: Implement FSGSBASE 2016-02-15 14:50:00 +11:00
kvm-stub.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
kvm.c target-i386: assert that KVM_GET/SET_MSRS can set all requested MSRs 2016-04-05 11:46:52 +02:00
kvm_i386.h kvm: x86: add support for KVM_CAP_SPLIT_IRQCHIP 2015-12-17 17:33:47 +01:00
machine.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
mem_helper.c target-i386: Update BNDSTATUS for exceptions raised by BOUND 2016-02-15 14:50:00 +11:00
misc_helper.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
monitor.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
mpx_helper.c * Asynchronous dump-guest-memory from Peter 2016-02-25 15:30:57 +00:00
ops_sse.h target-i386: Rename XMM_[BWLSDQ] helpers to ZMM_* 2016-01-21 12:47:16 -02:00
ops_sse_header.h target-i386: Rename struct XMMReg to ZMMReg 2016-01-21 12:47:15 -02:00
seg_helper.c target-i386: Rewrite gen_enter inline 2016-02-09 15:46:54 +01:00
shift_helper_template.h target-i386: compute eflags outside rcl/rcr helper 2013-02-18 15:03:56 -08:00
smm_helper.c target-i386: Enable control registers for MPX 2016-02-13 07:59:59 +11:00
svm.h Use new macro QEMU_PACKED for packed structures 2011-09-03 10:45:59 +00:00
svm_helper.c x86: Clean up includes 2016-01-29 15:07:22 +00:00
translate.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00