summaryrefslogtreecommitdiff
path: root/hw
AgeCommit message (Collapse)AuthorFilesLines
2013-06-03xilinx_spips: Fix striping behaviourPeter Crosthwaite1-21/+63
The QSPI controller was using byte-wide stripes when striping across the two flashes in dual parallel mode. The real hardware however uses individual bit striping. QEMU misbehaves in the (corner) case where data is written/read in dual-parallel mode and read/written back in single mode. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 718a61df1bf746ec06f6da44d12f8317af7b08ce.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Fix CTRL register RW bitsPeter Crosthwaite1-2/+3
The CTRL register was RAZ/WI on some of the RW bits. Even though the function behind these bits is invalid in QEMU, they should still be guest accessible. Fix. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: b7aaad93163ce4af0c428635804ac7b77a567b25.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: lqspi: Dont touch config registerPeter Crosthwaite1-6/+6
The LQSPI mode is supposed to work via the automatic CS mode feature rather than manipulate CS lines itself. Now that auto CS is implemented remove LQSPIs CS mode override logic. There is still a need to manipulate the U_PAGE bit in LQSPI config register to implement dual-stack mode however. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 000c8dd54df09523f17052638100722ef0f5a3af.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Implement automatic CSPeter Crosthwaite1-4/+14
Implement the automatic CS control feature. If the MANUAL_CS bit is cleared then the chip select stay de-asserted as long as the tx FIFO is empty. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 1d67383adc42761af715a93f161344b9284dfc9a.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Add automatic start supportPeter Crosthwaite1-1/+2
SPI has a mode where it automatically starts based on tx fifo occupancy. Implemented. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: f4e9accb5de87b526fff6ed937f63278db76533b.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Trash LQ page cache on mode changePeter Crosthwaite1-1/+24
Invalidate the LQSPI cached page when transitioning into LQSPI mode. Otherwise there is a possibility that the controller will return stale data to the guest when transitioning back to LQ_MODE after a page program. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 677490a6ee1953fe5d366e599d665de645ac84db.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Fix QSPI FIFO sizePeter Crosthwaite1-2/+25
QSPI has a bigger FIFO than the regular SPI controller. Differentiate between the two with correct FIFO sizes for each. This is the first piece of class data for SPIPS, so this patch sees the creation of the XilinxSPIPSClass definition and assoicated QOM constructs. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: acee25dd5e203215cbc15ca5d3cb5d5b2efebe7b.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Add verbose LQSPI debug outputPeter Crosthwaite1-1/+4
You really need this is you want to track a guest banging on LQSPI. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 26e508da4af11058d37daa777064c9e5c2a69abb.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Inhibit interrupts in LQSPI modePeter Crosthwaite1-1/+6
The real hardware does not produce interrupts in LQSPI mode. Inhibit generation of interrupts when the LQ_MODE bit is set. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: dff794a06872009ea7e5733ce6adcff94d18bbd0.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: Make interrupts clear on readPeter Crosthwaite1-0/+4
By default these interrupts are clear on read. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 999ff0091ed3cc3969a431bf55c00ef934cecc8e.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03xilinx_spips: seperate SPI and QSPI as two classesPeter Crosthwaite2-15/+56
Make SPI and QSPI different classes. QSPIPS is setup as a child of SPIPS. Only QSPI has the LQSPI functionality, so move all that to the child class. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 2cdd0cadb5ba77ca02fde5cae627852dc9a64c71.1369117359.git.peter.crosthwaite@xilinx.com Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2013-06-03Merge remote-tracking branch 'kraxel/usb.83' into stagingAnthony Liguori4-25/+240
# By Gerd Hoffmann (5) and others # Via Gerd Hoffmann * kraxel/usb.83: xhci: add live migration support xhci: add xhci_init_epctx xhci: add xhci_alloc_epctx xhci: add XHCISlot->addressed pci: add VMSTATE_MSIX host-libusb: Correct test for USB packet state Fix usage of USB_DEV_FLAG_IS_HOST flag. Message-id: 1370253951-12323-1-git-send-email-kraxel@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-03Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori4-4/+3
# By Ed Maste (3) and others # Via Michael Tokarev * mjt/trivial-patches: do not check pointers after dereferencing them m25p80: Add Micron n25q032a qemu: fix out of tree cross compile slirp: cleanup leftovers from misc.h migration: Remove duplicate bandwidth_limit set docs: Fix typo and update file in migration configure: try pkg-config ncurses first rtc: remove rtc_set_date linux-user: Fix typo in comment configure: remove confusing file manipulation debugcon: fix compiler warning when open DEBUG_DEBUGCON debugcon: make debug message more readable debugcon: fix always print "addr=0x0, val=0x0" bug when use DEBUG_DEBUGCON Remove unnecessary break statements don't run pkg-config for features explicitly disabled Message-id: 51A9CCFB.1000109@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-06-03xhci: add live migration supportGerd Hoffmann1-1/+163
With all preparing pieces in place we can finally drop in the vmstate structs and the postload function. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-03xhci: add xhci_init_epctxGerd Hoffmann1-18/+25
Factor out endpoint context initialization to a separate function. xhci live migration will need that too, in post_load. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-03xhci: add xhci_alloc_epctxGerd Hoffmann1-11/+21
Factor out endpoint context allocation to a separate function. xhci live migration will need that too, in post_load. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-03xhci: add XHCISlot->addressedGerd Hoffmann1-0/+3
Preparing for live-migration support, post_load will need that. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-03pci: add VMSTATE_MSIXGerd Hoffmann1-0/+33
Using a trick cut+pasted from vmstate_scsi_device to wind up msix_save and msix_load. Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2013-06-03host-libusb: Correct test for USB packet stateEd Maste1-1/+1
USB_RET_ASYNC is -6, so inflight was always false. Signed-off-by: Ed Maste <emaste@freebsd.org> Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-03Fix usage of USB_DEV_FLAG_IS_HOST flag.Michael Marineau1-1/+1
USB_DEV_FLAG_IS_HOST is the bit number, not value. Booting with a "Fitbit Base Station" USB dongle was triggering this assert. Signed-off-by: Michael Marineau <mike@marineau.org> Cc: qemu-stable@nongnu.org Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2013-06-02tcx: Fix 24-bit display modeMark Cave-Ayland1-4/+6
Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode of the tcx display adapter by accidentally passing in the final address of the dirty region to memory_region_reset_dirty() instead of its size. Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-06-01m25p80: Add Micron n25q032aEd Maste1-0/+1
Based on the datasheet at http://www.micron.com/~/media/Documents/Products/Data%20Sheet/NOR%20Flash/Serial%20NOR/N25Q/n25q_32mb_1_8v_65nm.pdf Signed-off-by: Ed Maste <emaste@freebsd.org> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01debugcon: fix compiler warning when open DEBUG_DEBUGCONliguang1-2/+2
compiler warnings: CC hw/char/debugcon.o hw/char/debugcon.c: In function ‘debugcon_ioport_write’: hw/char/debugcon.c:58: warning: format ‘%02x’ expects type ‘unsigned int’, but argument 3 has type ‘uint64_t’ hw/char/debugcon.c: In function ‘debugcon_ioport_read’: hw/char/debugcon.c:70: warning: format ‘%04x’ expects type ‘unsigned int’, but argument 2 has type ‘hwaddr’ Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01debugcon: make debug message more readableliguang1-1/+1
before change: Bdebugcon: write addr=0x0000 val=0x6f odebugcon: write addr=0x0000 val=0x6f odebugcon: write addr=0x0000 val=0x74 tdebugcon: write addr=0x0000 val=0x69 idebugcon: write addr=0x0000 val=0x6e ndebugcon: write addr=0x0000 val=0x67 gdebugcon: write addr=0x0000 val=0x20 debugcon: write addr=0x0000 val=0x66 after change: B [debugcon: write addr=0x0000 val=0x6f] o [debugcon: write addr=0x0000 val=0x6f] o [debugcon: write addr=0x0000 val=0x74] t [debugcon: write addr=0x0000 val=0x69] i [debugcon: write addr=0x0000 val=0x6e] n [debugcon: write addr=0x0000 val=0x67] g [debugcon: write addr=0x0000 val=0x20] [debugcon: write addr=0x0000 val=0x66] Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01debugcon: fix always print "addr=0x0, val=0x0" bug when use DEBUG_DEBUGCONliguang1-1/+1
when use DEBUG_DEBUGCON, screen spits: debugcon: write addr=0x0000 val=0x00 Rdebugcon: write addr=0x0000 val=0x00 udebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 idebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 gdebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 odebugcon: write addr=0x0000 val=0x00 pdebugcon: write addr=0x0000 val=0x00 tdebugcon: write addr=0x0000 val=0x00 idebugcon: write addr=0x0000 val=0x00 odebugcon: write addr=0x0000 val=0x00 ndebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 rdebugcon: write addr=0x0000 val=0x00 odebugcon: write addr=0x0000 val=0x00 mdebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 adebugcon: write addr=0x0000 val=0x00 tdebugcon: write addr=0x0000 val=0x00 debugcon: write addr=0x0000 val=0x00 Oh, that's wrong, val is not always be 0. this bug caused by lack of length modifier for specifier 'x'. Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-06-01Remove unnecessary break statementsStefan Weil2-2/+0
Fix these warnings from cppcheck: hw/display/cirrus_vga.c:2603: hw/sd/sd.c:348: hw/timer/exynos4210_mct.c:1033: target-arm/translate.c:9886: target-s390x/mem_helper.c:518: target-unicore32/translate.c:1936: style: Consecutive return, break, continue, goto or throw statements are unnecessary. Signed-off-by: Stefan Weil <sw@weilnetz.de> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-30qdev: fix get_fw_dev_path to support to add nothing to fw_dev_pathAmos Kong2-1/+15
Recent virtio refactoring in QEMU made virtio-bus become the parent bus of scsi-bus, and virtio-bus doesn't have get_fw_dev_path implementation, typename will be added to fw_dev_path by default, the new fw_dev_path could not be identified by seabios. It causes that bootindex parameter of scsi device doesn't work. This patch implements get_fw_dev_path() in BusClass, it will be called if bus doesn't implement the method, tyename will be added to fw_dev_path. If the implemented method returns NULL, nothing will be added to fw_dev_path. It also implements virtio_bus_get_fw_dev_path() to return NULL. Then QEMU will still pass original style of fw_dev_path to seabios. Signed-off-by: Amos Kong <akong@redhat.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com> Message-id: 1369814202-10346-1-git-send-email-akong@redhat.com -- v2: only add nothing to fw_dev_path when get_fw_dev_path() is implemented and returns NULL. then it will not effect other devices don't have get_fw_dev_path() implementation. v3: implement default get_fw_dev_path() in BusClass Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29virtio-pci: drop unused wmb macroMichael S. Tsirkin1-6/+0
The implementation is wrong for kvm, and it's unused anyway. Drop it. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20130528102023.GA30055@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29pc_sysfw: allow flash (-pflash) memory to be used with KVMJordan Justen1-19/+31
When pc-sysfw.rom_only == 0, flash memory will be usable with kvm. In order to enable flash memory mode, a pflash device must be created. (For example, by using the -pflash command line parameter.) Usage of a flash memory device with kvm requires KVM_CAP_READONLY_MEM, and kvm will abort if a flash device is used with an older kvm which does not support this capability. If a flash device is not used, then qemu/kvm will operate in the original rom-mode. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1369816047-16384-5-git-send-email-jordan.l.justen@intel.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)Jordan Justen2-5/+16
The isapc machine with seabios currently requires the BIOS region to be read/write memory rather than read-only memory. KVM currently cannot support the BIOS as a ROM region, but qemu in non-KVM mode can. Based on this, isapc machine currently only works with KVM. To work-around this isapc issue, this change avoids marking the BIOS as readonly for isapc. This change also will allow KVM to start supporting ROM mode via KVM_CAP_READONLY_MEM. Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1369816047-16384-2-git-send-email-jordan.l.justen@intel.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-29Merge remote-tracking branch 'aneesh/for-upstream' into stagingAnthony Liguori3-9/+47
# By Aneesh Kumar K.V (3) and Gabriel de Perthuis (1) # Via Aneesh Kumar K.V * aneesh/for-upstream: hw/9pfs: Be robust against paths without FS_IOC_GETVERSION hw/9pfs: Use O_NOFOLLOW when opening files on server hw/9pfs: use O_NOFOLLOW for mapped readlink operation hw/9pfs: Fix segfault with 9p2000.u Message-id: 87zjvevx4s.fsf@linux.vnet.ibm.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-28hw/9pfs: Be robust against paths without FS_IOC_GETVERSIONGabriel de Perthuis1-0/+4
9P optionally uses the FS_IOC_GETVERSION ioctl to get information about a file's version (sometimes called generation number). The code checks for supported filesystems at mount time, but some paths may come from other mounted filesystems. Change it to treat unsupported paths the same as unsupported filesystems, returning 0 in both cases. Note: ENOTTY is the error code for an unsupported ioctl. This fix allows booting a linux kernel with the same / filesystem as the host; otherwise the boot fails when mounting devtmpfs. Signed-off-by: Gabriel de Perthuis <g2p.code@gmail.com> Reviewed-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-28hw/9pfs: Use O_NOFOLLOW when opening files on serverAneesh Kumar K.V1-7/+41
9p server should never follow a symlink. So use O_NOFOLLOW with all open syscall Tested-by: "M. Mohan Kumar" <mohan@in.ibm.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-28hw/9pfs: use O_NOFOLLOW for mapped readlink operationAneesh Kumar K.V1-1/+1
With mapped security models like mapped-xattr and mapped-file, we save the symlink target as file contents. Now if we ever expose a normal directory with mapped security model and find real symlinks in export path, never follow them and return proper error. Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-28hw/9pfs: Fix segfault with 9p2000.uAneesh Kumar K.V1-1/+1
When guest tries to chmod a block or char device file over 9pfs, the qemu process segfaults. With 9p2000.u protocol we use wstat to change mode bits and client don't send extension information for chmod. We need to check for size field to check whether extension info is present or not. Reported-by: Michael Tokarev <mjt@tls.msk.ru> Acked-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
2013-05-26Remove Sun4c, Sun4d and a few CPUsBlue Swirl4-826/+3
Sun4c and Sun4d architectures and related CPUs are not fully implemented (especially Sun4c MMU) and there has been no interest for them. Likewise, a few CPUs (Cypress, Ross etc) are only half implemented. Remove the machines and CPUs, they can be re-added if needed later. Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
2013-05-24Merge remote-tracking branch 'bonzini/iommu-for-anthony' into stagingAnthony Liguori4-7/+4
# By Paolo Bonzini (11) and others # Via Paolo Bonzini * bonzini/iommu-for-anthony: memory: clean up phys_page_find memory: populate FlatView for new address spaces memory: limit sections in the radix tree to the actual address space size s390x: reduce TARGET_PHYS_ADDR_SPACE_BITS to 62 memory: fix address space initialization/destruction memory: make memory_global_sync_dirty_bitmap take an AddressSpace memory: do not duplicate memory_region_destructor_none memory: Rename readable flag to romd_mode memory: Replace open-coded memory_region_is_romd memory: allow memory_region_find() to run on non-root memory regions memory: assert that PhysPageEntry's ptr does not overflow exec: eliminate stq_phys_notdirty exec: make qemu_get_ram_ptr private exec: eliminate qemu_put_ram_ptr exec: remove obsolete comment Message-id: 1369414987-8839-1-git-send-email-pbonzini@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-24memory: Rename readable flag to romd_modeJan Kiszka2-4/+4
"Readable" is a very unfortunate name for this flag because even a rom_device region will always be readable from the guest POV. What differs is the mapping, just like the comments had to explain already. Also, readable could currently be understood as being a generic region flag, but it only applies to rom_device regions. So rename the flag and the function to modify it after the original term "ROMD" which could also be interpreted as "ROM direct", i.e. ROM mode with direct access. In any case, the scope of the flag is clearer now. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24exec: eliminate qemu_put_ram_ptrPaolo Bonzini2-3/+0
Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2013-05-24rtl8139: flush queued packets when RxBufPtr is writtenStefan Hajnoczi1-0/+3
Net queues support efficient "receive disable". For example, tap's file descriptor will not be polled while its peer has receive disabled. This saves CPU cycles for needlessly copying and then dropping packets which the peer cannot receive. rtl8139 is missing the qemu_flush_queued_packets() call that wakes the queue up when receive becomes possible again. As a result, the Windows 7 guest driver reaches a state where the rtl8139 cannot receive packets. The driver has actually refilled the receive buffer but we never resume reception. The bug can be reproduced by running a large FTP 'get' inside a Windows 7 guest: $ qemu -netdev tap,id=tap0,... -device rtl8139,netdev=tap0 The Linux guest driver does not trigger the bug, probably due to a different buffer management strategy. Reported-by: Oliver Francke <oliver.francke@filoo.de> Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2013-05-22Merge remote-tracking branch 'mjt/trivial-patches' into stagingAnthony Liguori7-8/+0
# By Christophe Lyon (1) and others # Via Michael Tokarev * mjt/trivial-patches: target-moxie: replace target_phys_addr_t with hwaddr Rename hexdump to avoid FreeBSD libutil conflict remove some double-includes translate: remove redundantly included qemu/timer.h Remove twice include of qemu-common.h fix /proc/self/maps output Message-id: 51977B44.1000302@msgid.tls.msk.ru Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22pci-assign: Add MSI affinity supportAlex Williamson1-0/+18
To support guest MSI affinity changes update the MSI message any time the guest writes to the address or data fields. Signed-off-by: Alex Williamson <alex.williamson@redhat.com> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20130513201840.5430.86331.stgit@bling.home Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22virtio-net: dynamic network offloads configurationDmitry Fleytman1-15/+84
Virtio-net driver currently negotiates network offloads on startup via features mechanism and have no ability to disable and re-enable offloads later. This patch introduced a new control command that allows to configure device network offloads state dynamically. The patch also introduces a new feature flag VIRTIO_NET_F_CTRL_GUEST_OFFLOADS. Signed-off-by: Dmitry Fleytman <dfleytma@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Message-id: 20130520081814.GA8162@redhat.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-22glib: Fix some misuses of gsize/size_t typesPeter Crosthwaite1-2/+2
This unbreaks cross compile builds: configure --target-list="i386-softmmu" --cpu=i386 When building on a 64bit machine. Reported-by: David Holsgrove <david.holsgrove@xilinx.com> Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com> Message-id: 926326e96fd8685d74e9d5bf430fe4ad97a55289.1369191585.git.peter.crosthwaite@xilinx.com Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-20Rename hexdump to avoid FreeBSD libutil conflictEd Maste1-2/+2
On FreeBSD libutil is used for openpty(), but it also provides a hexdump() which conflicts with QEMU's. Signed-off-by: Ed Maste <emaste@freebsd.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1368718348-15199-1-git-send-email-emaste@freebsd.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-20ide/macio: fix wrong opaque with TRIM supportAurelien Jarno1-1/+1
Commit 215e47b9 enabled TRIM by default, which revealed a bug in TRIM support for the IDE macio emulation driver, introduced in d353fb72. The call to dma_bdrv_io() is using a wrong opaque of type IDEState instead of DBDMA_io. This patch fixes that. Fixes LP#1179104 Reported-by: Michael Tokarev <mjt@tls.msk.ru> Tested-off-by: Michael Tokarev <mjt@tls.msk.ru> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2013-05-18Rename hexdump to avoid FreeBSD libutil conflictEd Maste1-2/+2
On FreeBSD libutil is used for openpty(), but it also provides a hexdump() which conflicts with QEMU's. Signed-off-by: Ed Maste <emaste@freebsd.org> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-18remove some double-includesMichael Tokarev7-8/+0
Some source files #include the same header more than once for no good reason. Remove second #includes in such cases. Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2013-05-16virtio: add virtio_bus_get_dev_path.KONRAD Frederic1-0/+14
This adds virtio_bus_get_dev_path to fix migration id string which is wrong since the virtio refactoring. Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Message-id: 1368723967-21050-1-git-send-email-fred.konrad@greensocs.com Cc: mdroth <mdroth@linux.vnet.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2013-05-15hw/pci-host/versatile.c: Provide property for forcing broken IRQ mappingPeter Maydell1-1/+13
Although we try our best to automatically detect broken versions of Linux which assume the old broken IRQ mapping we used to implement for our model of the Versatile PCI controller, it turns out that some particularly new kernels manage to outwit the autodetection. We therefore provide a property for enabling the old broken IRQ mapping, so that if users happen to have such a kernel they can work around its deficiencies with the command line option: -global versatile_pci.broken-irq-mapping=1 Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1368545616-22344-4-git-send-email-peter.maydell@linaro.org Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>