Subject: Re: [RFC 1/2] vfio/pci: keep the prefetchable attribute of a BAR region in VMA

From: Marc Zyngier <[email-masked]>
Date: Fri, 30 Apr 2021 16:07:22 +0100

On Fri, 30 Apr 2021 14:07:46 +0100,
Shanker R Donthineni <[email-masked]> wrote:
> 
> 
> Hi Marc,
> 
> On 4/30/21 6:47 AM, Marc Zyngi
> >>>> We've two concerns here:
> >>>>    - Performance impacts for pass-through devices.
> >>>>    - The definition of ioremap_wc() function doesn't match the host
> >>>> kernel on ARM64
> >>> Performance I can understand, but I think you're also using it to mask
> >>> a driver bug which should be resolved first.  Thank
> >> We’ve already instrumented the driver code and found the code path
> >> for the unaligned accesses. We’ll fix this issue if it’s not
> >> following WC semantics.
> >>
> >> Fixing the performance concern will be under KVM stage-2 page-table
> >> control. We're looking for a guidance/solution for updating stage-2
> >> PTE based on PCI-BAR attribute.
> > Before we start discussing the *how*, I'd like to clearly understand
> > what *arm64* memory attributes you are relying on. We already have
> > established that the unaligned access was a bug, which was the biggest
> > argument in favour of NORMAL_NC. What are the other requirements?
> >
> We are  relying  on NORMAL_NC mapping for PCI prefetchable BARs
> instead of DEVICE_nGnRE in baremetal and VM.  No other requirement
> other than this.

That wasn't really my question. What properties do you require for
this assigned MMIO window outside of unaligned accesses? Or to put it
another way, what goes wrong with any of the other device types?

	M.

-- 
Without deviation from the norm, progress is not possible.

_______________________________________________
linux-arm-kernel mailing list
[email-masked]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel