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
Signed-off-by: Benoit Canet <benoit.canet@gmail.com>Signed-off-by: Avi Kivity <avi@redhat.com>
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
fdc: convert to memory API
FIXME: instance ID for migration
Signed-off-by: Avi Kivity <avi@redhat.com>
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
Include zlib.h using #include <>
zlib.h is not a local include file, therefore it should be includedusing <> instead of "".
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
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>...
configure: build position independent executables on x86-Linux hosts
Change the default on x86 Linux hosts to building PIE (positionindependent executables); instead of restricting the option touser-only targets, apply it to all targets.
In addition, set the relocation sections to read-only (relro) when...
configure: check for EFD_NONBLOCK | EFD_CLOEXEC flags
Add check for the EFD_NONBLOCK and EFD_CLOEXEC flags to theCONFIG_EVENTFD test.This fixes the following build failure on Fedora 9:
CC event_notifier.o event_notifier.c: In function `event_notifier_init':...
Update version for 1.0-rc3 release
Signed-off-by: Anthony Liguori <aliguori@us.ibm.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>
block: allow migration to work with image files (v3)
Image files have two types of data: immutable data that describes things likeimage size, backing files, etc. and mutable data that includes offset andreference count tables.
Today, image formats aggressively cache mutable data to improve performance. In...
qcow2: implement bdrv_invalidate_cache (v2)
We don't reopen the actual file, but instead invoke the close and open routines.We specifically ignore the backing file since it's contents are read-only andtherefore immutable.
qed: add migration blocker (v2)
Now when you try to migrate with qed, you get:
(qemu) migrate tcp:localhost:1025Block format 'qed' used by device 'ide0-hd0' does not support feature 'live migration'(qemu)
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)...
migrate: add migration blockers
This lets different subsystems register an Error that is thrown whenevermigration is attempted. This works nicely because it gracefully supportsthings like hotplug.
Right now, if multiple errors are registered, only one of them is reported....
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-linux: fix /proc/bus/usb/devices scan
Commit 0c402e5abb8c2755390eee864b43a98280fc2453 is incompleteand misses one of the two function pointer calls inusb_host_scan_dev(). Add the additional port handling logicto the other call too.
Spotted by Coverity....
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.
x86: fix pcmpestrm and pcmpistrm
Fix obvious typos (decrement and off-by-one error) in pcmpestrm and pcmpistrmwhich resulted in infinite loop. Reported by Frank Mehnert,spotted also by Coverity (bug 84752853).
Reported-by: Frank Mehnert <frank.mehnert@oracle.com>...
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...
Improve "ta 0" shutdown
This patch replace the previous implementation with this simplified andmore complete version (no shutdown when psret == 1).
Signed-off-by: Fabien Chouteau <chouteau@adacore.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
gdbstub: Fix memory leak
cppcheck report: gdbstub.c:1781: error: Memory leak: s
Rearranging of the code avoids the leak.
v2:Replace the g_malloc0() by g_new0() (suggested by Stuart Brady).
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
tcg-sparc: Fix set-but-not used warnings.
In both cases, val is computed, but then not used in thesubsequent line, which then re-computes the quantity ina different type (int32_t vs unsigned long).
Keep the computation type that's been working so far....
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
Merge remote-tracking branch 'qmp/queue/qmp-1.0' into staging
fmodaudio: Remove unused variable 'bits16' (reported by cppcheck)
The variable is assigned a value which is never used,so remove variable and assignment.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: malc <av1474@comtv.ru>
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...
Documentation: Add section about iSCSI LUNS to qemu-doc
Add a new section about using iSCSI LUNs with qemuand provide a short example on how to set up a target and access itusing the built-in initiator
Signed-off-by: Ronnie Sahlberg <ronniesahlberg@gmail.com>...
Makefile: remove more generated files on clean
make clean missed the source qmp files generatedby python. Fix that.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Makefile: fix dependencies for generated .h, .c
We have a single rule generating .c and .h files,so .h doesn't depend on .c: both depend on thesource schema.
Fix Makefile to reflect that - without this,if .c is there and .h is missing, Makefile doesnot know how to remake .h and assumes it's...
Makefile: dependency fix
qga/guest-agent-commands.c includes qga-qmp-commands.h,but it was missing in its dependencies. Add it in QGALIB_GEN.
Makefile: fix qga dependencies
.c files include .h files, so .o depends on .h,and the linked result depends on .o.We got it wrong for qga rules, fix it up.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>...
qapi: Check for negative enum values
We don't currently check for negative enum values in qmp_output_type_enum(),this will very likely generate a segfault when triggered.
However, it seems that no code in tree can trigger this today.
Acked-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
Fixing some spelling in docs/libcacard.txt
Reviewed-by: Alon Levy <alevy@redhat.com>Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
monitor: Fix file_completion() to check for stat() failure
stat() can fail for a file name just read with readdir(). Easiest wayto trigger is a dangling symbolic link --- look ma, no race! When itfails, file_completion() uses sb.st_mode uninitialized. If the...
Fix typo: runnning -> running
One n too many for running, need we say more.
Signed-Off-By: Vagrant Cascadian <vagrant@freegeek.org>
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
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>
Fix some spelling bugs in documentation and comments
These errors were detected by codespell:
remaing -> remainingsoley -> solelyvirutal -> virtualseperate -> separate
libcacard.txt still needs some more patches.
Signed-off-by: Stefan Weil <sw@weilnetz.de>...
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>
Update version to 1.0-rc2
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>...