xen/x86-cpufreq-report.patch
Charles Arnold 800917b5a2 - bnc#717650 - Unable to start VM
- Update to Xen 4.1.2_rc2 c/s 23152

- bnc#716695 - domUs using tap devices will not start
  updated multi-xvdp.patch

- Upstream patches from Jan
  23803-intel-pmu-models.patch
  23800-x86_64-guest-addr-range.patch
  23795-intel-ich10-quirk.patch
  23804-x86-IPI-counts.patch 

- bnc#706106 - Inconsistent reporting of VM names during migration
  xend-migration-domname-fix.patch

- bnc#712823 - L3:Xen guest does not start reliable when rebooted
  xend-vcpu-affinity-fix.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=143
2011-09-15 21:43:21 +00:00

74 lines
2.5 KiB
Diff

Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
===================================================================
--- xen-4.1.2-testing.orig/xen/arch/x86/platform_hypercall.c
+++ xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
@@ -23,7 +23,7 @@
#include <xen/cpu.h>
#include <asm/current.h>
#include <public/platform.h>
-#include <acpi/cpufreq/processor_perf.h>
+#include <acpi/cpufreq/cpufreq.h>
#include <asm/edd.h>
#include <asm/mtrr.h>
#include <asm/io_apic.h>
@@ -63,6 +63,7 @@ long cpu_down_helper(void *data);
ret_t do_platform_op(XEN_GUEST_HANDLE(xen_platform_op_t) u_xenpf_op)
{
ret_t ret = 0;
+ struct vcpu *v;
struct xen_platform_op curop, *op = &curop;
if ( !IS_PRIV(current->domain) )
@@ -522,6 +523,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
op->u.mem_add.epfn,
op->u.mem_add.pxm);
break;
+
+ case XENPF_get_cpu_freq:
+ if ( op->u.get_cpu_freq.vcpu >= current->domain->max_vcpus ||
+ !(v = current->domain->vcpu[op->u.get_cpu_freq.vcpu]) )
+ {
+ ret = -EINVAL;
+ break;
+ }
+
+ op->u.get_cpu_freq.freq = per_cpu(cpufreq_cpu_policy, v->processor)
+ ? cpufreq_driver->get
+ ? cpufreq_driver->get(v->processor)
+ : per_cpu(cpufreq_cpu_policy, v->processor)->cur
+ : 0;
+ if ( copy_field_to_guest(u_xenpf_op, op, u.get_cpu_freq.freq) )
+ ret = -EFAULT;
+ break;
+
default:
ret = -ENOSYS;
break;
Index: xen-4.1.2-testing/xen/include/public/platform.h
===================================================================
--- xen-4.1.2-testing.orig/xen/include/public/platform.h
+++ xen-4.1.2-testing/xen/include/public/platform.h
@@ -451,6 +451,14 @@ struct xenpf_mem_hotadd
uint32_t flags;
};
+#define XENPF_get_cpu_freq ('N' << 24)
+struct xenpf_get_cpu_freq {
+ /* IN variables */
+ uint32_t vcpu;
+ /* OUT variables */
+ uint32_t freq; /* in kHz */
+};
+
struct xen_platform_op {
uint32_t cmd;
uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
@@ -471,6 +479,7 @@ struct xen_platform_op {
struct xenpf_cpu_ol cpu_ol;
struct xenpf_cpu_hotadd cpu_add;
struct xenpf_mem_hotadd mem_add;
+ struct xenpf_get_cpu_freq get_cpu_freq;
uint8_t pad[128];
} u;
};