Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gND5X-0004aA-4m for mharc-grub-devel@gnu.org; Thu, 15 Nov 2018 03:33:23 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51847) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gND5U-0004ZF-Q2 for grub-devel@gnu.org; Thu, 15 Nov 2018 03:33:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gND5P-0006Wy-Ki for grub-devel@gnu.org; Thu, 15 Nov 2018 03:33:20 -0500 Received: from smtp.ctxuk.citrix.com ([185.25.65.24]:22411 helo=SMTP.EU.CITRIX.COM) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gND5P-0006Uv-9c for grub-devel@gnu.org; Thu, 15 Nov 2018 03:33:15 -0500 X-IronPort-AV: E=Sophos;i="5.56,235,1539648000"; d="scan'208";a="81891774" Date: Thu, 15 Nov 2018 09:33:04 +0100 From: Roger Pau =?utf-8?B?TW9ubsOp?= To: Juergen Gross CC: , , , , Subject: Re: [Xen-devel] [PATCH v4 10/19] xen: setup hypercall page for PVH Message-ID: <20181115083304.zty3xor4j4nthhvt@mac> References: <20181102123738.16395-1-jgross@suse.com> <20181102123738.16395-11-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20181102123738.16395-11-jgross@suse.com> User-Agent: NeoMutt/20180716 X-ClientProxiedBy: AMSPEX02CAS01.citrite.net (10.69.22.112) To AMSPEX02CL02.citrite.net (10.69.22.126) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 185.25.65.24 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Nov 2018 08:33:21 -0000 On Fri, Nov 02, 2018 at 01:37:29PM +0100, Juergen Gross wrote: > Add the needed code to setup the hypercall page for calling into the > Xen hypervisor. > > Signed-off-by: Juergen Gross Thanks, LGTM, just one suggestion and one question. > --- > V3: grub_xen_early_halt->grub_xen_panic (Roger Pau Monné) > issue panic message (Roger Pau Monné) > rewrite grub_xen_hypercall to avoid register variables (Daniel Kiper) > --- > grub-core/kern/i386/xen/pvh.c | 69 +++++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 69 insertions(+) > > diff --git a/grub-core/kern/i386/xen/pvh.c b/grub-core/kern/i386/xen/pvh.c > index ac6181f4e..7e90a4538 100644 > --- a/grub-core/kern/i386/xen/pvh.c > +++ b/grub-core/kern/i386/xen/pvh.c > @@ -20,14 +20,83 @@ > #include > #include > #include > +#include > +#include > #include > #include > > +#define XEN_CONSOLE_PORT 0xe9 This is now part of the public headers (XEN_HVM_DEBUGCONS_IOPORT) if you wish to pick it up from there. > + > grub_uint64_t grub_rsdp_addr; > > +static char hypercall_page[GRUB_XEN_PAGE_SIZE] > + __attribute__ ((aligned (GRUB_XEN_PAGE_SIZE))); > + > +static grub_uint32_t xen_cpuid_base; > + > +static void > +grub_xen_panic (const char *msg) > +{ > + const char *c; > + > + for (c = msg; *c; c++) > + grub_outb (*c, XEN_CONSOLE_PORT); > + > + asm volatile ("hlt"); Should this be "cli; hlt;", or does grub always runs with interrupt flag clear? Thanks, Roger.