Re: An issue with x86 tcg and MMIO

2023-02-02 Thread Peter Maydell
On Thu, 2 Feb 2023 at 12:31, Jonathan Cameron wrote: > > On Thu, 2 Feb 2023 11:39:28 + > Peter Maydell wrote: > > You might want to look at whether QEMU's iommu functionality is helpful > > to you -- I'm assuming CXL doesn't do weird stuff on a less-than-page > > granularity, and the iommu AP

Re: An issue with x86 tcg and MMIO

2023-02-02 Thread Jonathan Cameron via
On Thu, 2 Feb 2023 11:39:28 + Peter Maydell wrote: > On Thu, 2 Feb 2023 at 10:56, Richard Henderson > wrote: > > > > On 2/1/23 23:39, Jonathan Cameron wrote: > > > Not sure - if we can do the handling above then sure we could make that > > > change. > > > I can see there is a path to regi

Re: An issue with x86 tcg and MMIO

2023-02-02 Thread Peter Maydell
On Thu, 2 Feb 2023 at 10:56, Richard Henderson wrote: > > On 2/1/23 23:39, Jonathan Cameron wrote: > > Not sure - if we can do the handling above then sure we could make that > > change. > > I can see there is a path to register the callbacks but I'd kind of assumed > > ROM meant read only... > >

Re: An issue with x86 tcg and MMIO

2023-02-02 Thread Richard Henderson
On 2/1/23 23:39, Jonathan Cameron wrote: Not sure - if we can do the handling above then sure we could make that change. I can see there is a path to register the callbacks but I'd kind of assumed ROM meant read only... I think "romd" means "read mostly". In the case of flash, I believe that a

Re: An issue with x86 tcg and MMIO

2023-02-02 Thread Jonathan Cameron via
On Wed, 1 Feb 2023 11:50:50 -1000 Richard Henderson wrote: > On 2/1/23 05:24, Jørgen Hansen wrote: > > Hello Richard, > > > > We are using x86 qemu to test some CXL stuff, and in that process we are > > running into an issue with tcg. In qemu, CXL memory is mapped as an MMIO > > region, so when

Re: An issue with x86 tcg and MMIO

2023-02-01 Thread Richard Henderson
On 2/1/23 05:24, Jørgen Hansen wrote: Hello Richard, We are using x86 qemu to test some CXL stuff, and in that process we are running into an issue with tcg. In qemu, CXL memory is mapped as an MMIO region, so when using CXL memory as part of the system memory, application code and data can be s