diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-10-21 09:47:33 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-10-21 09:47:33 +0100 |
commit | bd021534ed633e2d1921b4811dc80083a1a04def (patch) | |
tree | 98c329681a3d75d940a78eb85e92c85e40a900aa /xen/arch/x86/platform_hypercall.c | |
parent | 37349fcd1c22163858c492a66808077bbd52c9ea (diff) | |
download | xen-bd021534ed633e2d1921b4811dc80083a1a04def.tar.gz xen-bd021534ed633e2d1921b4811dc80083a1a04def.tar.bz2 xen-bd021534ed633e2d1921b4811dc80083a1a04def.zip |
x86: Adapt 32b guest os to 64b hypervisor platform_hypercall compatibility
Changeset 18552 (19b0a4f91712) move px transfer logic from
platform_hypercall.c to a common file to support both x86 and
ia64. However, it involves 32b guest os to 64b hypervisor (x86)
compatible issue. This patch fix the compatible issue, and make
set_px_pminfo() re-used by ia64 and x86 (32b guest os to 64b
hypervisor, and 64b guest os to 64b hypervisor).
Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
Diffstat (limited to 'xen/arch/x86/platform_hypercall.c')
-rw-r--r-- | xen/arch/x86/platform_hypercall.c | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/xen/arch/x86/platform_hypercall.c b/xen/arch/x86/platform_hypercall.c index 99060a0d56..28ab32678b 100644 --- a/xen/arch/x86/platform_hypercall.c +++ b/xen/arch/x86/platform_hypercall.c @@ -53,15 +53,6 @@ static long cpu_frequency_change_helper(void *data) return cpu_frequency_change(this_cpu(freq)); } -int xenpf_copy_px_states(struct processor_performance *pxpt, - struct xen_processor_performance *dom0_px_info) -{ - if (!pxpt || !dom0_px_info) - return -EINVAL; - return copy_from_compat(pxpt->states, dom0_px_info->states, - dom0_px_info->state_count); -} - ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) { ret_t ret = 0; @@ -372,12 +363,13 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op) switch ( op->u.set_pminfo.type ) { case XEN_PM_PX: - { - - ret = set_px_pminfo(op->u.set_pminfo.id, - &op->u.set_pminfo.perf); + if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_PX) ) + { + ret = -ENOSYS; + break; + } + ret = set_px_pminfo(op->u.set_pminfo.id, &op->u.set_pminfo.perf); break; - } case XEN_PM_CX: if ( !(xen_processor_pmbits & XEN_PROCESSOR_PM_CX) ) |