summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* QString: Introduce qstring_append_chr()Luiz Capitulino2009-12-032-5/+20
| | | | | | | It appends a C char to a QString. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* QJSON: Introduce qobject_from_jsonv()Luiz Capitulino2009-12-032-10/+13
| | | | | | | | | It accepts a va_list and will be used by QError. Also simplifies the code a little, as the other qobject_from_() functions can use it. Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* fix I2C slave addressingJuha Riihimäki2009-12-021-2/+4
| | | | | | | | | | | | With the recent device handling changes the I2C slave addressing code was broken. With current code, if a slave with the correct address is not found on the bus the last scanned slave on the bus will be addressed. This is wrong. Please find attached a patch to fix it. Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com> Acked-by: Riku Voipio <riku.voipio@iki.fi> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* Fix qdev property type definition for isa serial/parallel devicesGerd Hoffmann2009-12-022-2/+2
| | | | | | | Use the correct qdev property type for these devices. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_malloc/qemu_free use in rtl8139.cJean-Christophe DUBOIS2009-12-021-2/+2
| | | | | | | | rtl8139.c is using malloc()/free() instead of qemu_malloc()/qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix free use in xen_backend.cJean-Christophe DUBOIS2009-12-021-1/+1
| | | | | | | | xen_backend.c is using qemu_free() instead of free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_free use in scsi-generic.cJean-Christophe DUBOIS2009-12-021-2/+2
| | | | | | | | scsi-generic.c is using free() instead of qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_free use in nseries.cJean-Christophe DUBOIS2009-12-021-1/+1
| | | | | | | | nseries.c is using free() instead of qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_free use in bt-l2cap.cJean-Christophe DUBOIS2009-12-021-1/+1
| | | | | | | | bt-l2cap.c is using free() instead of qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_free use in nand.cJean-Christophe DUBOIS2009-12-021-2/+2
| | | | | | | | nand.c is using free() instead of qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_free use in baum.cJean-Christophe DUBOIS2009-12-021-4/+4
| | | | | | | | baum.c is using free() instead of qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Fix qemu_free use in acpi.cJean-Christophe DUBOIS2009-12-021-1/+1
| | | | | | | | acpi.c is using free() instead of qemu_free(). Fix it. Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* pci: move apb specific stuff to apb_pci.cMichael S. Tsirkin2009-12-023-20/+29
| | | | | | | | | pci code had a TODO to move apb specific pci bridge initialization to apb_pci. Implement this and remove the TODO. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* configure: use correct cflags in compiler checksMichael S. Tsirkin2009-12-021-20/+21
| | | | | | | | | | | | | | | | | | | linux-user build on fedora 11 breaks because fallocate is broken on that system if -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 are specified, which is what QEMU uses. We do have a configure check to catch this and disable fallocate, however, it turns out that default QEMU_CFLAGS/LDFLAGS were assigned in script *after* all compiler checks: so during checks we were not running compiler with same flags that we used for build later. Fix this by moving QEMU_CFLAGS to before compiler checks, and using comple_prog when checking for fallocate. This also fixes the fact that we do some compiler checks while assigning the flags, right below a comment that says "no cc tests beyond this point". Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* vga-pci: Fix access to linear framebufferStefan Weil2009-12-021-0/+6
| | | | | | | | | | Anthony Liguori's patch fixes the problems with vga display in graphical mode and SeaBIOS. I only adapted some values for vga-pci. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Makefile: Remove unneeded prerequisitesStefan Weil2009-12-021-3/+1
| | | | | | | | | Thanks to f527c57935e22b56952d1ed1af36070b682ecf70 (fix parallel build), these prerequisites are redundant now and can be removed. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
* Merge commit 'mst/for_anthony' into mstAnthony Liguori2009-12-0139-235/+290
|\
| * msix: clear pending bit of an unused vectorMichael S. Tsirkin2009-12-011-10/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PCI spec states: if a masked vector has its Pending bit set, and the associated underlying interrupt events are somehow satisfied (usually by software though the exact manner is function-specific), the function must clear the Pending bit, to avoid sending a spurious interrupt message later when software unmasks the vector. In our case this happens if vector becomes unused. Clear pending bit in this case. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * msix: fix reset value for enable bitMichael S. Tsirkin2009-12-011-1/+2
| | | | | | | | | | | | | | | | | | On reset, we currently clear all bits in msix control register *except* enable bit. This is wrong: the spec says we should clear writeable bits: function mask and enable bit. Correct this. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * msix: fix mask bit state after resetMichael S. Tsirkin2009-12-011-0/+11
| | | | | | | | | | | | | | PCI spec states that mask bit must be 1 after reset. Make it so. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * virtio: do not reset msix state on soft resetMichael S. Tsirkin2009-12-011-4/+8
| | | | | | | | | | | | | | | | | | msix state is managed by OS, not the driver, so it's wrong to touch it on io from driver. Mark all vectors unused instead. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * msix: add helper to unuse all msix entriesMichael S. Tsirkin2009-12-012-0/+8
| | | | | | | | | | | | will be used by virtio on soft reset Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: convert goto into scope in bridge_filterMichael S. Tsirkin2009-12-011-6/+7
| | | | | | | | | | | | | | | | goto into scope is evil. rearrange pci_bridge_filter so that we always go to end of function on error. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
| * pci: pci bridge related clean up.Isaku Yamahata2009-12-012-7/+12
| | | | | | | | | | | | | | | | - fix bridge prefetchable memory accesser to check 64bit or not. - use pcibus_t consistently instead mixing pcibus_t and uint64_t. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: fix pci_config_get_io_base().Isaku Yamahata2009-12-011-1/+1
| | | | | | | | | | | | | | fix typo in pci_config_get_io_base(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: remove magic number, 256 in pci.cIsaku Yamahata2009-12-011-2/+3
| | | | | | | | | | | | | | This patch replaces magic number, 256, with ARRAY_SIZE(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: split up up pci_update mappingsMichael S. Tsirkin2009-12-011-57/+68
| | | | | | | | | | | | | | | | | | Split bar address math into a separate function. In particular, this gets rid of an ugly forward goto into scope that we have there. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
| * pci: clean up of pci_update_mappings()Isaku Yamahata2009-12-011-1/+1
| | | | | | | | | | | | | | This patch converts r->size == 0 to !r_size. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: remove unused constantsIsaku Yamahata2009-12-011-9/+0
| | | | | | | | | | | | | | | | This patch removes unused constants committed by fb23162885f7fd8cf7334bed22c25ac32c7d8b9d. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: move typedef, PCIHostState, PCIExpressHost to qemu-common.h.Isaku Yamahata2009-12-013-4/+6
| | | | | | | | | | | | | | | | | | This patch moves two typedefs, PCIHostState and PCIExpressHost to qemu-common.h for consistency as PCIBus and PCIDevice are typedefed in qemu-common.h. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: remove some unnecessary comment in pci.hIsaku Yamahata2009-12-011-9/+2
| | | | | | | | | | | | | | | | This patch removes some comment which should go into commit log in pci.h. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: clean up of pci_init_wmask().Isaku Yamahata2009-12-011-3/+3
| | | | | | | | | | | | | | This patch replaces for loop by memset in pci_init_wmask(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: kill unnecessary included in pci.cIsaku Yamahata2009-12-011-1/+0
| | | | | | | | | | | | | | | | including pci_host.h isn't needed by pci.c. This patch kills it. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci_host: remove unnecessary & 0xff.Isaku Yamahata2009-12-011-2/+3
| | | | | | | | | | | | | | This patch removes unnecessary & 0xff in pci_dev_find_by_addr(). Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: s/pci_find_host_bus/pci_find_root_bus/gIsaku Yamahata2009-12-013-7/+7
| | | | | | | | | | | | | | | | This patch renames pci_find_host_bus() to pci_find_root_bus() as suggested by "Michael S. Tsirkin" <mst@redhat.com>. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: remove pci_sub_bus() by open coding.Isaku Yamahata2009-12-011-8/+4
| | | | | | | | | | | | | | | | Because pci_sub_bus() is used only once so eliminate it by open coding as suggested by "Michael S. Tsirkin" <mst@redhat.com>. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: shorten pci_host_{conf, data}_register_xxx function a bit.Isaku Yamahata2009-12-019-27/+27
| | | | | | | | | | | | | | | | | | pci_host_data_register_io_memory and its variants are too long a bit. So shorten them. Now they are pci_host_{conf, data}_register_{mmio, mmio_noswap, ioport}() Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: rename (pci_/pcie_mmcfg_)addr_to_devIsaku Yamahata2009-12-012-6/+7
| | | | | | | | | | | | | | | | | | This patch renames pci_addr_to_dev(), pcie_mmcfg_addr_to_dev() to pci_dev_find_by_addr(), pcie_dev_find_by_mmcfg_addr() as "Michael S. Tsirkin" <mst@redhat.com> suggested. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: remove pci_addr_to_config() by open codeIsaku Yamahata2009-12-011-7/+2
| | | | | | | | | | | | | | | | This patch removes pci_addr_to_config() and open code it as suggested by Michael S. Tsirkin <mst@redhat.com>. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: simplify (pci_/pcie_mmcfg_)data_read()Michael S. Tsirkin2009-12-012-37/+11
| | | | | | | | | | | | | | | | | | Remove switch on length: we don't care about high bits for value, so just return all ones if no device. And add one assert(). Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Isaku Yamahata <yamahata@valinux.co.jp>
| * pci: move pci_data_{read, write}() declaration from pci.h to pci_host.hIsaku Yamahata2009-12-014-2/+5
| | | | | | | | | | | | | | | | | | | | Now pci host stuff has been moved from pci.[hc] to pci_host.[hc] so the declaration of pci_data_{read, write}() should be in pci_host.h This patch moves them from pci.h to pci_host.h for consistency. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: fix pci_info_device().Isaku Yamahata2009-12-011-1/+1
| | | | | | | | | | | | | | | | It printed wrong limit value of bridge. This patch fixes it. Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
| * pci: pci.h cleanup: move out stuff not in pci.cMichael S. Tsirkin2009-12-0123-25/+76
| | | | | | | | | | | | | | | | pci.h declares some functions which aren't defined in pci.h. Clean up moving things to appropriate headers, and update all users. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
* | tcg: increase TCG_MAX_OP_SIZE to 192Aurelien Jarno2009-12-011-3/+3
| | | | | | | | | | | | This is needed on a MIPS host and a 64-bit cross-endian target. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | tcg: initial mips supportAurelien Jarno2009-12-013-1/+1452
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on a patch from Arnaud Patard (Rtp) <arnaud.patard@rtp-net.org> A few words about design choices: * Two registers, at and t0, are reserved for TCG internal use. They are useful for bswap and 64-bit ops. * Most ops supports a constant argument with value 0, which is actually mapped to the zero register. * While the at register is available for constant loading, ops only support a limited range of constants. TCG does a better job doing the register allocation and constant loading by itself. There are plenty of registers available anyway. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-mips: use physical address in lladdrAurelien Jarno2009-11-303-28/+61
| | | | | | | | | | | | | | | | Currently the ll/sc instructions use the virtual address in both user and system mode. Use the physical address insteead in system mode. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-mips: add a function to do virtual -> physical translationsAurelien Jarno2009-11-302-0/+25
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-mips: split code raising MMU exception in a separate functionAurelien Jarno2009-11-301-46/+53
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | target-mips: factorize load/store code in op_helper.cAurelien Jarno2009-11-301-152/+100
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
* | Fix commit a167ba50851cdac2fa36633587e98c5956cd6b18Aurelien Jarno2009-11-302-0/+2
| | | | | | | | Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
OpenPOWER on IntegriCloud