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
..
arch_dump.c
arch_memory_mapping.c
bpt_helper.c
cc_helper_template.h
cc_helper.c
cpu-qom.h
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
fpu_helper.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
gdbstub.c
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
int_helper.c
kvm_i386.h
kvm-stub.c
kvm.c target-i386: assert that KVM_GET/SET_MSRS can set all requested MSRs 2016-04-05 11:46:52 +02:00
machine.c
Makefile.objs
mem_helper.c
misc_helper.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00
monitor.c
mpx_helper.c
ops_sse_header.h
ops_sse.h
seg_helper.c
shift_helper_template.h
smm_helper.c
svm_helper.c
svm.h
TODO
translate.c target-i386: implement PKE for TCG 2016-03-24 14:01:08 +01:00