History | View | Annotate | Download (14.9 kB)
Replace the VMSTOP macros with a proper state type
Today, when notifying a VM state change with vm_state_notify(),we pass a VMSTOP macro as the 'reason' argument. This is not idealbecause the VMSTOP macros tell why qemu stopped and not exactlywhat the current VM state is....
hw: Trim superfluous #include "block_int.h"
Including it in device models is unclean, including it without areason adds insult to injury.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: convert to memory API
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>
ide: Clear error_status after restarting flush
Clearing the error status flag was missing for restarting flushes. Now that theerror status is separate from the BM status register, we can simply set it to 0after restarting the request. This ensures that we never forget to clear a bit....
ide: allow other dma comands than read and write
Replace the is_read flag with a dma_cmd flag to allow the dma andrestart logic to handler other commands like TRIM.
Signed-off-by: Christoph Hellwig <hch@lst.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: add TRIM support
Add support for TRIM sub function of the data set management command,and wire it up to the qemu discard infrastructure.
ide: Split error status from status register
When adding the werror=stop mode, some flags were added to s->statuswhich are used to determine what kind of operation should be restartedwhen the VM is continued.
Unfortunately, it turns out that s->status is in fact a device register...
ide: cleanup warnings
Add \n.
Signed-off-by: Andrea Arcangeli <aarcange@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: Turn debug messages into assertions
These printfs aren't really debug messages, but clearly indicate a bug if theyever become effective. Noone uses DEBUG_IDE, let's re-enable the checkunconditionally and make it an assertion instead of printfs in the device...
Remove unused sysemu.h include directives
Remove unused sysemu.h include directives to speed up buildwith the following patches.
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ide: Remove unneeded null pointer check
With bm == NULL, other code in the same function would crash.
This bug was reported by cppcheck:hw/ide/pci.c:280: error: Possible null pointer dereference: bm
Cc: Michael S. Tsirkin <mst@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>...
ide: factor dma handling helpers
Factor the DMA I/O path that is duplicated between read and writecommands, into common helpers using the s->is_read flag added forthe macio ATA controller.
ide: Split out BMDMA code from ATA core
The ATA core is currently heavily intertwined with BMDMA code. Let's loosenthat a bit, so we can happily replace the DMA backend with differentimplementations.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: Reset current_addr after stopping DMA
Whenever SSBM is reset in the command register all state information is lost.Restarting DMA means that current_addr must be reset to the base address of thePRD table. The OS is not required to change the base address register before...
ide: Ignore double DMA transfer starts/stops
You can only start a DMA transfer if it's not running yet, and you can onlycancel it if it's running.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>Reviewed-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
ide: convert bmdma address ioport to ioport_register()
cmd646, via compile tested, pci lightly boot tested.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ide: Avoid canceling IDE DMA
The reason for not actually canceling the I/O is because withvirtualization and lots of VM running, a guest fs may mistake aoverload of the host, as an IDE timeout. So rather than canceling theI/O, it's safer to wait I/O completion and simulate that the I/O has...
Revert "ide save/restore current transfer fields"
This reverts commit 42ee76fe82093ba914f0dc83d2decbcf68866144.
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: fix migration in the middle of a bmdma transfer
It reintroduces Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"
but using subsections. Added bonus is the addition of ide_dummy_transfer_stopto transfer_end_table, that was missing....
ide save/restore current transfer fields
If migration takes place between write of the bmdma address register andwrite of the command register (to initiate DMA), the destination willnot properly start the DMA op, hanging the guest:
ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen...
ide: port pci ide to vmstate
ide: change cast to DO_UPCAST
Patchworks-ID: 35293Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: Remove cast in pci_register_bar
We already have a PCIDevice at that point
Patchworks-ID: 35296Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: create ide/pci.h for common ide pci definitions
Patchworks-ID: 35299Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: export needed ide-pci functions for split
Patchworks-ID: 35300Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide: split cmd646 and piix from pci.c
This patch splits cmd646 specific code from pci.c.This patch splits piix4 specific code from pci.c.And compile new piix.o and cmd646.o when they are needed.The only change that is not code movemet is removal of cmd646 specific parts...
New qdev_init_nofail()
Like qdev_init(), but terminate program via hw_error() instead ofreturning an error value.
Use it instead of qdev_init() where terminating the program on failureis okay, either because it's during machine construction, or because...
Rename pci_create_noinit() to pci_create()
It's qdev_create() specialized for PCI, so name it accordingly.
Signed-off-by: Markus Armbruster <armbru@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
switch ide bus to inplace allocation.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ide/pci: convert to qdev.
With this patch applied ide drives (when attached to a pci adapter) canbe created via -device, like this:
-drive if=none,id=mydisk,file=/path/to/disk.img -device ide-drive,drive=mydisk,bus=ide.0,unit=0
Note that creating a master on ide1 doesn't work that way. That is a...
ide/pci: fix indention
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
mips malta: Fix fdc regression and use qdev for i8042 setup
8baf73adf664e79eae201c3f618078a220a661d9 (qdev/isa: convert fdc)breaks MIPS Malta:
Tried to create isa device isa-fdc with no isa bus present
Fix this by creating an isa bus for piix4.This change also requires some more qdev related changes...
ide: pass down DriveInfo instead of BlockDriverState
ide: move code to hw/ide/