Re: [PATCH 1/2] dma: add Qualcomm Technologies HIDMA management driver
From: Sinan Kaya
Date: Tue Nov 03 2015 - 20:04:57 EST
On 11/3/2015 7:42 AM, Arnd Bergmann wrote:
You have a distinct "compatible" string for qemu, right? It sounds like
this is not the same device if the dependencies are different, and
you could just have two ways to probe the same device.
No, it is the same dma channel object that gets probed by the same name
like the hypervisor. The channel object gets unbound from the
hypervisor, it then gets bound to VFIO. Then, eventually QEMU takes
over. The channel driver does not know under which OS it is running and
it works in both environments as it is without any code changes at this
moment.
The split between the two drivers still feels a little awkward overall,
it might be good to give it some more thought.
I see. I'd like to keep the management driver as independent as possible
from the channel driver for security and functionality reasons. I need
to keep the management addresses and functionality in the hypervisor only.
> Would it work to describe the combination of the channel and management
registers as a single device with a single driver, but the management
parts being optional? That way, the management registers could be
intergrated better into the dmaengine framework, to provide a consistent
API to user space.
I can compile both management driver and channel driver into the same
module if it sounds better. I can probe one with channel and another
with the management name. I just need to be careful about not sharing
any kind of data structure between them otherwise virtualization will break.
I consider the management driver a client of the DMA engine API at this
moment.
--
Sinan Kaya
Qualcomm Technologies, Inc. on behalf of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/