From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH 07/13] KVM: SVM: Add intercept checks for descriptor table accesses Date: Sat, 26 Mar 2011 11:43:47 +0200 Message-ID: <4D8DB553.7080508@redhat.com> References: <1301045356-25257-1-git-send-email-joerg.roedel@amd.com> <1301045356-25257-8-git-send-email-joerg.roedel@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , kvm@vger.kernel.org To: Joerg Roedel Return-path: Received: from mx1.redhat.com ([209.132.183.28]:6002 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752595Ab1CZJnv (ORCPT ); Sat, 26 Mar 2011 05:43:51 -0400 In-Reply-To: <1301045356-25257-8-git-send-email-joerg.roedel@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: 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. -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.