mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
hvm/fep: Allow testing of instructions crossing the -1 -> 0 virtual boundary
The Force Emulation Prefix is named to follow its PV counterpart for cpuid or
rdtsc, but isn't really an instruction prefix. It behaves as a break-out into
Xen, with the purpose of emulating the next instruction in the current state.
It is important to be able to test legal situations which occur in real
hardware, including instruction which cross certain boundaries, and
instructions starting at 0.
Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
master commit: 7b5cee79da
master date: 2016-09-08 16:39:46 +0100
This commit is contained in:
1 parent
11c0462417
commit
57e7172bb9
2 files changed
+8
No files matched your search
@@ -2136,6 +2136,10 @@ static void svm_vmexit_ud_intercept(struct cpu_user_regs *regs)
|
||||
{
|
||||
regs->eip += sizeof(sig);
|
||||
regs->eflags &= ~X86_EFLAGS_RF;
|
||||
|
||||
/* Zero the upper 32 bits of %rip if not in long mode. */
|
||||
if ( svm_guest_x86_mode(current) != 8 )
|
||||
regs->eip = regs->_eip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2554,6 +2554,10 @@ static void vmx_vmexit_ud_intercept(struct cpu_user_regs *regs)
|
||||
{
|
||||
regs->eip += sizeof(sig);
|
||||
regs->eflags &= ~X86_EFLAGS_RF;
|
||||
|
||||
/* Zero the upper 32 bits of %rip if not in long mode. */
|
||||
if ( vmx_guest_x86_mode(current) != 8 )
|
||||
regs->eip = regs->_eip;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||