[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <a372b4b6-ae34-c618-3569-4d5f5ab760c1@nvidia.com>
Date: Sat, 24 Apr 2021 16:59:15 +0530
From: Sumit Gupta <sumitg@...dia.com>
To: Marc Zyngier <maz@...nel.org>, Krishna Reddy <vdumpa@...dia.com>
CC: Jean-Philippe Brucker <jean-philippe@...aro.org>,
"eric.auger@...hat.com" <eric.auger@...hat.com>,
"alex.williamson@...hat.com" <alex.williamson@...hat.com>,
"eric.auger.pro@...il.com" <eric.auger.pro@...il.com>,
"iommu@...ts.linux-foundation.org" <iommu@...ts.linux-foundation.org>,
"jiangkunkun@...wei.com" <jiangkunkun@...wei.com>,
"joro@...tes.org" <joro@...tes.org>,
"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"kvmarm@...ts.cs.columbia.edu" <kvmarm@...ts.cs.columbia.edu>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"lushenming@...wei.com" <lushenming@...wei.com>,
"robin.murphy@....com" <robin.murphy@....com>,
"tn@...ihalf.com" <tn@...ihalf.com>,
"vivek.gautam@....com" <vivek.gautam@....com>,
Vikram Sethi <vsethi@...dia.com>,
"wangxingang5@...wei.com" <wangxingang5@...wei.com>,
"will@...nel.org" <will@...nel.org>,
"zhangfei.gao@...aro.org" <zhangfei.gao@...aro.org>,
"zhukeqian1@...wei.com" <zhukeqian1@...wei.com>,
Sachin Nikam <Snikam@...dia.com>,
Bibek Basu <bbasu@...dia.com>,
Shanker Donthineni <sdonthineni@...dia.com>,
Sumit Gupta <sumitg@...dia.com>
Subject: Re: [PATCH v14 00/13] SMMUv3 Nested Stage Setup (IOMMU part)
>> I have worked around the issue by filtering out the request if the
>> pfn is not valid in __clean_dcache_guest_page(). As the patch
>> wasn't posted in the community, reverted it as well.
>
> That's papering over the real issue, and this mapping path needs
> fixing as it was only ever expected to be called for CoW.
>
> Can you please try the following patch and let me know if that fixes
> the issue for good?
>
Hi Marc,
Thank you for the patch. This patch fixed the crash for me.
For the formal patch, please add:
Tested-by: Sumit Gupta <sumitg@...dia.com>
>
> diff --git a/arch/arm64/kvm/mmu.c b/arch/arm64/kvm/mmu.c
> index 77cb2d28f2a4..b62dd40a4083 100644
> --- a/arch/arm64/kvm/mmu.c
> +++ b/arch/arm64/kvm/mmu.c
> @@ -1147,7 +1147,8 @@ int kvm_set_spte_hva(struct kvm *kvm, unsigned long hva, pte_t pte)
> * We've moved a page around, probably through CoW, so let's treat it
> * just like a translation fault and clean the cache to the PoC.
> */
> - clean_dcache_guest_page(pfn, PAGE_SIZE);
> + if (!kvm_is_device_pfn(pfn))
> + clean_dcache_guest_page(pfn, PAGE_SIZE);
> handle_hva_to_gpa(kvm, hva, end, &kvm_set_spte_handler, &pfn);
> return 0;
> }
>
>
> --
> Without deviation from the norm, progress is not possible.
>
Powered by blists - more mailing lists