Skip to contentSkip to conversation

rwhandler: introduce and switch pci_host to it

PATCH In review Michael S. Tsirkin 2 participants 5 messages Jan 18, 2010

lore
Share & tools
lore
#0 lore raw

v2 cover rwhandler: introduce and switch pci_host to it

Alexander, so I assume the following patchset should be enough for you to implement u3 support, simply by creating your own rwhandler, and using pci_data_read/write directly there. I have pushed it to a temporary branch in my tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git rwhandler

Paul, any comments on this approach?

I'll push this to my pci tree if this turns out to be helpful. Hope this helps, and sorry about the churn.

Michael S. Tsirkin (3):
bwap: add qemu_bswap helper
rwhandler: simplified way to register for mem/io
pci_host: rewrite using rwhandler

 Makefile.target        |    1 +
 bswap.h                |    6 ++
 hw/pci_host.c          |  172 +++++++++++++++++++----------------------------
 hw/pci_host.h          |    4 +
 hw/pci_host_template.h |  109 ------------------------------
 rwhandler.c            |   91 +++++++++++++++++++++++++
 rwhandler.h            |   27 ++++++++
 7 files changed, 199 insertions(+), 211 deletions(-)
 delete mode 100644 hw/pci_host_template.h
 create mode 100644 rwhandler.c
 create mode 100644 rwhandler.h
#1 lore raw
Quoted 10 lines · Michael S. Tsirkin

Alexander, so I assume the following patchset should be enough for you to implement u3 support, simply by creating your own rwhandler, and using pci_data_read/write directly there. I have pushed it to a temporary branch in my tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git rwhandler

Paul, any comments on this approach?

I'll push this to my pci tree if this turns out to be helpful. Hope this helps, and sorry about the churn.

I proposed earlier something similar for MMIO. The thread could be interesting:
http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00095.html

#2 lore raw
Quoted 7 lines · Blue Swirl
Quoted 6 lines · Michael S. Tsirkin

Alexander, so I assume the following patchset should be enough for you to implement u3 support, simply by creating your own rwhandler, and using pci_data_read/write directly there. I have pushed it to a temporary branch in my tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git rwhandler

Quoted 7 lines
Quoted 4 lines

Paul, any comments on this approach?

I'll push this to my pci tree if this turns out to be helpful. Hope this helps, and sorry about the churn.

I proposed earlier something similar for MMIO. The thread could be interesting:
http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00095.html

IIUC that patch seems to do much more, and also seems to involve all io? This one is just a library that devices can use. Intended users are not performance-critical like pci config.

Signature · 1 line
MST
#3 lore raw
Quoted 13 lines · Michael S. Tsirkin
Quoted 12 lines · Blue Swirl
Quoted 10 lines · Michael S. Tsirkin

Alexander, so I assume the following patchset should be enough for you to implement u3 support, simply by creating your own rwhandler, and using pci_data_read/write directly there. I have pushed it to a temporary branch in my tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git rwhandler

Paul, any comments on this approach?

I'll push this to my pci tree if this turns out to be helpful. Hope this helps, and sorry about the churn.

Quoted 6 lines
Quoted 2 lines

I proposed earlier something similar for MMIO. The thread could be interesting:
http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00095.html

IIUC that patch seems to do much more, and also seems to involve all io? This one is just a library that devices can use. Intended users are not performance-critical like pci config.

To put it in other words: could you please be more explicit please? I failed to see the relevance ...

Signature · 1 line
MST
#4 lore raw
Quoted 17 lines · Michael S. Tsirkin
Quoted 16 lines · Michael S. Tsirkin
Quoted 14 lines · Blue Swirl
Quoted 10 lines · Michael S. Tsirkin

Alexander, so I assume the following patchset should be enough for you to implement u3 support, simply by creating your own rwhandler, and using pci_data_read/write directly there. I have pushed it to a temporary branch in my tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mst/qemu.git rwhandler

Paul, any comments on this approach?

I'll push this to my pci tree if this turns out to be helpful. Hope this helps, and sorry about the churn.

I proposed earlier something similar for MMIO. The thread could be interesting:
http://lists.gnu.org/archive/html/qemu-devel/2009-05/msg00095.html

Quoted 6 lines
Quoted 3 lines

IIUC that patch seems to do much more, and also seems to involve all io? This one is just a library that devices can use. Intended users are not performance-critical like pci config.

To put it in other words: could you please be more explicit please?  I failed to see the relevance ...

Well, I thought the stuff I proposed earlier may be useful for comparison. It was also opt-in like yours, by the way.

Also the end result that Paul wasn't interested in my patch may (or may not) be relevant with yours too.