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:
Andrew Cooper authored and Jan Beulich committed 2016-09-12 16:04:08 +02:00
1 parent 11c0462417
commit 57e7172bb9
2 files changed
+8

No files matched your search

+4
View File
@@ -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;
}
}
+4
View File
@@ -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;
}
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.