Remove remenants of qemu_malloc
This covers the various check commands
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Update HACKING to refer to g_malloc instead of qemu_malloc
Add trace points for g_malloc/g_free functions
Derived from a patch submitted by Avi Kivity.
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
Remove qemu_malloc/qemu_free
Make glib mandatory and fixup utils appropriately
Reorder default ram_size initialization
code_gen_alloc depends on it, and that is now called earlier viaconfigure_accelerator.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
scsi-disk: fix DPRINTF
The variable 'status' does not exist anymore, adjust DPRINTFaccordingly.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
target-cris/opcode-cris.h: rename REG_PC/SP to CRIS_REG_PC/SP
The REG_PC constant used in opcode-cris.h can clash with asimilar define in system include files. In particular theUbuntu Lucid SPARC signal.h will define REG_PC, and sinceqemu-common.h now includes signal.h this was causing compile...
scsi: do not overwrite memory on REQUEST SENSE commands with a large buffer
Other scsi_target_reqops commands were careful about not using r->cmd.xferdirectly, and instead always cap it to a fixed length. This was not donefor REQUEST SENSE, and this patch fixes it....
hw/scsi-bus.c: Fix use of uninitialised variable
Don't use req before it has been initialised in scsi_req_new().This fixes a compile failure due to gcc complaining about this.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>Acked-by: Paolo Bonzini <pbonzini@redhat.com>...
memory: add API for creating ROM/device regions
ROM/device regions act as mapped RAM for reads, can I/O memory forwrites. This allow emulation of flash devices.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
memory: correct documentation typos
Noted by Drew Jones.
qapi: fix build issue due to missing newline in generated header
Fixes a build issue on RHEL5, and potentially other distros, where gccwill generate an error due to us not writing a trailing "\n" whengenerating *qmp-commands.h
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>...
configure: Disable guest_agent for mingw32
guest_agent is not supported for mingw32, so the default valueshould be 'no', not 'yes'.
This removes the dependencies to glib-2.0 and python whichmakes native and cross builds for w32 much easier (no needto get and install these extra packages)....
build: Move QEMU_INCLUDES before QEMU_CFLAGS
This patch fixes build when any of the include paths from QEMU_CFLAGScontains a header file with similar name to a header file in qemusources. I hit it with error.h included by qapi/qapi-types-core.h. GCCdecided to use /usr/include/alsa/error.h instead of qemu's error.h....
memory: reclaim resources when a memory region is destroyed for good
scsi: add support for unit attention conditions
Unit attention conditions override any sense data the device alreadyhas. Their signaling and clearing is handled entirely by the SCSIBuscode, and they are completely transparent to the SCSIDevices.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>...
scsi: report unit attention on reset
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
scsi: add special traces for common commands
Can be useful when debugging the device scan phase.
scsi: move handling of REQUEST SENSE to common code
scsi: add a bunch more common sense codes
scsi: move handling of REPORT LUNS and invalid LUNs to common code
scsi: introduce SCSICommand
This struct is currently unnamed. Give it a name and use itexplicitly to decouple (some parts of) CDB parsing fromSCSIRequest.
scsi: push lun field to SCSIDevice
This will let SCSIBus detect requests sent to an invalid LUN, andhandle them itself. However, there will be still support for only oneLUN per target
scsi: move request parsing to common code
Also introduce the first occurrence of "independent" SCSIReqOps,to handle invalid commands in common code.
scsi: move request-related callbacks from SCSIDeviceInfo to SCSIReqOps
scsi: pass cdb already to scsi_req_new
Right now the CDB is not passed to the SCSIBus until scsi_req_enqueue.Passing it to scsi_req_new will let scsi_req_new dispatch common requeststhrough different reqops.
Moving the memcpy to scsi_req_new is a hack that will go away as...
scsi: introduce SCSIReqOps
This will let allow requests to be dispatched through different callbacks,either common or per-device.
This patch adjusts the API, the next one will move members to SCSIReqOps.
scsi: move sense handling to generic code
With this patch, sense data is stored in the generic data structuresfor SCSI devices and requests. The SCSI layer takes care of storingsense data in the SCSIDevice for the subsequent REQUEST SENSE command.
At the same time, get_sense is removed and scsi_req_get_sense can use...
pc: make vgabios exit port more useful
We've always listened on port 501 for vgabios panic messages. In the entiretime I've worked on QEMU, I've never actually seen a vgabios panic message :-)
If we change the semantics of this port a little bit, it makes it possible to...
scsi-disk: no need to call scsi_req_data on a short read
In fact, if the HBA's transfer_data callback goes on with scsi_req_continuethe request will be completed successfully instead of showing a failure.It can even cause a segmentation fault.
An easy way to trigger it is "eject -f cd" during installation (during media...
vscsi: always use get_sense
vscsi supports autosensing by providing sense data directly in theresponse. When get_sense was added, the older state machine approachthat sent REQUEST SENSE commands separately was left in place. Removeit, all existing SCSIDevices do support autosensing and the next patches...
scsi: pass status when completing
A small improvement in the SCSI request API. Pass the statusat the time the request is completed, so that we can assert thatno request is completed twice. This would have detected theproblem fixed in the previous patch....
Merge remote-tracking branch 'stefanha/trivial-patches' into staging
Merge remote-tracking branch 'aneesh/for-upstream-1' into staging
Merge remote-tracking branch 'spice/spice.v41' into staging
Merge remote-tracking branch 'kraxel/usb.23' into staging
Merge remote-tracking branch 'kraxel/seabios' into staging
fix QLIST usage for RAM list
Spotted while reviewing the migration thread patches.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
scsi-bus: use DO_UPCAST
Signed-off-by: Zhi Yong Wu <wuzhy@linux.vnet.ibm.com>Reviewed-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
hw/qdev: Don't crash if qdev_create(NULL, ...) fails
If an attempt to create a qdev device on the default sysbus (by passingNULL as the bus to qdev_create) fails, print a useful error messagerather than crashing trying to dereference a NULL pointer.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>...
etrax-ser: printf -> qemu_log.
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
etrax: QDevify the Ethernet MAC.
ui/spice-core: report compiled-version in info spice/query-spice
Signed-off-by: Alon Levy <alevy@redhat.com>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
seabios: update to master
commit 8e301472e324b6d6496d8b4ffc66863e99d7a505
user visible changes in seabios: * ahci is enabled by default (and thus in this build). * bootorder support for ahci. * two-pass pci allocator (orders bars by size for better packing)....
qxl: unbreak after memory API conversion
Break is only noticable with newer spice-server library (0.8.2 releaseor 0.9.0 and newer on master branch).
ioport_write's val was changed from uint32_t to uint64_t, thisbroke two printfs. Use PRId64 instead of %d....
qxl: allowing the command rings to be not empty when spice worker is stopped RHBZ #728984
same as 8927cfbba232e28304734f7afd463c1b84134031, but for qxl_check_state, that wastriggered by qxl_pre_load (which calls qxl_hard_reset, which calls qxl_soft_reset),...
usb/hid: add hid_pointer_activate, use it
HID reorganziation broke the usb tablet in windows xp. The reason isthat xp activates idle before it starts polling, which creates achicken-and-egg issue: We don't call hid_pointer_poll because there areno pending events. We don't get any events because the activation code...
hid: register kbd hander in init()
Register the keyboard event handler in hid's init() instead of its reset()function.
Signed-off-by: Michael Walle <michael@walle.cc>Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
hid: introduce hid vmstate macros
Add VMSTATE macros to describe a HIDState. Based on usb-hid.c descriptions.
usb-hid: use hid vmstate macro
Use new hid vmstate macro. Version stays the same, because there is noreordering of the fields.
milkymist-softusb: use hid code directly
Remove the dummy USB device and use the HID code directly. Use the HID codefor the mouse support, too.
usb-hid: remove usb_hid_datain_cb
No users left, all migrated over to hw/hid.[ch].Yea! Zap it!
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Merge remote-tracking branch 'pm-arm/for-upstream' into pm
etrax: Allocate DMA connections at board level.
etrax: Remove hw/etraxfs.c.
The Bare ETRAX FS board was a fictive machine that I used whendeveloping the CRIS system emulation. Since we support thereal AXIS-dev88 developer boards, there is no reason tokeep the fictive one around.
This commit also removes the double registration of the axis-dev88...
lance: unbreak after memory API conversion
The conversion passed the wrong opaque pointer, causing a crash on first use.Pass the correct opaque.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
Merge remote-tracking branch 'qemu-kvm/uq/master' into staging
hw/9pfs: Add yeild support to rename coroutine
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs: Update vfs_rename to use coroutines
I guess TRENAME 9p operation needs an update. The 9p op shouldmore similar renameat. Otherwise anything other than path cannot trackthe fid.
hw/9pfs: Update v9fs_remove to use coroutines
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs: Add yield support for remove
hw/9pfs: Update mkdir to use coroutines
Signed-off-by: Venkateswararao Jujjuri "<jvrao@linux.vnet.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
hw/9pfs: Add yield support for mkdir coroutine
hw/9pfs: Update v9fs_mknod to use coroutines
hw/9pfs: Add yield support to statfs coroutine
hw/9pfs: Update v9fs_statfs to use coroutines
hw/9pfs: Add yield support to lstat coroutine
hw/9pfs: Update v9fs_getattr to use coroutines
hw/9pfs: Add yield support to setattr related coroutines
This include chmod, utimensat, chown and truncate.
hw/9pfs: Update v9fs_setattr to use coroutines
hw/9pfs: Add yield support to xattr related coroutine
This include llistxattr and lgetxattr.
hw/9pfs: Update v9fs_xattrwalk to coroutines
hw/9pfs: Update v9fs_xattrcreate to use coroutines
hw/9pfs: Add yield support to mknod coroutine
hw/9pfs: Add yield support for readdir related coroutines
This include readdir, telldir, seekdir, rewinddir.
hw/9pfs: Update v9fs_readdir to use coroutines
hw/9pfs: Update v9fs_readlink to use coroutine
hw/9pfs: Add yeild support for readlink
Signed-off-by: Venkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
pci: remove support for pre memory API BARs
Not used anymore.
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
isa-mmio: convert to memory API
sun4u: convert to memory API
fixes memory leak on repeated BAR map/unmap
Reviewed-by: Richard Henderson <rth@twiddle.net>Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ehci: convert to memory API
uhci: convert to memory API
xen-platform: convert to memory API
Since this device bypasses PCI and registers I/O ports directly withthe system bus, it needs further attention.
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>Signed-off-by: Avi Kivity <avi@redhat.com>...
msix: convert to memory API
The msix table is defined as a subregion, to allow for a BAR thatmixes device specific regions with the msix table.
pci: remove pci_register_bar_simple()
Superceded by pci_register_bar_region().
pci: convert pci rom to memory API
pci: remove pci_register_bar()
Superceded by pci_register_bar_region(). The implementationsare folded together.
pci: fold BAR mapping function into its caller
There is only one function, so no need for a function pointer.
pci: rename pci_register_bar_region() to pci_register_bar()
ahci: convert to memory API
intel-hda: convert to memory API
lsi53c895a: convert to memory API
An optimization that fast-pathed DMA reads from the SCRIPTS memorywas removed int the process. Likely it breaks with iommus anyway.
Reviewed-by: Richard Henderson <rth@twiddle.net>Reviewed-by: Anthony Liguori <aliguori@us.ibm.com>...
ppc: convert to memory API
ne2000: convert to memory API
pcnet: convert to memory API
Also related chips.
i6300esb: convert to memory API
Also add missing destructor.
virtio-pci: convert to memory API
except msix.
[jan: fix build][aliguori: fix build]