diff options
author | Keir Fraser <keir.fraser@citrix.com> | 2008-10-14 10:45:29 +0100 |
---|---|---|
committer | Keir Fraser <keir.fraser@citrix.com> | 2008-10-14 10:45:29 +0100 |
commit | 39f97ffa298bba63e727ecce0117db95f0bb17f7 (patch) | |
tree | cde5f544991c3de8f56384cf12ce139fe8c87ee5 /xen/include/asm-x86/hvm/viridian.h | |
parent | b525c05cf95fa9528cfb83ecc120087881013980 (diff) | |
download | xen-39f97ffa298bba63e727ecce0117db95f0bb17f7.tar.gz xen-39f97ffa298bba63e727ecce0117db95f0bb17f7.tar.bz2 xen-39f97ffa298bba63e727ecce0117db95f0bb17f7.zip |
x86, hvm: Hyper-V guest interface support with small set of enlightenments
A minimal implementation of the Viridian (Hyper-V) guest
interface. The only enlightenments advertised and supported are vAPIC
MSRs and long-spin-wait notifications. The set of enlightenments can
easily be extended in future, as they are found to provide a
performance win, and configured via an extended HVM_PARAM_VIRIDIAN hvm
parameter.
Signed-off-by: Peter Johnston <peter.johnston@citrix.com>
Signed-off-by: Tim Deegan <tim.deegan@citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
Diffstat (limited to 'xen/include/asm-x86/hvm/viridian.h')
-rw-r--r-- | xen/include/asm-x86/hvm/viridian.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/viridian.h b/xen/include/asm-x86/hvm/viridian.h new file mode 100644 index 0000000000..ac16966172 --- /dev/null +++ b/xen/include/asm-x86/hvm/viridian.h @@ -0,0 +1,65 @@ +/***************************************************************************** + * + * include/xen/viridian.h + * + * Copyright (c) 2008 Citrix Corp. + * + */ + +#ifndef __ASM_X86_HVM_VIRIDIAN_H__ +#define __ASM_X86_HVM_VIRIDIAN_H__ + +union viridian_guest_os_id +{ + uint64_t raw; + struct + { + uint64_t build_number:16; + uint64_t service_pack:8; + uint64_t minor:8; + uint64_t major:8; + uint64_t os:8; + uint64_t vendor:16; + } fields; +}; + +union viridian_hypercall_gpa +{ uint64_t raw; + struct + { + uint64_t enabled:1; + uint64_t reserved_preserved:11; + uint64_t pfn:48; + } fields; +}; + +struct viridian_domain +{ + union viridian_guest_os_id guest_os_id; + union viridian_hypercall_gpa hypercall_gpa; +}; + +int +cpuid_viridian_leaves( + unsigned int leaf, + unsigned int *eax, + unsigned int *ebx, + unsigned int *ecx, + unsigned int *edx); + +int +wrmsr_viridian_regs( + uint32_t idx, + uint32_t eax, + uint32_t edx); + +int +rdmsr_viridian_regs( + uint32_t idx, + uint32_t *eax, + uint32_t *edx); + +int +viridian_hypercall(struct cpu_user_regs *regs); + +#endif /* __ASM_X86_HVM_VIRIDIAN_H__ */ |