23233-hvm-cr-access.patch 23234-svm-decode-assist-base.patch 23235-svm-decode-assist-crs.patch 23236-svm-decode-assist-invlpg.patch 23238-svm-decode-assist-insn-fetch.patch 23303-cpufreq-misc.patch 23304-amd-oprofile-strings.patch 23305-amd-fam15-xenoprof.patch 23306-amd-fam15-vpmu.patch 23334-amd-fam12+14-vpmu.patch 23338-vtd-force-intremap.patch - fate#310957 - Update to Xen 4.1.1-rc1 c/s 23064 - xentrace: dynamic tracebuffer allocation xen-unstable.xentrace.dynamic_tbuf.patch xen-unstable.xentrace.empty_t_info_pages.patch xen-unstable.xentrace.verbose.patch xen-unstable.xentrace.no_gdprintk.patch xen-unstable.xentrace.comments.patch xen-unstable.xentrace.printk_prefix.patch xen-unstable.xentrace.remove_debug_printk.patch xen-unstable.xentrace.t_info_pages-formula.patch xen-unstable.xentrace.register_cpu_notifier-boot_time.patch xen-unstable.xentrace.t_info_page-overflow.patch xen-unstable.xentrace.t_info_first_offset.patch xen-unstable.xentrace.data_size__read_mostly.patch xen-unstable.xentrace.__insert_record-dst-type.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=124
74 lines
2.5 KiB
Diff
74 lines
2.5 KiB
Diff
Index: xen-4.1.1-testing/xen/arch/x86/platform_hypercall.c
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/xen/arch/x86/platform_hypercall.c
|
|
+++ xen-4.1.1-testing/xen/arch/x86/platform_hypercall.c
|
|
@@ -22,7 +22,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>
|
|
@@ -62,6 +62,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) )
|
|
@@ -493,6 +494,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.1-testing/xen/include/public/platform.h
|
|
===================================================================
|
|
--- xen-4.1.1-testing.orig/xen/include/public/platform.h
|
|
+++ xen-4.1.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;
|
|
};
|