History | View | Annotate | Download (35.9 kB)
ahci: Fix ahci cdrom read corruptions for reads > 128k
While testing q35, which has its cdrom attached to the ahci controller, I foundthat the Fedora 17 install would panic on boot. The panic occurs whilesquashfs is trying to read from the cdrom. The errors are:...
ahci: Fix sglist memleak in ahci_dma_rw_buf()
I noticed that in hw/ide/ahci:ahci_dma_rw_buf() we do not free the sglist. Thus,I've added a call to qemu_sglist_destroy() to fix this memory leak.
In addition, I've adeed a call in qemu_sglist_destroy() to 0 all of the sglist...
iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers
dma-helpers.c contains a number of helper functions for doingscatter/gather DMA, and various block device related DMA. Currently,these directly access guest memory using cpu_physical_memory_*(),...
ide/ahci: Use universal DMA helper functions
The AHCI device can provide both PCI and SysBus AHCI deviceemulations. For this reason, it wasn't previously converted to usethe pci_dma_*() helper functions. Now that we have universal DMAhelper functions, this converts AHCI to use them....
ahci: Clean up reset functions
Properly register reset functions via the device class.
CC: Alexander Graf <agraf@suse.de>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ahci: SATA FIS is 20 bytes, not 0x20
As in the SATA and AHCI specifications, a FIS is 5 Dwords of 4 byteseach, which comes to 20 bytes (decimal), not 0x20.
Signed-off-by: Daniel Verkamp <daniel@drv.nu>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Add missing const attributes for MemoryRegionOps
Most MemoryRegionOps already had the const attribute.This patch adds it to the remaining ones.
Signed-off-by: Stefan Weil <sw@weilnetz.de>Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
ahci: use new DMA helpers
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Merge remote-tracking branch 'kwolf/for-anthony' into staging
qom: Unify type registration
Replace device_init() with generalized type_init().
While at it, unify naming convention: type_init([$prefix_]register_types)Also, type_init() is a function, so add preceding blank line wherenecessary and don't put a semicolon after the closing brace....
AHCI: Fix port reset race
bdrv_aio_cancel() can trigger bdrv_aio_flush() which makes all aiothat is currently in flight finish. So what we do is:
port reset detect ncq in flight cancel ncq delete ncq sg list
at which point we have double freed the sg list. Instead, with this...
AHCI: Masking of IRQs actually masks them
When masking IRQ lines, we should actually mask them out and not declarethem active anymore. Once we mask them in again, they are allowed to triggeragain.
Signed-off-by: Alexander Graf <agraf@suse.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
qdev: register all types natively through QEMU Object Model
This was done in a mostly automated fashion. I did it in three steps and thenrebased it into a single step which avoids repeatedly touching every file inthe tree.
The first step was a sed-based addition of the parent type to the subclass...
sysbus: apic: ioapic: convert to QEMU Object Model
This converts three devices because apic and ioapic are subclasses of sysbus.Converting subclasses independently of their base class is prohibitively hard.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
ahci: add support for non-PCI based controllers
Add support for ahci on sysbus.
Signed-off-by: Rob Herring <rob.herring@calxeda.com>Signed-off-by: Mark Langsdorf <mark.langsdorf@calxeda.com>Reviewed-by: Andreas Färber <afaerber@suse.de>Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
ahci: fix DPRINTF format strings
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
ahci: add port I/O index-data pair
Implement an I/O space index-data register pair as defined by the AHCIspec, including the corresponding SATA PCI capability and BAR.
This allows real-mode code to access the AHCI registers; real-modecode cannot address the memory-mapped register space because it is...
AHCI Port Interrupt Enable register cleaning on soft reset
I've found that FreeBSD AHCI driver doesn't work with AHCI hardwareemulation of QEMU 0.15.0. I believe the problem is on QEMU's side. As Isee, it clears port's Interrupt Enable register each time when reset of...
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....
ahci: Remove unused struct member
Member variable is_read is written, but never read(contrary to its name). Remove it.
Kevin Wolf <kwolf@redhat.com>Signed-off-by: Stefan Weil <weil@mail.berlios.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block: explicit I/O accounting
Decouple the I/O accounting from bdrv_aio_readv/writev/flush andmake the hardware models call directly into the accounting helpers.
This means: - we do not count internal requests from image formats in addition to guest originating I/O...
Use glib memory allocation and free functions
qemu_malloc/qemu_free no longer exist after this commit.
ahci: 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>
ahci: Fix non-NCQ accesses for LBA > 16bits
AHCI provides two ways of reading/writing data:
1) NCQ 2) ATA commands with the LBA in the command FIS
In the second code path, we didn't handle any LBAs that were bigger than16 bits, so whenever a guest that used high LBA numbers wanted to access...
ahci: Fix crashes on duplicate BH registration
If ahci_dma_set_inactive is called a while there is still a pending BHfrom a previous run, we will crash on the second run ofahci_check_cmd_bh as it overwrites AHCIDevice::check_bh. Avoid thisbroken and redundant duplicate registration....
ich/ahci: convert to pci_register_bar_simple()
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
ahci: make number of ports runtime determined
Different AHCI controllers have a different number of ports, so the coreshouldn't care about the amount of ports available.
This patch makes the number of ports available to the AHCI core runtimeconfigurable, allowing us to have multiple different AHCI implementations...
ahci: Implement HBA reset
The ahci code was missing its soft reset functionality. This wasn't really anissue for Linux guests, but Windows gets confused when the controller doesn'treset when it tells it so.
Using this patch I can now successfully boot Windows 7 from AHCI using AHCI...
ahci: send init d2h fis on fis enable
The drive sends a d2h init fis on initialization. Usually, the guest doesn'treceive fises yet at that point though, so the delivery is deferred.
Let's reflect that by sending the init fis on fis receive enablement....
ahci: split ICH and AHCI even more
Sebastian's patch already did a pretty good job at splitting up ICH-9AHCI code and the AHCI core. We need some more though. Copyright was missing,the lspci dump belongs to ICH-9, we don't need the AHCI core to have its...
ahci: split ICH9 from core
There are multiple ahci devices out there. The currently implemented ich-9is only one of the many. So let's split that one out into a separate fileto stress the difference.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Alexander Graf <agraf@suse.de>...
blockdev: Fix regression in -drive if=scsi,index=N
Before commit 622b520f, index=12 meant bus=1,unit=5.
Since the commit, it means bus=0,unit=12. The drive is created, butnot the guest device. That's because the controllers we use withif=scsi drives (lsi53c895a and esp) support only 7 units, and...
ahci: Fix cpu_physical_memory_unmap() argument ordering
The len and is_write arguments to cpu_physical_memory_unmap() wereswapped. This patch changes calls to use the correct argument ordering.
Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>...
ahci: delete write-only variables (v2)
Avoid these warnings with GCC 4.6.0:/src/qemu/hw/ide/ahci.c: In function 'ahci_reset_port':/src/qemu/hw/ide/ahci.c:810:14: error: variable 'tfd' set but not used [-Werror=unused-but-set-variable]/src/qemu/hw/ide/ahci.c: In function 'handle_cmd':...
ahci: set SATA Mode Select
Set SATA Mode Select to AHCI in the Address Map Register.
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Kevin Wolf <kwolf@redhat.com>
ahci: add ahci emulation
This patch adds an emulation layer for an ICH-9 AHCI controller. For nowthis controller does not do IDE legacy emulation. It is a pure AHCI controller.