[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v3 1/7] memory: associate DMA accesses with the initiator Dev
|
From: |
Alexander Bulekov |
|
Subject: |
Re: [PATCH v3 1/7] memory: associate DMA accesses with the initiator Device |
|
Date: |
Tue, 15 Nov 2022 12:44:23 -0500 |
On 221115 1119, Peter Xu wrote:
> On Fri, Oct 28, 2022 at 03:16:42PM -0400, Alexander Bulekov wrote:
> > + /* Do not allow more than one simultanous access to a device's IO
> > Regions */
> > + if (mr->owner &&
> > + !mr->ram_device && !mr->ram && !mr->rom_device &&
> > !mr->readonly) {
> > + dev = (DeviceState *) object_dynamic_cast(mr->owner, TYPE_DEVICE);
> > + if (dev->mem_reentrancy_guard.engaged_in_io) {
>
> Do we need to check dev being non-NULL? Fundamentally it's about whether
> the owner can be not a DeviceState, I believe it's normally true but I
> can't tell; at least from memory region API it can be any Object*.
>
I'll add a NULL-check
Thanks