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

[Xen-devel] [PATCH] x86: fix compat guest handling of XENPF_enter_acpi_sleep



Rather than blindly defining the native name to the compat one, when
we want to pass the compat structure to a native function we ought to
verify that their layouts match. With a respective xlat.lst entry
there's then also no need anymore to do such aliasing.

While cleaaning up that file I also noticed that the Cx and Px
interface handling here has quite a few unnecessary #define-s - delete
them.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>

--- a/xen/arch/x86/x86_64/platform_hypercall.c
+++ b/xen/arch/x86/x86_64/platform_hypercall.c
@@ -14,17 +14,11 @@ DEFINE_XEN_GUEST_HANDLE(compat_platform_
 #define efi_get_info        efi_compat_get_info
 #define efi_runtime_call(x) efi_compat_runtime_call(x)
 
-#define xen_processor_px    compat_processor_px
-#define xen_processor_px_t  compat_processor_px_t
-#define xen_processor_performance    compat_processor_performance
-#define xen_processor_performance_t  compat_processor_performance_t
-#define xenpf_set_processor_pminfo   compat_pf_set_processor_pminfo
-
-#define set_px_pminfo          compat_set_px_pminfo
-
-#define xen_processor_power     compat_processor_power
-#define xen_processor_power_t   compat_processor_power_t
-#define set_cx_pminfo           compat_set_cx_pminfo
+#define xen_processor_performance compat_processor_performance
+#define set_px_pminfo       compat_set_px_pminfo
+
+#define xen_processor_power compat_processor_power
+#define set_cx_pminfo       compat_set_cx_pminfo
 
 #define xen_pf_pcpuinfo xenpf_pcpuinfo
 CHECK_pf_pcpuinfo;
@@ -34,7 +28,9 @@ CHECK_pf_pcpuinfo;
 CHECK_pf_pcpu_version;
 #undef xen_pf_pcpu_version
 
-#define xenpf_enter_acpi_sleep compat_pf_enter_acpi_sleep
+#define xen_pf_enter_acpi_sleep xenpf_enter_acpi_sleep
+CHECK_pf_enter_acpi_sleep;
+#undef xen_pf_enter_acpi_sleep
 
 #define COMPAT
 #define _XEN_GUEST_HANDLE(t) XEN_GUEST_HANDLE(t)
--- a/xen/include/xlat.lst
+++ b/xen/include/xlat.lst
@@ -83,6 +83,7 @@
 !      processor_power                 platform.h
 ?      processor_px                    platform.h
 !      psd_package                     platform.h
+?      xenpf_enter_acpi_sleep          platform.h
 ?      xenpf_pcpuinfo                  platform.h
 ?      xenpf_pcpu_version              platform.h
 !      sched_poll                      sched.h



Attachment: x86-platform-verify-enter_acpi_sleep.patch
Description: Text document

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

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