Statistics
| Branch: | Revision:

root / hw / ide @ 086cf4d3

# Date Author Comment
086cf4d3 05/18/2011 03:38 pm Andrea Arcangeli

ide: cleanup warnings

Add \n.

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

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

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

a60cf7e7 04/27/2011 05:20 pm Kevin Wolf

ide/atapi: Factor commands out

In preparation for a table of function pointers, factor each command out from
ide_atapi_cmd() into its own function.

Signed-off-by: Kevin Wolf <>

e1a064f9 04/27/2011 05:20 pm Kevin Wolf

ide/atapi: Use table instead of switch for commands

Signed-off-by: Kevin Wolf <>

e119bcac 04/27/2011 05:20 pm Kevin Wolf

ide/atapi: Replace bdrv_get_geometry calls by s->nb_sectors

The disk size can only change when the medium is changed, and the change
callback takes care of updating s->nb_sectors in this case.

Signed-off-by: Kevin Wolf <>

33231e0e 04/27/2011 05:20 pm Kevin Wolf

ide: Split atapi.c out

Besides moving code, this patch only fixes some whitespace issues in the moved
code and makes all functions in atapi.c static which can be static.

Signed-off-by: Kevin Wolf <>

4b9b7092 04/27/2011 03:36 pm Amit Shah

atapi: Add 'medium ready' to 'medium not ready' transition on cd change

MMC-5 Table F.1 lists errors that can be thrown for the TEST_UNIT_READY
command. Going from medium not ready to medium ready states is
communicated by throwing an error.

This adds the missing 'tray opened' event that we fail to report to...

a08784dd 04/15/2011 09:25 pm Blue Swirl

Remove unused sysemu.h include directives

Remove unused sysemu.h include directives to speed up build
with the following patches.

Signed-off-by: Blue Swirl <>

996faf1a 04/13/2011 01:20 pm Amit Shah

atapi: GESN: implement 'media' subcommand

Implement the 'media' sub-command of the GET_EVENT_STATUS_NOTIFICATION
command. This helps us report tray open, tray closed, no media, media
present states to the guest.

Newer Linux kernels (2.6.38+) rely on this command to revalidate discs...

0af63ba3 04/13/2011 01:20 pm Amit Shah

atapi: GESN: Standardise event response handling for future additions

Handle GET_EVENT_STATUS_NOTIFICATION's No Event Available response in a
generic way so that future additions to the code to handle other
response types is easier.

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

8f8e834d 04/13/2011 01:20 pm Amit Shah

atapi: GESN: Use structs for commonly-used field types

Instead of using magic numbers, use structs that are more descriptive of
the fields being used.

Signed-off-by: Amit Shah <>
Acked-by: Jes Sorensen <>
Acked-by: Paolo Bonzini <>...

493accd6 04/13/2011 01:20 pm Amit Shah

atapi: Move GET_EVENT_STATUS_NOTIFICATION command handling to its own function

This makes the code more readable.

Also, there's a block like:

if () {
...
} else {
...
}

Split that into

if () {
...
return;
}
...

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

0c370a35 04/13/2011 01:19 pm Amit Shah

atapi: Allow GET_EVENT_STATUS_NOTIFICATION after media change

After a media change, the only commands allowed from the guest were
REQUEST_SENSE and INQUIRY. The guest may also issue
GET_EVENT_STATUS_NOTIFICATION commands to get media
changed notification....

8aa71917 04/13/2011 01:06 pm Amit Shah

atapi: Drives can be locked without media present

Drivers are free to lock drives without any media present. Such a
condition should not result in an error condition.

See Table 341 in MMC-5 spec for details.

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

88f2bb58 04/13/2011 01:06 pm Amit Shah

atapi: Report correct errors on guest eject request

Table 629 of the MMC-5 spec mentions two different error conditions when
a CDROM eject is requested: a) while a disc is inserted and b) while a
disc is not inserted.

Ensure we return the appropriate error for the present condition of the...

75717903 04/07/2011 02:51 pm Isaku Yamahata

ide: consolidate drive_get(IF_IDE)

factor out ide initialization to call drive_get(IF_IDE)

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Kevin Wolf <>

667bb59d 04/07/2011 01:56 pm Avi Kivity

ich/ahci: convert to pci_register_bar_simple()

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

aa315f95 03/21/2011 10:28 pm Aurelien Jarno

Merge branch 'for-anthony' of git://github.com/bonzini/qemu

  • 'for-anthony' of git://github.com/bonzini/qemu:
    remove qemu_get_clock
    add a generic scaling mechanism for timers
    change all other clock references to use nanosecond resolution accessors
    change all rt_clock references to use millisecond resolution accessors...
74475455 03/21/2011 10:23 am Paolo Bonzini

change all other clock references to use nanosecond resolution accessors

This was done with:

sed -i 's/qemu_get_clock\>/qemu_get_clock_ns/' \
$(git grep -l 'qemu_get_clock\>' )
sed -i 's/qemu_new_timer\>/qemu_new_timer_ns/' \
$(git grep -l 'qemu_new_timer\>' )...
b93af93d 03/15/2011 02:21 pm Brian Wheeler

Fix ATA SMART and CHECK POWER MODE

This patch fixes two things:

1) CHECK POWER MODE

The error return value wasn't always zero, so it would show up as
offline. Error is now explicitly set to zero.

2) SMART

The smart values that were returned were invalid and tools like skdump...

ee951a37 02/21/2011 04:46 pm Jan Kiszka

isa-bus: Remove bogus IRQ sharing check

Nothing prevented IRQ sharing on the ISA bus in principle. Not all
boards supported this, neither each and every card nor driver and OS.
Still, there existed valid IRQ sharing scenarios, (at least) two of them
can also be found in QEMU: >2 PC UARTs and the PREP IDE buses....

e07bbac5 02/14/2011 04:39 pm Jan Kiszka

Improve vm_stop reason declarations

Define and use dedicated constants for vm_stop reasons, they actually
have nothing to do with the EXCP_* defines used so far. At this chance,
specify more detailed reasons so that VM state change handlers can
evaluate them....

2c4b9d0e 02/07/2011 12:40 pm Alexander Graf

ahci: make number of ports runtime determined

Different AHCI controllers have a different number of ports, so the core
shouldn't care about the amount of ports available.

This patch makes the number of ports available to the AHCI core runtime
configurable, allowing us to have multiple different AHCI implementations...

760c3e44 02/07/2011 12:38 pm Alexander Graf

ahci: Implement HBA reset

The ahci code was missing its soft reset functionality. This wasn't really an
issue for Linux guests, but Windows gets confused when the controller doesn't
reset when it tells it so.

Using this patch I can now successfully boot Windows 7 from AHCI using AHCI...

87e62065 02/07/2011 12:38 pm Alexander Graf

ahci: send init d2h fis on fis enable

The drive sends a d2h init fis on initialization. Usually, the guest doesn't
receive fises yet at that point though, so the delivery is deferred.

Let's reflect that by sending the init fis on fis receive enablement....

7fb6577b 02/07/2011 12:37 pm Alexander Graf

ahci: split ICH and AHCI even more

Sebastian's patch already did a pretty good job at splitting up ICH-9
AHCI 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...

f83a40dc 02/07/2011 12:35 pm Alexander Graf

ahci: add license header in ahci.h

Due to popular request, this patch adds a license header to ahci.h

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

03c7a6a8 02/07/2011 12:14 pm Sebastian Herbszt

ahci: split ICH9 from core

There are multiple ahci devices out there. The currently implemented ich-9
is only one of the many. So let's split that one out into a separate file
to stress the difference.

Signed-off-by: Sebastian Herbszt <>
Signed-off-by: Alexander Graf <>...

27d6bf40 01/31/2011 11:42 am Markus Armbruster

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, but
not the guest device. That's because the controllers we use with
if=scsi drives (lsi53c895a and esp) support only 7 units, and...

db97ee6a 01/31/2011 11:03 am Christoph Hellwig

block: tell drivers about an image resize

Extend the change_cb callback with a reason argument, and use it
to tell drivers about size changes.

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

fe6ceac8 01/31/2011 11:03 am Stefan Hajnoczi

ahci: Fix cpu_physical_memory_unmap() argument ordering

The len and is_write arguments to cpu_physical_memory_unmap() were
swapped. This patch changes calls to use the correct argument ordering.

Signed-off-by: Stefan Hajnoczi <>...

1635eecc 01/24/2011 05:41 pm Stefan Weil

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 <>
Signed-off-by: Stefan Weil <>...

596bb44d 01/24/2011 12:08 pm Christoph Hellwig

ide: also reset io_buffer_index for writes

Currenly the code only resets the io_buffer_index field for reads,
but the code seems to expect this for all types of I/O. I guess
we simply don't hit large enough transfers that would require this
often enough....

c641483f 01/24/2011 12:08 pm Christoph Hellwig

ide: kill ide_dma_submit_check

Merge ide_dma_submit_check into it's only caller. Also use tail recursion
using a goto instead of a real recursion - this avoid overflowing the
stack in the pathological situation of an recurring error that is ignored.
We'll still be busy looping in ide_dma_cb, but at least won't eat up...

cd369c46 01/24/2011 12:08 pm Christoph Hellwig

ide: factor dma handling helpers

Factor the DMA I/O path that is duplicated between read and write
commands, into common helpers using the s->is_read flag added for
the macio ATA controller.

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

0965f12d 01/10/2011 01:29 pm Gerd Hoffmann

piix: tag as not hotpluggable.

This patch tags all pci devices which belong to the piix3/4 chipsets as
not hotpluggable (Host bridge, ISA bridge, IDE controller, ACPI bridge).

Acked-by: Aurelien Jarno <>
Signed-off-by: Gerd Hoffmann <>...

cdfe17df 12/19/2010 12:43 pm Blue Swirl

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

653af235 12/17/2010 08:57 pm Kevin Wolf

ide: Build fix for via.c

Signed-off-by: Kevin Wolf <>

f56b18c0 12/17/2010 08:57 pm Kevin Wolf

ide: Fix build for cmd646.c

Signed-off-by: Kevin Wolf <>
Acked-by: Andreas Färber <>

38a08f05 12/17/2010 05:11 pm Sebastian Herbszt

ahci: set SATA Mode Select

Set SATA Mode Select to AHCI in the Address Map Register.

Signed-off-by: Sebastian Herbszt <>
Signed-off-by: Kevin Wolf <>

1bdaa28d 12/17/2010 05:11 pm Alexander Graf

ide: honor ncq for atapi

ATAPI also can do ncq, so let's expose the capability.

This patch makes CD-ROM support work on Windows 7 for me.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

61d9d6b0 12/17/2010 05:11 pm Stefan Hajnoczi

ide: Register vm change state handler once only

We register the vm change state handler in a PCI BAR map() function.
This function can be called multiple times throughout the lifetime of a
PCI IDE device. This results in duplicate vm change state handlers...

ccf0fd8b 12/17/2010 05:11 pm Roland Elek

ide: add ncq identify data for ahci sata drives

I modified ide_identify() to include the zero-based queue length
value in word 75, and set bit 8 in word 76 to signal NCQ support
in the identify data for AHCI SATA drives.

Signed-off-by: Roland Elek <>...

f6ad2e32 12/17/2010 05:11 pm Alexander Graf

ahci: add ahci emulation

This patch adds an emulation layer for an ICH-9 AHCI controller. For now
this controller does not do IDE legacy emulation. It is a pure AHCI controller.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

40a6238a 12/17/2010 05:11 pm Alexander Graf

ide: Split out BMDMA code from ATA core

The ATA core is currently heavily intertwined with BMDMA code. Let's loosen
that a bit, so we can happily replace the DMA backend with different
implementations.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

2ff61ff1 12/17/2010 05:11 pm Alexander Graf

ide: move transfer_start after variable modification

We hook into transfer_start and immediately call the end function
for ahci. This means that everything needs to be in place for the
end function when we start the transfer, so let's move the function
down to where all state is in place....

7cff87ff 12/17/2010 05:11 pm Alexander Graf

ide: split ide command interpretation off

The ATA command interpretation code can be used for PATA and SATA
interfaces alike. So let's split it out into a separate function.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

6ef2ba5e 12/17/2010 05:11 pm Alexander Graf

ide: fix whitespace gap in ide_exec_cmd

Now that we have the function split out, we have to reindent it.
In order to increase the readability of the actual functional change,
this is split out.

Signed-off-by: Alexander Graf <>
Signed-off-by: Kevin Wolf <>

1ca4d09a 12/11/2010 11:32 pm Gleb Natapov

Add bootindex parameter to net/block/fd device

If bootindex is specified on command line a string that describes device
in firmware readable way is added into sorted list. Later this list will
be passed into firmware to control boot order.

Signed-off-by: Gleb Natapov <>...

dc1a46b6 12/11/2010 11:27 pm Gleb Natapov

Add get_fw_dev_path callback to IDE bus.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

3835510f 12/11/2010 11:27 pm Gleb Natapov

Store IDE bus id in IDEBus structure for easy access.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

dee41d58 12/11/2010 11:27 pm Gleb Natapov

Keep track of ISA ports ISA device is using in qdev.

Store all io ports used by device in ISADevice structure.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

779206de 12/11/2010 11:27 pm Gleb Natapov

Introduce fw_name field to DeviceInfo structure.

Add "fw_name" to DeviceInfo to use in device path building. In
contrast to "name" "fw_name" should refer to functionality device
provides instead of particular device model like "name" does.

Signed-off-by: Gleb Natapov <>...

2507c12a 12/11/2010 05:24 pm Alexander Graf

Add endianness as io mem parameter

As stated before, devices can be little, big or native endian. The
target endianness is not of their concern, so we need to push things
down a level.

This patch adds a parameter to cpu_register_io_memory that allows a
device to choose its endianness. For now, all devices simply choose...

c924f36a 12/01/2010 07:11 am Michael S. Tsirkin

Merge remote branch 'origin/master' into pci

Conflicts:
Makefile.objs
hw/virtio.c

b76876e6 11/29/2010 05:15 pm Kevin Wolf

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 the
PRD table. The OS is not required to change the base address register before...

c29947bb 11/29/2010 05:15 pm Kevin Wolf

ide: Ignore double DMA transfer starts/stops

You can only start a DMA transfer if it's not running yet, and you can only
cancel it if it's running.

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

8337606d 11/29/2010 05:15 pm Kevin Wolf

ide: Factor ide_dma_set_inactive out

Several places that stop a DMA transfer duplicate this code. Factor it out into
a common function.

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

e3982b3c 11/29/2010 05:15 pm Kevin Wolf

ide: Set bus master inactive on error

BMIDEA in the status register must be cleared on error. This makes FreeBSD
respond (more) correctly to I/O errors.

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

9fbef1ac 11/24/2010 06:31 pm Avi Kivity

ide: convert bmdma address ioport to ioport_register()

cmd646, via compile tested, pci lightly boot tested.

Signed-off-by: Avi Kivity <>
Signed-off-by: Kevin Wolf <>

b90c73cf 11/22/2010 10:00 am Stefan Weil

pci: Replace unneeded type casts in calls of pci_register_bar

There is no need for these type casts (as other existing
code shows). So re-write the first argument without
type cast (and remove a related TODO comment).

Cc: Michael S. Tsirkin <>...

b2df7531 11/04/2010 02:54 pm Kevin Wolf

ide: Handle immediate bdrv_aio_flush failure

If bdrv_aio_flush returns NULL, this should be treated as an error.

Signed-off-by: Kevin Wolf <>

a58b8d54 10/22/2010 03:49 pm Christoph Hellwig

ide: set WCACHE supported in IDENTIFY data

ATA does not only have the WCACHE enabled bit in identify word 85, but also
a WCACHE supported bit in word 82. While the Linux kernel is fine with the
latter at least hdparm also needs the former before correctly displaying...

6bcb1a79 10/22/2010 03:49 pm Kevin Wolf

ide: Factor ide_flush_cache out

The next patch reuses this code, so put it in its own function.

Signed-off-by: Kevin Wolf <>

e2bcadad 10/22/2010 03:49 pm Kevin Wolf

ide: Handle flush failure

Instead of always assuming success for bdrv_aio_flush, actually do something
with the error. This respects the werror option and accordingly ignores the
error, reports it to the guest or stops the VM and retries after cont.

Ignoring the error is trivial, obviously. For stopping the VM and retrying...

1b2adf28 09/21/2010 04:39 pm Christoph Hellwig

ide: propagate the required alignment

IDE is a bit ugly in this respect. For one it doesn't really keep track
of a sector size - most of the protocol is in units of 512 bytes, and we
assume 2048 bytes for CDROMs which is correct most of the time.

Second IDE allocates an I/O buffer long before we know if we're dealing...

79d1d331 09/08/2010 01:39 pm Jonathan A. Kollasch

Improve ATA IDENTIFY word 64 contents.

Fill in word 64 of IDENTIFY data to indicate support for PIO modes 3 and 4.
This allows NetBSD guests to use UltraDMA modes instead of just PIO mode 0.

Signed-off-by: Jonathan A. Kollasch <>
Signed-off-by: Kevin Wolf <>

2446333c 08/24/2010 06:22 pm Blue Swirl

Rearrange block headers

Changing block.h or blockdev.h resulted in recompiling most objects.

Move DriveInfo typedef and BlockInterfaceType enum definitions
to qemu-common.h and rearrange blockdev.h use to decrease churn.

Signed-off-by: Blue Swirl <>

953844d1 08/03/2010 04:57 pm Andrea Arcangeli

ide: Avoid canceling IDE DMA

The reason for not actually canceling the I/O is because with
virtualization and lots of VM running, a guest fs may mistake a
overload of the host, as an IDE timeout. So rather than canceling the
I/O, it's safer to wait I/O completion and simulate that the I/O has...

cdc6f542 07/30/2010 10:12 pm Aurelien Jarno

Merge branch 'for-anthony' of git://repo.or.cz/qemu/kevin

  • 'for-anthony' of git://repo.or.cz/qemu/kevin:
    Fix -snapshot deleting images on disk change
    block: Use error codes from lower levels for error message
    block: default to 0 minimal / optiomal I/O size...
7bccf573 07/27/2010 06:32 pm Blue Swirl

Fix uint8_t comparisons with negative values

Fix the following warnings:
/src/qemu/hw/ide/core.c: In function `ide_drive_pio_post_load':
/src/qemu/hw/ide/core.c:2767: warning: comparison is always false due to limited range of data type

/src/qemu/ui/vnc-enc-tight.c: In function `tight_detect_smooth_image':...

57338424 07/27/2010 12:19 am Juan Quintela

Revert "ide save/restore current transfer fields"

This reverts commit 42ee76fe82093ba914f0dc83d2decbcf68866144.

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

50641c5c 07/27/2010 12:19 am Juan Quintela

ide: fix migration in the middle of pio operation

Signed-off-by: Juan Quintela <>
Signed-off-by: Anthony Liguori <>

5ee84c33 07/27/2010 12:19 am Juan Quintela

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_stop
to transfer_end_table, that was missing....

3abb6260 07/27/2010 12:19 am Juan Quintela

Revert "ide save/restore pio/atapi cmd transfer fields and io buffer"

This reverts commit ed487bb1d69040b9dac64a4fc076d8dd82b131d6.

The conflicts are due to commit 4fc8d6711aff7a9c11e402c3d77b481609f9f486
that is a fix to the ide_drive_pre_save() function. It reverts both...

253cb7b9 07/26/2010 02:39 pm Aurelien Jarno

ide/atapi: add support for GET EVENT STATUS NOTIFICATION

The GET EVENT STATUS NOTIFICATION is a mandatory command according
to MMC-3, even if event status notification is not supported.

This patch adds support for this command. It returns NEA ("No Event...

98f28ad7 07/13/2010 06:48 pm Markus Armbruster

ide scsi virtio-blk: Reject empty drives unless media is removable

Disks without media make no sense. For SCSI, a Linux guest kernel
complains during boot. I didn't try other combinations.

scsi-generic doesn't need the additional check, because it already...

aa5fb7b3 07/12/2010 07:36 pm Isaku Yamahata

pci/multi function bit: fix vt82c686.c.

The file, vt82c686.c, was added after the change set of
b80d4a9887fa4b6cc63f8c3a13ab2a45054d3e5c and
fecb93c45c749a4c994d8d12bdee17ce2012de9e
are created, but before the patch series was commit.
So similar fix is needed to vt82c686.c....

b80d4a98 07/11/2010 08:00 pm Isaku Yamahata

pci: don't overwrite multi functio bit in pci header type.

Don't overwrite pci header type.
Otherwise, multi function bit which pci_init_header_type() sets
appropriately is lost.
Anyway PCI_HEADER_TYPE_NORMAL is zero, so it is unnecessary to zero
which is already zero cleared....

5efb397f 07/06/2010 06:48 pm Anthony Liguori

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

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

Signed-off-by: Alex Williamson <>...

1724f049 07/06/2010 06:36 pm Alex Williamson

qemu_ram_alloc: Add DeviceState and name parameters

These will be used to generate unique id strings for ramblocks. The name
field is required, the device pointer is optional as most callers don't
have a device. When there's no device or the device isn't a child of...

7aa9c811 07/06/2010 06:05 pm Markus Armbruster

ide: Reject readonly drives unless CD-ROM

drive_init() doesn't permit option readonly for if=ide, but that's
worthless: we get it via if=none and -device.

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

dce9e928 07/06/2010 06:05 pm Markus Armbruster

ide: Reject invalid CHS geometry

drive_init() doesn't permit invalid CHS for if=ide, but that's
worthless: we get it via if=none and -device.

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

f597627f 07/06/2010 06:05 pm Markus Armbruster

ide: Improve error messages

Use error_report(), because it points to the error location.

Reword "tried to assign twice" messages to make it clear that we're
complaining about the unit property.

Report invalid unit property instead of failing silently.
...

cd8722bb 07/06/2010 06:05 pm Markus Armbruster

ide: Replace IDEState members is_cdrom, is_cf by drive_kind

The two aren't independent variables. Make that obvious.

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

c4d74df7 07/06/2010 06:05 pm Markus Armbruster

ide: Make ide_init_drive() return success

It still always succeeds. The next commits will add failures.

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

f8b6cc00 07/02/2010 02:18 pm Markus Armbruster

qdev: Decouple qdev_prop_drive from DriveInfo

Make the property point to BlockDriverState, cutting out the DriveInfo
middleman. This prepares the ground for block devices that don't have
a DriveInfo.

Currently all user-defined ones have a DriveInfo, because the only way...

18846dee 07/02/2010 02:18 pm Markus Armbruster

block: Catch attempt to attach multiple devices to a blockdev

For instance, -device scsi-disk,drive=foo -device scsi-disk,drive=foo
happily creates two SCSI disks connected to the same block device.
It's all downhill from there.

Device usb-storage deliberately attaches twice to the same blockdev,...

7d0d6950 07/02/2010 02:18 pm Markus Armbruster

block: Fix virtual media change for if=none

BlockDriverState member removable controls whether virtual media
change (monitor commands change, eject) is allowed. It is set when
the "type hint" is BDRV_TYPE_CDROM or BDRV_TYPE_FLOPPY.

The type hint is only set by drive_init(). It sets BDRV_TYPE_FLOPPY...

57c88866 07/02/2010 02:18 pm Markus Armbruster

ide: Make PIIX and ISA IDE init functions return the qdev

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

c0897e0c 07/02/2010 02:18 pm Markus Armbruster

pc: Fix CMOS info for drives defined with -device

Drives defined with drive if=ide get get created along with the IDE
controller, inside machine
>init(). That's before cmos_init().
Drives defined with -device get created during generic device init.
That's after cmos_init(). Because of that, CMOS has no information on...

fa12fbbe 07/02/2010 02:18 pm Markus Armbruster

ide: Make it explicit that ide_create_drive() can't fail

All callers of ide_create_drive() ignore its value. Currently
harmless, because it fails only when qdev_init() fails, which fails
only when ide_drive_initfn() fails, which never fails.

Brittle. Change it to die instead of silently ignoring failure....

016512f3 06/30/2010 12:07 am Huacai Chen

MIPS: Initial support of VIA IDE controller used by fulong mini pc

Signed-off-by: Huacai Chen <>
Signed-off-by: Aurelien Jarno <>