* [PATCH] nestedsvm: update rip on invlpga intercept
@ 2011-05-11 13:28 Christoph Egger
0 siblings, 0 replies; only message in thread
From: Christoph Egger @ 2011-05-11 13:28 UTC (permalink / raw)
To: xen-devel@lists.xensource.com
[-- Attachment #1: Type: text/plain, Size: 381 bytes --]
Hi,
update rip on invlpga intercept. Fixes endless loop.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
--
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
[-- Attachment #2: xen_nh_invlpga.diff --]
[-- Type: text/plain, Size: 1688 bytes --]
diff -r 0c60c61ff836 xen/arch/x86/hvm/svm/emulate.c
--- a/xen/arch/x86/hvm/svm/emulate.c Tue May 10 11:42:02 2011 +0200
+++ b/xen/arch/x86/hvm/svm/emulate.c Wed May 11 15:25:51 2011 +0200
@@ -107,6 +107,7 @@ MAKE_INSTR(VMLOAD, 3, 0x0f, 0x01, 0xda);
MAKE_INSTR(VMSAVE, 3, 0x0f, 0x01, 0xdb);
MAKE_INSTR(STGI, 3, 0x0f, 0x01, 0xdc);
MAKE_INSTR(CLGI, 3, 0x0f, 0x01, 0xdd);
+MAKE_INSTR(INVLPGA,3, 0x0f, 0x01, 0xdf);
static const u8 *opc_bytes[INSTR_MAX_COUNT] =
{
@@ -126,6 +127,7 @@ static const u8 *opc_bytes[INSTR_MAX_COU
[INSTR_VMSAVE] = OPCODE_VMSAVE,
[INSTR_STGI] = OPCODE_STGI,
[INSTR_CLGI] = OPCODE_CLGI,
+ [INSTR_INVLPGA] = OPCODE_INVLPGA,
};
static int fetch(struct vcpu *v, u8 *buf, unsigned long addr, int len)
diff -r 0c60c61ff836 xen/arch/x86/hvm/svm/svm.c
--- a/xen/arch/x86/hvm/svm/svm.c Tue May 10 11:42:02 2011 +0200
+++ b/xen/arch/x86/hvm/svm/svm.c Wed May 11 15:25:51 2011 +0200
@@ -1993,7 +1990,10 @@ asmlinkage void svm_vmexit_handler(struc
break;
case VMEXIT_INVLPGA:
+ if ( (inst_len = __get_instruction_length(v, INSTR_INVLPGA)) == 0 )
+ break;
svm_invlpga_intercept(v, regs->eax, regs->ecx);
+ __update_guest_eip(regs, inst_len);
break;
case VMEXIT_VMMCALL:
diff -r 0c60c61ff836 xen/include/asm-x86/hvm/svm/emulate.h
--- a/xen/include/asm-x86/hvm/svm/emulate.h Tue May 10 11:42:02 2011 +0200
+++ b/xen/include/asm-x86/hvm/svm/emulate.h Wed May 11 15:25:51 2011 +0200
@@ -38,6 +38,7 @@ enum instruction_index {
INSTR_VMSAVE,
INSTR_STGI,
INSTR_CLGI,
+ INSTR_INVLPGA,
INSTR_MAX_COUNT /* Must be last - Number of instructions supported */
};
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-05-11 13:28 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 13:28 [PATCH] nestedsvm: update rip on invlpga intercept Christoph Egger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).