[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ZcTqcqE69zkLZgQx@arm.com>
Date: Thu, 8 Feb 2024 14:51:30 +0000
From: Catalin Marinas <catalin.marinas@....com>
To: ankita@...dia.com
Cc: jgg@...dia.com, maz@...nel.org, oliver.upton@...ux.dev,
james.morse@....com, suzuki.poulose@....com, yuzenghui@...wei.com,
reinette.chatre@...el.com, surenb@...gle.com, stefanha@...hat.com,
brauner@...nel.org, will@...nel.org, mark.rutland@....com,
alex.williamson@...hat.com, kevin.tian@...el.com,
yi.l.liu@...el.com, ardb@...nel.org, akpm@...ux-foundation.org,
andreyknvl@...il.com, wangjinchao@...sion.com, gshan@...hat.com,
ricarkol@...gle.com, linux-mm@...ck.org, lpieralisi@...nel.org,
rananta@...gle.com, ryan.roberts@....com, aniketa@...dia.com,
cjia@...dia.com, kwankhede@...dia.com, targupta@...dia.com,
vsethi@...dia.com, acurrid@...dia.com, apopple@...dia.com,
jhubbard@...dia.com, danw@...dia.com, kvmarm@...ts.linux.dev,
mochs@...dia.com, zhiw@...dia.com, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH v6 3/4] kvm: arm64: set io memory s2 pte as normalnc for
vfio pci device
On Thu, Feb 08, 2024 at 02:16:51AM +0530, ankita@...dia.com wrote:
> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
> index d14504821b79..e1e6847a793b 100644
> --- a/arch/arm64/kvm/mmu.c
> +++ b/arch/arm64/kvm/mmu.c
> @@ -1381,7 +1381,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 device = false;
> + bool device = false, vfio_allow_wc = false;
> unsigned long mmu_seq;
> struct kvm *kvm = vcpu->kvm;
> struct kvm_mmu_memory_cache *memcache = &vcpu->arch.mmu_page_cache;
> @@ -1472,6 +1472,8 @@ static int user_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa,
> gfn = fault_ipa >> PAGE_SHIFT;
> mte_allowed = kvm_vma_mte_allowed(vma);
>
> + vfio_allow_wc = (vma->vm_flags & VM_VFIO_ALLOW_WC);
Nitpick: no need for brackets, '=' has a pretty low precedence.
Reviewed-by: Catalin Marinas <catalin.marinas@....com>
Powered by blists - more mailing lists