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

[PATCH 05/11] xen/platform_op: Wrap around XENPF_efi_runtime_call


  • To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jiqian Chen <Jiqian.Chen@xxxxxxx>
  • Date: Fri, 25 Jul 2025 14:15:24 +0800
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 165.204.84.17) smtp.rcpttodomain=lists.xenproject.org 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=KEinsSMwxWCPj+3nce9Z/57gNqQWJIZ0utVIOsKX6CY=; b=oFMdHLxqAHpRF5UYjp2HJZQhghBXXscYhRQNZRWy6JKRVvURI78NC+UiYPAsS73xNax3A2q9OdI6t4AN6wCqhg/u0NFyvna+dNNVWYZQirkh871OpdCMYYpw0GDWy5G6U0RzMLwCDth2jWxxUGlBI3IQ8EQmhjZf5+xbpMm8TeWiY1GChmaIhBtChj3RxNaIA/imNJtT67sf3MP4u+NxhIlrktsrmUyF7tiS/h492ecomD9eh2efJ0S7QRVoVDW0xhWIu4mwM+vwQklNEWiKdcM3rJjJUUXMSBTCjDAp1kq8x4NesZQqTeHBnlfWUeu3tKFhWV6dTBoLKG2AT46i7w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=JkW1rwJhfynHEUlF1QleInnT+lfAKsP9jcCHYoMY72hFfpTM3k4NIAuYRSkR2wEv1/cqFUP3Q6wbrZhRo5x0es/TxEebw294HjnFhm5Dc92MX7P9ZF/UnVjOI/GcbWdfD3pUnC5c4DtWtlBHO0mvlsiLRRgSU9e6xx4fOgE/SphxTT8kgoog6FeyS0K4cd9j2zdEXs/m4KdhhDDC2P4qGARFFtqwKQQ6CKWZFUFu9f6LZEAP6h/sPWWuuUx70adhIFTunioLKJH2p7OpID/eOwaBuhJj717fRn/8xXN+ACgmqbYhCnAM6+s3rRBBAvDij7Zix/a9m2ziFTE25S0t8A==
  • Cc: Huang Rui <ray.huang@xxxxxxx>, Jiqian Chen <Jiqian.Chen@xxxxxxx>, "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>, Marek Marczykowski-Górecki <marmarek@xxxxxxxxxxxxxxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>
  • Delivery-date: Fri, 25 Jul 2025 06:16:10 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

efi_runtime_call() is only used for XENPF_efi_runtime_call, wrap
it and its compat function and its calling functions:
efi_compat_runtime_call()
gwstrlen()
cast_time()
cast_guid()

Signed-off-by: Jiqian Chen <Jiqian.Chen@xxxxxxx>
---
cc: "Daniel P. Smith" <dpsmith@xxxxxxxxxxxxxxxxxxxx>
cc: "Marek Marczykowski-Górecki" <marmarek@xxxxxxxxxxxxxxxxxxxxxx>
cc: Jan Beulich <jbeulich@xxxxxxxx>
---
 xen/common/efi/common-stub.c | 4 ++--
 xen/common/efi/compat.c      | 2 +-
 xen/common/efi/runtime.c     | 2 ++
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/xen/common/efi/common-stub.c b/xen/common/efi/common-stub.c
index 05a84c60fb70..f3fb9b77d426 100644
--- a/xen/common/efi/common-stub.c
+++ b/xen/common/efi/common-stub.c
@@ -26,21 +26,21 @@ int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
 {
     return -ENOSYS;
 }
-#endif /* CONFIG_PLATFORM_OP */
 
 int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 {
     return -ENOSYS;
 }
+#endif /* CONFIG_PLATFORM_OP */
 
 #ifdef CONFIG_COMPAT
 
 #ifdef CONFIG_PLATFORM_OP
 int efi_compat_get_info(uint32_t idx, union compat_pf_efi_info *)
     __attribute__((__alias__("efi_get_info")));
-#endif /* CONFIG_PLATFORM_OP */
 
 int efi_compat_runtime_call(struct compat_pf_efi_runtime_call *)
     __attribute__((__alias__("efi_runtime_call")));
+#endif /* CONFIG_PLATFORM_OP */
 
 #endif
diff --git a/xen/common/efi/compat.c b/xen/common/efi/compat.c
index 4f5f59fcac2e..f350958c96b3 100644
--- a/xen/common/efi/compat.c
+++ b/xen/common/efi/compat.c
@@ -4,10 +4,10 @@
 #ifdef CONFIG_PLATFORM_OP
 #define efi_get_info efi_compat_get_info
 #define xenpf_efi_info compat_pf_efi_info
-#endif
 
 #define efi_runtime_call efi_compat_runtime_call
 #define xenpf_efi_runtime_call compat_pf_efi_runtime_call
+#endif
 
 #define xenpf_efi_guid compat_pf_efi_guid
 #define xenpf_efi_time compat_pf_efi_time
diff --git a/xen/common/efi/runtime.c b/xen/common/efi/runtime.c
index ab63785397e2..b1f1d677d2cb 100644
--- a/xen/common/efi/runtime.c
+++ b/xen/common/efi/runtime.c
@@ -329,6 +329,7 @@ int efi_get_info(uint32_t idx, union xenpf_efi_info *info)
 }
 #endif /* CONFIG_PLATFORM_OP */
 
+#ifdef CONFIG_PLATFORM_OP
 static long gwstrlen(XEN_GUEST_HANDLE_PARAM(CHAR16) str)
 {
     unsigned long len;
@@ -715,4 +716,5 @@ int efi_runtime_call(struct xenpf_efi_runtime_call *op)
 
     return rc;
 }
+#endif /* CONFIG_PLATFORM_OP */
 #endif
-- 
2.34.1




 


Rackspace

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