microblaze/petalogix_s3adsp1800_mmu: Fix UART IRQ
The UART IRQ is edge sensitive, whereas the machine was registering itas level sensitive. Fix.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
intc/xilinx_intc: Don't clear level sens. IRQs without ACK
For level sensitive interrupts, ISR bits are cleared when the input pinis lowered. This is incorrect. Only software can clear ISR bits (viaIAR or direct write to ISR with !MER).
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
NVMe: Initial commit for new storage interface
Initial commit for emulated Non-Volatile-Memory Express (NVMe) pcistorage device.
NVMe is an open, industry driven storage specification definingan optimized register and command set designed to deliver the full...
Merge remote-tracking branch 'pmaydell/configury.next' into staging
char/serial: fix copy&paste error (fifo8_is_full vs empty)
Copy&paste error in serial.c causes a crash when attemptingto read from UART (if there is no data to be read)
Signed-off-by: Vladimir Senkov <hangup@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu
arm: Remove CONFIG_FDT conditionals
Now that we know we're compiling with libfdt, we can remove theCONFIG_FDT conditionals.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Reviewed-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>...
microblaze: Remove CONFIG_FDT conditionals
Now that we know we're compiling with libfdt we can remove theCONFIG_FDT conditionals.
ppc: Remove CONFIG_FDT conditionals
audio/intel-hda: Fix Inheritance hierachy
The ich6 and ich9 variants either need to inherit one from the other,or both from a common base class, otherwise its not possible to createa QOM cast macro for use by the shared implementation functions.Went for option B, with a common base class....
audio/intel-hda: QOM casting sweep
Define and use standard QOM cast macro. Remove usages of DO_UPCAST anddirect -> style casting.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>...
smbios: Fix -smbios type=0, release=... for big endian hosts
Classic endianness bug due to careless dirty coding: assuming readinga byte from an int variable gets the least significant byte.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>...
smbios: Check R in -smbios type=0, release=R parses okay
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>Message-id: 1370610036-10577-7-git-send-email-armbru@redhat.comSigned-off-by: Anthony Liguori <aliguori@us.ibm.com>
smbios: Convert to error_report()
Improves diagnistics from ad hoc messages like
Invalid SMBIOS UUID string
to
qemu-system-x86_64: -smbios type=1,uuid=gaga: Invalid UUID
smbios: Clean up smbios_add_field() parameters
Having size precede the associated pointer is odd. Swap them, and fixup the types.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Reviewed-by: Laszlo "ever the optimist" Ersek <lersek@redhat.com>Message-id: 1370610036-10577-5-git-send-email-armbru@redhat.com...
Merge remote-tracking branch 'mjt/trivial-patches-next' into staging
piix: fix some printf errors when debug is enabled
And use PRIxxx macros if possible.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
spapr_rtas: Abstract rtas_start_cpu() with qemu_get_cpu()
Instead of looping over all CPUArchState, use a helper to obtain thedesired CPUState.Free the "cpu" variable for PowerPCCPU, to access its CPUPPCState.
Signed-off-by: Andreas Färber <afaerber@suse.de>
spapr_rtas: Abstract rtas_query_cpu_stopped_state() with qemu_get_cpu()
Instead of looping over all CPUArchState, use a helper to obtain thedesired CPUState directly. Saves a CPUPPCState variable and QOM cast.
ivshmem: add missing error exit(2)
If the user fails to specify 'chardev' or 'shm' then we cannot continue.Exit right away so that we don't invoke shm_open(3) with a NULL pointer.
It would be nice to replace exit(1) with error returns in the PCI device...
char/serial: cosmetic fixes.
Some cosmetic fixes to char/serial fixing some checkpatch errors.
Cc: qemu-trivial@nongnu.org
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
char/serial: Use generic Fifo8
Use the generic Fifo8 helper provided by QEMU, rather than re-implementprivately.
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
char/serial: serial_ioport_write: Factor out common code
These three lines are common to both FIFO and regular mode. Just factorthem out to outside the if rather than replicate the same lines insideboth if and else.
hw/scsi: Don't increment a boolean value
This fixes a warning from cppcheck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/xen: Use g_free instead of free and fix potential memory leaks
The wrong functions and the missing calls of g_free were reportedby cppcheck.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
intc/xilinx_intc: Use qemu_set_irq
Use qemu_set_irq rather than if-elsing qemu_irq_(lower|raise). Nofunctional change, just reduces verbosity.
pc: Fix crash when attempting to hotplug CPU with negative ID
QMP command "{ 'execute': 'cpu-add', 'arguments': { 'id': 1 }}" may causeQEMU SIGSEGV at: piix4_cpu_hotplug_req () ... g>sts[cpu_id / 8] |= (1 << (cpu_id % 8)); ...
Since for PC in current implementation id should be in range [0...maxcpus)...
pc: Create pc-*-1.6 machine-types
Some CPU model fixes are going to be included and they will requirecompatibility properties in the pc-*-1.5 machine-types.
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>Reviewed-by: Igor Mammedov <imammedo@redhat.com>...
target-i386: Update model values on Conroe/Penryn/Nehalem CPU models
The CPUID model values on Conroe, Penryn, and Nehalem are tooconservative and don't reflect the values found on real Conroe, Penryn,and Nehalem CPUs.
This causes at least one known problems: Windows XP disables sysenter...
Merge remote-tracking branch 'stefanha/net' into staging
Message-id: 1370613288-14933-1-git-send-email-stefanha@redhat.com...
xilinx_axidma: Do not set DMA .notify to NULL after notify
If a stream notify function is not ready, it may re-populate the notify call-back to indicate it should be re-polled later. This break in this usage, asimmediately following the notify() call, .notify is set to NULL. reverse the...
xilinx_axienet: Fix bit mask code
Obviously the code wanted to mask the lower bits but failed to do sobecause of a missing "<".
cppcheck detected a conditional expression which was always true (1 < 7).
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Merge remote-tracking branch 'stefanha/block' into staging
isa: QOM'ify ISADevice
Rename its parent field and use DEVICE where necessary.
qdev: Drop FROM_QBUS() macro
Use QOM cast macros I2C_BUS(), SSI_BUS(), PCI_BUS() instead.
isa: QOM'ify ISABus
Rename its parent field and use ISA_BUS() where necessary.
kvm/i8254: QOM'ify some more
Introduce type constant and cast macro to obsolete DO_UPCAST().
Prepares for PIT realizefn.
i8254: Convert PITCommonState to QOM realizefn
Instead of having the parent provide PITCommonClass::init,let the children override DeviceClass::realize themselves.This pushes the responsibility for saving and calling the parent'srealizefn to the children....
i8259: QOM'ify some more
Introduce type constant.
Prepares for PIC realizefn.
kvm/i8259: QOM'ify some more
i8259: Convert PICCommonState to use QOM realizefn
Instead of having the parent provide PICCommonClass::init,let the children override DeviceClass::realize themselves.This pushes the responsibility of saving and calling the parent'srealizefn to the children....
i8254: QOM'ify some more
Introduce type constant and avoid DO_UPCAST().
isa: Use realizefn for ISADevice
Drop ISADeviceClass::init and the resulting no-op initfn and letchildren implement their own realizefn. Adapt error handling.Split off an instance_init where sensible.
cs4231a: QOM'ify some more
Introduce type constant and cast macro.Replace reset hook with DeviceClass::reset callback.
gus: QOM'ify some more
Add type constant and cast macro.
ide: Set BSY bit during FLUSH
The implementation of the ATA FLUSH command invokes a flush at the blocklayer, which may on raw files on POSIX entail a synchronous fdatasync().This may in some cases take so long that the SLES 11 SP1 guest driverreports I/O errors and filesystems get corrupted or remounted read-only....
virtio-ccw: Fix unsetting of indicators.
Interpretation of the ccws to register (configuration) indicators containeda thinko: We want to disallow reading from 0, but setting the indicatorpointer to 0 is fine.
Let's fix the handling for CCW_CMD_SET{,_CONF}_IND....
s390x/css: Fix concurrent sense.
Fix an off-by-one error when indicating availablity of concurrentsense data.
Cc: qemu-stable@nongnu.orgSigned-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
vmxnet3: fix NICState cleanup
Use qemu_del_nic() instead of qemu_del_net_client() to correctly freethe entire NICState.
Cc: qemu-stable@nongnu.orgReported-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Merge remote-tracking branch 'sstabellini/xen_fixes_20130603' into staging
Merge remote-tracking branch 'kwolf/for-anthony' into staging
Merge remote-tracking branch 'mst/tags/for_anthony' into staging
pci: misc cleanups
This includes some pci-related cleanups,and fw cfg cleanups which will be useful for on-goingpci related work.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
block: add block driver read only whitelist
We may want to include a driver in the whitelist for read only taskssuch as diagnosing or exporting guest data (with libguestfs as a goodexample). This patch introduces a readonly whitelist option, and forbackward compatibility, the old configure option --block-drv-whitelist...
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.
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.
xen: start PCI hole at 0xe0000000 (same as pc_init1 and qemu-xen-traditional)
We are currently setting the PCI hole to start at HVM_BELOW_4G_RAM_END,that is 0xf0000000.Start the PCI hole at 0xe0000000 instead, that is the same value used bypc_init1 and qemu-xen-traditional....
xen: remove xen_vcpu_init
No need for xen_vcpu_init anymore:
- the RTC emulator doesn't have any periodic timers continuously runningeven in absence of guest interactions anymore;
- qemu_dummy_start_vcpu takes care of disabling TCG for us, so we don't...
xen: use pc_init_pci instead of pc_init_pci_no_kvmclock
Call kvmclock_create only if kvmclock_enabled.Use pc_init_pci on Xen rather than pc_init_pci_no_kvmclock.
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
xen_machine_pv: do not create a dummy CPU in machine->init
This fixes a regression introduced by:
commit 62fc403f11523169eb4264de31279745f48e3eccAuthor: Igor Mammedov <imammedo@redhat.com>Date: Mon Apr 29 18:54:13 2013 +0200
target-i386: Attach ICC bus to CPU on its creation...
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>...
pvpanic: use FWCfgState explicitly
Use the type-safe FWCfgState structure insteadof the unsafe void *.
fw_cfg: add API to find FW cfg object
Remove some code duplication by adding afunction to look up the fw cfg file.This way, we don't need to duplicate same strings everywhere.Use by both fw cfg and pvpanic device.
fw_cfg: fw_cfg is a singleton
Make sure we only have a single instance ever:because if it isn't we can't find it so it'suseless anyway.
apic: rename apic specific bitopts
apic has its own version of bitops, with thedifference that it works on u32 and not long.Add apic_ prefix to avoid namespace clashes.
We should look into reusing standard bitops long-term,but that's not entirely trivial....
refer to FWCfgState explicitly
Currently some places use pointer-to-void even though they meanpointer-to-FWCfgState. Clean them up.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
firmware_abi: move to include/hw/nvram/
firmware_abi.h with structs for OpenBIOS landed in hw/sparc/ by mistake- move it to hw/nvram/ alongside fw_cfg.h. In addition to sparc it'sincluded from ppc mac_nvram.c and will need to include it from prep.c in...
dec.c - move to pci-bridge
Looks like dec.c is in pci-host by mistake.Moving it over to pci-bridge.
Acked-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
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>
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’...