xen/x86-cpufreq-report.patch
Charles Arnold ed105f0f54 - fate#309894: Xen needs to correctly understand family 15h CPU
topology 
- fate#311376: EFI support in SP2
- fate#311529: Native UEFI booting under Xen (installation)
  23074-pfn.h.patch
  23571-vtd-fault-verbosity.patch
  23574-x86-dom0-compressed-ELF.patch
  23575-x86-DMI.patch
  23610-x86-topology-info.patch
  23611-amd-fam15-topology.patch
  23613-EFI-headers.patch
  23614-x86_64-EFI-boot.patch
  23615-x86_64-EFI-runtime.patch
  23616-x86_64-EFI-MPS.patch

- Mark xen-scsi.ko supported (bnc#582265, fate#309459).

- fate#310308: Hypervisor assisted watchdog driver 
  ioemu-watchdog-support.patch
  ioemu-watchdog-linkage.patch
  ioemu-watchdog-ib700-timer.patch
  tools-watchdog-support.patch

- bnc#702025 - VUL-0: xen: VT-d (PCI passthrough) MSI trap 
  injection  (CVE-2011-1898)
  Fixed in Xen version 4.1.1

- fate#310956: Support Direct Kernel Boot for FV guests
  kernel-boot-hvm.patch

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=130
2011-07-01 19:31:25 +00:00

70 lines
2.2 KiB
Diff

--- a/xen/arch/x86/platform_hypercall.c
+++ b/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) )
@@ -513,6 +514,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;
--- a/xen/include/public/platform.h
+++ b/xen/include/public/platform.h
@@ -449,6 +449,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 */
@@ -469,6 +477,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;
};