On Thu, 1 Apr 2021 at 13:55, Haibo Xu <[email protected]> wrote: > > Adds an el2=[on/off] option to enable/disable el2(nested virtualization) > support in KVM guest vCPU. > > Signed-off-by: Haibo Xu <[email protected]> > --- > target/arm/cpu.c | 11 ++++++++++ > target/arm/cpu.h | 4 ++++ > target/arm/cpu64.c | 52 ++++++++++++++++++++++++++++++++++++++++++++++ > 3 files changed, 67 insertions(+) > > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index ae04884408..30cc330f50 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c > @@ -1349,6 +1349,17 @@ void arm_cpu_finalize_features(ARMCPU *cpu, Error > **errp) > return; > } > } > + > + /* > + * Currently, vCPU feature 'el2' only supported in KVM mode. > + */ > + if (kvm_enabled()) { > + arm_cpu_el2_finalize(cpu, &local_err); > + if (local_err != NULL) { > + error_propagate(errp, local_err); > + return; > + } > + }
I don't understand this. EL2 is supported in TCG as well... thanks -- PMM
