Statistics
| Branch: | Revision:

root / hw / ide @ a0f42610

# Date Author Comment
48a18b3c 12/20/2011 11:44 pm Hervé Poussineau

isa: give ISABus/ISADevice to isa_create(), isa_bus_irqs() and isa_get_irq() functions

NULL is a valid bus/device, so there is no change in behaviour.

Signed-off-by: Hervé Poussineau <>
Signed-off-by: Anthony Liguori <>

3cfdd0da 12/19/2011 05:10 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

b61744b3 12/16/2011 11:53 am Paolo Bonzini

ide: drop argument to dma_buf_commit

The argument is unused and even wrong when the function is called
by ide_handle_rw_error. Drop it.

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Stefan Hajnoczi <>

b9b2008b 12/15/2011 01:40 pm Paolo Bonzini

block: dma_bdrv_* does not return NULL

Initially attempted with the following semantic patch:

rule1
expression E;
statement S;
@@
E =
(
dma_bdrv_io | dma_bdrv_read | dma_bdrv_write
)
(...);
(
- if (E == NULL) { ... } |
- if (E) { <... S ...> }...

ad54ae80 12/15/2011 01:40 pm Paolo Bonzini

block: bdrv_aio_* do not return NULL

Initially done with the following semantic patch:

rule1
expression E;
statement S;
@@
E =
(
bdrv_aio_readv | bdrv_aio_writev | bdrv_aio_flush | bdrv_aio_discard | bdrv_aio_ioctl
)
(...);
(
- if (E == NULL) { ... }...

9423a2e8 12/14/2011 03:59 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging

859e538d 12/12/2011 07:16 pm David Gibson

Remove unnecessary casts from PCI DMA code in PCI IDE

This patch removes some unnecessary casts in the PCI IDE device,
introduced by commit 552908fef5b67ad9d96b76d7cb8371ebc26c9bc8
'PCI IDE: Use PCI DMA stub functions'.

Signed-off-by: David Gibson <>...

3a93113a 12/06/2011 11:56 am Dong Xu Wang

fix typo: delete redundant semicolon

Double semicolons should be single.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

66a0a2cb 12/06/2011 11:56 am Dong Xu Wang

fix spelling in hw sub directory

Correct obvious spelling errors in qemu/hw directory.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

eb5d5bea 12/05/2011 05:39 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

922453bc 12/05/2011 03:56 pm Stefan Hajnoczi

block: convert qemu_aio_flush() calls to bdrv_drain_all()

Many places in QEMU call qemu_aio_flush() to complete all pending
asynchronous I/O. Most of these places actually want to drain all block
requests but there is no block layer API to do so.

This patch introduces the bdrv_drain_all() API to wait for requests...

9d7f1b9a 11/24/2011 06:31 pm Avi Kivity

ide/mmio: convert to memory API

Signed-off-by: Avi Kivity <>

2c20ae11 11/18/2011 02:54 pm Paolo Bonzini

atapi: kill MODE SENSE, fix MODE SENSE

Mode page 2A of emulated ATAPI DVD-ROM should have page length 0x14
like SCSI CD-ROM, rather than 0x12.

Mode page length is off by 8, as it should contain the length of the
payload after the first two bytes....

2df0a3a3 11/11/2011 03:02 pm Paolo Bonzini

atapi: implement eject requests

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

552908fe 11/01/2011 11:52 pm David Gibson

PCI IDE: Use PCI DMA stub functions

This updates the PCI IDE device emulation to use the explicit PCI DMA
wrapper to initialize its scatter/gathjer structure. This means this
driver should not need further changes when the sglist interface is
extended to support IOMMUs....

8494a397 10/31/2011 06:09 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

Conflicts:
block/vmdk.c

67cc61e4 10/28/2011 08:25 pm Paolo Bonzini

atapi/scsi: unify definitions for MMC

The definitions in ide/internal.h are duplicates, since ATAPI commands
actually come from SCSI. Use the ones in scsi-defs.h and move the
missing ones there. Two exceptions:

- MODE_PAGE_WRITE_PARMS conflicts with the "flexible disk geometry"...

f0f992e6 10/28/2011 08:25 pm Paolo Bonzini

atapi: move GESN definitions to scsi-defs.h

As a complement to the previous patch, move definitions for GET EVENT
STATUS NOTIFICATION from the two functions to scsi-defs.h.

The NCR_* constants are just bit values corresponding to the ENC_*
values, with no offsets even, so keep just one copy....

af0e1ea2 10/28/2011 08:25 pm Paolo Bonzini

atapi: cleanup/fix mode sense results

The first two bytes (after the 8-byte ATAPI header) are the mode page
number and the number of bytes after the length field itself. Make
this clear in the code.

The AUDIO_CTL page was filled with wrong values. It is not anymore in...

a07c7dcd 10/28/2011 08:25 pm Paolo Bonzini

atapi/scsi-disk: make mode page values coherent between the two

This patch adds to scsi-disk the missing mode page 0x01 for both disk
and CD-ROM drives, and mode page 0x0e for CD drives only.

A few offsets were wrong in atapi.c. Also change the 2Ah mode page to...

fb60105d 10/28/2011 08:25 pm Kevin Wolf

ide: Fix off-by-one error in array index check

Signed-off-by: Kevin Wolf <>
Reviewed-by: Paolo Bonzini <>

3899edf7 10/26/2011 04:22 pm Max Filippov

ahci: fix DPRINTF format strings

Signed-off-by: Max Filippov <>
Signed-off-by: Stefan Hajnoczi <>

2a22e6eb 10/14/2011 08:36 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

36f490b1 10/14/2011 06:44 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm-tmp/memory/batch' into staging

4a91d3b3 10/11/2011 04:57 pm Richard Henderson

ide: Convert to isa_register_portio_list

Signed-off-by: Richard Henderson <>
Signed-off-by: Avi Kivity <>

50fb1900 10/11/2011 10:42 am Luiz Capitulino

ide: Support I/O status

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

0461d5a6 10/04/2011 05:02 pm Luiz Capitulino

RunState: Rename enum values as generated by the QAPI

Next commit will convert the query-status command to use the
RunState type as generated by the QAPI.

In order to "transparently" replace the current enum by the QAPI
one, we have to make some changes to some enum values....

465f1ab1 09/21/2011 03:32 pm Daniel Verkamp

ahci: add port I/O index-data pair

Implement an I/O space index-data register pair as defined by the AHCI
spec, including the corresponding SATA PCI capability and BAR.

This allows real-mode code to access the AHCI registers; real-mode
code cannot address the memory-mapped register space because it is...

c8af89af 09/20/2011 11:21 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

a26a13da 09/20/2011 01:27 pm Alexander Motin

AHCI Port Interrupt Enable register cleaning on soft reset

I've found that FreeBSD AHCI driver doesn't work with AHCI hardware
emulation of QEMU 0.15.0. I believe the problem is on QEMU's side. As I
see, it clears port's Interrupt Enable register each time when reset of...

bbca72c6 09/19/2011 12:35 pm Paolo Bonzini

dma-helpers: rename is_write to to_dev

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Kevin Wolf <>

1dfb4dd9 09/15/2011 10:39 pm Luiz Capitulino

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 ideal
because the VMSTOP macros tell why qemu stopped and not exactly
what the current VM state is....

7b6f9300 09/12/2011 04:17 pm Markus Armbruster

block: New bdrv_set_buffer_alignment()

Device models should be able to set it without an unclean include of
block_int.h.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

7d4b4ba5 09/12/2011 04:17 pm Markus Armbruster

block: New change_media_cb() parameter load

To let device models distinguish between eject and load.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

25ad22bc 09/12/2011 04:17 pm Markus Armbruster

ide/atapi scsi-disk: Make monitor eject -f, then change work

change fails while the tray is locked by the guest. eject -f forces
it open and removes any media. Unfortunately, the tray closes again
instantly. Since the lock remains as it is, there is no way to insert...

847f171e 09/12/2011 04:17 pm Stefan Weil

ahci: Remove unused struct member

Member variable is_read is written, but never read
(contrary to its name). Remove it.

Kevin Wolf <>
Signed-off-by: Stefan Weil <>
Signed-off-by: Kevin Wolf <>

48f65b3f 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Don't fail eject when tray is already open

MMC-5 6.40.2.6 specifies that START STOP UNIT succeeds when the drive
already has the requested state. cmd_start_stop_unit() fails when
asked to eject while the tray is open and locked. Fix that.

Signed-off-by: Markus Armbruster <>...

db118fe7 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Preserve tray state on migration

Use a subsection, so that migration to older version still works,
provided the tray is closed and unlocked.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

9e6a4c91 09/12/2011 04:17 pm Markus Armbruster

block: Drop BlockDriverState member removable

It's a confused mess (see previous commit). No users remain.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

e4def80b 09/12/2011 04:17 pm Markus Armbruster

block: Show whether the virtual tray is open in info block

Need to ask the device, so this requires new BlockDevOps member
is_tray_open().

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

d1a0739d 09/12/2011 04:17 pm Markus Armbruster

block: Move BlockConf & friends from block_int.h to block.h

It's convenience stuff for block device models, so block.h isn't the
ideal home either, but better than block_int.h.

Permits moving some #include "block_int.h" from device model .h into
.c.

Signed-off-by: Markus Armbruster <>...

fb0c61a5 09/12/2011 04:17 pm Markus Armbruster

hw: Trim superfluous #include "block_int.h"

Including it in device models is unclean, including it without a
reason adds insult to injury.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

dd063333 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Track tray open/close state

We already track it in BlockDriverState since commit 4be9762a. As
discussed in that commit's message, we should track it in the device
device models instead, because it's device state.

Signed-off-by: Markus Armbruster <>...

a1aff5bf 09/12/2011 04:17 pm Markus Armbruster

block: Revert entanglement of bdrv_is_inserted() with tray status

Commit 4be9762a changed bdrv_is_inserted() to fail when the tray is
open. Unfortunately, there are two different kinds of users, with
conflicting needs.

1. Device models using bdrv_eject(), currently ide-cd and scsi-cd....

a0a7573b 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Track tray locked state

We already track it in BlockDriverState. Just like tray open/close
state, we should track it in the device models instead, because it's
device state.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

fdec4404 09/12/2011 04:17 pm Markus Armbruster

block: Leave enforcing tray lock to device models

The device model knows best when to accept the guest's eject command.
No need to detour through the block layer.

bdrv_eject() can't fail anymore. Make it void.

Signed-off-by: Markus Armbruster <>...

f107639a 09/12/2011 04:17 pm Markus Armbruster

block: Drop medium lock tracking, ask device models instead

Requires new BlockDevOps member is_medium_locked(). Implement for IDE
and SCSI CD-ROMs.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

025e849a 09/12/2011 04:17 pm Markus Armbruster

block: Rename bdrv_set_locked() to bdrv_lock_medium()

While there, make the locked parameter bool.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

844505b1 09/12/2011 04:17 pm Markus Armbruster

ide: Use a table to declare which drive kinds accept each command

No functional change.

It would be nice to have handler functions in the table, like commit
e1a064f9 did for ATAPI. Left for another day.

Signed-off-by: Markus Armbruster <>...

3cfc2269 09/12/2011 04:17 pm Markus Armbruster

ide: Reject ATA commands specific to drive kinds

ACS-2 Table B.2 explicitly prohibits ATAPI devices from implementing
WIN_RECAL, WIN_READ_EXT, WIN_READDMA_EXT, WIN_READ_NATIVE_MAX,
WIN_MULTREAD_EXT, WIN_WRITE, WIN_WRITE_ONCE, WIN_WRITE_EXT,
WIN_WRITEDMA_EXT, WIN_MULTWRITE_EXT, WIN_WRITE_VERIFY, WIN_VERIFY,...

f0776564 09/12/2011 04:17 pm Markus Armbruster

ide/atapi: Clean up misleading name in cmd_start_stop_unit()

"eject" is misleading; it means "eject" when start is clear, but
"load" when start is set. Rename to loej, because that's how MMC-5
calls it, in section 6.40.

Signed-off-by: Markus Armbruster <>...

3f76a7c3 09/12/2011 04:17 pm Markus Armbruster

ide: Fix ATA command READ to set ATAPI signature for CD-ROM

Must set the ATAPI device signature, see ATA4 8.27.5.2 Outputs for
PACKET Command feature set devices, and ACS-2 7.36.6 Outputs for
PACKET feature set devices.

Signed-off-by: Markus Armbruster <>...

f9e8fda4 09/06/2011 12:24 pm Markus Armbruster

xen: Clean up pci_piix3_xen_ide_unplug()'s test for "not a CD"

pci_piix3_xen_ide_unplug() unplugs only disks, not CD-ROMs. It peeks
into the DriveInfo's BlockDriverState to distinguish between the two.
Unclean; use DriveInfo member media_cd, like xen_config_dev_blk()....

656fbeff 09/06/2011 12:24 pm Markus Armbruster

ide: Give vmstate structs internal linkage where possible

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

fa879d62 09/06/2011 12:23 pm Markus Armbruster

block: Attach non-qdev devices as well

For now, this just protects against programming errors like having the
same drive back multiple non-qdev devices, or untimely bdrv_delete().
Later commits will add other interesting uses.

While there, rename BlockDriverState member peer to dev, bdrv_attach()...

0e49de52 09/06/2011 12:23 pm Markus Armbruster

block: Generalize change_cb() to BlockDevOps

So we can more easily add device model callbacks.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

145feb17 09/06/2011 12:23 pm Markus Armbruster

block: Split change_cb() into change_media_cb(), resize_cb()

Multiplexing callbacks complicates matters needlessly.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

1d4316d3 09/06/2011 12:23 pm Markus Armbruster

ide: Update command code definitions as per ACS-2 Table B.2

Drop WIN_SRST, it has the same value as WIN_DEVICE_RESET.

Drop unused WIN_RESTORE, it has the same value as WIN_RECAL.

Drop codes that are not implemented and long obsolete: WIN_READ_LONG,
WIN_READ_LONG_ONCE, WIN_WRITE_LONG, WIN_WRITE_LONG_ONCE, WIN_FORMAT...

814839c0 09/06/2011 12:23 pm Markus Armbruster

ide: Clean up case label indentation in ide_exec_cmd()

Signed-off-by: Markus Armbruster <>
Signed-off-by: Kevin Wolf <>

541dc0d4 09/03/2011 01:45 pm Stefan Weil

Use new macro QEMU_PACKED for packed structures

Most changes were made using these commands:

git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/'
git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/'...

a597e79c 08/25/2011 07:18 pm Christoph Hellwig

block: explicit I/O accounting

Decouple the I/O accounting from bdrv_aio_readv/writev/flush and
make 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...

7267c094 08/21/2011 07:01 am Anthony Liguori

Use glib memory allocation and free functions

qemu_malloc/qemu_free no longer exist after this commit.

Signed-off-by: Anthony Liguori <>

e824b2cc 08/08/2011 06:22 pm Avi Kivity

pci: rename pci_register_bar_region() to pci_register_bar()

Reviewed-by: Richard Henderson <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

67e576c2 08/08/2011 06:22 pm Avi Kivity

ahci: convert to memory API

Reviewed-by: Richard Henderson <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

23c5e4ca 08/08/2011 06:22 pm Avi Kivity

ppc: convert to memory API

Reviewed-by: Richard Henderson <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

a9deb8c6 08/08/2011 06:15 pm Avi Kivity

ide: convert to memory API

Reviewed-by: Richard Henderson <>
Reviewed-by: Anthony Liguori <>
Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

3046c984 07/29/2011 05:42 pm Anthony Liguori

Merge remote-tracking branch 'agraf/xen-next' into staging

e3745602 07/29/2011 05:39 pm Anthony Liguori

Merge remote-tracking branch 'kraxel/migration.2' into staging

679f4f8b 07/26/2011 08:02 am Stefano Stabellini

xen: implement unplug protocol in xen_platform

The unplug protocol is necessary to support PV drivers in the guest: the
drivers expect to be able to "unplug" emulated disks and nics before
initializing the Xen PV interfaces.
It is responsibility of the guest to make sure that the unplug is done...

e0e8384d 07/23/2011 07:21 pm Markus Armbruster

ide: Turn properties any IDE device must have into bus properties

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

b7ce1b27 07/20/2011 03:49 pm Gerd Hoffmann

ahci doesn't support migration

Signed-off-by: Gerd Hoffmann <>

c925400b 07/05/2011 12:23 pm Kevin Wolf

ide: Initialise buffers with zeros

Just in case there's still a way how a guest can read out buffers when it's not
supposed to, let's zero the buffers during initialisation so that we don't leak
information to the guest.

Signed-off-by: Kevin Wolf <>...

40c4ed3f 07/05/2011 12:23 pm Kevin Wolf

ide: Ignore reads during PIO in and writes during PIO out

This fixes https://bugs.launchpad.net/qemu/+bug/786209:

When the DRQ_STAT bit is set, the IDE core permits both data reads
and data writes, regardless of whether the current transfer was
initiated as a read or write....
fdba9594 06/22/2011 03:11 pm Anthony Liguori

Merge remote-tracking branch 'mst/for_anthony' into staging

Conflicts:
hw/usb-uhci.c

befeac45 06/15/2011 06:27 pm Michael S. Tsirkin

Merge remote-tracking branch 'origin/master' into pci

Conflicts:
hw/virtio-pci.c

ee752da7 06/15/2011 04:39 pm Kevin Wolf

ide: Clear error_status after restarting flush

Clearing the error status flag was missing for restarting flushes. Now that the
error status is separate from the BM status register, we can simply set it to 0
after restarting the request. This ensures that we never forget to clear a bit....

0754f9ec 06/15/2011 03:36 pm Kevin Wolf

ide: Add forgotten VMSTATE_END_OF_LIST in subsection

Signed-off-by: Kevin Wolf <>

4e1e0051 06/15/2011 03:36 pm Christoph Hellwig

ide: allow other dma comands than read and write

Replace the is_read flag with a dma_cmd flag to allow the dma and
restart logic to handler other commands like TRIM.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

d353fb72 06/15/2011 03:36 pm Christoph Hellwig

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.

Signed-off-by: Christoph Hellwig <>
Signed-off-by: Kevin Wolf <>

def93791 06/15/2011 03:36 pm Kevin Wolf

ide: Split error status from status register

When adding the werror=stop mode, some flags were added to s->status
which are used to determine what kind of operation should be restarted
when the VM is continued.

Unfortunately, it turns out that s->status is in fact a device register...

fdc650d7 06/15/2011 03:36 pm Kevin Wolf

ide: Fix ide_drive_pio_state_needed()

When a failed PIO request caused the VM to stop, we still need to transfer the
PIO state even though DRQ=0 at this point.

Signed-off-by: Kevin Wolf <>

c04ca075 06/12/2011 10:33 am Isaku Yamahata

hw/ide/cmd646.c: convert to PCIDeviceInfo to initialize ids

use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Michael S. Tsirkin <>

03f1c143 06/12/2011 10:33 am Isaku Yamahata

hw/ide/ich.c: convert to PCIDeviceInfo to initialize ids

use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Michael S. Tsirkin <>

65ff544b 06/12/2011 10:33 am Isaku Yamahata

hw/ide/via.c: convert to PCIDeviceInfo to initialize ids

use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Michael S. Tsirkin <>

25f8e2f5 06/12/2011 10:33 am Isaku Yamahata

ide/piix: convert to PCIDeviceInfo to initialize ids

use PCIDeviceInfo to initialize ids.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Michael S. Tsirkin <>

69c38b8f 06/08/2011 11:39 am Kevin Wolf

ide/core: Remove explicit setting of BM_STATUS_INT

BM_STATUS_INT is automatically set during ide_set_irq(), there's no reason to
set it manually in addition.

There is even one case where the interrupt status bit was set, but no IRQ was
raised. This is when the PRD table was reached but there is more data to...

1fddfba1 05/19/2011 01:08 pm Alexander Graf

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 than
16 bits, so whenever a guest that used high LBA numbers wanted to access...

95b5edcd 05/19/2011 11:26 am Markus Armbruster

blockdev: Store -drive option media in DriveInfo

DriveInfo is closely tied to -drive, and like -drive, it mixes
information about host and guest part of the block device. Unlike
DriveInfo, BlockDriverState should be about the host part only.

One of the remaining guest bits there is the "type hint". -drive...

1f56e32a 05/19/2011 11:26 am Markus Armbruster

ide: Split qdev "ide-drive" into "ide-hd" and "ide-cd"

An "ide-drive" is either a hard disk or a CD-ROM, depending on the
associated BlockDriverState's type hint. Unclean; disk vs. CD belongs
to the guest part, not the host part.

Have separate qdevs "ide-hd" and "ide-cd" to model disk vs. CD in...

4d29b50a 05/18/2011 03:38 pm Jan Kiszka

ahci: Fix crashes on duplicate BH registration

If ahci_dma_set_inactive is called a while there is still a pending BH
from a previous run, we will crash on the second run of
ahci_check_cmd_bh as it overwrites AHCIDevice::check_bh. Avoid this
broken and redundant duplicate registration....

086cf4d3 05/18/2011 03:38 pm Andrea Arcangeli

ide: cleanup warnings

Add \n.

Signed-off-by: Andrea Arcangeli <>
Signed-off-by: Kevin Wolf <>

2860e3eb 05/18/2011 03:38 pm Kevin Wolf

ide: Turn debug messages into assertions

These printfs aren't really debug messages, but clearly indicate a bug if they
ever become effective. Noone uses DEBUG_IDE, let's re-enable the check
unconditionally and make it an assertion instead of printfs in the device...

96d19bcb 05/16/2011 06:15 pm Jan Kiszka

ahci: Unbreak bar registration

Fix regression of 667bb59: ahci_init initializes ahci.mem, so we have to
move bar registration after it.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

69c8944f 05/16/2011 02:23 pm Michael S. Tsirkin

ich/ahci: fix uninitialized memory use

The commit 667bb59d2358daeef179583c944becba3f1f9680
uses d->ahci.mem before it is initialized by
ahci_init(). Fix this by calling ahci_init() first thing
so that it's safe to use all fields in the ahci state struct....

5300f1a5 05/05/2011 04:39 pm Michael S. Tsirkin

Merge remote branch 'origin/master' into pci

Conflicts:
exec.c

45fe15c2 05/05/2011 04:10 pm Jan Kiszka

MSI: Robust resource release

msi_init may fail, so we need to check on uninit if the cap was
actually installed. This also avoids that the users need to check.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Michael S. Tsirkin <>

a7acf552 05/03/2011 12:29 pm Amit Shah

atapi: Move comment to proper place

Move misplaced comment for media_is_dvd()

Signed-off-by: Amit Shah <>
Signed-off-by: Kevin Wolf <>

4a737d14 05/03/2011 12:29 pm Amit Shah

atapi: Explain why we need a 'media not present' state

After the re-org of the atapi code, it might not be intuitive for a
reader of the code to understand why we're inserting a 'media not
present' state between cd changes.

Signed-off-by: Amit Shah <>...

ab719827 05/03/2011 12:29 pm Alon Levy

ide/atapi: fix set but unused

Signed-off-by: Alon Levy <>
Acked-by: Stefan Weil <>
Signed-off-by: Kevin Wolf <>

7a2c4b82 04/27/2011 05:21 pm Kevin Wolf

ide/atapi: Introduce CHECK_READY flag for commands

Some commands are supposed to report a Not Ready Condition (i.e. they require
a medium to be present in order to execute successfully). Instead of
duplicating the check in each command implementation, let's add a flag and...