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

[PATCH] x86/shadow: sh_type_to_size[] needs L2H entry when HVM+PV32


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 23 Jan 2023 09:12:56 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=hwnSNtbVgtH/Q1KGLqJiOs0k3oDNWbq9OOtJzqQmaMA=; b=Ruhc4ai4waJrLGQnsA/N8JZnE1rzLaoE7QMBDvr9zhBBekJ6phAkqVGUwoBiUZ8rShIK5J9y6S+ROOoYfhRQ+rt5uVw7CmbwGjU6v3XSDoSardRd2HWNjfOu/rfgp9Sq4clgPz9BGdZManSMMVAuxpYgR0oee1BfI0PTBCBiiIe/ZsWcuuHxCEnu19yb+TNtGiMy1rF13z/uOxbQ3MN99svym/22rsOYcYkzQzeThvhAyPh12ySyKi05durZI3f7y9JRsPvUxCyMONfFRwHD9/T/Rf8hbuitVPdbIEJa0pNRqnfWNng4dfq31KhKwsKYj8FAMmnecdA4Mh3nB/Nyrg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Urj9IZp8efoUe0LDLudnnkCyLxYTNVKHOQo1QzDZImH7WLaYiomHuEbt8huKMrT/KiAsbsn4VArgBzp1vXjZlp5GgOBMDfMY1ovBlupzm8oLWG6vpE9UBnh58aZm1JSqEWafJOTENcL/ptrUSiNGYE79moNoZ+Xm6Bm9QPtWdk4/SQJpi8kwLxUrRNo3kyp/p3Y2cZo+brJTRDSOf5N6IIJ67ErzobC/XainSARwse2p6bjULFMydy/FmW7Je8q3m49ZFWDxJi/c4oXY9h+1HgIkY3EfxsQLnk2KoY0GL8ctlyPqWvImo5wxZ0G8RfQlEWV3xyJjpSQe+MKZ6n2AWA==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, George Dunlap <george.dunlap@xxxxxxxxxx>
  • Delivery-date: Mon, 23 Jan 2023 08:13:18 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

While the table is used only when HVM=y, the table entry of course needs
to be properly populated when also PV32=y. Fully removing the table
entry we therefore wrong.

Fixes: 1894049fa283 ("x86/shadow: L2H shadow type is PV32-only")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/mm/shadow/hvm.c
+++ b/xen/arch/x86/mm/shadow/hvm.c
@@ -56,7 +56,9 @@ const uint8_t sh_type_to_size[] = {
     [SH_type_l1_64_shadow]   = 1,
     [SH_type_fl1_64_shadow]  = 1,
     [SH_type_l2_64_shadow]   = 1,
-/*  [SH_type_l2h_64_shadow]  = 1,  PV32-only */
+#ifdef CONFIG_PV32
+    [SH_type_l2h_64_shadow]  = 1,
+#endif
     [SH_type_l3_64_shadow]   = 1,
     [SH_type_l4_64_shadow]   = 1,
     [SH_type_p2m_table]      = 1,



 


Rackspace

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