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

[Xen-changelog] [xen master] x86: fix compat guest handling of XENPF_enter_acpi_sleep



commit ec206e8ee4833c87746b0ef1e2e7ceeddc53e5f7
Author:     Jan Beulich <jbeulich@xxxxxxxx>
AuthorDate: Thu Sep 26 10:23:39 2013 +0200
Commit:     Jan Beulich <jbeulich@xxxxxxxx>
CommitDate: Thu Sep 26 10:23:39 2013 +0200

    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>
---
 xen/arch/x86/x86_64/platform_hypercall.c |   18 +++++++-----------
 xen/include/xlat.lst                     |    1 +
 2 files changed, 8 insertions(+), 11 deletions(-)

diff --git a/xen/arch/x86/x86_64/platform_hypercall.c 
b/xen/arch/x86/x86_64/platform_hypercall.c
index aa2ad54..b6f380e 100644
--- 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_op_t);
 #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 xen_processor_performance compat_processor_performance
+#define set_px_pminfo       compat_set_px_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_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)
diff --git a/xen/include/xlat.lst b/xen/include/xlat.lst
index d832110..f00cef3 100644
--- 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
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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