Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-20 Thread Alex Williamson
On Thu, 20 Feb 2025 11:45:35 +0100 Eric Auger wrote: > Hi Alex, > > On 2/20/25 11:31 AM, Eric Auger wrote: > > > > Hi Alex, > > > > On 2/19/25 10:19 PM, Alex Williamson wrote: > >> On Wed, 19 Feb 2025 11:58:44 -0700 > >> Alex Williamson wrote: > >> > >>> On Wed, 19 Feb 2025 18:58:58 +0100

Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-20 Thread Alex Williamson
On Thu, 20 Feb 2025 08:07:23 -0700 Alex Williamson wrote: > On Thu, 20 Feb 2025 11:45:35 +0100 > Eric Auger wrote: > > > Hi Alex, > > > > On 2/20/25 11:31 AM, Eric Auger wrote: > > > > > > Hi Alex, > > > > > > On 2/19/25 10:19 PM, Alex Williamson wrote: > > >> On Wed, 19 Feb 2025 11:58

Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-20 Thread Eric Auger
Hi Alex, On 2/20/25 11:31 AM, Eric Auger wrote: > > Hi Alex, > > On 2/19/25 10:19 PM, Alex Williamson wrote: >> On Wed, 19 Feb 2025 11:58:44 -0700 >> Alex Williamson wrote: >> >>> On Wed, 19 Feb 2025 18:58:58 +0100 >>> Eric Auger wrote: >>> Since kernel commit: 2b2c651baf1c ("vfio/pc

Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-20 Thread Eric Auger
Hi Alex, On 2/19/25 10:19 PM, Alex Williamson wrote: > On Wed, 19 Feb 2025 11:58:44 -0700 > Alex Williamson wrote: > >> On Wed, 19 Feb 2025 18:58:58 +0100 >> Eric Auger wrote: >> >>> Since kernel commit: >>> 2b2c651baf1c ("vfio/pci: Invalidate mmaps and block the access >>> in D3hot power stat

RE: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-20 Thread Duan, Zhenzhong
>-Original Message- >From: Alex Williamson >Subject: Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in >d3hot state > >On Thu, 20 Feb 2025 04:24:13 + >"Duan, Zhenzhong" wrote: > >> >-Original Message- >> >

Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-19 Thread Alex Williamson
On Thu, 20 Feb 2025 04:24:13 + "Duan, Zhenzhong" wrote: > >-Original Message- > >From: Alex Williamson > >Subject: Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in > >d3hot state > > > >On Wed, 19 Feb 2025 18:58:58 +0100

RE: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-19 Thread Duan, Zhenzhong
>-Original Message- >From: Alex Williamson >Subject: Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in >d3hot state > >On Wed, 19 Feb 2025 18:58:58 +0100 >Eric Auger wrote: > >> Since kernel commit: >> 2b2c651baf1c ("vfio/pci: In

Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-19 Thread Alex Williamson
On Wed, 19 Feb 2025 11:58:44 -0700 Alex Williamson wrote: > On Wed, 19 Feb 2025 18:58:58 +0100 > Eric Auger wrote: > > > Since kernel commit: > > 2b2c651baf1c ("vfio/pci: Invalidate mmaps and block the access > > in D3hot power state") > > any attempt to do an mmap access to a BAR when the devi

[RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-19 Thread Eric Auger
Since kernel commit: 2b2c651baf1c ("vfio/pci: Invalidate mmaps and block the access in D3hot power state") any attempt to do an mmap access to a BAR when the device is in d3hot state will generate a fault. On system_powerdown, if the VFIO device is translated by an IOMMU, the device is moved to D3

Re: [RFC 0/2] hw/vfio/pci: Prevent BARs from being dma mapped in d3hot state

2025-02-19 Thread Alex Williamson
On Wed, 19 Feb 2025 18:58:58 +0100 Eric Auger wrote: > Since kernel commit: > 2b2c651baf1c ("vfio/pci: Invalidate mmaps and block the access > in D3hot power state") > any attempt to do an mmap access to a BAR when the device is in d3hot > state will generate a fault. > > On system_powerdown, if