diff options
author | mrj <none@none> | 2007-12-21 14:13:23 -0800 |
---|---|---|
committer | mrj <none@none> | 2007-12-21 14:13:23 -0800 |
commit | 551bc2a66868b5cb5be6b70ab9f55515e77a39a9 (patch) | |
tree | a01e761c9864ea9483c468ced858a0f67edcbf93 /usr/src/uts/i86pc/os/cpuid.c | |
parent | 71a79fe7afa36dcf0de6902c2c6ef432980534d3 (diff) | |
download | illumos-joyent-551bc2a66868b5cb5be6b70ab9f55515e77a39a9.tar.gz |
PSARC 2007/664 Paravirtualized Drivers for Fully Virtualized xVM Domains
6525093 xnb/xnf should use hypervisor based copy for xnb->xnf data path
6608917 members of struct xnf and xnb need unique names
6609324 deadlock trying to own the HAT migrate lock
6609805 still missing XPV_DISALLOW_MIGRATE/XPV_ALLOW_MIGRATE bracketing in hat_i86.c
6616384 xnb's grant ref unmapping is inefficient
6619947 Solaris should provide a PV network driver for xVM HVM environments
6632774 panic setting up xen console
--HG--
rename : usr/src/uts/i86xpv/os/gnttab.c => usr/src/uts/common/xen/os/gnttab.c
rename : usr/src/uts/i86xpv/os/hypercall.c => usr/src/uts/common/xen/os/hypercall.c
rename : usr/src/uts/i86xpv/sys/gnttab.h => usr/src/uts/common/xen/sys/gnttab.h
rename : usr/src/uts/i86xpv/ml/hypersubr.s => usr/src/uts/intel/ia32/ml/hypersubr.s
rename : usr/src/uts/i86xpv/sys/hypervisor.h => usr/src/uts/intel/sys/hypervisor.h
rename : usr/src/uts/i86xpv/sys/xen_errno.h => usr/src/uts/intel/sys/xen_errno.h
Diffstat (limited to 'usr/src/uts/i86pc/os/cpuid.c')
-rw-r--r-- | usr/src/uts/i86pc/os/cpuid.c | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/usr/src/uts/i86pc/os/cpuid.c b/usr/src/uts/i86pc/os/cpuid.c index 731e885508..822ec8a4fa 100644 --- a/usr/src/uts/i86pc/os/cpuid.c +++ b/usr/src/uts/i86pc/os/cpuid.c @@ -564,6 +564,34 @@ cpuid_free_space(cpu_t *cpu) kmem_free(cpu->cpu_m.mcpu_cpi, sizeof (*cpu->cpu_m.mcpu_cpi)); } +#if !defined(__xpv) + +static void +check_for_hvm() +{ + struct cpuid_regs cp; + char *xen_str; + uint32_t xen_signature[4]; + extern int xpv_is_hvm; + + /* + * In a fully virtualized domain, Xen's pseudo-cpuid function + * 0x40000000 returns a string representing the Xen signature in + * %ebx, %ecx, and %edx. %eax contains the maximum supported cpuid + * function. + */ + cp.cp_eax = 0x40000000; + (void) __cpuid_insn(&cp); + xen_signature[0] = cp.cp_ebx; + xen_signature[1] = cp.cp_ecx; + xen_signature[2] = cp.cp_edx; + xen_signature[3] = 0; + xen_str = (char *)xen_signature; + if (strcmp("XenVMMXenVMM", xen_str) == 0 && cp.cp_eax <= 0x40000002) + xpv_is_hvm = 1; +} +#endif /* __xpv */ + uint_t cpuid_pass1(cpu_t *cpu) { @@ -1227,6 +1255,9 @@ cpuid_pass1(cpu_t *cpu) synth_info(cpi); pass1_done: +#if !defined(__xpv) + check_for_hvm(); +#endif cpi->cpi_pass = 1; return (feature); } @@ -3674,7 +3705,6 @@ void patch_tsc_read(int flag) { size_t cnt; - switch (flag) { case X86_NO_TSC: cnt = &_no_rdtsc_end - &_no_rdtsc_start; |