qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] PCI 64-bit BAR access with qemu


From: Francois WELLENREITER
Subject: Re: [Qemu-devel] PCI 64-bit BAR access with qemu
Date: Wed, 12 Oct 2011 14:01:19 +0200
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.23) Gecko/20110922 Lightning/1.0b2 Thunderbird/3.1.15


Hi Max,

thank you for your answer. Actually, I hadn't confused.
I already thought to your proposal but I found that it was a really ugly solution (essentially because of the uint32_t to uint64_t silent conversion).
Isn't there any other (current or future) development that may fix it ?

            François

Le 12/10/2011 13:00, Max Filippov a écrit :
    I've read a few days ago that it was possible to emulate PCI device with
64-bit BARs and have a real 64-bit memory access.
Thus, I've created a virtual device named toto accessible through a 64-bit
BAR
You've probably confused an ability to locate BAR anywhere in 64-bit
address space (such BAR actually spans 2 consecutive PCI BAR registers
and has 100 in its 3 least significant bits) and an ability to access
BAR-mapped memory in 64 bit items.

You obviously want the latter but currently it is not implemented, see e.g.

static inline DATA_TYPE glue(io_read, SUFFIX)(target_phys_addr_t physaddr,
                                               target_ulong addr,
                                               void *retaddr)

definition in the softmmu_template.h.

And it's quite simple to fix it, you only need to change
io_{read,write} in the softmmu_template.h and extend
io_mem_{read,write} loops in exec.c to 4 elements, taking care that
io_mem_{read,write}[3] can pass uint64_t.





reply via email to

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