target/i386: Added consistency checks for EFER
authorLara Lazier <laramglazier@gmail.com>
Wed, 21 Jul 2021 15:26:51 +0000 (17:26 +0200)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 22 Jul 2021 12:44:47 +0000 (14:44 +0200)
commitd499f196fe97a6650ac5bd56811d2985c010e0d7
treeae4e4dd9bad15a34926c9e46bfd1b5a0f4600ed2
parent213ff024a2f92020290296cb9dc29c2af3d4a221
target/i386: Added consistency checks for EFER

EFER.SVME has to be set, and EFER reserved bits must
be zero.
In addition the combinations
 * EFER.LMA or EFER.LME is non-zero and the processor does not support LM
 * non-zero EFER.LME and CR0.PG and zero CR4.PAE
 * non-zero EFER.LME and CR0.PG and zero CR0.PE
 * non-zero EFER.LME, CR0.PG, CR4.PAE, CS.L and CS.D
are all invalid.
(AMD64 Architecture Programmer's Manual, V2, 15.5)

Signed-off-by: Lara Lazier <laramglazier@gmail.com>
Message-Id: <20210721152651.14683-3-laramglazier@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
target/i386/cpu.h
target/i386/tcg/sysemu/svm_helper.c