@@ -36,6 +36,16 @@ struct svm_test_data {
void *msr; /* gva */
void *msr_hva;
uint64_t msr_gpa;
+
+ /* Hyper-V VP assist page */
+ void *vp_assist; /* gva */
+ void *vp_assist_hva;
+ uint64_t vp_assist_gpa;
+
+ /* Hyper-V Partition assist page */
+ void *partition_assist; /* gva */
+ void *partition_assist_hva;
+ uint64_t partition_assist_gpa;
};
#define stgi() \
@@ -47,6 +47,16 @@ vcpu_alloc_svm(struct kvm_vm *vm, vm_vaddr_t *p_svm_gva)
svm->msr_gpa = addr_gva2gpa(vm, (uintptr_t)svm->msr);
memset(svm->msr_hva, 0, getpagesize());
+ svm->vp_assist = (void *)vm_vaddr_alloc_page(vm);
+ svm->vp_assist_hva = addr_gva2hva(vm, (uintptr_t)svm->vp_assist);
+ svm->vp_assist_gpa = addr_gva2gpa(vm, (uintptr_t)svm->vp_assist);
+ memset(svm->vp_assist_hva, 0, getpagesize());
+
+ svm->partition_assist = (void *)vm_vaddr_alloc_page(vm);
+ svm->partition_assist_hva = addr_gva2hva(vm, (uintptr_t)svm->partition_assist);
+ svm->partition_assist_gpa = addr_gva2gpa(vm, (uintptr_t)svm->partition_assist);
+ memset(svm->partition_assist_hva, 0, getpagesize());
+
*p_svm_gva = svm_gva;
return svm;
}