Changeset View
Changeset View
Standalone View
Standalone View
sys/amd64/vmm/intel/vmx.h
Show First 20 Lines • Show All 154 Lines • ▼ Show 20 Lines | |||||
static inline bool | static inline bool | ||||
vmx_have_msr_tsc_aux(struct vmx *vmx) | vmx_have_msr_tsc_aux(struct vmx *vmx) | ||||
{ | { | ||||
int rdpid_rdtscp_bits = ((1 << VM_CAP_RDPID) | (1 << VM_CAP_RDTSCP)); | int rdpid_rdtscp_bits = ((1 << VM_CAP_RDPID) | (1 << VM_CAP_RDTSCP)); | ||||
/* | /* | ||||
* Since the values of these bits are uniform across all vCPUs | * Since the values of these bits are uniform across all vCPUs | ||||
* (see discussion in vmx_init() and initialization of these bits | * (see discussion in vmx_modinit() and initialization of these bits | ||||
* in vmx_vminit()), just always use vCPU-zero's capability set and | * in vmx_init()), just always use vCPU-zero's capability set and | ||||
* remove the need to require a vcpuid argument. | * remove the need to require a vcpuid argument. | ||||
*/ | */ | ||||
return ((vmx->cap[0].set & rdpid_rdtscp_bits) != 0); | return ((vmx->cap[0].set & rdpid_rdtscp_bits) != 0); | ||||
} | } | ||||
#endif | #endif |