SHA256
1
0
forked from pool/xen
OBS User unknown
2009-05-04 16:38:09 +00:00
committed by Git OBS Bridge
parent 4790095364
commit 0bb51565d6
187 changed files with 2454 additions and 20791 deletions

View File

@@ -1,9 +1,9 @@
%patch
Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h
Index: xen-3.4.0-testing/xen/include/asm-x86/hvm/domain.h
===================================================================
--- xen-3.3.1-testing.orig/xen/include/asm-x86/hvm/domain.h 2009-01-05 13:27:58.000000000 -0700
+++ xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h 2009-02-12 10:18:31.000000000 -0700
@@ -82,6 +82,7 @@
--- xen-3.4.0-testing.orig/xen/include/asm-x86/hvm/domain.h
+++ xen-3.4.0-testing/xen/include/asm-x86/hvm/domain.h
@@ -89,6 +89,7 @@ struct hvm_domain {
struct vmx_domain vmx;
struct svm_domain svm;
};
@@ -11,22 +11,22 @@ Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/domain.h
};
#endif /* __ASM_X86_HVM_DOMAIN_H__ */
Index: xen-3.3.1-testing/xen/arch/x86/hvm/Makefile
Index: xen-3.4.0-testing/xen/arch/x86/hvm/Makefile
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/hvm/Makefile 2009-01-05 13:27:57.000000000 -0700
+++ xen-3.3.1-testing/xen/arch/x86/hvm/Makefile 2009-02-12 10:18:31.000000000 -0700
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/Makefile
+++ xen-3.4.0-testing/xen/arch/x86/hvm/Makefile
@@ -1,5 +1,6 @@
subdir-y += svm
subdir-y += vmx
+subdir-y += hyperv
+subdir-y += hyperv
obj-y += emulate.o
obj-y += hvm.o
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
Index: xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/hvm/hvm.c 2009-02-12 10:18:30.000000000 -0700
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c 2009-02-12 10:18:31.000000000 -0700
@@ -44,6 +44,7 @@
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/hvm.c
+++ xen-3.4.0-testing/xen/arch/x86/hvm/hvm.c
@@ -45,6 +45,7 @@
#include <asm/mc146818rtc.h>
#include <asm/spinlock.h>
#include <asm/hvm/hvm.h>
@@ -34,7 +34,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
#include <asm/hvm/vpt.h>
#include <asm/hvm/support.h>
#include <asm/hvm/cacheattr.h>
@@ -361,6 +362,7 @@
@@ -373,6 +374,7 @@ void hvm_domain_relinquish_resources(str
void hvm_domain_destroy(struct domain *d)
{
@@ -42,7 +42,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
hvm_funcs.domain_destroy(d);
rtc_deinit(d);
stdvga_deinit(d);
@@ -662,8 +664,14 @@
@@ -673,8 +675,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
{
int rc;
@@ -57,7 +57,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
if ( (rc = hvm_funcs.vcpu_initialise(v)) != 0 )
goto fail2;
@@ -710,12 +718,14 @@
@@ -721,12 +729,14 @@ int hvm_vcpu_initialise(struct vcpu *v)
hvm_funcs.vcpu_destroy(v);
fail2:
vlapic_destroy(v);
@@ -72,8 +72,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
hvm_vcpu_cacheattr_destroy(v);
vlapic_destroy(v);
hvm_funcs.vcpu_destroy(v);
@@ -1663,7 +1673,7 @@
struct vcpu *v = current;
@@ -1678,7 +1688,7 @@ void hvm_cpuid(unsigned int input, unsig
return;
if ( cpuid_hypervisor_leaves(input, eax, ebx, ecx, edx) )
- return;
@@ -81,7 +81,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
domain_cpuid(v->domain, input, *ecx, eax, ebx, ecx, edx);
@@ -1675,6 +1685,8 @@
@@ -1690,6 +1700,8 @@ void hvm_cpuid(unsigned int input, unsig
if ( vlapic_hw_disabled(vcpu_vlapic(v)) )
__clear_bit(X86_FEATURE_APIC & 31, edx);
}
@@ -90,16 +90,16 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
}
void hvm_rdtsc_intercept(struct cpu_user_regs *regs)
@@ -1765,6 +1777,8 @@
break;
@@ -1789,6 +1801,8 @@ int hvm_msr_read_intercept(struct cpu_us
break;
default:
+ if (hyperx_intercept_do_msr_read(ecx, regs))
+ return X86EMUL_OKAY;
+ return X86EMUL_OKAY;
return hvm_funcs.msr_read_intercept(regs);
}
@@ -1853,6 +1867,8 @@
@@ -1877,6 +1891,8 @@ int hvm_msr_write_intercept(struct cpu_u
break;
default:
@@ -108,23 +108,23 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
return hvm_funcs.msr_write_intercept(regs);
}
@@ -2020,6 +2036,10 @@
@@ -2044,6 +2060,10 @@ int hvm_do_hypercall(struct cpu_user_reg
case 0:
break;
}
+ if (hyperx_intercept_do_hypercall(regs))
+ if (hyperx_intercept_do_hypercall(regs))
+ {
+ return HVM_HCALL_completed;
+ }
if ( (eax >= NR_hypercalls) || !hvm_hypercall32_table[eax] )
{
@@ -2521,6 +2541,15 @@
if ( (eax & 0x80000000) && is_viridian_domain(curr->domain) )
return viridian_hypercall(regs);
@@ -2560,6 +2580,15 @@ long do_hvm_op(unsigned long op, XEN_GUE
rc = -EINVAL;
break;
+ case HVM_PARAM_EXTEND_HYPERVISOR:
+ if ((a.value == 1) && hyperv_initialize(d))
+ if ((a.value == 1) && hyperv_initialize(d))
+ {
+ if (a.value != 1)
+ rc = -EINVAL;
@@ -135,22 +135,13 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hvm.c
}
if ( rc == 0 )
Index: xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h
Index: xen-3.4.0-testing/xen/include/public/arch-x86/hvm/save.h
===================================================================
--- xen-3.3.1-testing.orig/xen/include/public/arch-x86/hvm/save.h 2009-01-05 13:27:58.000000000 -0700
+++ xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h 2009-02-12 10:18:31.000000000 -0700
@@ -38,7 +38,7 @@
uint32_t version; /* File format version */
uint64_t changeset; /* Version of Xen that saved this file */
uint32_t cpuid; /* CPUID[0x01][%eax] on the saving machine */
- uint32_t pad0;
+ uint32_t pad0;
};
--- xen-3.4.0-testing.orig/xen/include/public/arch-x86/hvm/save.h
+++ xen-3.4.0-testing/xen/include/public/arch-x86/hvm/save.h
@@ -432,9 +432,26 @@ struct hvm_viridian_context {
DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
@@ -421,9 +421,23 @@
DECLARE_HVM_SAVE_TYPE(MTRR, 14, struct hvm_hw_mtrr);
DECLARE_HVM_SAVE_TYPE(VIRIDIAN, 15, struct hvm_viridian_context);
+struct hvm_hyperv_dom {
+ uint64_t guestid_msr;
@@ -158,25 +149,28 @@ Index: xen-3.3.1-testing/xen/include/public/arch-x86/hvm/save.h
+ uint32_t long_mode;
+ uint32_t ext_id;
+};
+DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 15, struct hvm_hyperv_dom);
+
+DECLARE_HVM_SAVE_TYPE(HYPERV_DOM, 16, 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);
+
+DECLARE_HVM_SAVE_TYPE(HYPERV_CPU, 17, struct hvm_hyperv_cpu);
+
/*
* Largest type-code in use
*/
-#define HVM_SAVE_CODE_MAX 14
+#define HVM_SAVE_CODE_MAX 16
-#define HVM_SAVE_CODE_MAX 15
+#define HVM_SAVE_CODE_MAX 17
#endif /* __XEN_PUBLIC_HVM_SAVE_X86_H__ */
Index: xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c
Index: xen-3.4.0-testing/xen/arch/x86/hvm/vlapic.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/hvm/vlapic.c 2009-02-12 10:18:30.000000000 -0700
+++ xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c 2009-02-12 10:18:31.000000000 -0700
--- xen-3.4.0-testing.orig/xen/arch/x86/hvm/vlapic.c
+++ xen-3.4.0-testing/xen/arch/x86/hvm/vlapic.c
@@ -34,6 +34,7 @@
#include <asm/hvm/hvm.h>
#include <asm/hvm/io.h>
@@ -185,7 +179,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c
#include <asm/hvm/vmx/vmx.h>
#include <public/hvm/ioreq.h>
#include <public/hvm/params.h>
@@ -307,6 +308,7 @@
@@ -307,6 +308,7 @@ static int vlapic_accept_sipi(struct vcp
hvm_vcpu_reset_state(v, trampoline_vector << 8, 0);
vcpu_unpause(v);
@@ -193,17 +187,17 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/vlapic.c
return X86EMUL_OKAY;
}
Index: xen-3.3.1-testing/xen/include/public/hvm/params.h
Index: xen-3.4.0-testing/xen/include/public/hvm/params.h
===================================================================
--- xen-3.3.1-testing.orig/xen/include/public/hvm/params.h 2009-01-05 13:27:58.000000000 -0700
+++ xen-3.3.1-testing/xen/include/public/hvm/params.h 2009-02-12 10:18:31.000000000 -0700
@@ -93,6 +93,8 @@
/* ACPI S state: currently support S0 and S3 on x86. */
#define HVM_PARAM_ACPI_S_STATE 14
--- xen-3.4.0-testing.orig/xen/include/public/hvm/params.h
+++ xen-3.4.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 15
+#define HVM_PARAM_EXTEND_HYPERVISOR 15
-#define HVM_NR_PARAMS 17
+#define HVM_PARAM_EXTEND_HYPERVISOR 17
+
+#define HVM_NR_PARAMS 16
+#define HVM_NR_PARAMS 18
#endif /* __XEN_PUBLIC_HVM_PARAMS_H__ */