pxa2xx_mmci: convert to memory API
Convert mechanicaly; the access size of the old_mmio fieldsseems odd.
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>Signed-off-by: Avi Kivity <avi@redhat.com>
pxa2xx_lcd: convert to memory API
rc4030: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
hpet: convert to memory API
ide/mmio: convert to memory API
cs4321: convert to memory API
syborg_virtio: convert to memory API
pxa2xx_gpio: convert to memory API
pxa2xx_pcmcia.c: convert common memory space to memory API
pxa2xx_pcmcia.c: convert attribute memory space to memory API
pxa2xx_pcmcia.c: convert io memory space to memory API
pxa2xx_keypad: convert to memory API
pxa2xx_timer: convert to memory API
pxa2xx_pic: convert to memory API
The ARM documentation say transfers between the cpu and thecoprocessor are 32 bits wide.Use 4 as size for coprocessor read and writes.
stellaris: convert gptm to memory API
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>Reviewed-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Avi Kivity <avi@redhat.com>
marvell_88x8618_audio: convert to memory API
mst_fpga: convert to memory API
syborg_fb: convert to memory API
syborg_interrupt: convert to memory API
syborg_keyboard: convert to memory API
syborg_pointer: convert to memory API
syborg_rtc: convert to memory API
syborg_serial: convert to memory API
syborg_timer: convert to memory API
fdc: convert to memory API
FIXME: instance ID for migration
sbi: convert to memory API
ioapic: Reject non-dword accesses to IOWIN register
Aligns the model with the spec.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Avi Kivity <avi@redhat.com>
ioapic: Convert to memory API
This maintains the old imprecise access size handling.
integratorcp: convert core to memory API
integratorcp: convert icp pic to memory API
integratorcp: convert control to memory API
stellaris: convert sys to memory API
stellaris: convert i2c to memory API
stellaris: convert adc to memory API
pl011: convert to memory API
pl022: convert to memory API
pl031: convert to memory API
pl050: convert to memory API
pl061: convert to memory API
pl080: convert to memory API
pl110: convert to memory API
pl181: convert to memory API
pl190: convert to memory API
tosa: convert to memory API
versatilepb: convert to memory API
vexpress: convert to memory API
virtex_ml507: convert to memory API
shix: convert to memory API
RAM wasn't actually allocated, only used, so fix that as well.
jazz_led: convert to memory API
parallel: convert to memory API
zaurus: convert to memory API
msix: track function masked in pci device state
Only go over the table when function is masked.This is not really important for qemu.git but helpsfix a bug in qemu-kvm.git.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
msix: Prevent bogus mask updates on MMIO accesses
From: Jan Kiszka <jan.kiszka@siemens.com>
Only accesses to the MSI-X table must trigger a call tomsix_handle_mask_update, otherwise the vectorvalue might be out of range.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>...
msix: avoid mask updates if mask is unchanged
Check pending bit only if vector mask status changed.This is not really important for qemu.git but helpsfix a bug in qemu-kvm.git.
ivshmem: fix PCI BAR2 registration during initialization
Ivshmem cannot work, and the command lspci cannot show ivshmem BAR2 in the guest.As for pci_register_bar(), parameter MemoryRegion should be s->bar instead of s->ivshmem.
Reviewed-by: Avi Kivity <avi@redhat.com>...
9p: pass dotl flags to the unlinkat method
AT_REMOVEDIR is not defined on all systems. Pass the raw flags from the9p protocol, which are always there.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
9p: allow compiling the dummy virtio-9p-handle.c code on Linux
Avoid a conflict on the definition of struct file_handle byusing a replacement name.
ivshmem: use migration blockers to prevent live migration in peer mode (v2)
Now when you try to migrate with ivshmem, you get a proper QMP error:
(qemu) migrate tcp:localhost:1025Migration is disabled when using feature 'peer mode' in device 'ivshmem'(qemu)...
Merge remote-tracking branch 'kraxel/usb.31' into staging
Merge remote-tracking branch 'origin/master' into staging
usb-storage: don't try to send the status early.
Until recently all scsi commands sent to scsi-disk did either transferdata or finished instantly. The correct implementation ofSYNCRONIZE_CACHE changed the picture though, and usb-storage needsa fix to handle that case correctly.
ehci: add assert
Coverity thinks q could be NULL there and warns.I believe it can't be NULL there.Add assert to prove it.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
usb-storage: drop result from device state.
usb-storage: fill status in complete callback.
Put status word into device state, fill it in command_complete, haveusb_msd_send_status just send it out.
usb-storage: drop tag from device state.
scsi keeps track of the tag in SCSIRequest,no need to store a separate copy.
usb-storage: move status debug message to usb_msd_send_status.
usb_msd_send_status can be called from different code paths, move thedebug message into the function to make sure it is printedunconditionally.
loader: Fix read_targphys() to behave when read() fails
Happily passes (size_t)-1 to rom_add_blob_fixed(), which promptly diesattempting to malloc that much. Spotted by Coverity.
Bonus fix for ROMs larger than INT_MAX bytes: return ssize_t insteadof int. Bug can't bite, because the only user load_aout() limits ROM...
Merge branch 's390-1.0' of git://repo.or.cz/qemu/agraf
Merge branch 'ppc-1.0' of git://repo.or.cz/qemu/agraf
Merge remote-tracking branch 'kwolf/block-stable' into staging
pseries: Fix qdev.id handling in the VIO bus code
When the user creates a device on the command line with -device, theycan specify the id, using id=foo. Currently the VIO bus code overwritesthis id with it's own value. We should only set qdev.id if it is not...
pseries: Check we have a chardev in spapr_vty_init()
If qemu is run like:
qemu-system-ppc64 -nodefaults -device spapr-vty
We end up in spapr_vty_init() with dev->chardev == NULL. Currentlythat leads to a segfault because we unconditionally callqemu_chr_add_handlers()....
pseries: Default reg for vty should be SPAPR_VTY_BASE_ADDRESS
In commit b4a78527359a4540d84d4cdf629d01cbb262f698 ("Place pseries vtydevices at addresses more similar to existing machines"), we changed thedefault reg for the vty to 0x30000000, however we didn't update the default...
pseries: Allow kernel's early debug output to work
The PAPR specification defines a virtual TTY/console interface for guestOSes to use via the H_PUT_TERM_CHAR and H_GET_TERM_CHAR hypercalls. Therecan be multiple virtual ttys, so these take a "termno" parameter. This...
pseries: Correct RAM size check for SLOF
The SLOF firmware used on the pseries machine needs a reasonable amount of(guest) RAM in order to run, so we have a check in the machine initfunction to check that this is available. However, SLOF runs in real mode...
pseries: Fix buggy spapr_vio_find_by_reg()
The spapr_vio_find_by_reg() function in hw/spapr_vio.c is supposed to findthe device structure for a PAPR virtual IO device with the given reg value,and return NULL if none exists.
It does the first ok, but if no device with that reg exists, it just...
scsi-block: always use SG_IO for MMC devices
CD burning messes up the state of the host page cache and host blockdevice. Just pass all operations down to the device, even though thatmight have slightly worse performance. Everything else just is notreliable in combination with burning....
scsi: pass down REQUEST SENSE to the device when there is no stored sense
This will let scsi-block/scsi-generic report progress on longoperations.
Reported-by: Thomas Schmitt <scdbackup@gmxbackup.net>Tested-by: Thomas Schmitt <scdbackup@gmxbackup.net>...
scsi: remove block descriptors from CDs
Reported-by: Thomas Schmitt <scdbackup@gmx.net>Tested-by: Thomas Schmitt <scdbackup@gmx.net>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi: fix parsing of allocation length field
- several MMC commands were parsed wrong by QEMU because their allocationlength/parameter list length is placed in a non-standard position inthe CDB (i.e. it is different from most commands with the same value in...
scsi: update list of commands
Add more commands and their names, and remove SEEK which is obsolete.Instead, use SET_CAPACITY which is still in SSC.
Tested-by: Thomas Schmitt <scdbackup@gmx.net>Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
atapi: kill MODE SENSE, fix MODE SENSE
Mode page 2A of emulated ATAPI DVD-ROM should have page length 0x14like SCSI CD-ROM, rather than 0x12.
Mode page length is off by 8, as it should contain the length of thepayload after the first two bytes....
scsi-disk: guess geometry
Old operating systems rely on correct geometry to convert from CHSaddresses to LBA. Providing correct data is necessary for them to boot.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
scsi: fix fw path
The pre-1.0 firmware path for SCSI devices already included the LUNusing the suffix argument to add_boot_device_path. I missed that whenmaking channel and LUN customizable. Avoid that it is included twice, andconvert the colons to commas for consistency with other kinds of devices...
Fix spelling in documentation and comments (similiar -> similar)
This bug was detected by codespell.In mips_mipssim.c a grammatical error was fixed, too.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/omap_gpio: Fix infinite recursion when doing 8/16 bit reads
Fix a long-standing bug which meant that any attempt to do an8 or 16 bit read from the OMAP GPIO module would cause qemu tocrash due to an infinite recursion.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
pc_piix: set qxl revision to 2 for pc-0.14
The default is still 3, and I didn't change older machine types.
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Revert bugfix e7852674d5 until tested or until after the release.
Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
s390x: initialize virtio dev region
When running the s390x virtio machine we can potentially use uninitializedmemory for the virtio device backing ram. That can lead to weird breakge.
So let's better initialize it to 0 properly.
Reported-by: Andreas Färber <afaerber@suse.de>...
s390: fix reset hypercall to reset the status
This patch fixes the reset hypercall which is supposed to alsoreset the device status in device memory.This fixes the following bug:
[root@localhost driver]# echo virtio0 > unbind[ 35.056966] ------------[ cut here ]------------...
s390: fix short kernel command lines
The default kernel command line for s390 is"root=/dev/ram0 ro"
When overriding this line, we have to ensure to also copy the \0 toavoid false lines, for example, -append "root=/dev/vda" will result in"root=/dev/vda0 ro" with the current code....
s390: Fix cpu shutdown for KVM
On s390 a shutdown is the state of all CPUs being either stoppedor disabled (for interrupts) waiting. We have to track the overallnumber of running CPUs to call the shutdown sequence accordingly.This patch implements the counting and shutdown handling for the...
hw/onenand: reject read-only drives
Signed-off-by: Juha Riihimäki <juha.riihimaki@nokia.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/nand: reject read-only drives
also gracefully fail on nand_device_init() for unsupported blocksize instead of aborting.
hw/arm_sysctl: Fix RESETCTL for realview-pb-a8 and -pbx-a9
Depending on the considered baseboard the bit used toreset the platform is different.
Here is the list of considered Realview/Versatile platforms:
Realview/Versatile AB for ARM926EJ-S: BOARD_ID = 0x100 = BOARD_ID_PB9...
hw/pxa2xx.c: Fix handling of RW bits in PMCR
Fix an error in commit afd4a6522 which meant that writing a zeroto the RW bits in the PMCR wouldn't actually clear them. (Errorspotted by Andrzej Zaborowski.)
hw/usb-net.c: Fix precedence bug when checking rndis_state
"!X == 2" is always false (spotted by Coverity), so the checksfor whether rndis is in the correct state would never fire.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com>
hw/pxa2xx.c: Fix handling of R/WC bits in PMCR
Fix a bug in handling the write-one-to-clear bits in the PMCRwhich meant that we would always clear the bit even if thevalue written was a zero. Spotted by Coverity (see bug 887883).
hw/arm_timer.c: Fix bounds check for Integrator timer accesses
There are only three counter/timers on the integrator board:correct the bounds check to avoid an array overrun. (Spottedby Coverity, see bug 887883).