Statistics
| Branch: | Revision:

root / hw / pci @ 34b5d2c6

# Date Author Comment
6f88009e 09/09/2013 10:17 pm Tomoki Sekiyama

Add c++ keywords to QAPI helper script

Add c++ keywords to avoid errors in compiling with c++ compiler.
This also renames class member of PciDeviceInfo to q_class.

Signed-off-by: Tomoki Sekiyama <>
Reviewed-by: Laszlo Ersek <>...

9889e04a 09/03/2013 08:31 pm Anthony Liguori

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

pc,pci,virtio fixes and cleanups

This includes pc and pci cleanups and enhancements,
and a virtio bugfix for level interrupts.

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

  1. gpg: Signature made Sun 01 Sep 2013 03:15:36 AM CDT using RSA key ID D28D5469...
fb17dfe0 08/30/2013 10:15 pm Andreas Färber

qdev: Pass size to qbus_create_inplace()

To be passed to object_initialize().

Since commit 39355c3826f5d9a2eb1ce3dc9b4cdd68893769d6 the argument is
void*, so drop some superfluous (BusState *) casts or direct parent
field usages.

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

dd301ca6 08/30/2013 09:14 pm Andreas Färber

pci: Pass size to pci_bus_new_inplace()

To be passed to qbus_create_inplace().

Reviewed-by: Wenchao Xia <>
Signed-off-by: Andreas Färber <>

3bf4dfdd 08/28/2013 10:11 am Alexey Kardashevskiy

pci: add config space access traces

This adds pci_cfg_read and pci_cfg_write traces for config spaces
accesses.

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

9eda7d37 08/27/2013 08:30 am Alexey Kardashevskiy

pci: Introduce helper to retrieve a PCI device's DMA address space

A PCI device's DMA address space (possibly an IOMMU) is returned by a
method on the PCIBus. At the moment that only has one caller, so the
method is simply open coded. We'll need another caller for VFIO, so...

bcb75750 07/29/2013 09:45 pm Andreas Färber

pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

Move PCIEPort's "port" property to the new type, same for "aer_log_max".
Move PCIESlot's "chassis" and "slot" properties to the new type.

Reviewed-by: Don Koch <>
Acked-by: Michael S. Tsirkin <>...

f055e96b 07/29/2013 09:44 pm Andreas Färber

pci-bridge: Turn PCIBridge into abstract QOM type

Introduce TYPE_PCI_BRIDGE as base type and use PCI_BRIDGE() casts.

Reviewed-by: Don Koch <>
Acked-by: Michael S. Tsirkin <>
[AF: Updated pbm-bridge parent to TYPE_PCI_BRIDGE]...

caad4eb3 07/23/2013 01:37 am Andreas Färber

scsi: Improve error propagation for scsi_bus_legacy_handle_cmdline()

Let scsi_bus_legacy_add_drive() and scsi_bus_legacy_handle_cmdline()
return an Error**. Prepare qdev initfns for QOM realize error model.

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

e9acb8ce 07/18/2013 04:12 pm Anthony Liguori

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

pci,net,pc enhancements

This includes some fixes and enhancements that accumulated in my tree:
pci fixes by dkoch, virtio-net enhancements by akong and mst,
and a fix for xen pc by mst.

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

e78e9ae4 07/10/2013 12:49 pm Don Koch

pci-bridge: update mappings for migration/restore

Fix for LP#1187529: Devices on PCI bridge stop working when
live-migrated. Update bridge mappings for all PCI bridge
devices in get_pci_config_device().

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

dc11549e 07/08/2013 04:00 pm Anthony Liguori

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

pci,misc enhancements

This includes some pci enhancements:

Better support for systems with multiple PCI root buses
FW cfg interface for more robust pci programming in BIOS
Minor fixes/cleanups for fw cfg and cross-version migration -...

c473d18d 07/07/2013 11:10 pm David Gibson

pci: Use helper to find device's root bus in pci_find_domain()

Currently pci_find_domain() performs two functions - it locates the PCI
root bus above the given bus, then looks up that root bus's domain number.
This patch adds a helper function to perform the first task, finding the...

568f0690 07/07/2013 11:10 pm David Gibson

pci: Replace pci_find_domain() with more general pci_root_bus_path()

pci_find_domain() is used in a number of places where we want an id for a
whole PCI domain (i.e. the subtree under a PCI root bus). The trouble is
that many platforms may support multiple independent host bridges with no...

85c6e4fa 07/07/2013 11:10 pm David Gibson

pci: Add root bus argument to pci_get_bus_devfn()

pci_get_bus_devfn() interprets a full PCI address string to give a PCIBus *
and device/function number within that bus. Currently it assumes it is
working on an address under the primary PCI root bus. This patch extends...

29b358f9 07/07/2013 11:10 pm David Gibson

pci: Add root bus parameter to pci_nic_init()

At present, pci_nic_init() and pci_nic_init_nofail() assume that they will
only create a NIC under the primary PCI root. As we add support for
multiple PCI roots, that may no longer be the case. This patch adds a root...

9bc47305 07/07/2013 11:10 pm David Gibson

pci: Simpler implementation of primary PCI bus

Currently pci_find_primary_bus() searches the list of root buses for one
with domain 0. But since host buses are always registered with domain 0,
this just amounts to finding the only PCI host bus. The only remaining...

2b8cc89a 07/07/2013 11:10 pm David Gibson

pci: Remove domain from PCIHostBus

There are now no users of the domain field of PCIHostBus, so remove it
from the structure, and as a parameter from the pci_host_bus_register()
function which sets it.

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

7588e2b0 07/07/2013 11:10 pm David Gibson

pci: Fold host_buses list into PCIHostState functionality

The host_buses list is an odd structure - a list of pointers to PCI root
buses existing in parallel to the normal qdev tree structure. This patch
removes it, instead putting the link pointers into the PCIHostState...

1ef7a2a2 07/07/2013 11:10 pm David Gibson

pci: Abolish pci_find_root_bus()

pci_find_root_bus() takes a domain parameter. Currently PCI root buses
with domain other than 0 can't be created, so this is more or less a long
winded way of retrieving the main PCI root bus. Numbered domains don't
actually properly cover the (non x86) possibilities for multiple PCI root...

40c5dce9 07/04/2013 06:42 pm Paolo Bonzini

hw/p*: pass owner to memory_region_init* functions

Signed-off-by: Paolo Bonzini <>

2c9b15ca 07/04/2013 06:42 pm Paolo Bonzini

memory: add owner argument to initialization functions

Signed-off-by: Paolo Bonzini <>

79ca616f 07/04/2013 10:45 am David Gibson

pci: Cleanup configuration for pci-hotplug.c

pci-hotplug.c and the CONFIG_PCI_HOTPLUG variable which controls its
compilation are misnamed. They're not about PCI hotplug in general, but
rather about the pci_add/pci_del interface which are now deprecated in...

6ac363b5 07/04/2013 10:45 am David Gibson

pci: Move pci_read_devaddr to pci-hotplug-old.c

pci_read_devaddr() is only used by the legacy functions for the old PCI
hotplug interface in pci-hotplug-old.c. So we move the function there,
and make it static.

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

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

7dca8043 06/20/2013 05:39 pm Alexey Kardashevskiy

memory: give name to every AddressSpace

The "info mtree" command in QEMU console prints only "memory" and "I/O"
address spaces while there are actually a lot more other AddressSpace
structs created by PCI and VIO devices. Those devices do not normally
have names and therefore not present in "info mtree" output....

24addbc7 06/20/2013 05:32 pm Paolo Bonzini

dma: eliminate old-style IOMMU support

The translate function in the DMAContext is now always NULL.
Remove every reference to it.

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

e00387d5 06/20/2013 05:32 pm Avi Kivity

pci: use memory core for iommu support

Use the new iommu support in the memory core for iommu support. The only
user, spapr, is also converted, but it still provides a DMAContext
interface until the non-PCI bits switch to AddressSpace.

Reviewed-by: Michael S. Tsirkin <>...

fef7fbc9 06/07/2013 03:55 pm Andreas Färber

qdev: Drop FROM_QBUS() macro

Use QOM cast macros I2C_BUS(), SSI_BUS(), PCI_BUS() instead.

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

340b50c7 06/03/2013 12:37 pm Gerd Hoffmann

pci: add VMSTATE_MSIX

Using a trick cut+pasted from vmstate_scsi_device
to wind up msix_save and msix_load.

Signed-off-by: Gerd Hoffmann <>
Acked-by: Michael S. Tsirkin <>

4f39178b 05/24/2013 07:42 pm Paolo Bonzini

exec: eliminate qemu_put_ram_ptr

Reviewed-by: Peter Maydell <>
Signed-off-by: Paolo Bonzini <>

c0907c9e 04/08/2013 07:13 pm Paolo Bonzini

hw: move PCI bridges to hw/pci-* or hw/ARCH

Signed-off-by: Paolo Bonzini <>

49ab747f 04/08/2013 07:13 pm Paolo Bonzini

hw: move target-independent files to subdirectories

This patch tackles all files that are compiled once, moving
them to subdirectories of hw/.

Signed-off-by: Paolo Bonzini <>

ddf2bcfc 04/08/2013 07:13 pm Paolo Bonzini

hw: make all of hw/pci/ 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....

76534da7 04/05/2013 07:58 pm Kevin Wolf

usb-storage: Forward serial number to scsi-disk

usb-storage takes care to fetch the USB serial number from -drive
options, but it neglected to pass its own 'serial' property to the
scsi-disk it creates. With this patch, the 'serial' qdev property and
the 'serial' option in -drive behave the same and correctly apply the...

404e7a4f 03/26/2013 11:16 pm Anthony Liguori

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

virtio,pci,qom

Work by Alex to support VGA assignment,
pci and virtio fixes by Stefan, Jason and myself, and a
new qmp event for hotplug support by myself.

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

6214e73c 03/26/2013 09:02 pm Alex Williamson

pcie: Add endpoint capability initialization wrapper

Fix the awkward API of mangling the caller specified PCIe type and
just provide an interface to initialize an endpoint device. This
will pick either a regular endpoint or integrated endpoint based on
the bus and return pcie_cap_init to doing exactly what is asked....

3a861c46 03/26/2013 09:02 pm Alex Williamson

pci: Create and register a new PCI Express TypeInfo

This will allow us to differentiate Express and Legacy buses.

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

cf09458d 03/26/2013 09:02 pm Alex Williamson

pci: Move PCI and PCIE type defines

Move these so that we can reference them from a more common header
instead of including pci_bus.h everywhere.

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

60a0e443 03/26/2013 09:02 pm Alex Williamson

pci: Allow PCI bus creation interfaces to specify the type of bus

No change to any types.

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

8c0bf9e2 03/26/2013 09:02 pm Alex Williamson

pci: Create pci_bus_is_express helper

For testing the bus type.

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

0889464a 03/26/2013 09:02 pm Alex Williamson

pci: Create and use API to determine root buses

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

eb28cb1b 03/26/2013 09:02 pm Alex Williamson

pcie: Mangle types to match topology

Windows will fail to start drivers for devices with an Endpoint type
PCIe capability attached to a Root Complex (code 10 - Device cannot
start). The proper type for such a device is Root Complex Integrated
Endpoint. Devices don't care which they are, so do this conversion...

ba7d8515 03/26/2013 09:02 pm Alex Williamson

pci: Teach PCI Bridges about VGA routing

Each PCI Bridge has a set of implied VGA regions that are enabled when
the VGA bit is set in the bridge control register. This allows VGA
devices behind bridges. Unfortunately with VGA Enable, which we
formerly allowed but didn't back, comes along some required VGA...

45eb768c 03/26/2013 09:02 pm Michael S. Tsirkin

pci_bridge: factor out common code

Reuse common code in pcie_port, override the hardwired-to-0
bits per PCI Express spec.
No functional change but makes the code easier to follow.

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

600d05b9 03/26/2013 09:02 pm Michael S. Tsirkin

pci_bridge: drop formatting from source

We use the same formatting for all files, it
doesn't make sense to have formatting directives only
in pci bridge header.

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

e5368f0d 03/26/2013 09:02 pm Alex Williamson

pci: Fix INTx routing notifier recursion

For some reason we recurse to fire the INTx routing notifier for each
child of a bus, for each possible device of a bus. That means that if
we add a root port, the notifier gets called for that bridge 256
times. If we add an upstream switch behind that root port, 256^2. But...

659fefee 03/26/2013 09:02 pm Alex Williamson

pci_bridge: Use a default map_irq function

The PCI bridge spec defines a default swizzle for translating INTx
IRQs from secondary bus to primary. Use this by default for any
bridge that doesn't set a function.

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

8c7f3dd0 03/26/2013 09:02 pm Stefan Hajnoczi

pci: refuse empty ROM files

A zero size ROM file is invalid and should produce a warning.
Attempting to use a zero size file ends up hitting an assertion
qemu_ram_set_idstr() because RAMBlocks with duplicate addresses are
allocated - due to zero size the allocator doesn't increment the next...

e01fd687 03/26/2013 09:02 pm Alex Williamson

pci: Add PCI VGA helpers

Allow devices to register VGA memory regions for handling PCI spec
defined VGA I/O port and MMIO areas. PCI will attach these to the
bus address spaces and enable them according to the device command
register value.

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

786fd2b0 03/25/2013 12:13 pm Dmitry Fleytman

VMXNET3 device implementation

Signed-off-by: Dmitry Fleytman <>
Signed-off-by: Yan Vugenfirer <>
Signed-off-by: Stefan Hajnoczi <>

085d8134 03/22/2013 02:25 pm Peter Maydell

Fix typos and misspellings

Fix various typos and misspellings. The bulk of these were found with
codespell.

Signed-off-by: Peter Maydell <>
Reviewed-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

6e72a00f 03/11/2013 02:56 am Anthony Liguori

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

  • bonzini/hw-dirs:
    sh: move files referencing CPU to hw/sh4/
    ppc: move more files to hw/ppc
    ppc: move files referencing CPU to hw/ppc/
    m68k: move files referencing CPU to hw/m68k/
    i386: move files referencing CPU to hw/i386/...
d37e12a0 03/08/2013 02:15 pm Peter Maydell

pci_host: Drop write-only address_space field

The address_space field of PCIHostState was only ever written, never used.
Drop it completely.

Signed-off-by: Peter Maydell <>
Reviewed-by: Andreas Färber <>
Signed-off-by: Stefan Hajnoczi <>

b4a42f81 03/01/2013 02:54 pm Paolo Bonzini

hw: move qdev-monitor.o to toplevel directory

qdev-monitor.c is the only "core qdev" file that is not used in
user-mode emulation, and it does not define anything that is used
by hardware models. Remove it from the hw/ directory and
remove hw/qdev-monitor.h from hw/qdev.h too; this requires...

312fd5f2 02/11/2013 04:13 pm Markus Armbruster

error: Strip trailing '\n' from error string arguments (again)

Commit 6daf194d and be62a2eb got rid of a bunch, but they keep coming
back. Tracked down with this Coccinelle semantic patch:

r
expression err, eno, cls, fmt;
position p;
@@
(...
4fec6404 02/01/2013 11:53 pm Paolo Bonzini

pci: use qbus_create in pci_bus_new

Remove knowledge of QOM innards. The common part of pci_bus_new and
pci_bus_new_inplace is moved to a new function pci_bus_init.

Acked-by: Andreas Färber <>
Signed-off-by: Paolo Bonzini <>...

82cb6b04 01/26/2013 03:15 pm Paolo Bonzini

build: remove extra-obj-y

extra-obj-y is somewhat complicated to understand. Replace it with a
special CONFIG_ALL symbol that is defined only at toplevel.
This limits the case of directories defining more than one
*-obj-y target.

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

9c16fa79 01/14/2013 09:26 pm Alberto Garcia

Add TEWS TPCI200 IndustryPack emulation

The TPCI200 is a PCI board that supports up to 4 IndustryPack modules.

A new bus type called 'IndustryPack' has been created so any
compatible module can be attached to this board.

Reviewed-by: Andreas Färber <>...

8e9a8681 01/14/2013 06:23 pm Anthony Liguori

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

pci,virtio

This further optimizes MSIX handling in virtio-pci.
Also included is pci cleanup by Paolo, and pci device
assignment fix by Alex.

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

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

5c03a254 01/09/2013 12:10 pm Paolo Bonzini

pci: use constants for devices under the 1B36 device ID, document them

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

13744bd0 01/08/2013 08:24 pm Paolo Bonzini

virtio-9p: use symbolic constant, add to pci-ids.txt

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

4c93bfa9 01/07/2013 07:42 pm Michael S. Tsirkin

msix: add api to access msix message

Will be used by virtio pci.

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

70f8ee39 12/26/2012 11:49 am Michael S. Tsirkin

msix: expose access to masked/pending state

For use by poll handler.

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

812d2594 12/26/2012 11:49 am Knut Omang

pcie: Fix bug in pcie_ext_cap_set_next

Upper 16 bits of the PCIe Extended Capability Header was truncated during update,
also breaking pcie_add_capability.

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

bbef882c 12/26/2012 11:49 am Michael S. Tsirkin

msi: add API to get notified about pending bit poll

Update all users.

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

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

caf71f86 12/19/2012 09:31 am Paolo Bonzini

migration: move include files to include/migration/

Signed-off-by: Paolo Bonzini <>

cb9c377f 12/19/2012 09:31 am Paolo Bonzini

janitor: add guards to headers

Signed-off-by: Paolo Bonzini <>

7b1b5d19 12/19/2012 09:31 am Paolo Bonzini

qapi: move include files to include/qobject/

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

1422e32d 12/19/2012 09:31 am Paolo Bonzini

net: reorganize headers

Move public headers to include/net, and leave private headers in net/.
Put the virtio headers in include/net/tap.h, removing the multiple copies
that existed. Leave include/net/tap.h as the interface for NICs, and
net/tap_int.h as the interface for OS-specific parts of the tap backend....

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

Merge commit '1dd3a74d2ee2d873cde0b390b536e45420b3fe05' into HEAD

Signed-off-by: Paolo Bonzini <>

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

pci_bus: update comment

Don't ask everyone to desist from including this header,
simply recommend using accessors.

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

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

pci_bus.h: tweak include guards

Now that header has been renamed, tweak include guards
to match.

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

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

pci: fix path for local includes

Include dependencies from pci core using the correct path.
This is required now that it's in the separate directory.
Need to check whether they can be minimized, for now,
keep the code as is.

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

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

Revert "pci: prepare makefiles for pci code reorganization"

This reverts commit 475d67c3bcd6ba9fef917b6e59d96ae69eb1a9b4.

Now that all users have been updated, we don't need the
makefile hack or the softlink anymore.

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

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

pci: rename pci_internals.h pci_bus.h

There are lots of external users of pci_internals.h,
apparently making it an internal interface only didn't
work out. Let's stop pretending it's an internal header.

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

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

pci: move pci core code to hw/pci

Move files and modify makefiles to pick them at the
new location.

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

29002d9e 12/12/2012 11:41 pm Michael S. Tsirkin

pci: prepare makefiles for pci code reorganization

To make it easier to move code around without breaking
build at intermedite steps, tweak makefiles
to look in pci/ and hw/ for include files, automatically.
This will be reverted at the end of the reorganization....