Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-03-04 Thread Eric Auger
Hi Marc-André, On 3/3/22 5:16 PM, Marc-André Lureau wrote: > Hi > > On Thu, Mar 3, 2022 at 6:41 PM Eric Auger > wrote: > > Hi Stefan, > > On 2/8/22 6:58 PM, Eric Auger wrote: > > Hi Stefan, > > > > On 2/8/22 6:16 PM, Stefan Berger wrote: > >> >

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-03-03 Thread Marc-André Lureau
Hi On Thu, Mar 3, 2022 at 6:41 PM Eric Auger wrote: > Hi Stefan, > > On 2/8/22 6:58 PM, Eric Auger wrote: > > Hi Stefan, > > > > On 2/8/22 6:16 PM, Stefan Berger wrote: > >> > >> On 2/8/22 08:38, Eric Auger wrote: > >>> Representing the CRB cmd/response buffer as a standard > >>> RAM region caus

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-03-03 Thread Eric Auger
Hi Stefan, On 2/8/22 6:58 PM, Eric Auger wrote: > Hi Stefan, > > On 2/8/22 6:16 PM, Stefan Berger wrote: >> >> On 2/8/22 08:38, Eric Auger wrote: >>> Representing the CRB cmd/response buffer as a standard >>> RAM region causes some trouble when the device is used >>> with VFIO. Indeed VFIO attemp

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-09 Thread Eric Auger
Hi Peter, On 2/8/22 6:14 PM, Peter Maydell wrote: > On Tue, 8 Feb 2022 at 16:36, Alex Williamson > wrote: >> On Tue, 8 Feb 2022 16:01:48 + >> Peter Maydell wrote: >>> Well, it can if it likes, but "this is a RAM-backed MemoryRegion" >>> doesn't imply "this is really guest actual RAM RAM", s

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-09 Thread Eric Auger
Hi Dave, On 2/8/22 6:03 PM, Dr. David Alan Gilbert wrote: > * Eric Auger (eric.au...@redhat.com) wrote: >> Representing the CRB cmd/response buffer as a standard >> RAM region causes some trouble when the device is used >> with VFIO. Indeed VFIO attempts to DMA_MAP this region >> as usual RAM but

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 16:36, Alex Williamson wrote: > > On Tue, 8 Feb 2022 16:01:48 + > Peter Maydell wrote: > > Well, it can if it likes, but "this is a RAM-backed MemoryRegion" > > doesn't imply "this is really guest actual RAM RAM", so if it's > > using that as its discriminator it should

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Dr. David Alan Gilbert
* Eric Auger (eric.au...@redhat.com) wrote: > Representing the CRB cmd/response buffer as a standard > RAM region causes some trouble when the device is used > with VFIO. Indeed VFIO attempts to DMA_MAP this region > as usual RAM but this latter does not have a valid page > size alignment causing s

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Eric Auger
Hi Stefan, On 2/8/22 6:16 PM, Stefan Berger wrote: > > On 2/8/22 08:38, Eric Auger wrote: >> Representing the CRB cmd/response buffer as a standard >> RAM region causes some trouble when the device is used >> with VFIO. Indeed VFIO attempts to DMA_MAP this region >> as usual RAM but this latter do

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Eric Auger
Hi, On 2/8/22 5:01 PM, Peter Maydell wrote: > On Tue, 8 Feb 2022 at 15:56, Eric Auger wrote: >> Hi Peter, >> >> On 2/8/22 4:17 PM, Peter Maydell wrote: >>> On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: Representing the CRB cmd/response buffer as a standard RAM region causes some troubl

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 15:56, Eric Auger wrote: > > Hi Peter, > > On 2/8/22 4:17 PM, Peter Maydell wrote: > > On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: > >> Representing the CRB cmd/response buffer as a standard > >> RAM region causes some trouble when the device is used > >> with VFIO. Indee

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Stefan Berger
On 2/8/22 08:38, Eric Auger wrote: Representing the CRB cmd/response buffer as a standard RAM region causes some trouble when the device is used with VFIO. Indeed VFIO attempts to DMA_MAP this region as usual RAM but this latter does not have a valid page size alignment causing such an error re

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Alex Williamson
On Tue, 8 Feb 2022 16:01:48 + Peter Maydell wrote: > On Tue, 8 Feb 2022 at 15:56, Eric Auger wrote: > > > > Hi Peter, > > > > On 2/8/22 4:17 PM, Peter Maydell wrote: > > > On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: > > >> Representing the CRB cmd/response buffer as a standard > > >>

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Eric Auger
Hi Peter, On 2/8/22 4:17 PM, Peter Maydell wrote: > On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: >> Representing the CRB cmd/response buffer as a standard >> RAM region causes some trouble when the device is used >> with VFIO. Indeed VFIO attempts to DMA_MAP this region >> as usual RAM but this

Re: [PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Peter Maydell
On Tue, 8 Feb 2022 at 15:08, Eric Auger wrote: > > Representing the CRB cmd/response buffer as a standard > RAM region causes some trouble when the device is used > with VFIO. Indeed VFIO attempts to DMA_MAP this region > as usual RAM but this latter does not have a valid page > size alignment cau

[PATCH v4 1/2] tpm: CRB: Use ram_device for "tpm-crb-cmd" region

2022-02-08 Thread Eric Auger
Representing the CRB cmd/response buffer as a standard RAM region causes some trouble when the device is used with VFIO. Indeed VFIO attempts to DMA_MAP this region as usual RAM but this latter does not have a valid page size alignment causing such an error report: "vfio_listener_region_add receive