On Sat, Mar 26, 2011 at 11:43:47AM +0200, Avi Kivity wrote:
> On 03/25/2011 11:29 AM, Joerg Roedel wrote:
>> This patch add intercept checks into the KVM instruction
>> emulator to check for the 8 instructions that access the
>> descriptor table addresses.
>>
>>
>> +static struct opcode group6[] = {
>> +    DI(ModRM,        sldt),
>> +    DI(ModRM,        str),
>> +    DI(ModRM | Priv, lldt),
>> +    DI(ModRM | Priv, ltr),
>> +    N, N, N, N,
>> +};
>> +
>>   static struct group_dual group7 = { {
>> -    N, N, DI(ModRM | SrcMem | Priv, lgdt), DI(ModRM | SrcMem | Priv, lidt),
>> +    DI(ModRM | DstMem | Priv, sgdt), DI(ModRM | DstMem | Priv, sidt),
>> +    DI(ModRM | SrcMem | Priv, lgdt), DI(ModRM | SrcMem | Priv, lidt),
>>      DI(SrcNone | ModRM | DstMem | Mov, smsw), N,
>>      DI(SrcMem16 | ModRM | Mov | Priv, lmsw),
>>      DI(SrcMem | ModRM | ByteOp | Priv | NoAccess, invlpg),
>
> You're adding decode info for instructions that aren't emulated.  Safe  
> AFAICT because of 'default: goto cannot_emulate', I guess.

Right, all that can happen is that the nested guest shoot itself in the
foot by getting an #UD. Same for the SVM instructions.

        Joerg
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to