9a05aa7fc4
22707-x2apic-preenabled-check.patch - bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed: Cannot allocate memory" 7434-qemu-rlimit-as.patch - Additional or upstream patches from Jan 22693-fam10-mmio-conf-base-protect.patch 22694-x86_64-no-weak.patch 22708-xenctx-misc.patch 21432-4.0-cpu-boot-failure.patch 22645-amd-flush-filter.patch qemu-fix-7433.patch - Maintain compatibility with the extid flag even though it is deprecated for both legacy and sxp config files. hv_extid_compatibility.patch - bnc#649209-improve suspend eventchn lock suspend_evtchn_lock.patch - Removed the hyper-v shim patches in favor of using the upstream version. - bnc#641419 - L3: Xen: qemu-dm reports "xc_map_foreign_batch: mmap failed: Cannot allocate memory" qemu-rlimit-as.patch - Upstream c/s 7433 to replace qemu_altgr_more.patch 7433-qemu-altgr.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=90
74 lines
2.5 KiB
Diff
74 lines
2.5 KiB
Diff
Index: xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c
|
|
===================================================================
|
|
--- xen-4.0.1-testing.orig/xen/arch/x86/platform_hypercall.c
|
|
+++ xen-4.0.1-testing/xen/arch/x86/platform_hypercall.c
|
|
@@ -21,7 +21,7 @@
|
|
#include <xen/acpi.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 "cpu/mtrr/mtrr.h"
|
|
@@ -62,6 +62,7 @@ static long cpu_down_helper(void *hdl, v
|
|
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) )
|
|
@@ -489,6 +490,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 = cpufreq_cpu_policy[v->processor]
|
|
+ ? cpufreq_driver->get
|
|
+ ? cpufreq_driver->get(v->processor)
|
|
+ : 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.0.1-testing/xen/include/public/platform.h
|
|
===================================================================
|
|
--- xen-4.0.1-testing.orig/xen/include/public/platform.h
|
|
+++ xen-4.0.1-testing/xen/include/public/platform.h
|
|
@@ -355,6 +355,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 */
|
|
@@ -374,6 +382,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;
|
|
};
|