Re: [PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-31 Thread Roedel, Joerg
On Mon, Mar 28, 2011 at 08:28:12AM -0400, Avi Kivity wrote: The spec indicates we need to check the TSS and IOPL based permissions before the intercept (vmx agrees). With the code as is, it happens afterwards. One way to do this is to have an ExtraChecks bit in the opcode::flags. Then

Re: [PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-31 Thread Avi Kivity
On 03/31/2011 09:14 AM, Roedel, Joerg wrote: On Mon, Mar 28, 2011 at 08:28:12AM -0400, Avi Kivity wrote: The spec indicates we need to check the TSS and IOPL based permissions before the intercept (vmx agrees). With the code as is, it happens afterwards. One way to do this is to have

Re: [PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-31 Thread Roedel, Joerg
On Thu, Mar 31, 2011 at 05:18:28AM -0400, Avi Kivity wrote: On 03/31/2011 09:14 AM, Roedel, Joerg wrote: On Mon, Mar 28, 2011 at 08:28:12AM -0400, Avi Kivity wrote: The spec indicates we need to check the TSS and IOPL based permissions before the intercept (vmx agrees). With the code

Re: [PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-31 Thread Avi Kivity
On 03/31/2011 11:42 AM, Roedel, Joerg wrote: On Thu, Mar 31, 2011 at 05:18:28AM -0400, Avi Kivity wrote: On 03/31/2011 09:14 AM, Roedel, Joerg wrote: On Mon, Mar 28, 2011 at 08:28:12AM -0400, Avi Kivity wrote: The spec indicates we need to check the TSS and IOPL based permissions

Re: [PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-31 Thread Roedel, Joerg
On Thu, Mar 31, 2011 at 06:03:37AM -0400, Avi Kivity wrote: On 03/31/2011 11:42 AM, Roedel, Joerg wrote: On Thu, Mar 31, 2011 at 05:18:28AM -0400, Avi Kivity wrote: On 03/31/2011 09:14 AM, Roedel, Joerg wrote: On Mon, Mar 28, 2011 at 08:28:12AM -0400, Avi Kivity wrote: The

[PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-28 Thread Joerg Roedel
This patch adds code to check for IOIO intercepts on instructions decoded by the KVM instruction emulator. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_emulate.h |4 arch/x86/kvm/emulate.c | 10 ++ arch/x86/kvm/svm.c

Re: [PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-28 Thread Avi Kivity
On 03/28/2011 12:46 PM, Joerg Roedel wrote: This patch adds code to check for IOIO intercepts on instructions decoded by the KVM instruction emulator. @@ -3926,6 +3926,10 @@ static struct __x86_intercept { [x86_intercept_iret]= PRE_EX(SVM_EXIT_IRET),

[PATCH 12/13] KVM: SVM: Add checks for IO instructions

2011-03-25 Thread Joerg Roedel
This patch adds code to check for IOIO intercepts on instructions decoded by the KVM instruction emulator. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/include/asm/kvm_emulate.h |4 arch/x86/kvm/emulate.c | 10 ++ arch/x86/kvm/svm.c