On Thu, 20 May 2021 14:32:17 +0100, Zenghui Yu <yuzenghui@xxxxxxxxxx> wrote: > > On 2021/5/11 0:58, Marc Zyngier wrote: > > From: Jintack Lim <jintack.lim@xxxxxxxxxx> > > > > Add a new ARM64_HAS_NESTED_VIRT feature to indicate that the > > CPU has the ARMv8.3 nested virtualization capability. > > > > This will be used to support nested virtualization in KVM. > > > > Signed-off-by: Jintack Lim <jintack.lim@xxxxxxxxxx> > > Signed-off-by: Andre Przywara <andre.przywara@xxxxxxx> > > Signed-off-by: Christoffer Dall <christoffer.dall@xxxxxxx> > > Signed-off-by: Marc Zyngier <maz@xxxxxxxxxx> > > --- > > .../admin-guide/kernel-parameters.txt | 4 +++ > > arch/arm64/include/asm/cpucaps.h | 1 + > > arch/arm64/kernel/cpufeature.c | 25 +++++++++++++++++++ > > 3 files changed, 30 insertions(+) > > [...] > > > diff --git a/arch/arm64/kernel/cpufeature.c b/arch/arm64/kernel/cpufeature.c > > index efed2830d141..056de86d7f6f 100644 > > --- a/arch/arm64/kernel/cpufeature.c > > +++ b/arch/arm64/kernel/cpufeature.c > > @@ -1645,6 +1645,21 @@ static void cpu_copy_el2regs(const struct arm64_cpu_capabilities *__unused) > > write_sysreg(read_sysreg(tpidr_el1), tpidr_el2); > > } > > +static bool nested_param; > > +static bool has_nested_virt_support(const struct arm64_cpu_capabilities *cap, > > + int scope) > > +{ > > + return has_cpuid_feature(cap, scope) && > > + nested_param; > > +} > > Nitpick: > > How about putting them into a single line (they still perfectly > fit within the 80-colume limit)? Fair enough. M. -- Without deviation from the norm, progress is not possible. _______________________________________________ kvmarm mailing list kvmarm@xxxxxxxxxxxxxxxxxxxxx https://lists.cs.columbia.edu/mailman/listinfo/kvmarm