hw/arm/exynos4210.c: convert chipid_and_omr to an mmio region
Exynos SoC was misusing memory_region_init_ram_ptr(): this interface can safelybe used only for memory regions which size is a multiple of target page size.Change chipid_and_omr memory to an mmio region to fix this....
exynos4210.c: register rom_mem for memory migration
Even if we do not register newly created RAM MemoryRegion for migration withvmstate_register_ram_global() function, ram_save_setup() still saves this regionto snapshot file with empty idstr=="". Consequently this results in error during...
i.MX: Improve EPIT timer code.
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>Reviewed-by: Peter Chubb <peter.chubb@nicta.com.au>...
sd/sdhci.c: Fix bdata_read DPRINT message
This message was printing out the data in decimal only, which is notvery friendly to the debugging developer. Add hex variant inparenthesis to make it consistent with other similar messages in thismodule.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
sd/sdhci:ADMA: fix interrupt
The end of transfer check was occurring and potentially returning beforethe interrupt flag was checked. This means the interrupt will be missedif it occurs on the last packet. Fix by checking for the interruptbefore checking for the end of transfer....
sd/sd.c: Fix "inquiry" ACMD41
QEMU models two (of the three) ACMD41 has two modes, "inquiry" and"first". The selection logic for which of the two is incorrect - itcompares != 0 for the entire argument value rather than only bits 23:0as per the spec. Fix....
i.MX: split GPT and EPIT timer implementation
There is no common code between these 2 timer implementation.So it is better to split them.
Signed-off-by: Jean-Christophe DUBOIS <jcd@tribudubois.net>Message-id: 1368990197-19694-1-git-send-email-jcd@tribudubois.net...
xilinx_spips: lqspi: Push more data to tx-fifo
Do 16 words per fifo flush. Increases performance and decreasesdebug verbosity. This data depth has no real hardware analogue,so just go with something that has reasonable performance.
xilinx_spips: lqspi: Fix byte/misaligned access
The LQSPI bus attachment supports byte/halfword and misalignedaccesses. Fixed. Refactored the LQSPI cache to be byte-wiseinstead of word wise accordingly.
sd/sdhci.c: Only reset data_count on new commands
The data_count variable was being reset on every transfer, includingDMA transfer resumptions. This is incorrect, it should only be seton a new command.
Manifests as a bug when using ADMA and there is a timer delay between...
sd/sdhci: Fix Buffer Write Ready interrupt
This interrupt is not risen after the last block is written to sd. Itis mutually exclusive with the end of transfer conditions. Fix.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Igor Mitsyanko <i.mitsyanko@gmail.com>...
xilinx_spips: lqspi: Dont touch config register
The LQSPI mode is supposed to work via the automatic CS mode featurerather than manipulate CS lines itself. Now that auto CS is implementedremove LQSPIs CS mode override logic. There is still a need tomanipulate the U_PAGE bit in LQSPI config register to implement...
xilinx_spips: Fix CTRL register RW bits
The CTRL register was RAZ/WI on some of the RW bits. Even though thefunction behind these bits is invalid in QEMU, they should still beguest accessible. Fix.
xilinx_spips: Fix striping behaviour
The QSPI controller was using byte-wide stripes when striping acrossthe two flashes in dual parallel mode. The real hardware however usesindividual bit striping. QEMU misbehaves in the (corner) case wheredata is written/read in dual-parallel mode and read/written back in...
xilinx_spips: Debug msgs for Snoop state
This is worth keeping track of when debugging the device model.
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>...
xilinx_spips: Multiple debug verbosity levels
The debug printfs on every SPI operation is extremely verbose. Adda second level of debug for this.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>...
xilinx_spips: Fix QSPI FIFO size
QSPI has a bigger FIFO than the regular SPI controller. Differentiatebetween the two with correct FIFO sizes for each.
This is the first piece of class data for SPIPS, so this patch seesthe creation of the XilinxSPIPSClass definition and assoicated QOM...
xilinx_spips: Trash LQ page cache on mode change
Invalidate the LQSPI cached page when transitioning into LQSPI mode.Otherwise there is a possibility that the controller will return staledata to the guest when transitioning back to LQ_MODE after a page...
xilinx_spips: Add automatic start support
SPI has a mode where it automatically starts based on tx fifooccupancy. Implemented.
xilinx_spips: Implement automatic CS
Implement the automatic CS control feature. If the MANUAL_CS bit iscleared then the chip select stay de-asserted as long as the tx FIFOis empty.
xilinx_spips: seperate SPI and QSPI as two classes
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.
xilinx_spips: Make interrupts clear on read
By default these interrupts are clear on read.
xilinx_spips: Inhibit interrupts in LQSPI mode
The real hardware does not produce interrupts in LQSPI mode. Inhibitgeneration of interrupts when the LQ_MODE bit is set.
xilinx_spips: Add verbose LQSPI debug output
You really need this is you want to track a guest banging on LQSPI.
Merge remote-tracking branch 'kraxel/usb.83' into staging
Merge remote-tracking branch 'mjt/trivial-patches' into staging
xhci: add live migration support
With all preparing pieces in place we can finally drop inthe vmstate structs and the postload function.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
xhci: add XHCISlot->addressed
Preparing for live-migration support, post_load will need that.
xhci: add xhci_alloc_epctx
Factor out endpoint context allocation to a separate function.xhci live migration will need that too, in post_load.
xhci: add xhci_init_epctx
Factor out endpoint context initialization to a separate function.xhci live migration will need that too, in post_load.
pci: add VMSTATE_MSIX
Using a trick cut+pasted from vmstate_scsi_deviceto wind up msix_save and msix_load.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Acked-by: Michael S. Tsirkin <mst@redhat.com>
Fix usage of USB_DEV_FLAG_IS_HOST flag.
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.orgSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
host-libusb: Correct test for USB packet state
USB_RET_ASYNC is -6, so inflight was always false.
Signed-off-by: Ed Maste <emaste@freebsd.org>Cc: qemu-stable@nongnu.orgSigned-off-by: Gerd Hoffmann <kraxel@redhat.com>
tcx: Fix 24-bit display mode
Commit d08151bf (conversion of tcx to the memory API) broke the 24-bit mode ofthe tcx display adapter by accidentally passing in the final address of thedirty region to memory_region_reset_dirty() instead of its size.
Signed-off-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>...
m25p80: Add Micron n25q032a
Based on the datasheet athttp://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>
Remove unnecessary break statements
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....
debugcon: fix always print "addr=0x0, val=0x0" bug when use DEBUG_DEBUGCON
when use DEBUG_DEBUGCON, screen spits:debugcon: write addr=0x0000 val=0x00Rdebugcon: write addr=0x0000 val=0x00udebugcon: write addr=0x0000 val=0x00ndebugcon: write addr=0x0000 val=0x00...
debugcon: make debug message more readable
before change:Bdebugcon: write addr=0x0000 val=0x6fodebugcon: write addr=0x0000 val=0x6fodebugcon: write addr=0x0000 val=0x74tdebugcon: write addr=0x0000 val=0x69idebugcon: write addr=0x0000 val=0x6endebugcon: write addr=0x0000 val=0x67...
debugcon: fix compiler warning when open DEBUG_DEBUGCON
compiler warnings: CC hw/char/debugcon.ohw/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’...
qdev: fix get_fw_dev_path to support to add nothing to fw_dev_path
Recent virtio refactoring in QEMU made virtio-bus become the parent busof 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...
virtio-pci: drop unused wmb macro
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.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
pc_sysfw: allow flash (-pflash) memory to be used with KVM
When pc-sysfw.rom_only == 0, flash memory will beusable with kvm. In order to enable flash memory mode,a pflash device must be created. (For example, byusing the -pflash command line parameter.)...
isapc: Fix non-KVM qemu boot (read/write memory for isapc BIOS)
The isapc machine with seabios currently requires the BIOS regionto be read/write memory rather than read-only memory.
KVM currently cannot support the BIOS as a ROM region, but qemuin non-KVM mode can. Based on this, isapc machine currently only...
Merge remote-tracking branch 'aneesh/for-upstream' into staging
hw/9pfs: Fix segfault with 9p2000.u
When guest tries to chmod a block or char device file over 9pfs,the qemu process segfaults. With 9p2000.u protocol we use wstat tochange mode bits and client don't send extension information forchmod. We need to check for size field to check whether extension...
hw/9pfs: use O_NOFOLLOW for mapped readlink operation
With mapped security models like mapped-xattr and mapped-file, we save thesymlink target as file contents. Now if we ever expose a normal directorywith mapped security model and find real symlinks in export path, never...
hw/9pfs: Use O_NOFOLLOW when opening files on server
9p server should never follow a symlink. So use O_NOFOLLOW with all opensyscall
Tested-by: "M. Mohan Kumar" <mohan@in.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs: Be robust against paths without FS_IOC_GETVERSION
9P optionally uses the FS_IOC_GETVERSION ioctl to get information abouta file's version (sometimes called generation number).
The code checks for supported filesystems at mount time, but some paths...
Remove Sun4c, Sun4d and a few CPUs
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....
Merge remote-tracking branch 'bonzini/iommu-for-anthony' into staging
memory: Rename readable flag to romd_mode
"Readable" is a very unfortunate name for this flag because even arom_device region will always be readable from the guest POV. Whatdiffers is the mapping, just like the comments had to explain already.Also, readable could currently be understood as being a generic region...
exec: eliminate qemu_put_ram_ptr
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
rtl8139: flush queued packets when RxBufPtr is written
Net queues support efficient "receive disable". For example, tap's filedescriptor will not be polled while its peer has receive disabled. Thissaves CPU cycles for needlessly copying and then dropping packets which...
virtio-net: dynamic network offloads configuration
Virtio-net driver currently negotiates network offloadson startup via features mechanism and have no ability todisable and re-enable offloads later.This patch introduced a new control command that allows...
pci-assign: Add MSI affinity support
To support guest MSI affinity changes update the MSI message any timethe 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>...
glib: Fix some misuses of gsize/size_t types
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>...
Rename hexdump to avoid FreeBSD libutil conflict
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...
ide/macio: fix wrong opaque with TRIM support
Commit 215e47b9 enabled TRIM by default, which revealed a bug in TRIMsupport for the IDE macio emulation driver, introduced in d353fb72.
The call to dma_bdrv_io() is using a wrong opaque of type IDEStateinstead of DBDMA_io. This patch fixes that....
remove some double-includes
Some source files #include the same header more thanonce for no good reason. Remove second #includes insuch cases.
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Ed Maste <emaste@freebsd.org>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
virtio: add virtio_bus_get_dev_path.
This adds virtio_bus_get_dev_path to fix migration id string which is wrongsince 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...
Revert "versatile_pci: Put the host bridge PCI device at slot 29"
This reverts commit 5f37ef92b7690423ac6311d3c597e182fc5f8fe6.It turns out that some kernels incorrectly depend on theold QEMU behaviour of not putting the host PCI bridge devicewhere the hardware puts it, because they use a swizzling IRQ...
hw/pci-host/versatile.c: Update autodetect to detect newer kernels
Newer versatilepb kernels still don't get the IRQ mapping rightfor the PCI controller, but they get it differently wrong (they adda fixed +64 offset to everything they write to PCI_INTERRUPT_LINE)....
hw/pci-host/versatile.c: Provide property for forcing broken IRQ mapping
Although we try our best to automatically detect broken versionsof Linux which assume the old broken IRQ mapping we used to implementfor our model of the Versatile PCI controller, it turns out that...
virtio-net: add virtio_net_set_netclient_name.
This adds virtio_net_set_netclient_name, which is used to set thename and type shown in "info network" command.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1368619970-23892-2-git-send-email-fred.konrad@greensocs.com...
virtio-net-x: forward the netclient name and type.
This forwards the name and the type of virtio-net-x to fix the badbehaviour of "info network" command.
Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>Message-id: 1368619970-23892-3-git-send-email-fred.konrad@greensocs.com...
spitz: fix compilation failure due to pty.h namespace pollution
pty.h is polluting the global namespace with a CTRL macro. spitzthus fails compilation with the patch athttp://article.gmane.org/gmane.comp.emulators.qemu/211337 andthis patch fixes it....
acpi: add dummy write function for acpi timer
Otherwise the guest can crash qemu (NULL pointer dereference).
https://bugzilla.redhat.com/show_bug.cgi?id=947691
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Reviewed-by: Laszlo Ersek <lersek@redhat.com>...
Revert "pc: Kill the "use flash device for BIOS unless KVM" misfeature"
This reverts commit 9953f8822cc316eec9962f0a2858c3439a80adec.While Markus's analysis is entirely correct, there are 1.6 patchesthat fix the bug for real and without requiring machine type hacks....
Merge remote-tracking branch 'mjt/trivial-patches-next' into staging
m25p80.c: Sync Flash chip list with Linux
Add new devices for various manufacturers, and re-sort Spansion list tomatch the order in Linux, which requires chips with a non-zero extended IDto come first.
With this commit the outstanding differences to Linux rev 55bf75b are:...
remove double semicolons
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
qxl: Call spice_qxl_driver_unload from qxl_enter_vga_mode
With a SPICE_DISPLAY_CAP_MONITORS_CONFIG capable client, the client needs toknow what part of the primary to use for each monitor. If the guest driverdoes not support this, the server sends messages to the client for a...
Merge remote-tracking branch 'kwolf/for-anthony' into staging
virtio-pci: fix level interrupts
mask notifiers are never called without msix,so devices with backend masking like vhost don't work.Call mask notifiers explicitly atstartup/cleanup to make it work.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Tested-by: Alexander Graf <agraf@suse.de>...
virtio: properly validate address before accessing config
There are several several issues in the current checking:
- The check was based on the minus of unsigned values which can overflow- It was done after .{set|get}_config() which can lead crash when config_len...
ahci: Don't allow creating slave drives
An IDE bus provided by AHCI can only take a single IDE drive. If you adda drive as slave, qemu used to accept the command line but the devicewouldn't be actually usable. Catch the situation instead and error out....
ide: Reset BMIDEA bit when the bus master is stopped
The device is supposed to reset the Bus Master IDE Active bit in thestatus register when 0 is written to the Start/Stop Bus Master bit inthe command register.
In the common cases this happens automatically because bdrv_drain_all()...
Merge remote-tracking branch 'kraxel/usb.82' into staging
virtio-net: properly check the vhost status during status set
Commit 32993698 (vhost: disable on tap link down) tries to disable the vhostalso when the peer's link is down. But the check was not done properly, thevhost were only started when:
1) peer's link is not down...
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
uhci: Use an intermediate buffer for usb packet data
Due to various unfortunate reasons we cannot reliable detect a guestcancelling a packet as soon as it happens, instead we detect cancelswith some delay.
When packets are handled async, and we directly pass the guest memory for...
xhci: handle USB_RET_BABBLE
usb-host: add usb_host_full_speed_compat
Alloes to pass through usb2 devices on usb1 host controllers if possible.Brings the libusb implementation to feature-parity with the linux usbfscode, so the usb-host implementation in 1.5 (libusb) doesn't regress...
usb-host: live migration support for the libusb version
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
Message-id: cover.1367844188.git.gleb@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
target-i386: n270 can MOVBE
The Atom core (cpu name "n270" in QEMU speak) supports MOVBE. This isneeded when booting 3.8 and later linux kernels built with the MATOMtarget because we require MOVBE in order to boot properly now.
Signed-off-by: Borislav Petkov <bp@suse.de>...
Merge branch 's390-for-upstream' of git://github.com/agraf/qemu
qdev: Introduce qdev_prop_set_globals_for_type()
Reuse it in qdev_prop_set_globals().
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>[AF: Renamed from qdev_prop_set_custom_globals()]Signed-off-by: Andreas Färber <afaerber@suse.de>
qdev: Let qdev_prop_parse() pass through Error
Move error reporting to callers.
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>Signed-off-by: Andreas Färber <afaerber@suse.de>
S390: Merging s390_ipl_cpu and s390_ipl_reset
There is no use in have this splitted in two functions.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>Signed-off-by: Alexander Graf <agraf@suse.de>
S390: Add virtio-blk boot
If no kernel IPL entry is specified, boot the bios and pass if availabledevice information for the first boot device (as given by the boot index).
The provided information will be used in the next commit from the BIOS.
Signed-off-by: Dominik Dingel <dingel@linux.vnet.ibm.com>...
S390: BIOS check for file
Add a check if the BIOS blob exists before trying to load.
PPC: e500: correct params->ram_size with ram_size
We should sync params->ram_size after we fixup memory size ona alignment boundary. Otherwise Guest would exceed the actualmemory region.
Signed-off-by: Tiejun Chen <tiejun.chen@windriver.com>Signed-off-by: Alexander Graf <agraf@suse.de>
spapr_llan: fix device reenabling
Normally, the "tap" device is polled by QEMU if a guest NIC canreceive packets. If a guest NIC is stopped during transfer (rmmod orifdown), it may still have packets in a queue which have to be sendto the guest before QEMU enables polling of a "tap" interface via...
pseries: Factor out check for out-of-bounds LIOBN
PAPR defines LIOBNs (Logical IO Bus Numbers) to be 32-bit, and we check forvalues that aren't in the code for H_PUT_TCE. This patch factors the checkinto spapr_tce_find_by_liobn(), which already checks if a 32-bit LIOBN...
pseries: Fix debug message for out-of-bounds address in H_PUT_TCE
Due to a brain outage, this message says "out-of-boards" instead of"out-of-bounds".
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>...
PPC: e500: initialize GPRs as per epapr
ePAPR defines the initial values of cpu registers.This patch initialize the GPRs as per ePAPR specification.
This resolves the issue of guest reboot/reset (guest hang on reboot).
Signed-off-by: Bharat Bhushan <bharat.bhushan@freescale.com>...
kvmvapic: add ioport read accessor
Necessary since memory region accessor assumes read and writemethods are registered. Otherwise reading I/O port 0x7e segfaults.
https://bugzilla.redhat.com/show_bug.cgi?id=954306
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>...