All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: "Sai Pavan Boddu" <saipava@xilinx.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Markus Armbruster" <armbru@redhat.com>,
	"'Marc-André Lureau'" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Gerd Hoffmann" <kraxel@redhat.com>,
	"Edgar Iglesias" <edgari@xilinx.com>,
	"Francisco Eduardo Iglesias" <figlesia@xilinx.com>,
	"David Gibson" <david@gibson.dropbear.id.au>
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	Vikram Garhwal <fnuv@xilinx.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	Paul Zimmerman <pauldzim@gmail.com>,
	Alistair Francis <alistair.francis@wdc.com>,
	Ying Fang <fangying1@huawei.com>
Subject: Re: [PATCH v4 1/7] usb/hcd-xhci: Make dma read/writes hooks pci free
Date: Tue, 8 Sep 2020 14:26:44 +0200	[thread overview]
Message-ID: <fe1cf46a-7669-8d84-aa5e-4ad67a23db3c@redhat.com> (raw)
In-Reply-To: <BY5PR02MB67724F130F0AF42FB0689148CA290@BY5PR02MB6772.namprd02.prod.outlook.com>

On 9/8/20 1:35 PM, Sai Pavan Boddu wrote:
> Hi Philippe,
> 
>> -----Original Message-----
>> From: Philippe Mathieu-Daudé <philmd@redhat.com>
>> Sent: Tuesday, September 8, 2020 4:05 PM
>> To: Sai Pavan Boddu <saipava@xilinx.com>; Peter Maydell
>> <peter.maydell@linaro.org>; Markus Armbruster <armbru@redhat.com>;
>> 'Marc-André Lureau' <marcandre.lureau@redhat.com>; Paolo Bonzini
>> <pbonzini@redhat.com>; Gerd Hoffmann <kraxel@redhat.com>; Edgar
>> Iglesias <edgari@xilinx.com>; Francisco Eduardo Iglesias
>> <figlesia@xilinx.com>; David Gibson <david@gibson.dropbear.id.au>
>> Cc: qemu-devel@nongnu.org; Alistair Francis <alistair.francis@wdc.com>;
>> Eduardo Habkost <ehabkost@redhat.com>; Ying Fang
>> <fangying1@huawei.com>; Vikram Garhwal <fnuv@xilinx.com>; Paul
>> Zimmerman <pauldzim@gmail.com>
>> Subject: Re: [PATCH v4 1/7] usb/hcd-xhci: Make dma read/writes hooks pci
>> free
>>
>> On 9/8/20 12:30 PM, Philippe Mathieu-Daudé wrote:
>>>>> On 8/28/20 9:19 PM, Sai Pavan Boddu wrote:
>>>>>> This patch starts making the hcd-xhci.c pci free, as part of this
>>>>>> restructuring dma read/writes are handled without passing pci object.
>>>>>>
>>>>>> Signed-off-by: Sai Pavan Boddu <sai.pavan.boddu@xilinx.com>
>>>>>> ---
>>>>>>  hw/usb/hcd-xhci.c | 24 +++++++++++-------------  hw/usb/hcd-xhci.h
>>>>>> |
>>>>>> 3 +++
>>>>>>  2 files changed, 14 insertions(+), 13 deletions(-)
>>>>>>
>>> [...]
>>>>>> --- a/hw/usb/hcd-xhci.h
>>>>>> +++ b/hw/usb/hcd-xhci.h
>>>>>> @@ -22,6 +22,8 @@
>>>>>>  #ifndef HW_USB_HCD_XHCI_H
>>>>>>  #define HW_USB_HCD_XHCI_H
>>>>>>
>>>>>> +#include "sysemu/dma.h"
>>>>>
>>>>> AddressSpace is forward-declared in "qemu/typedefs.h", so no need to
>>>>> include it here (yes in the sources including hcd-xhci.h).
>>>> [Sai Pavan Boddu] Yes you are right!, but without this " dma_addr_t " is
>> undefined.
>>>> At this point of the patch, hcd-xhci.h is compiled along with pci.h which
>> would provide 'dma_addr_t', but when we strip the pci wrapper around hcd-
>> xhci we would miss it. Let me know, if its good to add later in the patch series
>> when the split happens.
>>>
>>> OK :( I'd prefer to only include "sysemu/dma.h" in hw/usb/hcd-xhci.c.
>>>
>>> Cc'ing David who added dma_addr_t in commit e5332e6334f
>>> ("iommu: Introduce IOMMU emulation infrastructure"), it might be
>>> simpler to move its declaration to "qemu/typedefs.h"
>>> too.
>>
>> Btw this type should be poisoned for user-mode.
> [Sai Pavan Boddu] Thanks, I would try to define them in typedefs.h. 
> BTW I'm not clear about poisoning then in user-mode. Do you mean hide these defines for user-mode ?

This doesn't "hide" but poison them: if you try to use them the
compiler (cpp actually) will raise an error.

This was not a direct comment for you, more something to discuss
out of the scope of your series ;) No need to try to declare it
poisoned now.

> 
> Regards
> Sai Pavan
>>
>>>
>>> So no change needed for this patch.
>>>
>>>>
>>>> Regards,
>>>> Sai Pavan
>>>>>
>>>>> With that fixed:
>>>>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>>>>>
>>>>>> +
>>>>>>  #define TYPE_XHCI "base-xhci"
>>>>>>  #define TYPE_NEC_XHCI "nec-usb-xhci"
>>>>>>  #define TYPE_QEMU_XHCI "qemu-xhci"
>>>>>> @@ -189,6 +191,7 @@ struct XHCIState {
>>>>>>
>>>>>>      USBBus bus;
>>>>>>      MemoryRegion mem;
>>>>>> +    AddressSpace *as;
>>>>>>      MemoryRegion mem_cap;
>>>>>>      MemoryRegion mem_oper;
>>>>>>      MemoryRegion mem_runtime;
>>>>>>
>>>>
>>>
> 



  reply	other threads:[~2020-09-08 12:34 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-28 19:19 [PATCH v4 0/7] Make hcd-xhci independent of pci hooks Sai Pavan Boddu
2020-08-28 19:19 ` [PATCH v4 1/7] usb/hcd-xhci: Make dma read/writes hooks pci free Sai Pavan Boddu
2020-09-01 16:34   ` Philippe Mathieu-Daudé
2020-09-08  9:58     ` Sai Pavan Boddu
2020-09-08 10:30       ` Philippe Mathieu-Daudé
2020-09-08 10:34         ` Philippe Mathieu-Daudé
2020-09-08 11:35           ` Sai Pavan Boddu
2020-09-08 12:26             ` Philippe Mathieu-Daudé [this message]
2020-09-09 10:50               ` Sai Pavan Boddu
2020-09-10 23:42           ` David Gibson
2020-09-10 23:41         ` David Gibson
2020-08-28 19:19 ` [PATCH v4 2/7] usb/hcd-xhci: Move qemu-xhci device to hcd-xhci-pci.c Sai Pavan Boddu
2020-09-01 16:38   ` Philippe Mathieu-Daudé
2020-09-02 18:26     ` Sai Pavan Boddu
2020-08-28 19:19 ` [PATCH v4 3/7] usb/hcd-xhci: Split pci wrapper for xhci base model Sai Pavan Boddu
2020-08-28 19:19 ` [PATCH v4 4/7] usb: hcd-xhci-sysbus: Attach xhci to sysbus device Sai Pavan Boddu
2020-09-01 16:42   ` Philippe Mathieu-Daudé
2020-08-28 19:19 ` [PATCH v4 5/7] misc: Add versal-usb2-regs module Sai Pavan Boddu
2020-08-31  7:02   ` Gerd Hoffmann
2020-09-01  7:36     ` Sai Pavan Boddu
2020-08-28 19:19 ` [PATCH v4 6/7] usb: Add DWC3 model Sai Pavan Boddu
2020-08-31  7:05   ` Gerd Hoffmann
2020-09-01 10:58     ` Sai Pavan Boddu
2020-08-28 19:19 ` [PATCH v4 7/7] Versal: Connect DWC3 controller with virt-versal Sai Pavan Boddu
2020-08-31  7:12   ` Gerd Hoffmann
2020-09-01 10:59     ` Sai Pavan Boddu
2020-09-02  7:49       ` Gerd Hoffmann
2020-08-31 11:58 ` [PATCH v4 0/7] Make hcd-xhci independent of pci hooks Gerd Hoffmann
2020-09-01 11:00   ` Sai Pavan Boddu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=fe1cf46a-7669-8d84-aa5e-4ad67a23db3c@redhat.com \
    --to=philmd@redhat.com \
    --cc=alistair.francis@wdc.com \
    --cc=armbru@redhat.com \
    --cc=david@gibson.dropbear.id.au \
    --cc=edgari@xilinx.com \
    --cc=ehabkost@redhat.com \
    --cc=fangying1@huawei.com \
    --cc=figlesia@xilinx.com \
    --cc=fnuv@xilinx.com \
    --cc=kraxel@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pauldzim@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=saipava@xilinx.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.