Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965197AbbKDBEz (ORCPT ); Tue, 3 Nov 2015 20:04:55 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:58544 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755445AbbKDBEw (ORCPT ); Tue, 3 Nov 2015 20:04:52 -0500 Subject: Re: [PATCH 1/2] dma: add Qualcomm Technologies HIDMA management driver To: Arnd Bergmann References: <1446174501-8870-1-git-send-email-okaya@codeaurora.org> <9016417.z9Hz6MbmvQ@wuerfel> <56383BDD.9090903@codeaurora.org> <4010471.Nu3L6CWPWG@wuerfel> Cc: dmaengine@vger.kernel.org, timur@codeaurora.org, cov@codeaurora.org, jcm@redhat.com, Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Vinod Koul , Dan Williams , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org From: Sinan Kaya Message-ID: <563959B1.5020101@codeaurora.org> Date: Tue, 3 Nov 2015 20:04:49 -0500 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <4010471.Nu3L6CWPWG@wuerfel> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2081 Lines: 45 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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/