Statistics
| Branch: | Revision:

root / hw / pci @ ddf5636d

# Date Author Comment
84d18f06 02/17/2014 06:57 pm Markus Armbruster

Use error_is_set() only when necessary

error_is_set(&var) is the same as var != NULL, but it takes
whole-program analysis to figure that out. Unnecessarily hard for
optimizers, static checkers, and human readers. Dumb it down to
obvious.

Gets rid of several dozen Coverity false positives....

0888a29c 02/13/2014 05:02 pm Peter Maydell

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging

acpi,pc,pci fixes and enhancements

Most changes here are hotplug related:

This merges hotplug infrastructure changes by Igor,
some acpi related fixes, and PC fixes.

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

ab1da857 02/11/2014 02:57 pm Edgar E. Iglesias

exec: Make stl_*_phys input an AddressSpace

Reviewed-by: Peter Maydell <>
Signed-off-by: Edgar E. Iglesias <>

5d268704 02/10/2014 10:27 am Igor Mammedov

pci/shpc: convert SHPC hotplug to use hotplug-handler API

Split shpc_device_hotplug() into hotplug/unplug callbacks
and register them as "hotplug-handler" interface implementation of
PCI_BRIDGE_DEV device.

Replace pci_bus_hotplug() wiring with setting link on PCI BUS...

a66e657e 02/10/2014 10:27 am Igor Mammedov

pci/pcie: convert PCIE hotplug to use hotplug-handler API

Split pcie_cap_slot_hotplug() into hotplug/unplug callbacks
and register them as "hotplug-handler" interface implementation of
PCIE_SLOT device.

Replace pci_bus_hotplug() wiring with setting link on PCI BUS...

5e954943 02/10/2014 10:27 am Igor Mammedov

hw/pci: switch to a generic hotplug handling for PCIDevice

make qdev_unplug()/device_set_realized() to call hotplug handler's
plug/unplug methods if available and remove not needed anymore
hot(un)plug handling from PCIDevice.

In case if hotplug handler is not available, revert to the legacy...

2897ae02 02/10/2014 10:26 am Igor Mammedov

qdev:pci: refactor PCIDevice to use generic "hotpluggable" property

Get rid of PCIDevice specific PCIDeviceClass.no_hotplug and use
generic DeviceClass.hotpluggable field instead.

Signed-off-by: Igor Mammedov <>
Reviewed-by: Michael S. Tsirkin <>...

30607764 01/26/2014 01:11 pm Marcel Apfelbaum

hw/pci: fix error flow in pci multifunction init

Scenario:
- There is a non multifunction pci device A on 00:0X.0.
- Hot-plug another multifunction pci device B at 00:0X.1.
- The operation will fail of course.
- Try to hot-plug the B device 2-3 more times, qemu will crash....

eb0acfdd 01/26/2014 01:06 pm Michael S. Tsirkin

pci: add pci_for_each_bus_depth_first

Useful for ACPI hotplug.

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

d1819762 01/10/2014 09:04 pm Anthony Liguori

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

acpi,pci,pc,fedora,virtio fixes and enhancements

This includes some Preparatory patches for cpu hotplug for q25 and memory
hotplug by Igor, tests and memory mapping change
by Laszlo and pci reset cleanup by Paolo....

6780a22c 12/24/2013 07:02 pm Stefan Hajnoczi

qdev: Drop misleading qbus_free() function

Same reasoning as commit 02a5c4c97422b40034f31265e0f139f7846172a8
("qdev: Drop misleading qdev_free() function"). The qbus_free()
function removes the child from the namespace and decrements the
reference count. It does not, however, guarantee to free the child...

81e3e75b 12/23/2013 01:12 pm Paolo Bonzini

pci: do not export pci_bus_reset

qbus_reset_all can be used instead. There is no semantic change
because pcibus_reset returns 1 and takes care of the device
tree traversal.

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

9bdbbfc3 12/23/2013 01:12 pm Paolo Bonzini

pci: clean up resetting of IRQs

pci_device_reset will deassert the INTX pins, and this will make the
irq_count array all-zeroes. Check that this is the case, and remove
the existing loop which might even unsync irq_count and irq_state.

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

dcc20931 12/23/2013 01:12 pm Paolo Bonzini

qdev: switch reset to post-order

Post-order is the only sensible direction for the reset signals.
For example, suppose pre-order is used and the parent has some data
structures that cache children state (for example a list of active
requests). When the reset method is invoked on the parent, these caches...

4c41425d 12/11/2013 08:11 pm Gerd Hoffmann

pci: fix pci bridge fw path

qemu uses "pci" as name for pci bridges in the firmware device path.
seabios expects "pci-bridge". Result is that bootorder is broken for
devices behind pci bridges.

Some googling suggests that "pci-bridge" is the correct one. At least...

cf252e51 12/10/2013 12:29 pm Michael S. Tsirkin

pci: fix address space size for bridge

Address space size for bridge should be full 64 bit,
so we should use UINT64_MAX not INT64_MAX as it's size.

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

5c397242 11/21/2013 04:25 pm Bandan Das

pci: unregister vmstate_pcibus on unplug

PCIBus registers a vmstate during init. Unregister it upon
removal/unplug.

Signed-off-by: Bandan Das <>
Cc:
Reviewed-by: Andreas Färber <>
Signed-off-by: Michael S. Tsirkin <>

0fbf50b6 11/10/2013 02:30 pm Marcel Apfelbaum

Revert "hw/pci: partially handle pci master abort"

This reverts commit a53ae8e934cd54686875b5bcfc2f434244ee55d6.

The patch being reverted introduced a low-priority memory region
covering all 64 bit pci address space. This exposed the following bugs
elsewhere in the code:...

6bd194ab 11/06/2013 05:57 am Peter Maydell

bswap.h: Remove cpu_to_be32wu()

Replace the legacy cpu_to_be32wu() with stl_be_p().

Signed-off-by: Peter Maydell <>
Reviewed-by: Richard Henderson <>
Reviewed-by: Michael S. Tsirkin <>
Message-id: ...

02a5c4c9 11/05/2013 07:06 pm Stefan Hajnoczi

qdev: Drop misleading qdev_free() function

The qdev_free() function name is misleading since all the function does
is unlink the device from its parent. The device is not necessarily
freed.

The device will be freed when its QObject refcount reaches zero. It is...

b0eb759f 10/31/2013 05:58 pm Anthony Liguori

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

pci, pc, acpi fixes, enhancements

This includes some pretty big changes:
- pci master abort support by Marcel
- pci IRQ API rework by Marcel
- acpi generation support by myself

Everything has gone through several revisions, latest versions have been on...

cf01ba9e 10/16/2013 07:21 pm Ákos Kovács

Makefile.target: CONFIG_NO_* variables removed

CONFIG_NO_* variables replaced with the lnot logical function

Signed-off-by: Ákos Kovács <>
[PMM: fixed a few CONFIG_NO_* uses that were missed]
Signed-off-by: Peter Maydell <>...

079e3e70 10/14/2013 05:48 pm Michael S. Tsirkin

pcie_host: expose UNMAPPED macro

Make it possible to test unmapped status through QMP.

Reviewed-by: Gerd Hoffmann <>
Tested-by: Gerd Hoffmann <>
Reviewed-by: Igor Mammedov <>
Tested-by: Igor Mammedov <>...

6f6d2823 10/14/2013 05:48 pm Michael S. Tsirkin

pcie_host: expose address format

Callers pass in the address so it's helpful for
them to be able to decode it.

Reviewed-by: Gerd Hoffmann <>
Tested-by: Gerd Hoffmann <>
Reviewed-by: Igor Mammedov <>
Tested-by: Igor Mammedov <>...

77d6f4ea 10/14/2013 05:48 pm Michael S. Tsirkin

pci: fix up w64 size calculation helper

BAR base was calculated incorrectly.
Use existing pci_bar_address to get it right.

Tested-by: Igor Mammedov <>
Reviewed-by: Igor Mammedov <>
Signed-off-by: Michael S. Tsirkin <>

9e64f8a3 10/14/2013 05:11 pm Marcel Apfelbaum

hw: set interrupts using pci irq wrappers

pci_set_irq and the other pci irq wrappers use
PCI_INTERRUPT_PIN config register to compute device
INTx pin to assert/deassert.

An irq is allocated using pci_allocate_irq wrapper
only if is needed by non pci devices....

5a03e708 10/14/2013 05:11 pm Marcel Apfelbaum

hw/pcie: AER and hot-plug events must use device's interrupt

The fields hpev_intx and aer_intx were removed because
both AER and hot-plug events must use device's interrupt.
Assert/deassert interrupts using pci irq wrappers instead.

Signed-off-by: Marcel Apfelbaum <>...

c31d04b5 10/14/2013 05:11 pm Marcel Apfelbaum

hw/pci: removed irq field from PCIDevice

Instead of exposing the the irq field,
pci wrappers to qemu_set_irq or qemu_irq_*
can be used.

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

a53ae8e9 10/14/2013 05:11 pm Marcel Apfelbaum

hw/pci: partially handle pci master abort

A MemoryRegion with negative priority was created and
it spans over all the pci address space.
It "intercepts" the accesses to unassigned pci
address space and will follow the pci spec:
1. returns -1 on read
2. does nothing on write...

d98f08f5 10/14/2013 05:11 pm Marcel Apfelbaum

hw/pci: add pci wrappers for allocating and asserting irqs

Interrupt pin is selected and saved into PCI_INTERRUPT_PIN
register during device initialization. Devices should not call
directly qemu_set_irq and specify the INTx pin on each call.

Added pci_* wrappers to replace qemu_set_irq, qemu_irq_raise,...

9f1a029a 09/15/2013 11:49 am Hervé Poussineau

pci: remove explicit check to 64K ioport size

This check is useless, as bigger addresses will be ignored when
added to 'io' MemoryRegion, which has a size of 64K.

However, some architectures don't use the 'io' MemoryRegion, like
the alpha and versatile platforms. They create a PCI I/O region...

43864069 09/15/2013 11:49 am Michael S. Tsirkin

pci: add helper to retrieve the 64-bit range

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

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