Statistics
| Branch: | Revision:

root / hw / ide @ 2c9b15ca

# Date Author Comment
2c9b15ca 07/04/2013 06:42 pm Paolo Bonzini

memory: add owner argument to initialization functions

Signed-off-by: Paolo Bonzini <>

f487b677 07/04/2013 06:42 pm Paolo Bonzini

dma: keep a device alive while it has SGLists

Reviewed-by: Anthony Liguori <>
Signed-off-by: Paolo Bonzini <>

721da65c 06/28/2013 04:46 pm Mark Cave-Ayland

cmd646: fix build when DEBUG_IDE is enabled.

Make sure we use the correct TARGET/PRI macros in the debug statements.

Signed-off-by: Mark Cave-Ayland <>
CC: Kevin Wolf <>
Signed-off-by: Kevin Wolf <>

92a6a6f6 06/24/2013 11:25 am Kevin Wolf

ide: Convert DMA read/write commands to ide_cmd_table handler

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

63a82e6a 06/24/2013 11:25 am Kevin Wolf

ide: Convert READ NATIVE MAX ADDRESS to ide_cmd_table handler

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

785f6320 06/24/2013 11:25 am Kevin Wolf

ide: Convert CHECK POWER MDOE to ide_cmd_table handler

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

ee03398c 06/24/2013 11:25 am Kevin Wolf

ide: Convert SET FEATURES to ide_cmd_table handler

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

9afce429 06/24/2013 11:25 am Kevin Wolf

ide: Convert FLUSH CACHE to ide_cmd_table handler

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

61fdda37 06/24/2013 11:25 am Kevin Wolf

ide: Convert SEEK to ide_cmd_table handler

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

ee425c78 06/24/2013 11:25 am Kevin Wolf

ide: Convert ATAPI commands to ide_cmd_table handler

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

6b1dd744 06/24/2013 11:25 am Kevin Wolf

ide: Convert CF-ATA commands to ide_cmd_table handler

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

ff352677 06/24/2013 11:25 am Kevin Wolf

ide: Convert SMART commands to ide_cmd_table handler

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

dfe1ea8f 06/24/2013 11:25 am Kevin Wolf

ide: Clean up ide_exec_cmd()

All commands are now converted to ide_cmd_table handlers, so it can be
unconditional now and the old switch block can go.

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

a0436e92 06/24/2013 11:25 am Kevin Wolf

ide: Add handler to ide_cmd_table

As a preparation for moving all IDE commands into their own function
like in the ATAPI code, introduce a 'handler' callback to ide_cmd_table.

Commands using this new infrastructure get some things handled
automatically:...

4286434c 06/24/2013 11:25 am Kevin Wolf

ide: Convert WIN_DSM to ide_cmd_table handler

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

1c66869a 06/24/2013 11:25 am Kevin Wolf

ide: Convert WIN_IDENTIFY to ide_cmd_table handler

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

b300337e 06/24/2013 11:25 am Kevin Wolf

ide: Convert cmd_nop commands to ide_cmd_table handler

cmd_nop handles all commands that don't really do anything in our
implementation except setting status register flags.

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

413860cf 06/24/2013 11:25 am Kevin Wolf

ide: Convert verify commands to ide_cmd_table handler

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

adf3a2c4 06/24/2013 11:25 am Kevin Wolf

ide: Convert read/write multiple commands to ide_cmd_table handler

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

0e6498ed 06/24/2013 11:25 am Kevin Wolf

ide: Convert PIO read/write commands to ide_cmd_table handler

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

df32fd1c 06/20/2013 05:39 pm Paolo Bonzini

dma: eliminate DMAContext

The DMAContext is a simple pointer to an AddressSpace that is now always
already available. Make everyone hold the address space directly,
and clean up the DMA API to use the AddressSpace directly.

Reviewed-by: Peter Maydell <>...

371a775d 06/15/2013 01:53 pm Blue Swirl

Merge branch 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu

  • 'realize-isa.v2' of git://github.com/afaerber/qemu-cpu:
    qdev: Drop FROM_QBUS() macro
    isa: QOM'ify ISADevice
    isa: QOM'ify ISABus
    i8259: Convert PICCommonState to use QOM realizefn...
db895a1e 06/07/2013 01:14 pm Andreas Färber

isa: Use realizefn for ISADevice

Drop ISADeviceClass::init and the resulting no-op initfn and let
children implement their own realizefn. Adapt error handling.
Split off an instance_init where sensible.

Signed-off-by: Andreas Färber <>

f68ec837 06/06/2013 12:27 pm Andreas Färber

ide: Set BSY bit during FLUSH

The implementation of the ATA FLUSH command invokes a flush at the block
layer, which may on raw files on POSIX entail a synchronous fdatasync().
This may in some cases take so long that the SLES 11 SP1 guest driver
reports I/O errors and filesystems get corrupted or remounted read-only....

b9b5df6f 05/20/2013 02:54 am Aurelien Jarno

ide/macio: fix wrong opaque with TRIM support

Commit 215e47b9 enabled TRIM by default, which revealed a bug in TRIM
support for the IDE macio emulation driver, introduced in d353fb72.

The call to dma_bdrv_io() is using a wrong opaque of type IDEState
instead of DBDMA_io. This patch fixes that....

0ee20e66 05/08/2013 04:28 pm Kevin Wolf

ahci: Don't allow creating slave drives

An IDE bus provided by AHCI can only take a single IDE drive. If you add
a drive as slave, qemu used to accept the command line but the device
wouldn't be actually usable. Catch the situation instead and error out....

b39f9612 05/08/2013 04:28 pm Kevin Wolf

ide: Reset BMIDEA bit when the bus master is stopped

The device is supposed to reset the Bus Master IDE Active bit in the
status register when 0 is written to the Start/Stop Bus Master bit in
the command register.

In the common cases this happens automatically because bdrv_drain_all()...

2f12688b 04/29/2013 04:27 pm Andreas Färber

ide: QOM'ify ISA IDE

Introduce type constant and cast macro to obsolete DO_UPCAST().
Add missing braces.

Prepares for ISA realizefn.

Signed-off-by: Andreas Färber <>
Signed-off-by: Andreas Färber <>
Message-id: ...

4ceb193d 04/16/2013 01:06 am Anthony Liguori

Merge remote-tracking branch 'bonzini/hw-dirs' into staging

  • bonzini/hw-dirs:
    exec: remove useless declarations from memory-internal.h
    memory: move core typedefs to qemu/typedefs.h
    include: avoid useless includes of exec/ headers
    sysemu: avoid proliferation of include/ subdirectories...
0bc3cd62 04/15/2013 07:19 pm Paolo Bonzini

include: avoid useless includes of exec/ headers

Headers in include/exec/ are for the deepest innards of QEMU,
they should almost never be included directly.

Signed-off-by: Paolo Bonzini <>

aad64f31 04/15/2013 11:18 am Stefan Hajnoczi

ide: refuse WIN_READ_NATIVE_MAX on empty device

What is the highest addressable sector on an empty CD-ROM? Nothing is
addressable so produce an error.

This patch prevents a divide-by-zero in ide_set_sector() since
s->sectors and s->heads would be 0. Not to mention that a sector=-1...

9a1179dc 04/08/2013 07:13 pm Paolo Bonzini

hw: make all of hw/ide/ configurable via default-configs/

Signed-off-by: Paolo Bonzini <>

0d09e41a 04/08/2013 07:13 pm Paolo Bonzini

hw: move headers to include/

Many of these should be cleaned up with proper qdev-/QOM-ification.
Right now there are many catch-all headers in include/hw/ARCH depending
on cpu.h, and this makes it necessary to compile these files per-target.
However, fixing this does not belong in these patches....

215e47b9 02/22/2013 10:29 pm Paolo Bonzini

blockdev: enable discard by default

Because discard is now a host parameter, we can always fake it as enabled
in the guest. This is an extension of the current choice to ignore
"not supported" errors from the host when discard_granularity is set
to nonzero....

6b2578d6 02/01/2013 01:13 am Andreas Färber

ide/mmio: QOM'ify MMIO IDE for R2D

It was not qdev'ified before, so turn it into a SysBusDevice.
Keep mmio_ide_init_drives() around to attach the hard drive.

Signed-off-by: Andreas Färberr <>
Cc: Markus Armbruster <>
Signed-off-by: Aurelien Jarno <>

503cb22e 01/28/2013 10:46 pm Anthony Liguori

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

  1. By Paolo Bonzini (14) and others
  2. Via Kevin Wolf
    • kwolf/for-anthony: (24 commits)
      ide: Add fall through annotations
      block: Create proper size file for disk mirror
      ahci: Add migration support...
07a7484e 01/25/2013 11:02 pm Andreas Färber

ide/macio: QOM'ify MacIO IDE

It was not qdev'ified before. Turn it into a SysBusDevice.
Embed them into the MacIO devices.

Signed-off-by: Andreas Färber <>
Signed-off-by: Alexander Graf <>

baec1910 01/25/2013 11:02 pm Andreas Färber

ppc: Move Mac machines to hw/ppc/

Signed-off-by: Andreas Färber <>
[agraf: squash in MAINTAINERS fix]
Signed-off-by: Alexander Graf <>

67bec53d 01/25/2013 07:27 pm Kevin Wolf

ide: Add fall through annotations

Add comments to help static analysers detect that these cases are
intentional, and clean up some whitespace in the environment of these
comments.

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

1147bb15 01/25/2013 07:18 pm Jason Baron

ahci: Remove unused AHCIDevice fields

'dma_status' and 'dma_cb' are written to, but never read.
Remove these fields in preparation for AHCI migration bits.

Signed-off-by: Jason Baron <>
Reviewed-by: Juan Quintela <>
Signed-off-by: Kevin Wolf <>

4ac557c8 01/25/2013 07:18 pm Kevin Wolf

ahci: Change data types in preparation for migration

The size of an int depends on the host, so in order to be able to
migrate these fields, make them either int32_t or bool, depending on the
use.

Signed-off-by: Kevin Wolf <>

a2623021 01/25/2013 07:18 pm Jason Baron

ahci: Add migration support

Jason tested these patches by migrating Windows 7 and Fedora 17 guests
(while under I/O) on both piix with ahci attached and on q35 (which has
a built-in AHCI controller).

Signed-off-by: Andreas Färber <>
Signed-off-by: Jason Baron <>...

6bf3ee07 01/17/2013 11:51 am Kevin Wolf

ide: Remove wrong assertion

The Bus Master IDE Active bit (BM_STATUS_DMAING) is not only set when
the request is still in flight, but also when it has completed and the
size of the physical memory regions in the PRDT was larger than the
transfer size.

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

80bc2e8d 01/15/2013 11:03 am Paolo Bonzini

ide: fix TRIM with empty range entry

ATA-ACS-3 says "If the two byte range length is zero, then the LBA
Range Entry shall be discarded as padding." iovecs are used as if
they are linearized, so it is incorrect to discard the rest of
this iovec.

Signed-off-by: Paolo Bonzini <>...

501378c3 01/15/2013 11:03 am Paolo Bonzini

ide: issue discard asynchronously but serialize the pieces

Now that discard can take a long time, make it asynchronous.
Each LBA range entry is processed separately because discard
can be an expensive operation.

Signed-off-by: Paolo Bonzini <>...

8c43a6f0 01/10/2013 11:11 pm Andreas Färber

Make all static TypeInfos const

Since 39bffca2030950ef6efe57c2fac8327a45ae1015 (qdev: register all
types natively through QEMU Object Model), TypeInfo as used in
the common, non-iterative pattern is no longer amended with information
and should therefore be const....

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

737e150e 12/19/2012 09:31 am Paolo Bonzini

block: move include files to include/block/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

6f991980 12/17/2012 07:56 pm Paolo Bonzini

Merge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD

Signed-off-by: Paolo Bonzini <>

a2cb15b0 12/17/2012 01:02 pm Michael S. Tsirkin

pci: update all users to look in pci/

update all users so we can remove the makefile hack.

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

a7f3d65b 12/13/2012 12:17 pm Pavel Hrdina

atapi: reset cdrom tray statuses on ide_reset

Tray statuses should be also reseted. Some guests may lock the tray
and after reset before any kernel is loaded the tray should be unlocked.

Also if you reset the real computer the tray is closed. We should
do the same in qemu....

0c6f08b0 11/30/2012 12:33 pm Pavel Hrdina

atapi: make change media detection for guests easier

If you have a guest with a media in the optical drive and you change
it, the windows guest cannot properly recognize this media change.

Windows needs to detect sense "NOT_READY with ASC_MEDIUM_NOT_PRESENT"...

d688e523 11/26/2012 08:53 pm Peter Maydell

hw/ide/macio: Fix segfault caused by NULL DMAContext*

Pass qemu_sglist_init the global dma_context_memory rather than a NULL
pointer; this fixes a segfault in dma_memory_map() when the guest
starts using DMA.

Reported-by: Amadeusz Sławiński <>...

038268e2 11/21/2012 10:47 am Kevin Wolf

ide: Fix crash with too long PRD

Without this, s->nsector can become negative and badness happens (trying
to malloc huge amount of memory and glib calls abort())

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

72bcca73 11/21/2012 10:47 am Kevin Wolf

ide: Fix status register after short PRDs

When failing a request because the length of the regions described by
the PRDT was too short for the requested number of sectors, the IDE
emulation forgot to update the status register, so that the device would
keep the BSY flag set indefinitely....

d7331bed 11/14/2012 07:19 pm Stefan Hajnoczi

aio: rename AIOPool to AIOCBInfo

Now that AIOPool no longer keeps a freelist, it isn't really a "pool"
anymore. Rename it to AIOCBInfo and make it const since it no longer
needs to be modified.

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

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

048d3612 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'trivial-patches' of git://github.com/stefanha/qemu

  • 'trivial-patches' of git://github.com/stefanha/qemu:
    versatilepb: Use symbolic indices for ARM PIC
    qdev: kill bogus comment
    qemu-barrier: Fix compiler version check for future gcc versions...
c9159fe9 10/06/2012 12:07 am Stefan Weil

Remove libhw

The entries for libhw* are no longer needed in .gitignore.

There is also no longer a difference between common-obj-y and
hw-obj-y, so one of those two macros is sufficient.

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

4d5b97da 10/05/2012 04:10 pm Amos Kong

cleanup useless return sentence

This patch cleans up return sentences in the end of void functions.

Reported-by: Paolo Bonzini <>
Signed-off-by: Amos Kong <>
Signed-off-by: Stefan Hajnoczi <>

a5cf8262 10/05/2012 03:58 pm Jim Meyering

scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL

Use g_strdup rather than strdup, because the sole caller
(qdev_get_fw_dev_path_helper) assumes it gets non-NULL, and dereferences
it. Besides, in that caller, the allocated buffer is already freed with...

1ceee0d5 09/28/2012 08:40 pm Paolo Bonzini

iostatus: change is_read to a bool

Do this while we are touching this part of the code, before introducing
more uses of "int is_read".

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

3e1caa5f 09/28/2012 08:40 pm Paolo Bonzini

iostatus: reorganize io error code

Move the common part of IDE/SCSI/virtio error handling to the block
layer. The new function bdrv_error_action subsumes all three of
bdrv_emit_qmp_error_event, vm_stop, bdrv_iostatus_set_err.

The same scheme will be used for errors in block jobs....

92aa5c6d 09/28/2012 08:40 pm Paolo Bonzini

iostatus: move BlockdevOnError declaration to QAPI

This will let block-stream reuse the enum. Places that used the enums
are renamed accordingly.

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

ff06f5f3 09/28/2012 08:14 pm Paolo Bonzini

iostatus: rename BlockErrorAction, BlockQMPEventAction

We want to remove knowledge of BLOCK_ERR_STOP_ENOSPC from drivers;
drivers should only be told whether to stop/report/ignore the error.
On the other hand, we want to keep using the nicer BlockErrorAction...

ce560dcf 09/12/2012 04:50 pm Ronnie Sahlberg

ATAPI: STARTSTOPUNIT only eject/load media if powercondition is 0

The START STOP UNIT command will only eject/load media if
power condition is zero.

If power condition is !0 then LOEJ and START will be ignored.

From MMC (sbc contains similar wordings too)...

1e53537f 09/12/2012 04:50 pm Stefan Weil

ide: Fix error messages from static code analysis (no real error)

Report from smatch:
hw/ide/core.c:1472 ide_exec_cmd(423) error: buffer overflow 'smart_attributes' 8 <= 29
hw/ide/core.c:1474 ide_exec_cmd(425) error: buffer overflow 'smart_attributes' 8 <= 29...

2a4f4f34 09/12/2012 04:50 pm Jason Baron

ahci: properly reset PxCMD on HBA reset

While testing q35, I found that windows 7 (specifically, windows 7 ultimate
with sp1 x64), wouldn't install because it can't find the cdrom or disk drive.
The failure message is: 'A required cd/dvd device driver is missing. If you...

08406b03 08/27/2012 05:33 pm malc

Revert "fix some debug printf format strings"

This reverts commit 145c7c880ff520a9348cc2401ba291330b9606fe.

Signed-off-by: malc <>

145c7c88 08/24/2012 06:44 am Matthew Ogilvie

fix some debug printf format strings

These are normally ifdefed out and don't matter. But if you enable
them, they ought to be correct.

Signed-off-by: Matthew Ogilvie <>
Signed-off-by: malc <>

61f52e06 08/10/2012 11:25 am Jason Baron

ahci: Fix ahci cdrom read corruptions for reads > 128k

While testing q35, which has its cdrom attached to the ahci controller, I found
that the Fedora 17 install would panic on boot. The panic occurs while
squashfs is trying to read from the cdrom. The errors are:...

ea8d82a1 08/10/2012 11:25 am Jason Baron

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...

b2df4314 08/06/2012 11:39 pm Markus Armbruster

ide scsi: Mess with geometry only for hard disk devices

Legacy -drive cyls=... are now ignored completely when the drive
doesn't back a hard disk device. Before, they were first checked
against a hard disk's limits, then ignored.

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

5e59b024 07/29/2012 05:05 pm Michael S. Tsirkin

Merge branch pci into master

Merge master and pci branch, resolve build breakage in hw/esp.c
introduced by f90c2bcd.

Conflicts:
hw/esp.c

0ed8b6f6 07/28/2012 12:23 pm Blue Swirl

Avoid returning void

It's silly and non-conforming to standards to return void,
don't do it.

Signed-off-by: Blue Swirl <>

2adc99b2 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Compute BIOS CHS translation in one place

Currently, it is split between hd_geometry_guess() and
pc_cmos_init_late(). Confusing. info qtree shows the result of the
former. Also confusing.

Fold the part done in pc_cmos_init_late() into hd_geometry_guess()....

b51daf00 07/17/2012 05:48 pm Markus Armbruster

Relax IDE CHS limits from 16383,16,63 to 65535,16,255

New limits straight from ATA4 6.2 Register delivered data transfer
command sector addressing.

I figure the old sector limit 63 was blindly copied from the BIOS
int 13 limit. Doesn't apply to the hardware. No idea where the old...

31e404f4 07/17/2012 05:48 pm Markus Armbruster

hw/block-common: Move BlockConf & friends from block.h

This stuff doesn't belong to block layer, and was put there only
because a better home didn't exist then. Now it does.

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

911525db 07/17/2012 05:48 pm Markus Armbruster

hw/block-common: Factor out fall back to legacy -drive serial=...

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

577d0a38 07/17/2012 05:48 pm Markus Armbruster

blockdev: Don't limit DriveInfo serial to 20 characters

All current users (IDE, SCSI and virtio-blk) happen to share this 20
characters limit. Still, it should be left to device models. They
already enforce their limits. They have to, as the DriveInfo limit...

b7eb0c9f 07/17/2012 05:48 pm Markus Armbruster

hw/block-common: Factor out fall back to legacy -drive cyls=...

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

ba801960 07/17/2012 05:48 pm Markus Armbruster

ide: qdev properties for disk geometry

Geometry needs to be qdev properties, because it belongs to the
disk's guest part.

Maintain backward compatibility exactly like for serial: fall back to
DriveInfo's geometry, set with -drive cyls=...

Do this only for ide-hd. ide-drive is legacy. ide-cd doesn't have a...

6e6f61a6 07/17/2012 05:48 pm Markus Armbruster

ide: qdev property for BIOS CHS translation

This isn't quite orthodox. CHS translation is firmware configuration,
communicated via the RTC's CMOS RAM, not a property of the disk. But
it's best to treat it just like geometry anyway.

Maintain backward compatibility exactly like for geometry: fall back...

9dc13e38 07/17/2012 05:48 pm Markus Armbruster

ide pc: Put hard disk info into CMOS only for hard disks

In particular, don't set disk type and geometry when a CD-ROM on bus
ide.0 has media during CMOS initialization.

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

9db1c0f7 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Move disk geometry guessing back from block.c

Commit f3d54fc4 factored it out of hw/ide.c for reuse. Sensible,
except it was put into block.c. Device-specific functionality should
be kept in device code, not the block layer. Move it to
hw/hd-geometry.c, and make stylistic changes required to keep...

e2f3dc2b 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Cut out block layer translation middleman

hd_geometry_guess() picks geometry and translation. Callers can get
the geometry directly, via parameters, but for translation they need
to go through the block layer.

Add a parameter for translation, so it can optionally be gotten just...

9139046c 07/17/2012 05:48 pm Markus Armbruster

ide pc: Cut out the block layer geometry middleman

PC BIOS setup needs IDE geometry information. Get it directly from
the device model rather than through the block layer. In preparation
of purging geometry from the block layer, which will happen later in...

1f24d7b4 07/17/2012 05:48 pm Markus Armbruster

hd-geometry: Switch to uint32_t to match BlockConf

Best to use the same type, to avoid unwanted truncation or sign
extension.

BlockConf can't use plain int for cyls, heads and secs, because
integer properties require an exact width.

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

f90c2bcd 07/04/2012 03:52 pm Alex Williamson

pci: convert PCIUnregisterFunc to void

Not a single driver has any possibility of failure on their
exit function, let's keep it that way.

Signed-off-by: Alex Williamson <>
Signed-off-by: Michael S. Tsirkin <>

55042b95 07/02/2012 11:18 am Paolo Bonzini

atapi: implement READ DISC INFORMATION

This command is not necessary for CD-ROM and DVD-ROM, but some versions of
udev trip on its absence.

Cc: Kevin Wolf <>
Cc: Markus Armbruster <>
Signed-off-by: Paolo Bonzini <>

c65bcef3 06/28/2012 12:33 am David Gibson

iommu: Make sglists and dma_bdrv helpers use new universal DMA helpers

dma-helpers.c contains a number of helper functions for doing
scatter/gather DMA, and various block device related DMA. Currently,
these directly access guest memory using cpu_physical_memory_*(),...

10ca2943 06/28/2012 12:33 am David Gibson

ide/ahci: Use universal DMA helper functions

The AHCI device can provide both PCI and SysBus AHCI device
emulations. For this reason, it wasn't previously converted to use
the pci_dma_*() helper functions. Now that we have universal DMA
helper functions, this converts AHCI to use them....

93bfef4c 06/19/2012 09:36 pm Crístian Viana

Allow machines to configure the QEMU_VERSION that's exposed via hardware

QEMU exposes its version to the guest's hardware and in some cases that is wrong
(e.g. Windows prints messages about driver updates when you switch
the QEMU version).
There is a new field now on the struct QEmuMachine, hw_version, which may...

8aca5215 06/18/2012 06:35 pm Anthony Liguori

Merge remote-tracking branch 'afaerber-or/qom-next-2' into staging

  • afaerber-or/qom-next-2: (22 commits)
    qom: Push error reporting to object_property_find()
    qdev: Remove qdev_prop_exists()
    qbus: Initialize in standard way
    qbus: Make child devices links...
0b0cb9d3 06/18/2012 06:34 pm Anthony Liguori

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

  • kwolf/for-anthony: (39 commits)
    qemu-iotests: add 036 autoclear feature bit test
    qemu-iotests: add qcow2.py set-feature-bit command
    fdc-test: introduced qtest read_without_media
    fdc: fix implied seek while there is no media in drive...
df6606f4 06/18/2012 06:18 pm Anthony Liguori

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

  • mst/tags/for_anthony:
    pci_bridge_dev: fix error path in pci_bridge_dev_initfn()
    qdev: release parent properties on dc->init failure
    msi: Use msi/msix_present more consistently
    msi: Invoke msi/msix_write_config from PCI core...
0d936928 06/18/2012 04:14 pm Anthony Liguori

qdev: Convert busses to QEMU Object Model

This is far less interesting than it sounds. We simply add an Object to each
BusState and then register the types appropriately. Most of the interesting
refactoring will follow in the next patches.

Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...