From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Roedel, Joerg" Subject: Re: [PATCH 2/2] KVM: SVM: Emulate next_rip svm feature Date: Wed, 28 Jul 2010 14:18:22 +0200 Message-ID: <20100728121822.GH26098@amd.com> References: <1280247261-19115-1-git-send-email-joerg.roedel@amd.com> <1280247261-19115-3-git-send-email-joerg.roedel@amd.com> <4C4F2643.8080507@redhat.com> <20100728093708.GD26098@amd.com> <4C500636.1070708@redhat.com> <20100728112540.GE26098@amd.com> <4C5015B3.8010003@redhat.com> <20100728115133.GG26098@amd.com> <4C501B30.6020900@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Cc: Marcelo Tosatti , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" To: Avi Kivity Return-path: Received: from va3ehsobe004.messaging.microsoft.com ([216.32.180.14]:29633 "EHLO VA3EHSOBE004.bigfish.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754699Ab0G1MPz (ORCPT ); Wed, 28 Jul 2010 08:15:55 -0400 Content-Disposition: inline In-Reply-To: <4C501B30.6020900@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On Wed, Jul 28, 2010 at 07:57:36AM -0400, Avi Kivity wrote: > If the instruction opcode is on mmio, the processor never sees the > opcode and thus can not intercept. Or the processor may see one > instruction, which is not intercepted, but by the time the emulator > kicks in a different instruction takes its place, since another vcpu is > evilly cross-modifying the code. Right. X-modifying code is a problem too. > The guest (L2 in this case) is doomed since it execution cannot > continue. But L1 and L0 are fine. The problem with L2 avoiding > intercepts is that L2 can change control registers and take over L1. Right too. We can not ignore it. The right fix is probably a check for the instruction intercepts right after the decoder has run and before the emulator ran. Joer -- Joerg Roedel - AMD Operating System Research Center Advanced Micro Devices GmbH Einsteinring 24 85609 Dornach General Managers: Alberto Bozzo, Andrew Bowd Registration: Dornach, Landkr. Muenchen; Registerger. Muenchen, HRB Nr. 43632