All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@web.de>
To: "Roedel, Joerg" <Joerg.Roedel@amd.com>
Cc: Avi Kivity <avi@redhat.com>,
	Marcelo Tosatti <mtosatti@redhat.com>, kvm <kvm@vger.kernel.org>,
	Gleb Natapov <gleb@redhat.com>
Subject: Re: [PATCH] KVM: SVM: Keep intercepting task switching with NPT enabled
Date: Tue, 01 Nov 2011 14:39:49 +0100	[thread overview]
Message-ID: <4EAFF6A5.8050308@web.de> (raw)
In-Reply-To: <20111101111335.GD13244@amd.com>

[-- Attachment #1: Type: text/plain, Size: 1597 bytes --]

On 2011-11-01 12:13, Roedel, Joerg wrote:
> On Tue, Oct 18, 2011 at 01:37:32PM -0400, Avi Kivity wrote:
>> On 10/18/2011 06:35 PM, Roedel, Joerg wrote:
>>> On Tue, Oct 18, 2011 at 12:23:11PM -0400, Jan Kiszka wrote:
>>>> AMD processors apparently have a bug in the hardware task switching
>>>> support when NPT is enabled. If the task switch triggers a NPF, we can
>>>> get wrong EXITINTINFO along with that fault. On resume, spurious
>>>> exceptions may then be injected into the guest.
>>>>
>>>> We were able to reproduce this bug when our guest triggered #SS and the
>>>> handler were supposed to run over a separate task with not yet touched
>>>> stack pages.
>>>>
>>>> Work around the issue by continuing to emulate task switches even in
>>>> NPT mode.
>>>>
>>>> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
>>>
>>> Acked-by: Joerg Roedel <joerg.roedel@amd.com>
>>>
>>
>> Will there be an erratum published for this bug?  Are all processors
>> affected?
>>
>> I'd like to limit this to just the buggy processors, if and when fixed
>> processors become available.
> 
> Actually, this isn't a bug. Please have a look at section 15.2.6 of the
> APM2:
> 
> 15.2.6 Restartable Instructions
> 
> SVM is designed to safely restart, with the exception of task switches,
> any intercepted instruction (either atomic or idempotent) after the
> intercept.
> 
> So SVM does not guarantee that an intercept during a task-switch can be
> restarted.

Not a bug but still a deficit as it makes hardware-assisted task
switching practically useless, no?

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]

  reply	other threads:[~2011-11-01 13:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-18 16:23 [PATCH] KVM: SVM: Keep intercepting task switching with NPT enabled Jan Kiszka
2011-10-18 16:35 ` Roedel, Joerg
2011-10-18 17:37   ` Avi Kivity
2011-10-19 14:12     ` Roedel, Joerg
2011-11-01 11:13     ` Roedel, Joerg
2011-11-01 13:39       ` Jan Kiszka [this message]
2011-11-01 15:30         ` Roedel, Joerg
2011-11-01 15:49           ` Jan Kiszka
2011-11-01 16:15             ` Roedel, Joerg
2011-11-01 18:22               ` Jan Kiszka
2011-11-02  9:55                 ` Roedel, Joerg
2011-11-02  9:59                   ` Jan Kiszka
2011-11-02 10:04                   ` Avi Kivity
2011-10-27 12:40 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4EAFF6A5.8050308@web.de \
    --to=jan.kiszka@web.de \
    --cc=Joerg.Roedel@amd.com \
    --cc=avi@redhat.com \
    --cc=gleb@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.