[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v3] x86/boot: Preserve the value clobbered by the load-base calculation


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jason Andryuk <jason.andryuk@xxxxxxx>
  • Date: Fri, 23 Aug 2024 10:40:50 -0400
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=citrix.com smtp.mailfrom=amd.com; dmarc=pass (p=quarantine sp=quarantine pct=100) action=none header.from=amd.com; dkim=none (message not signed); arc=none (0)
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Bzw4QZPEdg8C27i8Oyu3omeaQNrlZDb2Q1elQN1jYSs=; b=EWrkjn0GsPv0D2gqIDqhN8P16pourBbxCUiPAVCOD4xqob5IvNi4KzKWlQZVvdVSA1HIP7Q469WbB64r4ky2Ui8axmbVoDjE5x9fG6LvOND+gxkKj/VmYpI4RP1/1xuaTv+nFzXFW5+3PqEH1IsdRwITGeXBkv4H8kXv2kxYuzkPuIADSmDz3IQXbAFFq9gHpAdEHXxYSlYm0kbFPiNXAkZsG4B4Aho1lo96XwyQC72ihCLg+1Gq4NySDtEB8+Xj/S/BcmmSfMM6IIJWylEjjUjonvqKo37YB/7PUGuD+YkU6XL2tTxNab77+zAlXENykR1/auBhWlz5HXUzAzPk5A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Bxg6uinkXE41OQXLyElJufHxwMcWq84co5Dlk8GnDtEc48OxW45OOL5qYepQUCZ0rqT0k11Z6Z0u1kqzScRr08R2SkajhiZ+ZxUey9BppDHIX5752+7BP6g/nSwcGQbc/nk6BNSuRGF18VVLmE+Ef4OGgOeFRLCvVtXQlQvU7NtcOj2Ts6iG9PftNuTaQbVtcvdvUCDbUsSAAlvjWQy7px5VFgaq8JigV7lv1ID3iKJtlzOq2V276GQgpFIWMl2gv415Sve2301abgvlB98zdp6X4tEX0f5TWoe+1Rt9RPfYMQ1sIuRo5L4vpm7lJh1wSUa6Hrd6TcyneOsrK3+CDw==
  • Cc: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 23 Aug 2024 14:41:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 2024-08-23 09:10, Andrew Cooper wrote:
From: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>

Right now, Xen clobbers the value at 0xffc when performing it's load-base
calculation.  We've got plenty of free registers at this point, so the value
can be preserved easily.

This fixes a real bug booting under Coreboot+SeaBIOS, where 0xffc happens to
be the cbmem pointer (e.g. Coreboot's dmesg ring, among other things).

However, there's also a better choice of memory location to use than 0xffc, as
all our supported boot protocols have a pointer to an info structure in %ebx.

Update the documentation to match.

Fixes: 1695e53851e5 ("x86/boot: Fix the boot time relocation calculations")
Fixes: d96bb172e8c9 ("x86/entry: Early PVH boot code")
Signed-off-by: Frediano Ziglio <frediano.ziglio@xxxxxxxxx>
Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>

Reviewed-by: Jason Andryuk <jason.andryuk@xxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.