musicpal: avoid call to sysbus_init_mmio()
Instead of calling sysbus_init_mmio() with a null region,create a dummy region using the memory API.
Signed-off-by: Avi Kivity <avi@redhat.com>
grlib_apbuart: convert to memory API
grlib_gptimer: convert to memory API
esp: convert to memory API
[benoit: fix]
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>Signed-off-by: Avi Kivity <avi@redhat.com>
fw_cfg: convert to memory API
Because the new API doesn't allow overlapping regions with just differentaccess sizes, we have to create a new "combined" region for both controland data, when the two share an ioport offset.
mpc8544_guts: convert to memory API
empty_slot: convert to memory API
eccmemctl: convert to memory API
axis_dev88: convert to memory API
pxa2xx_dma: convert to memory API
sparc32_dma: convert to memory API
bitbang_i2c: avoid call to sysbus_init_mmio()
pxa2xx_mmci: convert to memory API
Convert mechanicaly; the access size of the old_mmio fieldsseems odd.
pxa2xx_lcd: convert to memory API
rc4030: convert to memory API
hpet: convert to memory API
ide/mmio: convert to memory API
cs4321: convert to memory API
dp8393x: convert to memory API
Fixes address space leak on hotunplug.
ds1225y: convert to memory API
m48t59: 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>