diff options
author | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-10-17 16:43:53 +0100 |
---|---|---|
committer | Stefano Stabellini <stefano.stabellini@eu.citrix.com> | 2012-10-17 16:43:53 +0100 |
commit | abf06ea91d1210d9cf7cde4c0465cd49b21efacb (patch) | |
tree | 80f1316ffd5381b09442732c5e4015bcc49fe3f5 /xen/arch/x86/x86_64 | |
parent | e7a527e100dd3f72e0f9b672ab97324d80e064df (diff) | |
download | xen-abf06ea91d1210d9cf7cde4c0465cd49b21efacb.tar.gz xen-abf06ea91d1210d9cf7cde4c0465cd49b21efacb.tar.bz2 xen-abf06ea91d1210d9cf7cde4c0465cd49b21efacb.zip |
xen: more XEN_GUEST_HANDLE_PARAM substitutions
More substitutions in this patch, not as obvious as the ones in the
previous patch.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Ian Campbell <ian.campbell@citrix.com>
Diffstat (limited to 'xen/arch/x86/x86_64')
-rw-r--r-- | xen/arch/x86/x86_64/cpu_idle.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/x86_64/cpufreq.c | 4 | ||||
-rw-r--r-- | xen/arch/x86/x86_64/platform_hypercall.c | 1 |
3 files changed, 7 insertions, 2 deletions
diff --git a/xen/arch/x86/x86_64/cpu_idle.c b/xen/arch/x86/x86_64/cpu_idle.c index 3e7422fee4..dfc7e847d5 100644 --- a/xen/arch/x86/x86_64/cpu_idle.c +++ b/xen/arch/x86/x86_64/cpu_idle.c @@ -57,10 +57,12 @@ static int copy_from_compat_state(xen_processor_cx_t *xen_state, { #define XLAT_processor_cx_HNDL_dp(_d_, _s_) do { \ XEN_GUEST_HANDLE(compat_processor_csd_t) dps; \ + XEN_GUEST_HANDLE_PARAM(xen_processor_csd_t) dps_param; \ if ( unlikely(!compat_handle_okay((_s_)->dp, (_s_)->dpcnt)) ) \ return -EFAULT; \ guest_from_compat_handle(dps, (_s_)->dp); \ - (_d_)->dp = guest_handle_cast(dps, xen_processor_csd_t); \ + dps_param = guest_handle_cast(dps, xen_processor_csd_t); \ + (_d_)->dp = guest_handle_from_param(dps_param, xen_processor_csd_t); \ } while (0) XLAT_processor_cx(xen_state, state); #undef XLAT_processor_cx_HNDL_dp diff --git a/xen/arch/x86/x86_64/cpufreq.c b/xen/arch/x86/x86_64/cpufreq.c index ce9864e187..19567779dc 100644 --- a/xen/arch/x86/x86_64/cpufreq.c +++ b/xen/arch/x86/x86_64/cpufreq.c @@ -45,10 +45,12 @@ compat_set_px_pminfo(uint32_t cpu, struct compat_processor_performance *perf) #define XLAT_processor_performance_HNDL_states(_d_, _s_) do { \ XEN_GUEST_HANDLE(compat_processor_px_t) states; \ + XEN_GUEST_HANDLE_PARAM(xen_processor_px_t) states_t; \ if ( unlikely(!compat_handle_okay((_s_)->states, (_s_)->state_count)) ) \ return -EFAULT; \ guest_from_compat_handle(states, (_s_)->states); \ - (_d_)->states = guest_handle_cast(states, xen_processor_px_t); \ + states_t = guest_handle_cast(states, xen_processor_px_t); \ + (_d_)->states = guest_handle_from_param(states_t, xen_processor_px_t); \ } while (0) XLAT_processor_performance(xen_perf, perf); diff --git a/xen/arch/x86/x86_64/platform_hypercall.c b/xen/arch/x86/x86_64/platform_hypercall.c index 188aa375f5..744796d90a 100644 --- a/xen/arch/x86/x86_64/platform_hypercall.c +++ b/xen/arch/x86/x86_64/platform_hypercall.c @@ -38,6 +38,7 @@ CHECK_pf_pcpu_version; #define COMPAT #define _XEN_GUEST_HANDLE(t) XEN_GUEST_HANDLE(t) +#define _XEN_GUEST_HANDLE_PARAM(t) XEN_GUEST_HANDLE_PARAM(t) typedef int ret_t; #include "../platform_hypercall.c" |