qemu-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ID_AA64MMFR1 VHE fields read as 0 when virtualization=true


From: Peter Maydell
Subject: Re: ID_AA64MMFR1 VHE fields read as 0 when virtualization=true
Date: Thu, 17 Feb 2022 11:54:00 +0000

On Thu, 17 Feb 2022 at 08:49, Chan Kim <ckim@etri.re.kr> wrote:
> I found by setting -cpu max, this ID_AA64MMFR1 register value is read 
> correctly.

The value is correct in both cases. The Cortex-A72 does not implement
the VHE architecture feature (it is mandatory from Armv8.1, but the
A72 is an Armv8.0 core). The 'max' CPU implements every feature
our emulation supports, which includes VHE.

> But with qemu-5.1.0, this register value’s VH value is read as “0000” so it 
> goes to ‘install_el2_stub’ and returns with ‘msr elr_el2, lr’ and ‘eret’ so 
> that it drops down to el1 and start_kernsl runs in el1.

This is all expected -- if the CPU does not support VHE then
the kernel will fall back to implementing KVM in the older way
(running the kernel proper in EL1 and with stub code in EL2
to do the things that must be done from EL2).

> I thought by setting ‘virtualization=true’, the VH value will be
> read as 1 and other VH features will be enabled in qemu but it seems not.

No. virtualization=true just means "CPU should support virtualization,
ie have an EL2".

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]