Statistics
| Branch: | Revision:

root / hw / sysbus.c @ 1fd6bb44

History | View | Annotate | Download (7.8 kB)

# Date Author Comment
4ce5dae8 04/01/2013 05:08 pm Peter Maydell

sysbus: make SysBusDeviceClass::init optional

Make the SysBusDeviceClass::init optional, for devices which
genuinely don't need to do anything here. In particular, simple
devices which can do all their initialization in their
instance_init method don't need either a DeviceClass::realize...

e63d28d7 04/01/2013 05:08 pm Peter Maydell

sysbus: Remove sysbus_add_memory and sysbus_del_memory

Remove the sysbus_add_memory and sysbus_del_memory functions. These
are trivial wrappers for mapping a memory region into the system
memory space, and have no users now. Sysbus devices should never map...

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/...
83c9f4ca 03/01/2013 04:01 pm Paolo Bonzini

hw: include hw header files with full paths

Done with this script:

cd hw
for i in `find . -name '*.h' | sed 's/^..//'`; do
echo '\,^#.*include.*["<]'$i'[">], s,'$i',hw/&,'
done | sed -i -f - `find . -type f`

This is so that paths remain valid as files are moved....

7feb640c 02/27/2013 05:23 pm Alexey Korolev

Fix guest OS hang when 64bit PCI bar present

This patch addresses the issue fully described here:
http://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg01804.html

Linux kernels prior to 2.6.36 do not disable the PCI device during
enumeration process. Since lower and higher parts of a 64bit BAR...

1356b98d 01/21/2013 09:52 pm Andreas Färber

sysbus: Drop sysbus_from_qdev() cast macro

Replace by SYS_BUS_DEVICE() QOM cast macro using a scripted conversion.
Avoids the old macro creeping into new code.

Resolve a Coding Style warning in openpic code.

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

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

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

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

64b625f4 11/26/2012 09:41 pm Paolo Bonzini

qdev: simplify (de)allocation of buses

All conditional deallocation can now be done with object_delete.
Remove the @qom_allocated and @glib_allocated fields; replace the latter
with a direct assignment of the @free function pointer.

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

a8170e5e 10/23/2012 04:58 pm Avi Kivity

Rename target_phys_addr_t to hwaddr

target_phys_addr_t is unwieldly, violates the C standard (_t suffixes are
reserved) and its purpose doesn't match the name (most target_phys_addr_t
addresses are not target specific). Replace it with a finger-friendly,...

a5cf8262 10/05/2012 03:58 pm Jim Meyering

scsi, pci, qdev, isa-bus, sysbus: don't let *_get_fw_dev_path return NULL

Use g_strdup rather than strdup, because the sole caller
(qdev_get_fw_dev_path_helper) assumes it gets non-NULL, and dereferences
it. Besides, in that caller, the allocated buffer is already freed with...

8185d216 06/18/2012 04:14 pm Paolo Bonzini

qdev: Move SysBus initialization to sysbus.c

TYPE_SYSTEM_BUS will be local to hw/sysbus.c, so move existing references
to main_system_bus and system_bus_info there.

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

0d936928 06/18/2012 04:14 pm Anthony Liguori

qdev: Convert busses to QEMU Object Model

This is far less interesting than it sounds. We simply add an Object to each
BusState and then register the types appropriately. Most of the interesting
refactoring will follow in the next patches.

Since we're changing fundamental type names (BusInfo -> BusClass), it all needs...

f968fc68 06/18/2012 04:14 pm Anthony Liguori

qdev: Connect busses with their parent devices

This makes SysBus part of the root hierarchy and all busses children of
their respective parent DeviceState.

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

83f7d43a 02/15/2012 05:39 pm Andreas Färber

qom: Unify type registration

Replace device_init() with generalized type_init().

While at it, unify naming convention: type_init([$prefix_]register_types)
Also, type_init() is a function, so add preceding blank line where
necessary and don't put a semicolon after the closing brace....

39bffca2 02/03/2012 06:41 pm Anthony Liguori

qdev: register all types natively through QEMU Object Model

This was done in a mostly automated fashion. I did it in three steps and then
rebased it into a single step which avoids repeatedly touching every file in
the tree.

The first step was a sed-based addition of the parent type to the subclass...

d307af79 02/03/2012 06:41 pm Anthony Liguori

qdev: kill off DeviceInfo

It is no longer used in the tree since everything is done natively through
QEMU Object Model.

Signed-off-by: Anthony Liguori <>

999e12bb 01/27/2012 06:50 pm Anthony Liguori

sysbus: apic: ioapic: convert to QEMU Object Model

This converts three devices because apic and ioapic are subclasses of sysbus.
Converting subclasses independently of their base class is prohibitively hard.

Signed-off-by: Anthony Liguori <>

f3c6a169 01/03/2012 10:39 pm Anthony Liguori

Merge remote-tracking branch 'qemu-kvm/memory/page_desc' into staging

  • qemu-kvm/memory/page_desc: (22 commits)
    Remove cpu_get_physical_page_desc()
    sparc: avoid cpu_get_physical_page_desc()
    virtio-balloon: avoid cpu_get_physical_page_desc()
    vhost: avoid cpu_get_physical_page_desc()...
e114fead 12/20/2011 11:44 pm Peter Maydell

hw/sysbus.c: Remove unnecessary conditionals

Now that all sysbus MMIO regions are MemoryRegions, mmio[n].memory
is never NULL, and we can remove some unnecessary conditionals.

Signed-off-by: Peter Maydell <>
Signed-off-by: Anthony Liguori <>

62ec4832 12/20/2011 02:14 pm Avi Kivity

sysbus: add sysbus_address_space()

Given a bus device, retrieves the memory address space for its bus.

Signed-off-by: Avi Kivity <>

ab0115e1 12/19/2011 09:36 pm Benoît Canet

sysbus: remove sysbus_init_mmio_cb2

This function is not longer in use so remove it.

Signed-off-by: Benoît Canet <>
Signed-off-by: Anthony Liguori <>

750ecd44 11/28/2011 03:38 pm Avi Kivity

sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()

Signed-off-by: Avi Kivity <>

3f7f1c80 11/28/2011 03:38 pm Avi Kivity

sysbus: remove sysbus_init_mmio()

No longer used - replaced by sysbus_init_mmio_region().

Signed-off-by: Avi Kivity <>

d0bc5bc3 11/01/2011 08:23 am Markus Armbruster

sysbus: Supply missing va_end()

C99 7.15.1: Each invocation of the va_start and va_copy macros shall
be matched by a corresponding invocation of the va_end macro in the
same function.

Spotted by Coverity. Harmless on the (common) systems where va_end()...

2b985d9c 09/04/2011 05:46 pm Avi Kivity

sysbus: add helpers to add and delete memory regions to the system bus

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

d40b2af8 09/04/2011 05:46 pm Avi Kivity

sysbus: add sysbus_add_memory_overlap()

Signed-off-by: Avi Kivity <>

46c305ef 08/28/2011 07:22 pm Peter Maydell

hw/sysbus: Add sysbus_mmio_get_region()

Add a sysbus_mmio_get_region() which allows users of sysbus
devices to turn a (SysBusDevice*, mmioidx) tuple into a
MemoryRegion*. This enables some useful simplifications of
devices which pass through another device's mmio region...

01e0451a 08/25/2011 10:39 pm Anthony Liguori

Revert "Merge remote-tracking branch 'qemu-kvm/memory/batch' into staging"

This reverts commit 8ef9ea85a2cc1007eaefa53e6871f1f83bcef22d, reversing
changes made to 444dc48298c480e42e15a8fe676be737d8a6b2a1.

From Avi:

Please revert the entire pull (git revert 8ef9ea85a2cc1) while I work this...
28e77964 08/25/2011 10:56 am Avi Kivity

sysbus: add sysbus_add_memory_overlap()

Signed-off-by: Avi Kivity <>

be35694d 08/24/2011 08:17 pm Avi Kivity

sysbus: add helpers to add and delete memory regions to the system bus

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

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

sysbus: remove sysbus_init_mmio_cb()

This problem with this function is that it is not reversible - it is
impossible to know where things are registered and unregister them
exactly. As there are no more users, we can remove it.

Signed-off-by: Avi Kivity <>...

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

sysbus: add a variant of sysbus_init_mmio_cb with an unmap callback

sysbus_init_mmio_cb() uses the destructive IO_MEM_UNASSIGNED to remove a
region. Provide an alternative that calls an unmap callback, so the removal
may be done non-destructively.

Signed-off-by: Avi Kivity <>...

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

ec3bb837 07/29/2011 04:25 pm Avi Kivity

sysbus: add MemoryRegion based memory management API

Allow registering sysbus device memory using a MemoryRegion. Once all users
are converted, sysbus_init_mmio() and sysbus_init_mmio_cb() will be removed.

Reviewed-by: Anthony Liguori <>...

a08784dd 04/15/2011 09:25 pm Blue Swirl

Remove unused sysemu.h include directives

Remove unused sysemu.h include directives to speed up build
with the following patches.

Signed-off-by: Blue Swirl <>

4912371f 02/12/2011 11:45 am Blue Swirl

sysbus: add creation function that may fail

Signed-off-by: Blue Swirl <>

0fba9fd6 02/11/2011 02:13 am Dmitry Eremin-Solenikov

sysbus: print number of irqs in dev_print

Signed-off-by: Dmitry Eremin-Solenikov <>
Signed-off-by: Andrzej Zaborowski <>

c646f74f 12/11/2010 11:32 pm Gleb Natapov

Add get_fw_dev_path callback for system bus.

Prints out mmio or pio used to access child device.

Signed-off-by: Gleb Natapov <>
Signed-off-by: Blue Swirl <>

3f7132d1 10/02/2010 05:27 pm Blue Swirl

sysbus: fix address truncation

Fix address truncation in sysbus by using a wider type.

Reported-by: Artyom Tarasenko <>
Tested-by: Andreas Färber <>
Signed-off-by: Blue Swirl <>

e23a1b33 10/07/2009 04:54 pm Markus Armbruster

New qdev_init_nofail()

Like qdev_init(), but terminate program via hw_error() instead of
returning an error value.

Use it instead of qdev_init() where terminating the program on failure
is okay, either because it's during machine construction, or because...

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

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

660f11be 08/01/2009 12:16 am Blue Swirl

Fix Sparse warnings: "Using plain integer as NULL pointer"

Signed-off-by: Blue Swirl <>

8167ee88 07/16/2009 11:47 pm Blue Swirl

Update to a hopefully more future proof FSF address

Signed-off-by: Blue Swirl <>

10c4c98a 07/09/2009 03:07 pm Gerd Hoffmann

qdev: replace bus_type enum with bus_info struct.

BusInfo is filled with name and size (pretty much like I did for
DeviceInfo as well). There is also a function pointer to print
bus-specific device information to the monitor. sysbus is hooked
up there, I've also added a print function for PCI....

074f2fff 06/11/2009 03:47 pm Gerd Hoffmann

qdev: move name+size into DeviceInfo (v2)

Rationale: move device information from code to data structures.

v2: Adapt the drivers missed in the first version.

Signed-off-by: Gerd Hoffmann <>

cae4956e 06/05/2009 05:53 pm Gerd Hoffmann

qdev: add monitor command to dump the tree.

Signed-off-by: Gerd Hoffmann <>
Signed-off-by: Paul Brook <>

1431b6a1 06/05/2009 05:52 pm Paul Brook

Record device property types

Record device property types, and provide a list of properties at device
registration time.

Add a "device" property type that holds a reference to annother device.

Signed-off-by: Paul Brook <>

02e2da45 05/23/2009 02:13 am Paul Brook

Add common BusState

Implement and use a common device bus state. The main side-effect is
that creating a bus and attaching it to a parent device are no longer
separate operations. For legacy code we allow a NULL parent, but that
should go away eventually....

aae9460e 05/15/2009 12:35 am Paul Brook

Basic qdev infrastructure.

Signed-off-by: Paul Brook <>