xen/hv_xen_base.patch
Charles Arnold fe31f9be81 - bnc#564406 - Make the new PV drivers work with older hosts that
do not understand the new PV driver protocol. 

- Upstream Xen version renamed to 4.0.0 in changeset 20624 & 20625. 

- fate#307594: HP-MCBS: XEN: support NR_CPUS=256 
  This is a spec file change (xen.spec)

- bnc#555152 - "NAME" column in xentop (SLES11) output limited to
  10 characters unlike SLES10
  The update to c/s 20572 includes this fix (at c/s 20567).

- Modify xen-paths.diff 

- Merge xend-tap-fix.patch to xen-domUloader.diff
  remove part of it which accepted by upstream

- Load gntdev module in xend init script similar to blkbk,
  netbk, etc.

- Backport dmmd from sles11/xen
  block-dmmd
  xen-qemu-iscsi-fix.patch
  xen.spec 

- Fix regression when create_vbd for tap
  xend-tap-fix.patch

- Temporarily disable libxl because of libconfig dependency. 

- fate#302864 domUloader support lvm in disk
  domUloader.py
  Note: for test in Beta1, if not good, remove it

- fate#302864 domUloader support fs on whole disk
  domUloader.py

- Turn KMPs back on now that kernel side fix is checked in. 

- fate#304415 VMM: ability to switch networking mode
  Add vif-route-ifup to handle routed configurations using
  sysconfig scripts.
  vif-route-ifup.patch

- fate#307540 USB for Xen VMs
  usb-add.patch

- fate#305545 XEN extra descriptive field within xenstore
  add_des.patch

- Update to Xen version 3.5.0 for the following features. 
  fate#304226 XEN: FlexMigration feature of VT-x2 support
  fate#305004 Add SR-IOV PF and VF drivers to Vt-d enabled Xen
  fate#306830 T states in Xen controlling by MSR
  fate#306832 Fix for xen panic on new processors
  fate#306833 Westmere and Nehalem-EX: Add support for Pause Loop exiting feature for Xen
  fate#306835 Xen: server virtual power management enhacement
  fate#306837 VT-d2 - PCI SIG ATS support
  fate#306872 Xen: Node manager support P/T-states change when Vt-d enable
  fate#306873 Xen: SMP guest live migration may fail with hap=1 on NHM
  fate#306875 Westmere: LT-SX (Xen)
  fate#306891 RAS features for Xen: Add support for Machine Check and CPU/Memory online/offline features
  fate#307322 1GB page support in Xen
  fate#307324 Xen IOMMU support

OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=26
2010-01-16 00:12:54 +00:00

204 lines
6.2 KiB
Diff

Index: xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h
===================================================================
--- xen-4.0.0-testing.orig/xen/include/asm-x86/hvm/domain.h
+++ xen-4.0.0-testing/xen/include/asm-x86/hvm/domain.h
@@ -98,6 +98,7 @@ struct hvm_domain {
struct vmx_domain vmx;
struct svm_domain svm;
};
+ void *hyperv_handle; /* will be NULL on creation*/
};
#endif /* __ASM_X86_HVM_DOMAIN_H__ */
Index: xen-4.0.0-testing/xen/arch/x86/hvm/Makefile
===================================================================
--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/Makefile
+++ xen-4.0.0-testing/xen/arch/x86/hvm/Makefile
@@ -1,5 +1,6 @@
subdir-y += svm
subdir-y += vmx
+subdir-$(x86_64) += hyperv
obj-y += asid.o
obj-y += emulate.o
Index: xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c
===================================================================
--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/hvm.c
+++ xen-4.0.0-testing/xen/arch/x86/hvm/hvm.c
@@ -48,6 +48,7 @@
#include <asm/mc146818rtc.h>
#include <asm/spinlock.h>
#include <asm/hvm/hvm.h>
+#include <asm/hvm/hvm_extensions.h>
#include <asm/hvm/vpt.h>
#include <asm/hvm/support.h>
#include <asm/hvm/cacheattr.h>
@@ -461,6 +462,7 @@ void hvm_domain_relinquish_resources(str
void hvm_domain_destroy(struct domain *d)
{
+ hyperx_intercept_domain_destroy(d);
hvm_funcs.domain_destroy(d);
rtc_deinit(d);
stdvga_deinit(d);
@@ -782,8 +784,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
v->arch.hvm_vcpu.xfeature_mask = XSTATE_FP_SSE;
}
+ if ((rc = hyperx_intercept_vcpu_initialize(v)) != 0)
+ goto fail1;
+
if ( (rc = vlapic_init(v)) != 0 )
+ {
+ hyperx_intercept_vcpu_destroy(v);
goto fail1;
+ }
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
goto fail2;
@@ -834,12 +842,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
hvm_funcs.vcpu_destroy(v);
fail2:
vlapic_destroy(v);
+ hyperx_intercept_vcpu_destroy(v);
fail1:
return rc;
}
void hvm_vcpu_destroy(struct vcpu *v)
{
+ hyperx_intercept_vcpu_destroy(v);
tasklet_kill(&v->arch.hvm_vcpu.assert_evtchn_irq_tasklet);
hvm_vcpu_cacheattr_destroy(v);
vlapic_destroy(v);
@@ -1897,7 +1907,7 @@ void hvm_cpuid(unsigned int input, unsig
return;
if ( cpuid_hypervisor_leaves(input, count, eax, ebx, ecx, edx) )
- return;
+ goto hvm_cpuid_done;
domain_cpuid(v->domain, input, *ecx, eax, ebx, ecx, edx);
@@ -1964,6 +1974,8 @@ void hvm_cpuid(unsigned int input, unsig
*edx &= ~bitmaskof(X86_FEATURE_RDTSCP);
break;
}
+hvm_cpuid_done:
+ hyperx_intercept_do_cpuid(input, eax, ebx, ecx, edx);
}
void hvm_rdtsc_intercept(struct cpu_user_regs *regs)
@@ -2064,6 +2076,8 @@ int hvm_msr_read_intercept(struct cpu_us
break;
/* ret == 0, This is not an MCE MSR, see other MSRs */
else if (!ret)
+ if (hyperx_intercept_do_msr_read(ecx, regs))
+ return X86EMUL_OKAY;
return hvm_funcs.msr_read_intercept(regs);
}
@@ -2162,6 +2176,8 @@ int hvm_msr_write_intercept(struct cpu_u
else if ( ret )
break;
else if (!ret)
+ if (hyperx_intercept_do_msr_write(ecx, regs))
+ return X86EMUL_OKAY;
return hvm_funcs.msr_write_intercept(regs);
}
@@ -2354,6 +2370,10 @@ int hvm_do_hypercall(struct cpu_user_reg
case 0:
break;
}
+ if (hyperx_intercept_do_hypercall(regs))
+ {
+ return HVM_HCALL_completed;
+ }
if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) )
return viridian_hypercall(regs);
@@ -2888,6 +2908,18 @@ long do_hvm_op(unsigned long op, XEN_GUE
rc = -EINVAL;
break;
+ case HVM_PARAM_EXTEND_HYPERVISOR:
+#ifdef __x86_64__
+ if (a.value != 1)
+ rc = -EINVAL;
+ else if (hyperv_initialize(d))
+ rc = -ENOMEM;
+ else
+ break;
+#else
+ rc = -EINVAL;
+#endif
+ goto param_fail;
}
if ( rc == 0 )
Index: xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h
===================================================================
--- xen-4.0.0-testing.orig/xen/include/public/arch-x86/hvm/save.h
+++ xen-4.0.0-testing/xen/include/public/arch-x86/hvm/save.h
@@ -431,9 +431,24 @@ struct hvm_viridian_context {
DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context);
+struct hvm_hyperv_dom {
+ uint64_t guestid_msr;
+ uint64_t hypercall_msr;
+ uint32_t long_mode;
+ uint32_t ext_id;
+};
+DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 15, struct hvm_hyperv_dom);
+
+struct hvm_hyperv_cpu {
+ uint64_t control_msr;
+ uint64_t version_msr;
+ uint64_t pad[27]; //KYS: sles10 sp2 compatibility
+};
+DECLARE_HVM_SAVE_TYPE(HYPERV_CPU, 16, struct hvm_hyperv_cpu);
+
/*
* Largest type-code in use
*/
-#define HVM_SAVE_CODE_MAX 15
+#define HVM_SAVE_CODE_MAX 17
#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
Index: xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c
===================================================================
--- xen-4.0.0-testing.orig/xen/arch/x86/hvm/vlapic.c
+++ xen-4.0.0-testing/xen/arch/x86/hvm/vlapic.c
@@ -34,6 +34,7 @@
#include <asm/hvm/hvm.h>
#include <asm/hvm/io.h>
#include <asm/hvm/support.h>
+#include <asm/hvm/hvm_extensions.h>
#include <asm/hvm/vmx/vmx.h>
#include <public/hvm/ioreq.h>
#include <public/hvm/params.h>
@@ -291,6 +292,7 @@ static int vlapic_accept_sipi(struct vcp
hvm_vcpu_reset_state(v, trampoline_vector << 8, 0);
vcpu_unpause(v);
+ hyperx_intercept_vcpu_up(v);
return X86EMUL_OKAY;
}
Index: xen-4.0.0-testing/xen/include/public/hvm/params.h
===================================================================
--- xen-4.0.0-testing.orig/xen/include/public/hvm/params.h
+++ xen-4.0.0-testing/xen/include/public/hvm/params.h
@@ -106,6 +106,8 @@
/* Boolean: Enable aligning all periodic vpts to reduce interrupts */
#define HVM_PARAM_VPT_ALIGN 16
-#define HVM_NR_PARAMS 17
+#define HVM_PARAM_EXTEND_HYPERVISOR 17
+
+#define HVM_NR_PARAMS 18
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */