Statistics
| Branch: | Revision:

root / hw / msix.c @ 145aebec

History | View | Annotate | Download (11.1 kB)

# Date Author Comment
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 <>

95524ae8 08/08/2011 06:22 pm Avi Kivity

msix: convert to memory API

The msix table is defined as a subregion, to allow for a BAR that
mixes device specific regions with the msix table.

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

ae5d3eb4 07/12/2011 11:00 pm Alexander Graf

msix: use specific endian ld/st_phys

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

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

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

Conflicts:
hw/virtio-pci.c

01731cfb 06/12/2011 10:33 am Jan Kiszka

msix: Use replace local defines with pci_regs versions

This also cleans up an open-coded 64-bit message address readout.

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

ebabb67a 05/06/2011 10:19 am Stefan Weil

Fix typo in code and comments

Replace writeable -> writable

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

e407bf13 01/20/2011 03:33 pm Isaku Yamahata

msix: simplify write config

use pci_device_deassert_intx().

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

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

b907b69d 10/27/2010 08:07 pm Michael S. Tsirkin

Merge branch 'pci' into for_anthony

57c6db2e 09/20/2010 09:15 pm Isaku Yamahata

msix: clear not only INTA, but all INTx when MSI-X is enabled.

clear not only INTA, but all INTx when MSI-X is enabled.

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

bf1b0071 09/18/2010 08:53 am Blue Swirl

Introduce range.h

Extract range functions from pci.h. These will be used by later patches
by non-PCI devices. Adjust current users.

Signed-off-by: Blue Swirl <>

ca77089d 09/07/2010 08:10 pm Isaku Yamahata

pci: consolidate pci_add_capability_at_offset() into pci_add_capability().

By making pci_add_capability() the special case of
pci_add_capability_at_offset() of offset = 0,
consolidate pci_add_capability_at_offset() into pci_add_capability().

Cc: Stefan Weil <>...

ac7045cf 06/14/2010 06:58 pm Jes Sorensen

Remove unused DEBUG defines from hw/msix.c

Remove unused DEBUG defines from hw/msix.c to avoid having anything
define the word DEBUG without any additions such as MSIX_DEBUG.

Signed-off-by: Jes Sorensen <>
Signed-off-by: Anthony Liguori <>

1b4e8f73 05/31/2010 04:33 pm Isaku Yamahata

msix: remove duplicated defines.

remove defines which are already defined in pci_regs.h

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

98a3cb02 12/23/2009 04:35 pm Isaku Yamahata

msix: use range helper function.

use range helper function in msix_write_config().

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

5b5cb086 12/07/2009 09:50 pm Michael S. Tsirkin

msix: function mask support

Function mask is a mandatory feature in MSIX
spec so not implementing it is a spec violation.
Implement.

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

2760952b 12/07/2009 09:50 pm Michael S. Tsirkin

msix: macro rename for function mask support

rename ENABLE_OFFSET -> CONTROL_OFFSET, since
same byte includes function mask.
This is in preparation for function mask support.

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

98304c84 12/01/2009 06:00 pm Michael S. Tsirkin

msix: clear pending bit of an unused vector

PCI spec states:
if a masked vector has its Pending bit set, and the associated
underlying interrupt events are somehow satisfied (usually by software
though the exact manner is function-specific), the function must clear...

1f944c66 12/01/2009 06:00 pm Michael S. Tsirkin

msix: fix reset value for enable bit

On reset, we currently clear all bits in msix control register except
enable bit. This is wrong: the spec says we should clear writeable
bits: function mask and enable bit.
Correct this.

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

ae1be0bb 12/01/2009 05:59 pm Michael S. Tsirkin

msix: fix mask bit state after reset

PCI spec states that mask bit must be 1 after reset.
Make it so.

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

b5f28bca 12/01/2009 05:58 pm Michael S. Tsirkin

msix: add helper to unuse all msix entries

will be used by virtio on soft reset

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

6e355d90 11/09/2009 04:43 pm Isaku Yamahata

pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t

This patch is preliminary for 64 bit BAR support.
Introduce dedicated type, pcibus_t, to represent pci bus address/size
instead of uint32_t.
Later this type will be changed to uint64_t....

76f5159d 10/30/2009 03:39 pm Michael S. Tsirkin

qemu/msix: fix table access issues

Fixes a couple of issues with msix table access:
- With misbehaving guests, misaligned 4 byte access could overflow
msix table and cause qemu to segfault. Since PCI spec requires
host to only issue dword-aligned accesses, as a fix,...

5a1fc5e8 10/05/2009 05:32 pm Michael S. Tsirkin

qemu: clean up target page usage in msix

Since cpu_register_phys_memory does not require size to be a multiple of
target page size, simply make msix page size 0x1000. Do this in msix,
reverting part of 5e520a7d500ec2569d22d80f9ef4272a34cb3c80, as we no
longer have to pass target page around....

c227f099 10/02/2009 12:12 am Anthony Liguori

Revert "Get rid of _t suffix"

In the very least, a change like this requires discussion on the list.

The naming convention is goofy and it causes a massive merge problem. Something
like this must be presented on the list first so people can provide input...

99a0949b 10/01/2009 09:45 pm malc

Get rid of _t suffix

Some not so obvious bits, slirp and Xen were left alone for the time
being.

Signed-off-by: malc <>

5e520a7d 09/20/2009 06:35 pm Blue Swirl

Compile msix only once

Get page size in device init.

Signed-off-by: Blue Swirl <>

d60efc6b 08/25/2009 09:29 pm Blue Swirl

Make CPURead/WriteFunc structure 'const'

Signed-off-by: Blue Swirl <>

3174ecd1 07/27/2009 10:09 pm Michael S. Tsirkin

qemu: msix nit: clear msix_entries_nr on error

I don't think it's critical to do this, but it's
best to keep uninit and error recovery consistent.

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

4bfd1712 07/10/2009 09:44 pm Michael S. Tsirkin

qemu/msi: clean used vectors state on load

Clean up msix vector usage state on load. Since guest might have control
over it through the device, the device will have to load this state from
file.

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

72755a70 07/10/2009 09:44 pm Michael S. Tsirkin

qemu/msi: missing braces

MSIX present bit is tested incorrectly, and only happens to work because
the bit we are testing is 0x1. Add braces to fix this.

Reported-by: Blue Swirl <>
Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Anthony Liguori <>

9a3e12c8 07/10/2009 12:58 am Michael S. Tsirkin

fix segfault in msix_save

This fixes segfault reported by Kevin Wolf,
and simplifies the code in msix_save.

Reported-by: Kevin Wolf <>
Signed-off-by: Michael S. Tsirkin <>
Signed-off-by: Anthony Liguori <>

98846d73 07/05/2009 11:11 am Blue Swirl

Fix Sparse warning

Signed-off-by: Blue Swirl <>

02eb84d0 06/24/2009 05:09 pm Michael S. Tsirkin

qemu/pci: MSI-X support functions

Add functions implementing MSI-X support. First user will be virtio-pci.
Note that platform must set a flag to declare MSI supported: this
is a safety measure to avoid breaking platforms which should support
MSI-X but currently lack this in the interrupt controller emulation....