From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1gKmdF-00032j-ND for mharc-grub-devel@gnu.org; Thu, 08 Nov 2018 10:54:09 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:55283) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gKmdE-00031y-Di for grub-devel@gnu.org; Thu, 08 Nov 2018 10:54:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gKmd8-0003lC-S4 for grub-devel@gnu.org; Thu, 08 Nov 2018 10:54:08 -0500 Received: from userp2130.oracle.com ([156.151.31.86]:56284) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gKmd8-0003k3-Iu for grub-devel@gnu.org; Thu, 08 Nov 2018 10:54:02 -0500 Received: from pps.filterd (userp2130.oracle.com [127.0.0.1]) by userp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id wA8FmvBW124665; Thu, 8 Nov 2018 15:53:59 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=date : from : to : cc : subject : message-id : references : mime-version : content-type : in-reply-to; s=corp-2018-07-02; bh=KKkQkCPQMPIf/A4c1vgVbTZbID6ooz+5HXsTVSULhFY=; b=A8+trDJUQKV5Mm75UlBpMCvAn1UvEAaeg6Cmm3jjGTSPiuCWNgwu33ZgrzgNjhnBhyFA yaV9yhgTolGFCqLMgl0+qB4KEppRAXYsw2FoUUl0dqtWDyYq4nXYnoPGCJVVwsBwVbN8 LeaUVP+k5+UA3WGmAc+ziWJ8db9uNnb1i3n1q3oJ0TnfD/LoqF8obC4bdumqTdLmEHwq UV9R3U6G5iNQfxlLFzMdm/rnN38KqjcoFolr8KmghAafkkKEsNBh6ThBf6fx3yeRTmpz /FJbZwMLRmzNBjCvpjWlvrYuu2fFUse+sGob0AZlmqhLfzjjjXpEjTAjLnptZ35RKnrC cQ== Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp2130.oracle.com with ESMTP id 2nh33ua8hb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 08 Nov 2018 15:53:59 +0000 Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.14.4/8.14.4) with ESMTP id wA8FrrRq008478 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 8 Nov 2018 15:53:53 GMT Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by aserv0121.oracle.com (8.14.4/8.13.8) with ESMTP id wA8FrrPA027158; Thu, 8 Nov 2018 15:53:53 GMT Received: from olila.i.net-space.pl (/10.175.185.5) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 08 Nov 2018 07:53:47 -0800 Date: Thu, 8 Nov 2018 16:53:40 +0100 From: Daniel Kiper To: Juergen Gross Cc: grub-devel@gnu.org, xen-devel@lists.xen.org, phcoder@gmail.com, hans@knorrie.org Subject: Re: [PATCH v4 09/19] xen: add PVH boot entry code Message-ID: <20181108155340.GI4487@olila.i.net-space.pl> References: <20181102123738.16395-1-jgross@suse.com> <20181102123738.16395-10-jgross@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20181102123738.16395-10-jgross@suse.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=9070 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1811080133 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [generic] X-Received-From: 156.151.31.86 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, 08 Nov 2018 15:54:09 -0000 On Fri, Nov 02, 2018 at 01:37:28PM +0100, Juergen Gross wrote: > Add the code for the Xen PVH mode boot entry. > > Signed-off-by: Juergen Gross One nitpick below. Otherwise Reviewed-by: Daniel Kiper > --- > V3: clear %fs and %gs, too (Daniel Kiper) > use GRUB_MEMORY_MACHINE_PROT_STACK_SIZE for stack size (Daniel Kiper) > --- > grub-core/kern/i386/xen/startup_pvh.S | 52 +++++++++++++++++++++++++++++++++++ > 1 file changed, 52 insertions(+) > > diff --git a/grub-core/kern/i386/xen/startup_pvh.S b/grub-core/kern/i386/xen/startup_pvh.S > index 69b8fdcca..417655990 100644 > --- a/grub-core/kern/i386/xen/startup_pvh.S > +++ b/grub-core/kern/i386/xen/startup_pvh.S > @@ -19,11 +19,63 @@ > > #include > #include > +#include > > .file "startup_pvh.S" > .text > + .globl start, _start > + .code32 > > +start: > +_start: > + cld > + lgdt gdtdesc > + ljmp $GRUB_MEMORY_MACHINE_PROT_MODE_CSEG, $1f > +1: > + movl $GRUB_MEMORY_MACHINE_PROT_MODE_DSEG, %eax > + mov %eax, %ds > + mov %eax, %es > + mov %eax, %ss > + mov %eax, %fs > + mov %eax, %gs I would do this in that order: mov %eax, %ds mov %eax, %es mov %eax, %fs mov %eax, %gs mov %eax, %ss Daniel