Statistics
| Branch: | Revision:

root @ eabba580

# Date Author Comment
71af014f 12/17/2010 05:11 pm Stefan Hajnoczi

docs: Add QED image format specification

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

75411d23 12/17/2010 05:11 pm Stefan Hajnoczi

qed: Add QEMU Enhanced Disk image format

This patch introduces the qed on-disk layout and implements image
creation. Later patches add read/write and other functionality.

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

298800ca 12/17/2010 05:11 pm Stefan Hajnoczi

qed: Table, L2 cache, and cluster functions

This patch adds code to look up data cluster offsets in the image via
the L1/L2 tables. The L2 tables are writethrough cached in memory for
performance (each read/write requires a lookup so it is essential to
cache the tables)....

eabba580 12/17/2010 05:11 pm Stefan Hajnoczi

qed: Read/write support

This patch implements the read/write state machine. Operations are
fully asynchronous and multiple operations may be active at any time.

Allocating writes lock tables to ensure metadata updates do not
interfere with each other. If two allocating writes need to update the...

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

53f76e58 12/17/2010 05:11 pm Kevin Wolf

qemu-img: Call error_set_progname

Call error_set_progname during the qemu-img initialization, so that error
messages printed with error_report() use the right prefix.

Signed-off-by: Kevin Wolf <>

f88e1a42 12/17/2010 05:11 pm Jes Sorensen

qemu-img.c: Re-factor img_create()

This patch re-factors img_create() moving the code doing the actual
work into block.c where it can be shared with QEMU. This is needed to
be able to create images from QEMU to be used for live snapshots.

Signed-off-by: Jes Sorensen <>...

f8882568 12/17/2010 05:11 pm Jes Sorensen

Introduce do_snapshot_blkdev() and monitor command to handle it.

The monitor command is:
snapshot_blkdev <device> [snapshot-file] [format]

Default format is qcow2. For now snapshots without a snapshot-file, eg
internal snapshots, are not supported.

Signed-off-by: Jes Sorensen <>...

792da93a 12/17/2010 05:11 pm Jes Sorensen

Prevent creating an image with the same filename as backing file

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

4f70f249 12/17/2010 05:11 pm Jes Sorensen

bdrv_img_create() use proper errno return values

Kevin suggested to have bdrv_img_create() return proper -errno values
on error.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

15654a6d 12/17/2010 05:11 pm Jes Sorensen

qemu.img.c: Use error_report() instead of own error() implementation

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

ad717139 12/17/2010 05:11 pm Kevin Wolf

Remove NULL checks for bdrv_new return value

It's an indirect call to qemu_malloc, which never returns an error.

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

bb8bf76f 12/17/2010 05:11 pm Christoph Hellwig

block: add discard support

Add a new bdrv_discard method to free blocks in a mapping image, and a new
drive property to set the granularity for these discard. If no discard
granularity support is set discard support is disabled.

Signed-off-by: Christoph Hellwig <>...

ea3bd56f 12/17/2010 05:11 pm Christoph Hellwig

scsi-disk: support WRITE SAME (16) with unmap bit

Support discards via the WRITE SAME command with the unmap bit set, and
tell the initiator about the support for it via the block limit and the
new thin provisioning EVPD pages. Also fix the comment which incorrectly...

edff5db1 12/17/2010 05:11 pm Stefan Hajnoczi

qemu-io: Add discard command

discard [-Cq] off len -- discards a number of bytes at a specified
offset

discards a range of bytes from the given offset
Example:
'discard 512 1k' - discards 1 kilobyte from 512 bytes into the file
Discards a segment of the currently open file....
dce512de 12/17/2010 05:11 pm Christoph Hellwig

raw-posix: add discard support

Add support to discard blocks in a raw image residing on an XFS filesystem
by calling the XFS_IOC_UNRESVSP64 ioctl to punch holes. Support for other
hole punching mechanisms can be added when they become available.

Signed-off-by: Christoph Hellwig <>...

095343ad 12/17/2010 05:11 pm Kevin Wolf

qemu-io: Fix typo in help texts

Signed-off-by: Kevin Wolf <>

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

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

pci: add storage class for sata

This patch adds the storage sata class id.

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

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

pci: add ich9 pci id

We need a PCI ID for our new AHCI adapter. I just picked an ICH-9
because that's the one in the Q35 chipset.

This patch adds a PCI ID define for an ICH-9 AHCI adapter.

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

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

461d13d3 12/17/2010 05:11 pm Alexander Graf

config: move ide core and pci to pci.mak

Every device that can do PCI should also be able to do IDE. So let's move
the IDE definitions over to pci.mak.

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

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

config: add ahci for pci capable machines

This patch enables AHCI for all machines supporting PCI.

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

0fc0f1fa 12/17/2010 05:10 pm Ryan Harper

blockdev: check dinfo ptr before using

If a user decides to punish a guest by revoking its block device via
drive_del, and subsequently also attempts to remove the pci device
backing it, and the device is using blockdev_auto_del() then we get a
segfault when we attempt to access dinfo->auto_del.[1]...

9e0b22f4 12/17/2010 05:10 pm Stefan Hajnoczi

block: Introduce path_has_protocol() function

The bdrv_find_protocol() function returns NULL if an unknown protocol
name is given. It returns the "file" protocol when the filename
contains no protocol at all. This makes it difficult to distinguish
between paths which contain a protocol and those which do not....

df2dbb4a 12/17/2010 05:10 pm Stefan Hajnoczi

block: Fix the use of protocols in backing files

Backing filenames may contain a protocol. The code currently doesn't
consider this case and produces filenames that embed "<protocol>:".
Don't combine filenames if the backing filename contains a protocol....

d8427002 12/17/2010 05:10 pm Jes Sorensen

Introduce strtosz_suffix()

This introduces strtosz_suffix() which allows the caller to specify a
default suffix in case the non default of MB is wanted.

strtosz() is kept as a wrapper for strtosz_suffix() which keeps it's
current default of MB.

Signed-off-by: Jes Sorensen <>...

1da7cfbd 12/17/2010 05:10 pm Jes Sorensen

qemu-img.c: Clean up handling of image size in img_create()

This cleans up the handling of image size in img_create() by parsing
the value early, and then only setting it once if a value has been
added as the last argument to the command line.

Signed-off-by: Jes Sorensen <>...

9d861fa5 12/17/2010 04:25 pm Anthony Liguori

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

4a493c6f 12/17/2010 04:23 pm Anthony Liguori

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

fef39578 12/17/2010 04:23 pm Anthony Liguori

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

2e44928e 12/17/2010 04:22 pm Anthony Liguori

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

b254b0d1 12/17/2010 04:21 pm Anthony Liguori

Merge remote branch 'mst/for_anthony' into staging

16905d71 12/14/2010 04:44 pm Stefan Hajnoczi

block: Make bdrv_create_file() ':' handling consistent

Filenames may start with "<protocol>:" to explicitly use a protocol like
nbd. Filenames with unknown protocols are rejected in most of QEMU
except for bdrv_create_file(). Even if a file with an invalid filename...

236e2376 12/14/2010 04:44 pm Jes Sorensen

Add missing tracing to qemu_mallocz()

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

5bdf61fd 12/14/2010 04:44 pm Jes Sorensen

Use qemu_mallocz() instead of calloc() in img_convert()

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

31ca34b8 12/14/2010 04:44 pm Jes Sorensen

img_convert(): Only try to free bs[] entries if bs is valid.

This allows for jumping to 'out:' consistently for error exit.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

4ac8aacd 12/14/2010 04:44 pm Jes Sorensen

Consolidate printing of block driver options

This consolidates the printing of block driver options in
print_block_option_help() which is called from both img_create() and
img_convert().

This allows for the "?" detection to be done just after the parsing of...

b8fb60da 12/14/2010 04:44 pm Jes Sorensen

Fix formatting and missing braces in qemu-img.c

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

ef87394c 12/14/2010 04:44 pm Jes Sorensen

Fail if detecting an unknown option

This patch changes qemu-img to exit if an unknown option is detected,
instead of trying to continue with a set of arguments which may be
incorrect.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

2a81998a 12/14/2010 04:44 pm Jes Sorensen

Make error handling more consistent in img_create() and img_resize()

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

f27aaf4b 12/14/2010 04:44 pm Christian Brunner

ceph/rbd block driver for qemu-kvm

RBD is an block driver for the distributed file system Ceph
(http://ceph.newdream.net/). This driver uses librados (which is part
of the Ceph server) for direct access to the Ceph object store and is
running entirely in userspace (Yehuda also wrote a driver for the...

eec77d9e 12/14/2010 04:44 pm Jes Sorensen

qemu-img: Deprecate obsolete -6 and -e options

If -6 or -e is specified, an error message is printed and we exit. It
does not print help() to avoid the error message getting lost in the
noise.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Kevin Wolf <>

898c257b 12/14/2010 04:44 pm Stefan Hajnoczi

qemu-option: Don't reinvent append_option_parameters()

parse_option_parameters() may need to create a new option parameter list
from a template list. Use append_option_parameters() instead of
duplicating the code.

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

0e72e753 12/14/2010 04:44 pm Stefan Hajnoczi

qemu-option: Fix parse_option_parameters() documentation typo

Yoda said, "list is the templace is". Fix this.

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

a87a6721 12/14/2010 04:44 pm Stefan Hajnoczi

qemu-img: Free option parameter lists in img_create()

Free option parameter lists in the img_create() error return path.

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

5eeaad5a 12/14/2010 04:44 pm Stefan Hajnoczi

qemu-img: Fail creation if backing format is invalid

The qemu-img create command should check the backing format to ensure
only image files with valid backing formats are created. By checking in
qemu-img.c we can print a useful error message.

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

36888c63 12/12/2010 03:10 pm Richard W.M. Jones

Watchdog: disable watchdog timer when hard-rebooting a guest.

This commit causes the watchdog timer to be reset when a guest is
hard-rebooted.

The failure case previously was as follows:

(a) guest boots, watchdog is enabled
(b) guest does a reset eg:...
4cab946a 12/11/2010 11:32 pm Gleb Natapov

Add notifier that will be called when machine is fully created.

Action that depends on fully initialized device model should register
with this notifier chain.

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

962630f2 12/11/2010 11:32 pm Gleb Natapov

Pass boot device list to firmware.

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

2e55e842 12/11/2010 11:32 pm Gleb Natapov

Add bootindex for option roms.

Extend -option-rom command to have additional parameter ,bootindex=.

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

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

de1f34cb 12/11/2010 11:32 pm Gleb Natapov

Change fw_cfg_add_file() to get full file path as a parameter.

Change fw_cfg_add_file() to get full file path as a parameter instead
of building one internally. Two reasons for that. First caller may need
to know how file is named. Second this moves policy of file naming out...

db07c0f8 12/11/2010 11:32 pm Gleb Natapov

Add get_fw_dev_path callback to scsi bus.

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

ab28ccc0 12/11/2010 11:32 pm Gleb Natapov

Record which USBDevice USBPort belongs too.

Ports on root hub will have NULL here. This is needed to reconstruct
path from device to its root hub to build device path.

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

cdedd006 12/11/2010 11:32 pm Gleb Natapov

Add get_fw_dev_path callback for usb bus.

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

5e0259e7 12/11/2010 11:32 pm Gleb Natapov

Add get_fw_dev_path callback for pci bus.

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

c646f74f 12/11/2010 11:32 pm Gleb Natapov

Add get_fw_dev_path callback for system bus.

Prints out mmio or pio used to access child device.

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

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

6a26e119 12/11/2010 11:27 pm Gleb Natapov

Add get_fw_dev_path callback to ISA bus in qdev.

Use device ioports to create unique device path.

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

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

Introduce new BusInfo callback get_fw_dev_path.

New get_fw_dev_path callback will be used for build device path usable
by firmware in contrast to qdev qemu internal device path.

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

1b3cba6e 12/11/2010 08:56 pm Blue Swirl

monitor: implement x86 info mem for PAE and long modes

'info mem' didn't show correct information for PAE mode and
x86_64 long mode.

Fix by implementing the output for missing modes.

Signed-off-by: Blue Swirl <>

d65aaf37 12/11/2010 08:56 pm Blue Swirl

monitor: implement x86 info tlb for PAE and long modes

'info tlb' didn't show correct information for PAE mode and
x86_64 long mode.

Implement the missing modes. Also print NX bit for PAE and long modes.
Fix off-by-one error in 32 bit mode mask.

Signed-off-by: Blue Swirl <>

fa82e9c3 12/11/2010 08:36 pm Bernhard Kohl

wdt_i6300esb: register a reset function

The device shall set its default hardware state after each reset.
This includes that the timer is stopped which is especially important
if the guest does a reboot independantly of a watchdog bite. I moved
the initialization of the state variables completely from the init...

74782223 12/11/2010 08:34 pm Tristan Gingold

isa-bus.c: use hw_error instead of fprintf

Minor clean-up in isa-bus.c. Using hw_error is more consistent.
There is a difference however: hw_error dumps the cpu state.

Signed-off-by: Tristan Gingold <>
Signed-off-by: Blue Swirl <>

f23cea4d 12/11/2010 05:24 pm Alexander Graf

uninorth: Get rid of bswap

There's no need to bswap once we correctly set the mmio to be little endian.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

32600a30 12/11/2010 05:24 pm Alexander Graf

e1000: Make little endian

The e1000 has compatibility code to handle big endianness which makes it
mandatory to be recompiled on different targets.

With the generic mmio endianness solution, there's no need for that anymore.
We just declare all mmio to be little endian and call it a day....

8cb7da56 12/11/2010 05:24 pm Alexander Graf

prep: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

387c3e96 12/11/2010 05:24 pm Alexander Graf

versatile_pci: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

0d2a73b3 12/11/2010 05:24 pm Alexander Graf

ppc4xx_pci: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

82600641 12/11/2010 05:24 pm Alexander Graf

openpic: Replace explicit byte swap with endian hints

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

5cf7a3ca 12/11/2010 05:24 pm Alexander Graf

rtl8139: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Because we don't depend on the target endianness anymore, we can also
move the driver over to Makefile.objs.

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

b093c1a3 12/11/2010 05:24 pm Alexander Graf

heathrow_pic: Declare as little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

968d683c 12/11/2010 05:24 pm Alexander Graf

isa_mmio: Always use little endian

This patch converts the ISA MMIO bridge code to always use little endian mmio.
All bswap code that existed was only there to convert from native cpu
endianness to little endian ISA devices.

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

34557491 12/11/2010 05:24 pm Alexander Graf

usb_ohci: Always use little endian

This patch replaces explicit bswaps with endianness hints to the
mmio layer.

Because we don't depend on the target endianness anymore, we can also
move the driver over to Makefile.objs.

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

dd310534 12/11/2010 05:24 pm Alexander Graf

exec: introduce endianness swapped mmio

The way we're currently modeling mmio is too simplified. We assume that
every device has the same endianness as the target CPU. In reality,
most devices are little endian (all PCI and ISA ones I'm aware of). Some
are big endian (special system devices) and a very little fraction is...

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

6bef0436 12/11/2010 05:24 pm Alexander Graf

Make simple io mem handler endian aware

As an alternative to the 3 individual handlers, there is also a simplified
io mem hook function. To be consistent, let's add an endianness parameter
there too.

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

0f4f039b 12/11/2010 05:24 pm Alexander Graf

dbdma: Make little endian

The device is only used on big endian systems, but always byte swaps. That's
a very good indicator that it's actually a little endian device ;-).

Signed-off-by: Alexander Graf <>
Signed-off-by: Blue Swirl <>

6ebf5905 12/11/2010 05:24 pm Alexander Graf

pci-host: Delegate bswap to mmio layer

The only reason we have bswap versions of the pci host code is that
most pci host devices are little endian. The ppc e500 is the only
odd one here, being big endian.

So let's directly pass the endianness down to the mmio layer and not...

85882c71 12/10/2010 04:25 am Michael Walle

noaudio: fix return value for read()

Read should return bytes instead of samples.

Signed-off-by: Michael Walle <>
Signed-off-by: malc <>

513691b7 12/09/2010 12:48 pm Michael S. Tsirkin

pci/aer: factor out common code

Same logic is used to assert interrupts
and send msix messages, so add a static functin for this.

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

5f47c187 12/09/2010 12:48 pm Michael S. Tsirkin

pci/aer: remove dead code

Remove some unused variables and return values.

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

2b3cb353 12/09/2010 12:48 pm Michael S. Tsirkin

pci/aer: fix interrupt on config write

config write handling for aer seems broken:
For example, it won't clear a level interrupt
when command register is set to 0.

Make it match the spec: level should equal
the logical or of enabled bits, msi only
be sent when the logical or changes....

c3f33667 12/09/2010 12:48 pm Michael S. Tsirkin

pci/aer: fix error injection

Fix the injection logic upon aer message to follow 6.2.4.1.2 more
closely: specifically only send an msi interrupt when the logical or of
the enabled bits changed, not when a bit which was previously clear
becomes set.

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

624c716c 12/09/2010 12:48 pm Michael S. Tsirkin

Makefile: make msix/msi depend on CONFIG_PCI

Possible now that pci is not depending on these.

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

4a9dd665 12/09/2010 12:48 pm Michael S. Tsirkin

pci: untangle pci/msi dependency

msi depends on pci but pci should not depend on msi.
The only dependency we have is a recent addition
of pci_msi_ functions, IMO they add little enough to
open-code in the small number of users.

Follow-up patches add more cleanups....

eff06c40 12/09/2010 12:47 pm Michael S. Tsirkin

migration/savevm: no need to flush requests

There's no need to flush requests after vmstop
as vmstop does it for us automatically now.

Signed-off-by: Michael S. Tsirkin <>
Tested-by: Jason Wang <>

95477323 12/09/2010 12:47 pm Michael S. Tsirkin

virtio-net: don't dma while vm is stopped

DMA into memory while VM is stopped makes it
hard to debug migration (consequitive saves
result in different files).
Fixing this completely is a large effort,
this patch does this for virtio-net.

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

783e7706 12/09/2010 12:47 pm Michael S. Tsirkin

virtio-net: stop/start bh when appropriate

Avoid sending out packets, and modifying
memory, when VM is stopped.
Add assert statements to verify this does not happen.

Avoid scheduling bh when vhost-net is started.

Stop bh when driver disabled bus mastering...

b1aeb926 12/09/2010 12:47 pm Isaku Yamahata

pci: make command SERR bit writable

pcie aer needs SERR bit to be writable, and the PCI spec requires
this as well. For compatibility, introduce compat global property
command_serr_enable and make this bit readonly for a pre 0.14 pc
machine.

Signed-off-by: Isaku Yamahata <>...