[PATCH v11 00/43] KVM: arm64: Nested Virtualization support (FEAT_NV2 only)

Marc Zyngier maz at kernel.org
Tue Nov 21 11:02:45 PST 2023


On Tue, 21 Nov 2023 16:49:52 +0000,
Miguel Luis <miguel.luis at oracle.com> wrote:
> 
> Hi Marc,
> 
> > On 20 Nov 2023, at 12:09, Marc Zyngier <maz at kernel.org> wrote:
> > 
> > This is the 5th drop of NV support on arm64 for this year, and most
> > probably the last one for this side of Christmas.
> > 
> > For the previous episodes, see [1].
> > 
> > What's changed:
> > 
> > - Drop support for the original FEAT_NV. No existing hardware supports
> >  it without FEAT_NV2, and the architecture is deprecating the former
> >  entirely. This results in fewer patches, and a slightly simpler
> >  model overall.
> > 
> > - Reorganise the series to make it a bit more logical now that FEAT_NV
> >  is gone.
> > 
> > - Apply the NV idreg restrictions on VM first run rather than on each
> >  access.
> > 
> > - Make the nested vgic shadow CPU interface a per-CPU structure rather
> >  than per-vcpu.
> > 
> > - Fix the EL0 timer fastpath
> > 
> > - Work around the architecture deficiencies when trapping WFI from a
> >  L2 guest.
> > 
> > - Fix sampling of nested vgic state (MISR, ELRSR, EISR)
> > 
> > - Drop the patches that have already been merged (NV trap forwarding,
> >  per-MMU VTCR)
> > 
> > - Rebased on top of 6.7-rc2 + the FEAT_E2H0 support [2].
> > 
> > The branch containing these patches (and more) is at [3]. As for the
> > previous rounds, my intention is to take a prefix of this series into
> > 6.8, provided that it gets enough reviewing.
> > 
> > [1] https://lore.kernel.org/r/20230515173103.1017669-1-maz@kernel.org
> > [2] https://lore.kernel.org/r/20231120123721.851738-1-maz@kernel.org
> > [3] https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms.git/log/?h=kvm-arm64/nv-6.8-nv2-only
> > 
> 
> While I was testing this with kvmtool for 5.16 I noted the following on dmesg:
> 
> [  803.014258] kvm [19040]: Unsupported guest sys_reg access at: 8129fa50 [600003c9]
>                 { Op0( 3), Op1( 5), CRn( 1), CRm( 0), Op2( 2), func_read },
> 
> This is CPACR_EL12.

CPACR_EL12 is redirected to VNCR[0x100]. It really shouldn't trap...

> Still need yet to debug.

Can you disassemble the guest around the offending PC?

> As for QEMU, it is having issues enabling _EL2 feature although EL2
> is supported by checking KVM_CAP_ARM_EL2; need yet to debug this.

The capability number changes at each release. Make sure you resync
your includes.

	M.

-- 
Without deviation from the norm, progress is not possible.



More information about the linux-arm-kernel mailing list