mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2026-01-04 23:24:56 +00:00
hv: mmu: add some API for guest page mode check
add is_long_mode to check whether the processor is operating in IA-32e mode add is_paging_enabled to check whether paging is enabled add is_pae to check whether physical address extension is enabled. Tracked-On: #1379 Signed-off-by: Li, Fei1 <fei1.li@intel.com>
This commit is contained in:
@@ -321,7 +321,7 @@ int create_vcpu(uint16_t pcpu_id, struct vm *vm, struct vcpu **rtn_vcpu_handle)
|
||||
|
||||
static void set_vcpu_mode(struct vcpu *vcpu, uint32_t cs_attr)
|
||||
{
|
||||
if (vcpu_get_efer(vcpu) & MSR_IA32_EFER_LMA_BIT) {
|
||||
if (is_long_mode(vcpu)) {
|
||||
if (cs_attr & 0x2000) /* CS.L = 1 */
|
||||
vcpu->arch_vcpu.cpu_mode = CPU_MODE_64BIT;
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user