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

[PATCH v2] x86/PV32: fix physdev_op_compat handling


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Mon, 11 Oct 2021 10:20:41 +0200
  • 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=wXp4WejUo1gQalHqC0ptBAcKhLpjEL68Gg6QYPuu8qo=; b=CXP/iNDsef0hYg95S8WChVX6tzUEJWgNiBvl5lrq10ZZt6TUrHBIYymd2XYGTxSajJbTrSc6HEry/28H/ZOHETPVMXOPHz1K9aTjGIVcs4hx2K2nKgyiaMkBClWRIf/iPtv/92pBA0izkfnU17gnQ9Ym01ouPAHKp2eYyGYpLoj3u4bfossveWCzJmUM36VMDOMpWVRfakBisFGKa9BtnwHYpc6zno0SdrWF7Eq5t88TBfUpLeZdXfYR26dUMVASfNAE7OtYk2x2I6RRMichwdsaC5m1NFZZ/GNO1kanpi8aEjuYgvwWqUs5tEzuhKGjF/4QgmWUxFrEjau7yJOHDg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=SWMh82GmDCqvVbBzXJAzDF5g4jX2sE2r7V+LALWO+eLEYmBGp926wMJkYDIgTKw65pAI3+IQOx901LZRnfmq5OvAaFbYWgHfVdE6omuBhrcPzZIN8uC6/CyEXlk59f6nKvBs3IexX26fv8IXYb0+PbrN16r3p6oe+MG3BYDqVvRLf6AU0yXamn8097g+kwRWSnqbTicdrlLcrmeIz0WnicGj6udtt/Hxfj+ppzqU/c4po3eaFeD96L9/vvb/F+N6oy3NLUR4HczWDz9Y1SS2yNQDhI4lN2LKFKmZWwbkmR3nG28VoTzV2iTFlCWCM1Kxle0bCYGlE99uq3e1XZ697Q==
  • Authentication-results: citrix.com; dkim=none (message not signed) header.d=none;citrix.com; dmarc=none action=none header.from=suse.com;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 11 Oct 2021 08:20:46 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

The conversion of the original code failed to recognize that the 32-bit
compat variant of this (sorry, two different meanings of "compat" here)
needs to continue to invoke the compat handler, not the native one.
Arrange for this by adding yet another #define.

Affected functions (having existed prior to the introduction of the new
hypercall) are PHYSDEVOP_set_iobitmap and PHYSDEVOP_apic_{read,write}.
For all others the operand struct layout doesn't differ.

Fixes: 1252e2823117 ("x86/pv: Export pv_hypercall_table[] rather than working 
around it in several ways")
Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v2: Don't remove do_physdev_op override.

--- a/xen/arch/x86/x86_64/compat.c
+++ b/xen/arch/x86/x86_64/compat.c
@@ -12,6 +12,7 @@ EMIT_FILE;
 #define physdev_op_t                  physdev_op_compat_t
 #define do_physdev_op                 compat_physdev_op
 #define do_physdev_op_compat(x)       compat_physdev_op_compat(_##x)
+#define native                        compat
 
 #define COMPAT
 #define _XEN_GUEST_HANDLE(t) XEN_GUEST_HANDLE(t)




 


Rackspace

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