|
From: | Paolo Bonzini |
Subject: | Re: [Qemu-devel] [PATCH 02/14] memory: Add MemTxAttrs, MemTxResult to io_mem_read and io_mem_write |
Date: | Wed, 08 Apr 2015 13:13:34 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 |
On 08/04/2015 12:59, Peter Maydell wrote: > Incidentally in the course of this patch I noticed that we have > exactly two places outside the memory system that use these > functions: hw/s390x/s390-pci-inst.c and hw/vfio/pci.c. Is > this a reasonable thing, or should they in an ideal world > have created an AddressSpace to access things through? In the case of VFIO, I would just export pci_read/write_msix_table functions from the PCI core. In the case of s390 they would have to create an AddressSpace per BAR per device: the current code doesn't work for BARs backed by a RAM region, or with a complicated layout (aliases and the like). This reflects how s390 PCI is basically only used for VFIO, so it's passable: having a separate AddressSpace per BAR per device probably wouldn't scale too well. Paolo > (I have no opinion except that functions used in only one > or two places always look a little suspicious to me :-))
[Prev in Thread] | Current Thread | [Next in Thread] |