From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1aMc04-0000or-Jr for mharc-grub-devel@gnu.org; Fri, 22 Jan 2016 08:43:40 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51513) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMc02-0000nU-FR for grub-devel@gnu.org; Fri, 22 Jan 2016 08:43:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aMbzy-0001Pp-EX for grub-devel@gnu.org; Fri, 22 Jan 2016 08:43:38 -0500 Received: from smtp.citrix.com ([66.165.176.89]:12261) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aMbzy-0001Ph-AC for grub-devel@gnu.org; Fri, 22 Jan 2016 08:43:34 -0500 X-IronPort-AV: E=Sophos;i="5.22,331,1449532800"; d="scan'208";a="327049920" Subject: Re: [Xen-devel] [BUG] XEN domU crash when PV grub chainloads 32-bit domU grub To: =?UTF-8?Q?Vladimir_'=cf=86-coder/phcoder'_Serbinenko?= , Ian Campbell , References: <5600628A.20202@zappa.cx> <1442912018.10338.118.camel@citrix.com> <56A226F8.3020301@gmail.com> <56A22847.3020708@citrix.com> <56A229DA.7030904@gmail.com> From: Andrew Cooper X-Enigmail-Draft-Status: N1110 Message-ID: <56A23203.4000902@citrix.com> Date: Fri, 22 Jan 2016 13:43:31 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Icedove/38.5.0 MIME-Version: 1.0 In-Reply-To: <56A229DA.7030904@gmail.com> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-DLP: MIA2 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 66.165.176.89 Cc: Andreas Sundstrom , xen-devel@lists.xen.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 22 Jan 2016 13:43:39 -0000 On 22/01/16 13:08, Vladimir 'φ-coder/phcoder' Serbinenko wrote: > On 22.01.2016 14:01, Andrew Cooper wrote: >> On 22/01/16 12:56, Vladimir 'φ-coder/phcoder' Serbinenko wrote: >>> On 22.09.2015 10:53, Ian Campbell wrote: >>>> Hi Vladimir & grub-devel, >>>> >>>> Do you have any thoughts on this issue with i386 pv-grub2? >>>> >>> Is it still an issue? If so I'll try to replicate it. From stack dump I >>> see that it has jumped to NULL. GRUB has no threads so it's not a race >>> condition with itself but may be one with some Xen part. An altrnative >>> possibility is that grub forgets to flush cache at some point in boot >>> process. >> Looks like GRUB doesn't have a traptable registered with Xen (the PV >> equivalent of the IDT). >> >> First, Xen tried to inject a #GP fault and found that the entry EIP was >> at 0 (which is sadly the default if nothing is specified). It then took >> a pagefault while attempting to inject the #GP, and crashed the domain. >> > Do you have a link how to add one? We can put a catch-stacktrace-abort > on it. This is from my microkernel framework, and is probably the most succinct code implementation: http://xenbits.xen.org/gitweb/?p=people/andrewcoop/xen-test-framework.git;a=blob;f=arch/x86/pv/traps.c;h=7f9a1908d260659c10f5cbb1d2d234c9fea1edb5;hb=HEAD#l31 The hypercall ABI documentation is: http://xenbits.xen.org/gitweb/?p=xen.git;a=blob;f=xen/include/public/arch-x86/xen.h;h=cdd93c1c6446a92e89188c6a5132538188825d27;hb=refs/heads/staging#l126 ~Andrew