This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] [PATCH] xen svm: fix PAUSE instruction intercept

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] [PATCH] xen svm: fix PAUSE instruction intercept
From: Christoph Egger <Christoph.Egger@xxxxxxx>
Date: Thu, 12 Aug 2010 14:50:52 +0200
Cc: Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Thu, 12 Aug 2010 05:51:54 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4C63E41A020000780000F773@xxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <201008121122.36706.Christoph.Egger@xxxxxxx> <4C63E41A020000780000F773@xxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: KMail/1.9.10
On Thursday 12 August 2010 12:07:54 Jan Beulich wrote:
> >>> On 12.08.10 at 11:22, Christoph Egger <Christoph.Egger@xxxxxxx> wrote:
> >
> > In svm_vmexit_do_pause() update the instruction pointer.
> > This fixes strange PAUSE intercepts on UP guests.
> This won't work when the instruction needs to actually be decoded:
> __get_instruction_length_from_list() strips all prefix bytes from
> the byte stream being decoded, and since 'pause' uses a prefix the
> actual opcode comparison will never produce a match.

Thank you for pointing this out. New attached version fixes this.

Signed-off-by: Christoph Egger <Christoph.Egger@xxxxxxx>

> Even in the case that CPUs supporting the pause filter would always
> support nextrip I think that the special case minimally deserves a
> code comment to that effect, but perhaps even warrants an
> ASSERT() or BUG_ON().

This is true for real hardware but not necessarily when it comes
to nested virtualization, because you emulate SVM features
in software.


---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

Attachment: xen_pausefilter.diff
Description: Text Data

Xen-devel mailing list
<Prev in Thread] Current Thread [Next in Thread>