Christoph Egger
2007-Oct-01 15:33 UTC
[Xen-devel] [PATCH][HVM][SVM] Fix machine check intercept correctly
Hi! Attached patch fixes machine check interception for HVM guests. Keir: Please apply this patch to xen-staging *and* to Xen 3.1.1 Signed-off-by: Christoph Egger <Christoph.Egger@amd.com> -- AMD Saxony, Dresden, Germany Operating System Research Center Legal Information: AMD Saxony Limited Liability Company & Co. KG Sitz (Geschäftsanschrift): Wilschdorfer Landstr. 101, 01109 Dresden, Deutschland Registergericht Dresden: HRA 4896 vertretungsberechtigter Komplementär: AMD Saxony LLC (Sitz Wilmington, Delaware, USA) Geschäftsführer der AMD Saxony LLC: Dr. Hans-R. Deppe, Thomas McCoy _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Oct-01 16:10 UTC
Re: [Xen-devel] [PATCH][HVM][SVM] Fix machine check intercept correctly
On 1/10/07 16:33, "Christoph Egger" <Christoph.Egger@amd.com> wrote:> Hi! > > Attached patch fixes machine check interception > for HVM guests. > > Keir: Please apply this patch to xen-staging *and* to Xen 3.1.1First chunk (adding TRAP_machine_check to exception intercepts) is not needed as that bit is already in HVM_TRAP_MASK. Also why remove the invocation of do_machine_check()? That is the function that actually handles the #MC. -- Keir _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Woller, Thomas
2007-Oct-01 16:17 UTC
RE: [Xen-devel] [PATCH][HVM][SVM] Fix machine check intercept correctly
In theory the MCE that occurs in SVM partition, will be held pending until the VMEXIT occurs, and then released when the STGI instruction is executed, rendering any VMEXIT code non-useful. Same as the NMI handling. I might be missing something here, but the do_machine_check() will be executed in the context of the hv trap handlers immediately after STGI instruction, so we don''t want to call it twice in the vmexit handler code. (?) tom> -----Original Message----- > From: xen-devel-bounces@lists.xensource.com > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of > Keir Fraser > Sent: Monday, October 01, 2007 11:11 AM > To: Egger, Christoph; xen-devel@lists.xensource.com > Subject: Re: [Xen-devel] [PATCH][HVM][SVM] Fix machine check > intercept correctly > > On 1/10/07 16:33, "Christoph Egger" <Christoph.Egger@amd.com> wrote: > > > Hi! > > > > Attached patch fixes machine check interception for HVM guests. > > > > Keir: Please apply this patch to xen-staging *and* to Xen 3.1.1 > > First chunk (adding TRAP_machine_check to exception > intercepts) is not needed as that bit is already in > HVM_TRAP_MASK. Also why remove the invocation of > do_machine_check()? That is the function that actually > handles the #MC. > > -- Keir > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
Keir Fraser
2007-Oct-02 05:37 UTC
Re: [Xen-devel] [PATCH][HVM][SVM] Fix machine check intercept correctly
The documentation is unclear on what happens to #MC. Certainly it is held pending if GIF==0, but the manual does not explicitly say that #MC is held pending on vmexit. Is it possible to inject a #MC, to test what happens? That would be very handy, otherwise the code path basically gets no testing. :-) -- Keir On 1/10/07 17:17, "Woller, Thomas" <thomas.woller@amd.com> wrote:> In theory the MCE that occurs in SVM partition, will be held pending > until the VMEXIT occurs, and then released when the STGI instruction is > executed, rendering any VMEXIT code non-useful. Same as the NMI > handling. I might be missing something here, but the do_machine_check() > will be executed in the context of the hv trap handlers immediately > after STGI instruction, so we don''t want to call it twice in the vmexit > handler code. (?) > tom > >> -----Original Message----- >> From: xen-devel-bounces@lists.xensource.com >> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of >> Keir Fraser >> Sent: Monday, October 01, 2007 11:11 AM >> To: Egger, Christoph; xen-devel@lists.xensource.com >> Subject: Re: [Xen-devel] [PATCH][HVM][SVM] Fix machine check >> intercept correctly >> >> On 1/10/07 16:33, "Christoph Egger" <Christoph.Egger@amd.com> wrote: >> >>> Hi! >>> >>> Attached patch fixes machine check interception for HVM guests. >>> >>> Keir: Please apply this patch to xen-staging *and* to Xen 3.1.1 >> >> First chunk (adding TRAP_machine_check to exception >> intercepts) is not needed as that bit is already in >> HVM_TRAP_MASK. Also why remove the invocation of >> do_machine_check()? That is the function that actually >> handles the #MC. >> >> -- Keir >> >> >> >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> >> >> > >_______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel