mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-06-07 17:46:15 +00:00
modulization: move functions related with cpu caps into cpu_caps.c
move cpu caps related functions like capability init/detect/check in cpu.c & mmu.c into a new file cpu_caps.c Changes to be committed: modified: developer-guides/hld/hv-memmgt.rst modified: ../hypervisor/Makefile modified: ../hypervisor/arch/x86/cpu.c new file: ../hypervisor/arch/x86/cpu_caps.c modified: ../hypervisor/arch/x86/mmu.c modified: ../hypervisor/arch/x86/vmx_asm.S modified: ../hypervisor/include/arch/x86/cpu.h new file: ../hypervisor/include/arch/x86/cpu_caps.h modified: ../hypervisor/include/arch/x86/guest/vm.h modified: ../hypervisor/include/arch/x86/mmu.h modified: ../hypervisor/include/arch/x86/vmcs.h Tracked-On: #1842 Signed-off-by: Jason Chen CJ <jason.cj.chen@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -66,7 +66,6 @@ int32_t vmx_wrmsr_pat(struct acrn_vcpu *vcpu, uint64_t value);
|
||||
|
||||
void vmx_write_cr0(struct acrn_vcpu *vcpu, uint64_t cr0);
|
||||
void vmx_write_cr4(struct acrn_vcpu *vcpu, uint64_t cr4);
|
||||
bool is_vmx_disabled(void);
|
||||
void switch_apicv_mode_x2apic(struct acrn_vcpu *vcpu);
|
||||
|
||||
static inline enum vm_cpu_mode get_vcpu_mode(const struct acrn_vcpu *vcpu)
|
||||
@@ -74,12 +73,6 @@ static inline enum vm_cpu_mode get_vcpu_mode(const struct acrn_vcpu *vcpu)
|
||||
return vcpu->arch.cpu_mode;
|
||||
}
|
||||
|
||||
static inline bool cpu_has_vmx_unrestricted_guest_cap(void)
|
||||
{
|
||||
return ((msr_read(MSR_IA32_VMX_MISC) & VMX_SUPPORT_UNRESTRICTED_GUEST)
|
||||
!= 0UL);
|
||||
}
|
||||
|
||||
#endif /* ASSEMBLER */
|
||||
|
||||
#endif /* VMCS_H_ */
|
||||
|
||||
Reference in New Issue
Block a user