Statistics
| Branch: | Revision:

root / hw / pci.c @ 4e4fa398

History | View | Annotate | Download (59 kB)

# Date Author Comment
40021f08 01/27/2012 06:50 pm Anthony Liguori

pci: convert to QEMU Object Model

Signed-off-by: Anthony Liguori <>

f79f2bfc 01/27/2012 06:50 pm Anthony Liguori

qdev: don't access name through info

We already have a QOM interface for this so let's use it.

Signed-off-by: Anthony Liguori <>

30fbb9fc 01/27/2012 06:50 pm Anthony Liguori

qdev: move qdev->info to class

Right now, DeviceInfo acts as the class for qdev. In order to switch to a
proper ObjectClass derivative, we need to ween all of the callers off of
interacting directly with the info pointer.

Signed-off-by: Anthony Liguori <>

6fc4925b 01/27/2012 06:28 pm Anthony Liguori

pci: call reset unconditionally

Because now all PCI devices are converted to qdev.

Signed-off-by: Anthony Liguori <>

a369da5f 01/22/2012 09:27 am Blue Swirl

vga: improve VGA logic

Improve VGA selection logic, push check for device availabilty to vl.c.
Create the devices at board level unconditionally.

Remove now unused pci_try_create*() functions.

Make PCI VGA devices optional.

Reviewed-by: Jan Kiszka <>...

c5705a77 01/04/2012 01:34 pm Avi Kivity

vmstate, memory: decouple vmstate from memory API

Currently creating a memory region automatically registers it for
live migration. This differs from other state (which is enumerated
in a VMStateDescription structure) and ties the live migration code
into the memory core....

79627472 10/27/2011 04:48 pm Luiz Capitulino

qapi: Convert query-pci

This also fixes a bug with the old version: QMP would invert device id
and vendor id. This would look ok on HMP because it was printing
"device:vendor" instead of "vendor:device".

Signed-off-by: Anthony Liguori <>...

8b881e77 10/17/2011 04:59 pm Avi Kivity

pci: simplify memory region registration

The two code paths (for ADDRESS_SPACE_IO and ADDRESS_SPACE_MEM) are
identical. Unify them.

Signed-off-by: Avi Kivity <>

e11d6439 09/25/2011 02:57 pm Richard Henderson

pci: add pci_address_space_io()

Returns the I/O address space. Useful for implementing
PCI-ISA bridge devices.

Signed-off-by: Richard Henderson <>
Signed-off-by: Avi Kivity <>

7df32ca0 09/19/2011 09:22 pm Michael S. Tsirkin

pci: implement bridge filtering

Support bridge filtering on top of the memory
API as suggested by Avi Kivity:

Create a memory region for the bridge's address space. This region is
not directly added to system_memory or its descendants. Devices under
the bridge see this region as its pci_address_space(). The region is...

ab346bb2 09/19/2011 09:22 pm Jan Kiszka

pci: Remove unused pci_reserve_capability

eepro100 was the last user. Now pci_add_capability is powerful enough.

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

f64e02b6 09/10/2011 05:56 pm Blue Swirl

PCI: delete unused mem_base and pci_to_cpu_addr

Signed-off-by: Blue Swirl <>

c9abe111 08/24/2011 03:52 pm Jan Kiszka

pci: Error on PCI capability collisions

Nothing good can happen when we overlap capabilities. This may happen
when plugging in assigned devices or when devices models contain bugs.
Detect the overlap and report it.

Based on qemu-kvm commit by Alex Williamson....

f5e6fed8 08/22/2011 06:47 pm Avi Kivity

pci: add pci_address_space()

Returns the PCI address space. Useful for bridges that can obscure
part of the PCI address space.

Signed-off-by: Avi Kivity <>
Signed-off-by: Anthony Liguori <>

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

03952339 08/08/2011 06:22 pm Avi Kivity

pci: remove support for pre memory API BARs

Not used anymore.

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

fa6c6065 08/08/2011 06:22 pm Avi Kivity

pci: remove pci_register_bar_simple()

Superceded by pci_register_bar_region().

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

14caaf7f 08/08/2011 06:22 pm Avi Kivity

pci: convert pci rom to memory API

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

cfc0be25 08/08/2011 06:22 pm Avi Kivity

pci: remove pci_register_bar()

Superceded by pci_register_bar_region(). The implementations
are folded together.

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

50181f10 08/08/2011 06:22 pm Avi Kivity

pci: fold BAR mapping function into its caller

There is only one function, so no need for a function pointer.

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

e824b2cc 08/08/2011 06:22 pm Avi Kivity

pci: rename pci_register_bar_region() to pci_register_bar()

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

aee97b84 08/08/2011 06:15 pm Avi Kivity

pci: pass I/O address space to new PCI bus

This lets us register BARs in the I/O address space.

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

5968eca3 08/08/2011 06:15 pm Avi Kivity

pci: allow I/O BARs to be registered with pci_register_bar_region()

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

16a96f28 08/08/2011 06:15 pm Avi Kivity

pci: add API to get a BAR's mapped address

Some (hacky) devices that have a back-channel to read this
address back outside the normal configuration mechanisms, such
as VMware svga.

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

81e34a24 08/05/2011 01:15 am Anthony Liguori

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

1e39101c 07/29/2011 04:25 pm Avi Kivity

pci: pass address space to pci bus when created

This is now done sloppily, via get_system_memory(). Eventually callers
will be converted to stop using that.

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

79ff8cb0 07/29/2011 04:25 pm Avi Kivity

pci: add MemoryRegion based BAR management API

Allow registering a BAR using a MemoryRegion. Once all users are converted,
pci_register_bar() and pci_register_bar_simple() will be removed.

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

42e4126b 07/27/2011 10:57 am Jan Kiszka

pci: Common overflow prevention

Introduce pci_config_read/write_common helpers to prevent passing
accesses down the callback chain that go beyond the config space limits.
Adjust length assertions as they are no longer correct (cutting may
generate valid 3 byte accesses)....

c2afc922 06/15/2011 06:32 pm Isaku Yamahata

pci: don't call qdev pci init method

As pci id initialization is moved to common layer,
some initialization function can be empty.
So don't call init method if NULL.

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

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

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

Conflicts:
hw/virtio-pci.c

113f89df 06/12/2011 10:33 am Isaku Yamahata

pci: move ids of config space into PCIDeviceInfo

vender id/device id... in configuration space are read-only registers
which are commonly defined for all pci devices.
So move those initialization into common place.

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

711c2128 05/12/2011 04:08 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches' into staging

Conflicts:
cpu-all.h

8c12f191 05/08/2011 11:10 am John Baboval

pci: Use of qemu_put_ram_ptr in pci_add_option_rom.

Prevent a deadlock caused by leaving a map cache bucket locked by the
preceding qemu_get_ram_ptr() call.

Signed-off-By: John Baboval <>
Signed-off-by: Anthony PERARD <>...

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

602ef4d9 05/05/2011 04:11 pm Jan Kiszka

pci: Add class 0x403 as 'audio controller'

Used by HD audio controllers like our intel-hda.

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

17cbcb0b 04/07/2011 01:56 pm Avi Kivity

pci: add pci_register_bar_simple() API

This is similar to pci_register_bar(), but automatically registers a single
memory region spanning the entire BAR.

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

9ddf8437 04/01/2011 03:53 pm Isaku Yamahata

pci: add accessor function to get irq levels

Introduce accessor function to know INTx levels.
It will be used later by q35.
Although piix_pci tracks the intx line levels, it can be eliminated
by this helper function.

Cc: Michael S. Tsirkin <>...

5256d8bf 03/28/2011 07:34 pm Isaku Yamahata

pci: use devfn for pci_find_device() instead of (slot, fn) pair

(slot, fn) pair is somewhat confusing because of ARI.
So use devfn for pci_find_device() instead of (slot, fn).

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

6ff534b6 03/28/2011 07:34 pm Isaku Yamahata

pci: use PCI_DEVFN in pci_get_bus_devfn()

Replace hardcoded logic by a common macro.

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

6f3279b5 03/28/2011 07:34 pm Isaku Yamahata

pci: use uint8_t for devfn_min

use uint8_t for devfn_min instead of int.

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

386bbf45 02/20/2011 07:23 pm Stefan Weil

pci: Fix memory leak

Signed-off-by: Stefan Weil <>
Signed-off-by: Aurelien Jarno <>

7cc050b1 02/12/2011 10:27 am Blue Swirl

pci: add creation functions that may fail

Signed-off-by: Blue Swirl <>

4c900518 01/27/2011 06:55 am Isaku Yamahata

pci: typo in pcibus_get_dev_path()

This patch fixes typo in pcibus_get_dev_path().
Without this patch, the result of pcibus_get_dev_path() isn't unique.

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

bb34007e 01/27/2011 06:54 am Michael S. Tsirkin

pci: bridge control fixup

PCI_BRIDGE_CTL_DISCARD_STATUS (bit 10 in bridge control register)
is W1C so we should not make it writeable, otherwise the assert(!(wmask
& w1cmask)) in pci_default_write_config() is hit

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

be7052c2 01/24/2011 03:40 pm Isaku Yamahata

pci: memory leak of PCIDevice::rom_file

PCIDevice::rom_file is leaked.
PCIDevice::rom_file is allocated in pci_qdev_init(), but not freed anywhere.
free it in qemu_unregister_device().

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

e10990c3 01/20/2011 03:44 pm Isaku Yamahata

pci: use qemu_malloc() in pcibus_get_dev_path()

use qemu_malloc() instead of direct use of malloc().

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

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

2991181a 01/19/2011 09:18 pm Michael S. Tsirkin

pci: fix device paths

Patch a6a7005d14b3c32d4864a718fb1cb19c789f58a5 generated
broken device paths. We snprintf with a length shorter
than the output, so the last character is discarded and replaced
by the null byte. Fix it up by snprintf to a buffer
which is larger by 1 byte and then memcpy the data (without...

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

a6a7005d 12/27/2010 11:21 am Michael S. Tsirkin

pci: fix migration path for devices behind bridges

The device path used for migration is currently broken for
for all devices behind a nested bridge.

Replace this by a hierarchical list of slot/function numbers, walking
the path from root down to device. Add :00 after the domain number...

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

af0669f0 12/19/2010 02:06 pm Michael S. Tsirkin

pci: don't use bus number in migration, stub out

Using bus numbers in migration is clearly wrong as
they are guest assigned. Not really sure what the
right thing to do is, for now stick 0 in there so things
keep working for non-nested setups, add a TODO....

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

Merge remote branch 'mst/for_anthony' into staging

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

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

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

929176c3 11/24/2010 05:04 pm Michael S. Tsirkin

pci: fix bus walk under secondary bus reset

Take into account secondary bus reset bit for
bus walk: devices behind a reset bus should not
respond to configuration cycles.

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

ab85ceb1 11/22/2010 10:00 am Stefan Weil

pci: Automatically patch PCI vendor id and device id in PCI ROM

PCI devices with different vendor or device ids sometimes share
the same rom code. Only the ids and the checksum
differs in a boot rom for such devices.

The i825xx ethernet controller family is a typical example...

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

89d437df 11/22/2010 10:00 am Isaku Yamahata

pci: add W1C bits to pci status register

This patch adds W1C bit support in the initialization/reset of pci
status registers.

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

f6bdfcc9 11/22/2010 10:00 am Michael S. Tsirkin

pci: fix bridge control bit wmask

Bits 12 to 15 in bridge control register are reserver and must be
read-only zero, curent mask is 0xffff which makes them writeable. Fix
this up by using symbolic bit names for writeable bits instead of a
hardcoded constant....

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

7f5feab4 11/16/2010 02:53 pm Alex Williamson

PCI: Bus number from the bridge, not the device

pcibus_dev_print() was erroneously retrieving the device bus
number from the secondary bus number offset of the device
instead of the bridge above the device. This ends of landing
in the 2nd byte of the 3rd BAR for devices, which thankfully...

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

Merge branch 'pci' into for_anthony

f9aebe2e 10/27/2010 08:01 pm Michael S. Tsirkin

pci: improve w1c mask handling

- save/restore must not check w1c bits
since they are in fact guest controlled
- clear w1c bits on reset

Note: for express there are different kinds of
reset, some leave part of config space alone.
We will likely need a sticky bit mask to implement this....

99443c21 10/19/2010 02:57 pm Isaku Yamahata

pci: use pci_word_test_and_clear_mask() in pci_device_reset()

use pci_clear_bit_word() in pci_device_reset() where appropriate.

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

1a4f5971 10/18/2010 09:07 am Isaku Yamahata

pci: make pci_del_capability() update for w1cmask

Clear w1cmask when deleting a pci capability.

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

b0cd712c 10/05/2010 09:53 pm Stefan Weil

Fix spelling in comments

multifuction -> multifunction
successfull -> successful.

Signed-off-by: Stefan Weil <>

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

5a9ff381 09/13/2010 10:03 pm Isaku Yamahata

pci: sorting out type confusion in pci_register_bar().

This patch sorts out invalid use of pcibus_t.

In pci_register_bar(), pcibus_t wmask is used. It should,
however, be uint64_t because it is used to set
pci configuration space value(PCIDevice::wmask)...

2bbb9c2f 09/13/2010 10:03 pm Isaku Yamahata

pci: don't ignore invalid parameter for pci_register_bar().

Abort when invalid value for region_num is passed to pci_register_bar.
That is caller's bug. Abort instead of silently ignoring invalid value.

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

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

5beb8ad5 09/07/2010 08:10 pm Isaku Yamahata

pci: call hotplug callback even when not hotplug case for later use.

call hotplug callback even when not hotplug case for later use.
And move hotplug check into hotplug callback.
PCIE slot needs this for card presence detection.

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

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

cfb0a50a 07/19/2010 02:20 pm Isaku Yamahata

pci: move out pci internal structures, PCIBus, PCIBridge, and pci_bus_info.

move out pci internal structures, PCIBus, PCIBridge and pci_bus_info into
private header file, pci_internals.h.
This is a preparation. Later pci bridge implementation will be
split out form pci.c into pci_bridge.c....

a213ff63 07/11/2010 11:31 pm Isaku Yamahata

pci hotplug: make pci hotplug return value to caller

make pci hotplug callback return value to caller.
And when returning error, allocated resources are freed.

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

eb0557db 07/11/2010 11:31 pm Michael S. Tsirkin

pci: fix bridge update

bridge config write should trigger updates
on the secondary bus. never on the primary bus.

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

71ebd6dc 07/11/2010 11:14 pm Isaku Yamahata

pci: fix pci_device_reset

Clear interrupt disable bit on reset, according to PCI spec.
Fix pci_device_reset() with 64bit BAR.

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

6eab3de1 07/11/2010 08:01 pm Isaku Yamahata

pci: set PCI multi-function bit appropriately.

Set PCI multi-function bit according to multifunction property.
PCI address, devfn ,is exported to users as addr property,
so users can populate pci function(PCIDevice in qemu)
at arbitrary devfn.
It means each function(PCIDevice) don't know whether pci device...

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

4f43c1ff 07/06/2010 06:36 pm Alex Williamson

pci: Implement BusInfo.get_dev_path()

This works great for PCI since a <segment>:<bus>:<dev>.<fn> uniquely
describes a global address. No need to traverse up the qdev tree.
PCI segment support is a placeholder for compatibility once we
support multiple segments....

0be71e32 07/06/2010 06:36 pm Alex Williamson

savevm: Add DeviceState param

When available, we'd like to be able to access the DeviceState
when registering a savevm. For buses with a get_dev_path()
function, this will allow us to create more unique savevm
id strings.

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

1724f049 07/06/2010 06:36 pm Alex Williamson

qemu_ram_alloc: Add DeviceState and name parameters

These will be used to generate unique id strings for ramblocks. The name
field is required, the device pointer is optional as most callers don't
have a device. When there's no device or the device isn't a child of...

230741dc 07/06/2010 06:36 pm Alex Williamson

pci: Free the space allocated for the option rom on removal

Signed-off-by: Alex Williamson <>
Signed-off-by: Anthony Liguori <>

3709c1b7 06/14/2010 11:46 pm Daniel P. Berrange

Clarify error message when a PCI slot is already in use (v2)

When mistakenly configuring two devices in the same PCI slot,
QEMU gives a not entirely obvious message about a 'devfn' being
in use:

$ qemu -device rtl8139 -device virtio-balloon-pci,bus=pci.0,addr=0x3...

1bb65042 06/14/2010 11:46 pm Markus Armbruster

qdev: Revert the hack to let -net nic and pci_add set qdev ID

Setting the ID in pci_nic_init() is a blatant violation of the
DeviceState abstraction. Which even carries a comment advising
against this:

/* This structure should not be accessed directly. We declare it here...

637503d1 06/01/2010 09:48 pm Luiz Capitulino

Monitor: Drop QMP documentation from code

Previous commit added QMP documentation to the qemu-monitor.hx
file, it's is a copy of this information.

While it's good to keep it near code, maintaining two copies of
the same information is too hard and has little benefit as we...

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

5e434f4e 05/31/2010 04:33 pm Isaku Yamahata

pci: clean up of pci_set_default_subsystem_id().

Use pci accessor function.
don't return value because it always return 0 and
the caller doesn't check the return value.

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

f7ce7287 05/17/2010 08:41 pm Anthony Liguori

Merge remote branch 'mst/for_anthony' into staging

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