@@ -558,11 +558,22 @@ int set_px_pminfo(uint32_t acpi_id, struct xen_processor_performance *dom0_px_in
ret = -ENOMEM;
goto out;
}
- if ( copy_from_guest(pxpt->states, dom0_px_info->states,
- dom0_px_info->state_count) )
+
+ if ( dom0_px_info->flags == XEN_PX_DATA )
{
- ret = -EFAULT;
- goto out;
+ struct xen_processor_px *states = (dom0_px_info->states).p;
+
+ memcpy(pxpt->states, states,
+ dom0_px_info->state_count * sizeof(struct xen_processor_px));
+ }
+ else
+ {
+ if ( copy_from_guest(pxpt->states, dom0_px_info->states,
+ dom0_px_info->state_count) )
+ {
+ ret = -EFAULT;
+ goto out;
+ }
}
pxpt->state_count = dom0_px_info->state_count;