[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
<SA1PR12MB7199F2B88CEB501F498FF903B07DA@SA1PR12MB7199.namprd12.prod.outlook.com>
Date: Thu, 19 Jun 2025 02:21:02 +0000
From: Ankit Agrawal <ankita@...dia.com>
To: Catalin Marinas <catalin.marinas@....com>
CC: Jason Gunthorpe <jgg@...dia.com>, "maz@...nel.org" <maz@...nel.org>,
"oliver.upton@...ux.dev" <oliver.upton@...ux.dev>, "joey.gouly@....com"
<joey.gouly@....com>, "suzuki.poulose@....com" <suzuki.poulose@....com>,
"yuzenghui@...wei.com" <yuzenghui@...wei.com>, "will@...nel.org"
<will@...nel.org>, "ryan.roberts@....com" <ryan.roberts@....com>,
"shahuang@...hat.com" <shahuang@...hat.com>, "lpieralisi@...nel.org"
<lpieralisi@...nel.org>, "david@...hat.com" <david@...hat.com>,
"ddutile@...hat.com" <ddutile@...hat.com>, "seanjc@...gle.com"
<seanjc@...gle.com>, Aniket Agashe <aniketa@...dia.com>, Neo Jia
<cjia@...dia.com>, Kirti Wankhede <kwankhede@...dia.com>, Krishnakant Jaju
<kjaju@...dia.com>, "Tarun Gupta (SW-GPU)" <targupta@...dia.com>, Vikram
Sethi <vsethi@...dia.com>, Andy Currid <acurrid@...dia.com>, Alistair Popple
<apopple@...dia.com>, John Hubbard <jhubbard@...dia.com>, Dan Williams
<danw@...dia.com>, Zhi Wang <zhiw@...dia.com>, Matt Ochs <mochs@...dia.com>,
Uday Dhoke <udhoke@...dia.com>, Dheeraj Nigam <dnigam@...dia.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"sebastianene@...gle.com" <sebastianene@...gle.com>, "coltonlewis@...gle.com"
<coltonlewis@...gle.com>, "kevin.tian@...el.com" <kevin.tian@...el.com>,
"yi.l.liu@...el.com" <yi.l.liu@...el.com>, "ardb@...nel.org"
<ardb@...nel.org>, "akpm@...ux-foundation.org" <akpm@...ux-foundation.org>,
"gshan@...hat.com" <gshan@...hat.com>, "linux-mm@...ck.org"
<linux-mm@...ck.org>, "tabba@...gle.com" <tabba@...gle.com>,
"qperret@...gle.com" <qperret@...gle.com>, "kvmarm@...ts.linux.dev"
<kvmarm@...ts.linux.dev>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>, "linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>, "maobibo@...ngson.cn"
<maobibo@...ngson.cn>
Subject: Re: [PATCH v7 2/5] KVM: arm64: Block cacheable PFNMAP mapping
Thanks Catalin for reviewing the patch.
>> static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>> struct kvm_s2_trans *nested,
>> struct kvm_memory_slot *memslot, unsigned long hva,
>> @@ -1477,7 +1493,7 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
>> {
>> int ret = 0;
>> bool write_fault, writable, force_pte = false;
>> - bool exec_fault, mte_allowed;
>> + bool exec_fault, mte_allowed, is_vma_cacheable = false;
>
> Nit: do we need to initialise is_vma_cacheable here? It did not seem
> used until the kvm_vma_is_cacheable() call. Anyway, it's harmless.
Shouldn't be necessary. I'll remove it.
>> if (disable_cmo) {
>> + if (is_vma_cacheable) {
>> + ret = -EINVAL;
>> + goto out_unlock;
>> + }
>
> so, is there anything else changing 'disable_cmo' up to this point? If
> not, I'd drop the second is_vma_cacheable check.
>
> --
> Catalin
Ack, we don't need the second check.
Powered by blists - more mailing lists