From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jan Kiszka Subject: Re: [PATCH] KVM: SVM: Keep intercepting task switching with NPT enabled Date: Tue, 01 Nov 2011 14:39:49 +0100 Message-ID: <4EAFF6A5.8050308@web.de> References: <4E9DA7EF.30804@siemens.com> <20111018163516.GO2198@amd.com> <4E9DB95C.1030105@redhat.com> <20111101111335.GD13244@amd.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig89D5F3CFEA9B432B094EC9F1" Cc: Avi Kivity , Marcelo Tosatti , kvm , Gleb Natapov To: "Roedel, Joerg" Return-path: Received: from fmmailgate03.web.de ([217.72.192.234]:39426 "EHLO fmmailgate03.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753618Ab1KANjy (ORCPT ); Tue, 1 Nov 2011 09:39:54 -0400 Received: from moweb001.kundenserver.de (moweb001.kundenserver.de [172.19.20.114]) by fmmailgate03.web.de (Postfix) with ESMTP id BD8B81A971C19 for ; Tue, 1 Nov 2011 14:39:52 +0100 (CET) In-Reply-To: <20111101111335.GD13244@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig89D5F3CFEA9B432B094EC9F1 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 c= an >>>> 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 touch= ed >>>> stack pages. >>>> >>>> Work around the issue by continuing to emulate task switches even in= >>>> NPT mode. >>>> >>>> Signed-off-by: Jan Kiszka >>> >>> Acked-by: Joerg Roedel >>> >> >> 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. >=20 > Actually, this isn't a bug. Please have a look at section 15.2.6 of the= > APM2: >=20 > 15.2.6 Restartable Instructions >=20 > SVM is designed to safely restart, with the exception of task switches,= > any intercepted instruction (either atomic or idempotent) after the > intercept. >=20 > 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 --------------enig89D5F3CFEA9B432B094EC9F1 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk6v9qUACgkQitSsb3rl5xRVuwCgmJ9xr6QoS8v5Yyg12264khOA HawAmwd4sNeGKkxCDwYKpPc8QKHDzN/o =T6kU -----END PGP SIGNATURE----- --------------enig89D5F3CFEA9B432B094EC9F1--