qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to acce


From: Greg Kurz
Subject: Re: [Qemu-devel] [PATCH v6 6/8] virtio-scsi: use virtio wrappers to access headers
Date: Fri, 28 Mar 2014 19:04:28 +0100

On Fri, 28 Mar 2014 17:43:07 +0000
Peter Maydell <address@hidden> wrote:

> On 28 March 2014 17:37, Greg Kurz <address@hidden> wrote:
> > And while we are at it, since we pass &address_space_memory to all
> > occurences of virtio_*_phys() and I don't see why we would change
> > that, maybe we can also move that into the helpers. Thoughts ?
> 
> In the longer term I'm hoping that references to
> &address_space_memory go away -- we should be modelling
> separate address spaces per CPU and per every other
> thing that can act as a DMA master (ie issue memory
> transactions). I'm not sure exactly how virtio ought to
> work since these accesses directly to memory are a total
> hack, but probably we will end up setting the virtio
> device up and handing it an AddressSpace* that it should use.
> 

Ok, I am now convinced. Let's make struct VirtIODevice* be the
first argument for all helpers and kill the AddressSpace* one.
Unless you envision we could end up with different address spaces
accross multiple virtio devices, I would then do as proposed
above... Even if we add an AddressSpace* to devices, the API
will remain the same.

> thanks
> -- PMM
> 

Cheers.

-- 
Gregory Kurz                                     address@hidden
                                                 address@hidden
Software Engineer @ IBM/Meiosys                  http://www.ibm.com
Tel +33 (0)562 165 496

"Anarchy is about taking complete responsibility for yourself."
        Alan Moore.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]