Statistics
| Branch: | Revision:

root / hw / pci.h @ 0b8b716d

History | View | Annotate | Download (13.6 kB)

# Date Author Comment
7cc050b1 02/12/2011 10:27 am Blue Swirl

pci: add creation functions that may fail

Signed-off-by: Blue Swirl <>

4c92325b 01/20/2011 03:33 pm Isaku Yamahata

pci: deassert intx on reset.

deassert intx on device reset.
So far pci_device_reset() is used for system reset.
In that case, interrupt controller is reset at the same time so that
all irq is are deasserted.
But now pci bus reset/flr is supported, and in that case irq needs to be...

180c22e1 01/10/2011 01:29 pm Gerd Hoffmann

pci: allow devices being tagged as not hotpluggable.

This patch adds a field to PCIDeviceInfo to tag devices as being
not hotpluggable. Any attempt to plug-in or -out such a device
will throw an error.

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

f3006dd1 12/24/2010 10:35 am Isaku Yamahata

pci: introduce a helper function to convert qdev id to PCIDevice

This patch introduce a helper function to get PCIDevice from qdev id.
This function will be used later.

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

0ead87c8 12/22/2010 09:01 am Isaku Yamahata

pcie: add flr support

Support flr: trigger device reset on flr config write.

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

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

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

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

9bb33586 11/22/2010 10:00 am Isaku Yamahata

pci: use qdev reset framework for pci bus reset

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

e927d487 11/16/2010 02:55 pm Michael S. Tsirkin

pci: allow hotplug removal of cold-plugged devices

This patch fixes hot unplug of cold plugged devices
(those present at system start), which got broken by
5beb8ad503c88a76f2b8106c3b74b4ce485a60e1 .

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

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

Merge branch 'pci' into for_anthony

0428527c 10/19/2010 03:09 pm Isaku Yamahata

pcie: helper functions for pcie capability and extended capability

This patch implements helper functions for pci express capability
and pci express extended capability allocation.
NOTE: presence detection depends on pci_qdev_init() change.

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

e4c7d2ae 10/19/2010 03:09 pm Isaku Yamahata

msi: implements msi

implements msi related functions.

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

a5d1fd20 10/19/2010 02:57 pm Isaku Yamahata

pci: introduce helper function to handle msi-x and msi.

this patch implements helper functions to handle msi-x and msi
uniformly.
They will be used later.

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

aabcf526 10/19/2010 02:57 pm Isaku Yamahata

pci: introduce helper functions to test-and-{clear, set} mask in configuration space

This patch introduces helper functions to test-and-{clear, set} mask in configuration
space. pci_{byte, word, long, quad}_test_and_{clear, set}_mask().
They will be used later....

92ba5f51 09/20/2010 09:10 pm Isaku Yamahata

pci: implement RW1C register framework.

Implement RW1C register framework.
With this patch, it would be easy to implement
W1C register by just setting w1cmask.
Later RW1C register will be used by pcie.

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

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

0bb750ef 09/13/2010 10:03 pm Isaku Yamahata

pci: improve signature of pci_register_bar().

Make type uint8_t from int because PCIIORegion::type is uint8_t.

Signed-off-by: Isaku Yamahata <>

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

43c945f1 09/07/2010 08:10 pm Isaku Yamahata

pci: make pci_parse_devfn() aware of func.

make pci_parse_devfn() aware of func. With func = NULL it behave as before.
This will be used later.

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

783753fd 07/22/2010 12:21 pm Isaku Yamahata

pci/bridge: split out pci bridge code into pci_bridge.c from pci.c

Move pci bridge related code into pci_bridge.c from pci.c
for further enhancement. pci.c is big enough now, so split it out.
No code change but exporting some accesser functions.

In fact, few pci bridge functions stays in pci.c....

7c7b829e 07/11/2010 08:01 pm Isaku Yamahata

pci_bridge: make pci bridge aware of pci multi function bit.

make pci bridge aware of pci multi function property and let pci generic
code to set the bit.

Cc: Blue Swirl <>
Signed-off-by: Isaku Yamahata <>
Signed-off-by: Blue Swirl <>

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

pci: introduce multifunction property.

introduce multifunction property.
Also introduce new convenient device creation function which
will be used later.

For bisectability this patch doesn't do anything, but sets the property
resulting in no functional changes....

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

pci: remove PCIDeviceInfo::header_type

replace PCIDeviceInfo::header_type with is_bridge
as suggested by Michael S. Tsirkin <>

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Blue Swirl <>

6fa84913 07/11/2010 08:00 pm Isaku Yamahata

pci: insert assert that auto-assigned-address function is single function device.

Auto-assigned-address pci function (passing devfn = -1) is always
single function.
This patch adds assert() to guarantee that auto-assigned-address function
is always single function device at function = 0....

e075e788 05/31/2010 04:39 pm Isaku Yamahata

pci-hotplug: make them aware of pci domain.

add helper function which converts root bus to pci domain.
make them aware of pci domain.

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

3c18685f 05/31/2010 04:33 pm Isaku Yamahata

pci: add const to pci_is_express(), pci_config_size().

add const to pci_is_express(), pci_config_size().

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

0c6fcb62 05/31/2010 04:33 pm Isaku Yamahata

pci.h: remove unused constants.

So remove unused constants,
PCI_STATUS_RESERVED_MASK_LO, PCI_STATUS_RESERVED_MASK_HI,
PCI_COMMAND_RESERVED, PCI_COMMAND_RESERVED_MASK_HI.
They were used once, but they aren't used anymore.

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

87c30546 05/15/2010 07:26 pm Isaku Yamahata

pci hotplug: add argument to pci hot plug callback.

Add argument, DeviceState*, to pci hot plug callback.
The argument will be used later to remove global variable.

Signed-off-by: Isaku Yamahata <>
Acked-by: Gerd Hoffmann <>...

1db5a3aa 04/11/2010 07:37 pm Michael S. Tsirkin

pci: add API to add capability at a known offset

Unlike virtio, device emulations need to add pci capabilities
at known offsets to match real hardware. Make this possible
by adding an appropriate API.

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

cf602c7b 03/08/2010 07:30 pm Izik Eidus

adding helper pci functions

Signed-off-by: Izik Eidus <>
Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

186993ee 02/14/2010 04:10 pm Michael S. Tsirkin

pci: move pcibus_t to qemu-common

move pcibus_t to qemu-common.h to simplify header dependencies.

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

163c8a59 01/26/2010 11:42 pm Luiz Capitulino

PCI: Convert pci_info() to QObject

The returned QObject is a QList of all buses. Each bus is
represented by a QDict, which has a key with a QList of all
PCI devices attached to it. Each device is represented by
a QDict.

As has happended to other complex conversions, it's hard to...

cb95c2e4 01/13/2010 02:50 pm Stefan Weil

pci: Add missing 'const' in argument to pci_get_xxx

pci_get_byte, pci_get_word, pci_get_long and pci_get_quad
all take a const uint8_t pointer, because they only read
the configuration data.

Their prototypes should reflect this fact.

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

88169ddf 01/11/2010 09:41 pm Gerd Hoffmann

pci: allow loading roms via fw_cfg.

This patch adds a pci bus property 'rombar' which specifies whenever
the pci rom should be loaded via pci rom bar (default) or via fw_cfg.
The later can be used for compatibility with older qemu versions where
no pci rom bar is present....

ea3fdd5d 01/06/2010 03:16 pm Anthony Liguori

Merge remote branch 'mst/for_anthony' into staging

2e01c8cf 12/25/2009 06:50 pm Blue Swirl

PCI: make pci_mem_base private

Make pci_mem_base private to PCIBus. Add a function to set it.

Signed-off-by: Blue Swirl <>

97526229 12/23/2009 04:35 pm Michael S. Tsirkin

pcnet: switch to symbolic names for pci registers

No functional changes. I verified that the generated binary
does not change.

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Juan Quintela <>
Acked-by: Glauber Costa <>

d577679e 12/23/2009 04:35 pm Michael S. Tsirkin

pci: add more status bits

will be used by eepro100.

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Juan Quintela <>
Acked-by: Glauber Costa <>

5d89715b 12/23/2009 04:35 pm Michael S. Tsirkin

pci: add another devsel macro

will be used by ensoniq emulation

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Juan Quintela <>
Acked-by: Glauber Costa <>

b81ebc69 12/23/2009 04:35 pm Michael S. Tsirkin

pci: remove unused macro

PCI_STATUS_DEVSEL is unused, and it also
has a different name in pci_regs.h
Remove.

Signed-off-by: Michael S. Tsirkin <>
Acked-by: Juan Quintela <>
Acked-by: Glauber Costa <>

3d09c490 12/23/2009 04:35 pm Isaku Yamahata

pci: s/PCI_SUBVENDOR_ID/PCI_SUBSYSTEM_VENDOR_ID/g

To match Linux PCI register definition,
rename PCI_SUBVENDOR_ID to PCI_SUBSYSTEM_VENDOR_ID.

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

fb58a897 12/23/2009 04:35 pm Isaku Yamahata

pci: use pci_regs.h

include pci_regs.h and remove duplicated defines.
And remove unused PCI_REVISION and PCI_SUBDEVICE_ID.

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

a7b15a5c 12/23/2009 04:33 pm Michael S. Tsirkin

Revert "Revert "pci: interrupt disable bit support""

This reverts commit d587e0787153f0224a6140c5015609963ceaabfb.

c2039bd0 12/18/2009 07:26 pm Anthony Liguori

Support PCI based option rom loading

Currently, we preload option roms into the option rom space in memory. This
prevents DDIM from functioning correctly which severely limits the number
of roms we can support.

This patch introduces a pci_add_option_rom() which registers the...

8c52c8f3 12/18/2009 07:26 pm Gerd Hoffmann

pci romfiles: add property, add default to PCIDeviceInfo

This patch adds a romfile property to the pci bus. It allows to specify
a romfile to load into the rom bar of the pci device. The default value
comes from a new field in PCIDeviceInfo. The property allows to change...

d587e078 12/18/2009 07:26 pm Anthony Liguori

Revert "pci: interrupt disable bit support"

This reverts commit 0ea5709a32085f7d14901a09d12bd35f9b267607.

Per discussion with Michael Tsirkin, this is too risky for 0.12

Signed-off-by: Anthony Liguori <>

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

pci: prepare irq code for interrupt state

This rearranges code in preparation for interrupt state
implementation.
Changes:
- split up bus walk away from interrupt handling
into a subroutine
- change irq_state from an array to bitmask
- verify that irq_state values are 0 or 1 on load...

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

pci: interrupt status bit implementation

interrupt status is a mandatory feature in PCI spec,
so devices must implement it to be spec compliant.

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

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

pci: interrupt disable bit support

Interrupt disable bit is mandatory in PCI spec.
Implement it to make devices spec compliant.

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

d6318738 12/02/2009 04:57 pm Michael S. Tsirkin

pci: move apb specific stuff to apb_pci.c

pci code had a TODO to move apb specific
pci bridge initialization to apb_pci.
Implement this and remove the TODO.

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

d46636b8 12/01/2009 05:52 pm Isaku Yamahata

pci: pci bridge related clean up.

- fix bridge prefetchable memory accesser to check 64bit or not.
- use pcibus_t consistently instead mixing pcibus_t and uint64_t.

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

2c56b44b 12/01/2009 05:52 pm Isaku Yamahata

pci: remove unused constants

This patch removes unused constants committed by
fb23162885f7fd8cf7334bed22c25ac32c7d8b9d.

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

3c217c14 12/01/2009 05:52 pm Isaku Yamahata

pci: remove some unnecessary comment in pci.h

This patch removes some comment which should go into commit log
in pci.h.

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

c469e1dd 12/01/2009 05:51 pm Isaku Yamahata

pci: s/pci_find_host_bus/pci_find_root_bus/g

This patch renames pci_find_host_bus() to pci_find_root_bus()
as suggested by "Michael S. Tsirkin" <>.

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

b6243d99 12/01/2009 05:51 pm Isaku Yamahata

pci: move pci_data_{read, write}() declaration from pci.h to pci_host.h

Now pci host stuff has been moved from pci.[hc] to pci_host.[hc]
so the declaration of pci_data_{read, write}() should be in
pci_host.h
This patch moves them from pci.h to pci_host.h for consistency....

18e08a55 12/01/2009 05:51 pm Michael S. Tsirkin

pci: pci.h cleanup: move out stuff not in pci.c

pci.h declares some functions which aren't
defined in pci.h. Clean up moving things
to appropriate headers, and update all users.

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

fb231628 11/09/2009 04:43 pm Isaku Yamahata

pci: initialize pci config headers depending it pci header type.

- Only sets default subsystem id for header type 00.(normal header type)
because header type 01 doesn't have subsystem id, and uses the register
for other purpose. So setting default subsystem id doesn't make sense....

a0c7a97e 11/09/2009 04:43 pm Isaku Yamahata

pci: implement pci bridge filtering.

This patch implements pci bridge filtering.

TODO: currently almost all the map funcions assumes
filtered_size size and addr & ~(size - 1) addr.
However with bridge filtering, they aren't always true.
Teach them such cases, such that filtered_size < size and...

14421258 11/09/2009 04:43 pm Isaku Yamahata

pci: 64bit bar support.

implemented pci 64bit bar support.
The tricky bit is pci_update_mapping().
An OS is allowed to set the BAR such that OS can't address the area
pointed by BAR. It doesn't make sense, though.
In that case, don't map the BAR.

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

e822a52a 11/09/2009 04:43 pm Isaku Yamahata

pci: make pci configuration transaction more accurate.

This patch sorts out/enhances pci code to track pci bus topology
more accurately.
- Track host bus bridge with pci domain number. Although the
current qemu implementation supports only pci domian 0 yet....

ce195fb5 11/09/2009 04:43 pm Isaku Yamahata

pci_host: change the signature of pci_data_{read, write}.

change the first argument, void opaque to PCIBus *s
of the pci_data_{read, write}.
They aren't used as direct callback so the argument type
don't have to be void
. So change it to the right type....

a9f49946 11/09/2009 04:43 pm Isaku Yamahata

pci: pcie host and mmcfg support.

This patch adds common routines for pcie host bridge and pcie mmcfg.
This will be used by q35 based chipset emulation.

Signed-off-by: Isaku Yamahata <>
Signed-off-by: Anthony Liguori <>

f49db805 11/09/2009 04:43 pm Isaku Yamahata

pci: add helper functions to check ranges overlap.

add helper function to check ranges overlap suggested by
Michael S. Tsirkin <>.
His original suggestion was to use [first, last], however I chosen
to use offset, length pair, i.e. [offset, offset + length)...

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

89e8b13c 11/09/2009 04:43 pm Isaku Yamahata

pci: introduce FMT_PCIBUS for printf format for pcibus_t.

This patch is preliminary for 64bit BAR.
Later pcibus_t will be changed from uint32_t to uint64_t.
Introduce FMT_PCIBUS for printf format for pcibus_t.

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

4f8589e1 11/09/2009 04:43 pm Isaku Yamahata

pci: typedef pcibus_t as uint64_t instead of uint32_t.

This patch is preliminary for 64bit bar.
For 64bit bar support, change pcibus_t which represents
pci bus addr/size from uint32_t to uint64_t.
And also change FMT_pcibus for printf.

In pci_update_mapping() checks 32bit overflow....

0392a017 11/09/2009 04:43 pm Isaku Yamahata

pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h

make constants for pci base address match pci_regs.h by
renaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.

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

b3b11697 11/09/2009 04:43 pm Isaku Yamahata

pci: make pci_bar() aware of header type 1.

make pci_bar() aware of header type 1. When PCI_ROM_SLOT
it should return PCI_ROM_ADDRESS1 (!= PCI_ROM_ADDRESS)

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

e369cad7 11/09/2009 04:43 pm Isaku Yamahata

pci: introduce constant PCI_NUM_PINS for the number of interrupt pins, 4.

introduce constant PCI_NUM_PINS for the number of interrupt pins, 4.
and use it.

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

182f9c8a 11/09/2009 04:43 pm Isaku Yamahata

pci: define a constant to represent a unmapped bar and use it.

define a constant to represent a unmapped bar instead of -1 and use it.

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

fb5ce7d2 11/09/2009 04:43 pm Isaku Yamahata

pci: helper functions to access PCIDevice::config

add helper functions to get/set PCIDevice::config
Those will be used later.

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

e52eb611 10/06/2009 10:36 pm Anthony Liguori

Revert "Fix exit on 'pci_add' Monitor command"

This reverts commit 0148fde54c2478ea8a47c8dbfe4c0fb8bda4d996.

As requested by Luiz.

Signed-off-by: Anthony Liguori <>

49bd1458 10/05/2009 05:32 pm Markus Armbruster

Fix pci_add storage not to exit on bad first argument

Monitor command "pci_add ADDR storage ..." does its work in
qemu_pci_hot_add_nic(). It called pci_create(..., ADDR) to create the
device. That's wrong, because pci_create() terminates the program
when ADDR is invalid....

07caea31 10/05/2009 05:32 pm Markus Armbruster

Fix pci_add nic not to exit on bad model

Monitor command "pci_add ADDR nic model=MODEL" uses pci_nic_init() to
create the NIC. When MODEL is unknown or "?", this prints to stderr
and terminates the program.

Change pci_nic_init() not to treat "?" specially, and to return NULL...

3312958d 10/05/2009 05:32 pm Markus Armbruster

pci_create() is now unused, remove it

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

499cf102 10/05/2009 05:32 pm Markus Armbruster

Rename pci_create_noinit() to pci_create()

It's qdev_create() specialized for PCI, so name it accordingly.

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

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

5330de09 10/05/2009 05:32 pm Michael S. Tsirkin

qemu/pci: refactor code/symbolic constants

refactor code slightly, adding symbolic constants and functions, and
using macros where possible. This will also make following reset
patches easier.

No functional changes.

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

ee995ffb 10/05/2009 05:32 pm Gerd Hoffmann

pci: hotplug windup

Create qdev infrastructure for pci hotplug. PCI bus implementations
must register a handler for hotplug. Creating a new PCI device will
automagically hot-plug it in case the PCI bus in question supports this.

Signed-off-by: Gerd Hoffmann <>...

a36a344d 10/05/2009 05:32 pm Gerd Hoffmann

pci: use qdev for device destruction.

pci_unregister_device is static now and hooked into Devicestate->exit.
qdev_free(pci_device) works now.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

e3936fa5 10/05/2009 05:32 pm Gerd Hoffmann

pci: move unregister from PCIDevice to PCIDeviceInfo

One more cleanup while being at it ;)

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

21eea4b3 10/05/2009 05:32 pm Gerd Hoffmann

support inplace allocation for pci bus, split irq init.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>

0148fde5 10/05/2009 05:32 pm Luiz Capitulino

Fix exit on 'pci_add' Monitor command

If the user issues one of the following commands to the Monitor:

pci_add pci_addr=auto nic model=None
pci_add pci_addr=auto nic model=?

QEMU will exit, because the function used to perform sanity
checks (qemu_check_nic_model_list()) exits on error....

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

71077c1c 09/15/2009 10:23 pm Gerd Hoffmann

qdev/pci: add pci_create_noinit()

Like pci_create_simple() but doesn't call qdev_init(), so one can
set properties before initializing the device.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Blue Swirl <>

d6fd1e66 09/09/2009 10:57 pm Stefan Weil

eepro100: Clean code which sets the PCI device id

  • Use function pci_config_set_device_id
  • Use new macro PCI_DEVICE_ID_INTEL_82557

Signed-off-by: Stefan Weil <>
Signed-off-by: Anthony Liguori <>

d52affa7 09/09/2009 10:57 pm Gerd Hoffmann

qdev/scsi: add scsi bus support to qdev, convert drivers.

  • Add SCSIBus. * Add SCSIDeviceInfo, move device callbacks here. * add qdev/scsi helper functions. * convert drivers.

Adding scsi disks via -device works now, i.e. you can do:

-drive id=sda,if=none,......
5b19d9a2 09/09/2009 10:55 pm Gerd Hoffmann

qdev/usb: convert ohci.

Drop num_ports argument for usb_ohci_init_pci(), everybody
calls it with num_ports == 3, so it is pointless.

Convert ohci pci device into qdev.
TODO: convert non-pci ohci adapters.

You can add a OHCI USB Controller to your virtual pc now using...

5d4e84c8 09/04/2009 05:37 pm Juan Quintela

We want the argument pass to set_irq to be opaque

piix_pci want to pass more things that the pic

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

81a322d4 08/28/2009 04:43 am Gerd Hoffmann

qdev: add return value to init() callbacks.

Sorry folks, but it has to be. One more of these invasive qdev patches.

We have a serious design bug in the qdev interface: device init
callbacks can't signal failure because the init() callback has no
return value. This patch fixes it....

f16c4abf 08/28/2009 04:30 am Juan Quintela

Add version_id to PCIDevice.

It is needed for VMState

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

54586bd1 08/10/2009 09:05 pm Gerd Hoffmann

qdev/prop: convert pci.c to helper macros.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Anthony Liguori <>
Message-Id:

0aab0d3a 07/09/2009 03:07 pm Gerd Hoffmann

qdev: update pci device registration.

Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunch
of parameters. Also adds config_read and config_write callbacks to
PCIDeviceInfo, so drivers needing these can be converted to the qdev
device API too....

e9283f8b 06/29/2009 10:18 pm Jan Kiszka

monitor: Drop pci_addr prefix from hotplug commands

The "pci_addr=" prefix currently required by pci_add/remove and
drive_add has no practical use. Drop it, but still silently accept it
for backward compatibility.

Signed-off-by: Jan Kiszka <>...

64d50b8b 06/24/2009 05:09 pm Michael S. Tsirkin

qemu/pci: add pci_get/set_byte

Add pci_get/set_byte to keep *_word and *_long access functions company.
They are unused for now.

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

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

qemu/pci: check constant registers on load

Add "cmask" table of constant register masks: if a bit is not writeable
and is set in cmask table, this bit is checked on load. An attempt to
load an image that would change such a register causes load to fail....

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