[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250618163836.GA1629589@nvidia.com>
Date: Wed, 18 Jun 2025 13:38:36 -0300
From: Jason Gunthorpe <jgg@...dia.com>
To: Catalin Marinas <catalin.marinas@....com>
Cc: ankita@...dia.com, maz@...nel.org, oliver.upton@...ux.dev,
joey.gouly@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
will@...nel.org, ryan.roberts@....com, shahuang@...hat.com,
lpieralisi@...nel.org, david@...hat.com, ddutile@...hat.com,
seanjc@...gle.com, aniketa@...dia.com, cjia@...dia.com,
kwankhede@...dia.com, kjaju@...dia.com, targupta@...dia.com,
vsethi@...dia.com, acurrid@...dia.com, apopple@...dia.com,
jhubbard@...dia.com, danw@...dia.com, zhiw@...dia.com,
mochs@...dia.com, udhoke@...dia.com, dnigam@...dia.com,
alex.williamson@...hat.com, sebastianene@...gle.com,
coltonlewis@...gle.com, kevin.tian@...el.com, yi.l.liu@...el.com,
ardb@...nel.org, akpm@...ux-foundation.org, gshan@...hat.com,
linux-mm@...ck.org, tabba@...gle.com, qperret@...gle.com,
kvmarm@...ts.linux.dev, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, maobibo@...ngson.cn
Subject: Re: [PATCH v7 4/5] KVM: arm64: Allow cacheable stage 2 mapping using
VMA flags
On Wed, Jun 18, 2025 at 05:34:16PM +0100, Catalin Marinas wrote:
> > + *
> > + * Do not set device as the device memory is cacheable. Note
> > + * that such mapping is safe as the KVM S2 will have the same
> > + * Normal memory type as the VMA has in the S1.
> > */
> > - disable_cmo = true;
> > + if (!is_vma_cacheable)
> > + disable_cmo = true;
>
> I'm tempted to stick to the 'device' variable name. Or something like
> s2_noncacheable. As I commented, it's not just about disabling CMOs.
I think it would be clearer to have two concepts/variable then because
the cases where it is really about preventing cachable access to
prevent aborts are not linked to the logic that checks pfn valid. We
have to detect those cases separately (through the VMA flags was it?).
Having these two things together is IMHO confusing..
Jason
Powered by blists - more mailing lists