[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface
From: |
Li Qiang |
Subject: |
Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface |
Date: |
Wed, 9 Sep 2020 12:58:22 +0800 |
Gerd Hoffmann <kraxel@redhat.com> 于2020年9月9日周三 下午12:49写道:
>
> On Wed, Sep 09, 2020 at 10:15:47AM +0800, Jason Wang wrote:
> >
> > On 2020/9/9 上午12:41, Li Qiang wrote:
> > > Currently the MR is not explicitly connecting with its device instead of
> > > a opaque. In most situation this opaque is the deivce but it is not an
> > > enforcement. This patch adds a DeviceState member of to MemoryRegion
> > > we will use it in later patch.
> >
> >
> > I don't have a deep investigation. But I wonder whether we could make sure
> > of owner instead of adding a new field here.
>
> Should be possible. There is object_dynamic_cast() which can be used to
> figure whenever a given owner object is a device.
>
I found most caller of 'memory_region_init_io' will set the owner to
the device object.
But some of them will just set it to NULL. Do will have a clear rule
that the device's MR
'owner' should be the device object? If yes, we can use this field.
Thanks,
Li Qiang
> take care,
> Gerd
>
- [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO, Li Qiang, 2020/09/08
- [RFC 3/4] e1000e: use the new memory_region_init_io_with_dev interface, Li Qiang, 2020/09/08
- [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Li Qiang, 2020/09/08
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Jason Wang, 2020/09/08
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Li Qiang, 2020/09/09
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Gerd Hoffmann, 2020/09/09
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface,
Li Qiang <=
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Alexander Bulekov, 2020/09/09
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Li Qiang, 2020/09/10
- Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Jason Wang, 2020/09/13
Re: [RFC 1/4] memory: add memory_region_init_io_with_dev interface, Paolo Bonzini, 2020/09/20
[RFC 2/4] memory: avoid reenter the device's MMIO handler while processing MMIO, Li Qiang, 2020/09/08
[RFC 4/4] hcd-xhci: use the new memory_region_init_io_with_dev interface, Li Qiang, 2020/09/08
Re: [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO, Jason Wang, 2020/09/08
Re: [RFC 0/4] Add a 'in_mmio' device flag to avoid the DMA to MMIO, Paolo Bonzini, 2020/09/20