[PATCH v2 1/1] KVM: arm64: allow the VM to select DEVICE_* and NORMAL_NC for IO memory

Shameerali Kolothum Thodi shameerali.kolothum.thodi at huawei.com
Tue Dec 5 06:16:51 PST 2023



> -----Original Message-----
> From: Catalin Marinas <catalin.marinas at arm.com>
> Sent: Tuesday, December 5, 2023 11:41 AM
> To: Marc Zyngier <maz at kernel.org>
> Cc: ankita at nvidia.com; Shameerali Kolothum Thodi
> <shameerali.kolothum.thodi at huawei.com>; jgg at nvidia.com;
> oliver.upton at linux.dev; suzuki.poulose at arm.com; yuzenghui
> <yuzenghui at huawei.com>; will at kernel.org; ardb at kernel.org; akpm at linux-
> foundation.org; gshan at redhat.com; aniketa at nvidia.com; cjia at nvidia.com;
> kwankhede at nvidia.com; targupta at nvidia.com; vsethi at nvidia.com;
> acurrid at nvidia.com; apopple at nvidia.com; jhubbard at nvidia.com;
> danw at nvidia.com; mochs at nvidia.com; kvmarm at lists.linux.dev;
> kvm at vger.kernel.org; lpieralisi at kernel.org; linux-kernel at vger.kernel.org;
> linux-arm-kernel at lists.infradead.org
> Subject: Re: [PATCH v2 1/1] KVM: arm64: allow the VM to select DEVICE_*
> and NORMAL_NC for IO memory
> 
> + Lorenzo, he really needs to be on this thread.
> 
> On Tue, Dec 05, 2023 at 09:21:28AM +0000, Marc Zyngier wrote:
> > On Tue, 05 Dec 2023 03:30:15 +0000,
> > <ankita at nvidia.com> wrote:
> > > From: Ankit Agrawal <ankita at nvidia.com>
> > >
> > > Currently, KVM for ARM64 maps at stage 2 memory that is considered
> device
> > > (i.e. it is not RAM) with DEVICE_nGnRE memory attributes; this setting
> > > overrides (as per the ARM architecture [1]) any device MMIO mapping
> > > present at stage 1, resulting in a set-up whereby a guest operating
> > > system cannot determine device MMIO mapping memory attributes on
> its
> > > own but it is always overridden by the KVM stage 2 default.
> [...]
> > Despite the considerable increase in the commit message length, a
> > number of questions are left unanswered:
> >
> > - Shameer reported a regression on non-FWB systems, breaking device
> >   assignment:
> >
> >
> https://lore.kernel.org/all/af13ed63dc9a4f26a6c958ebfa77d78a@huawei.co
> m/
> 
> This referred to the first patch in the old series which was trying to
> make the Stage 2 cacheable based on the vma attributes. That patch has
> been dropped for now. It would be good if Shameer confirms this was the
> problem.
>

Yes, that was related to the first patch. We will soon test this on both FWB and
non-FWB platforms and report back.

Thanks,
Shameer




More information about the linux-arm-kernel mailing list