#
837d3716 |
| 28-Nov-2013 |
Markus Armbruster <armbru@redhat.com> |
sysbus: Set cannot_instantiate_with_device_add_yet
device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made sepa
sysbus: Set cannot_instantiate_with_device_add_yet
device_add plugs devices into suitable bus. For "real" buses, that actually connects the device. For sysbus, the connections need to be made separately, and device_add can't do that. The device would be left unconnected, and could not possibly work.
Quite a few, but not all sysbus devices already set cannot_instantiate_with_device_add_yet in their class init function.
Set it in their abstract base's class init function sysbus_device_class_init(), and remove the now redundant assignments from device class init functions.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
#
efec3dd6 |
| 28-Nov-2013 |
Markus Armbruster <armbru@redhat.com> |
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world
qdev: Replace no_user by cannot_instantiate_with_device_add_yet
In an ideal world, machines can be built by wiring devices together with configuration, not code. Unfortunately, that's not the world we live in right now. We still have quite a few devices that need to be wired up by code. If you try to device_add such a device, it'll fail in sometimes mysterious ways. If you're lucky, you get an unmysterious immediate crash.
To protect users from such badness, DeviceClass member no_user used to make device models unavailable with -device / device_add, but that regressed in commit 18b6dad. The device model is still omitted from help, but is available anyway.
Attempts to fix the regression have been rejected with the argument that the purpose of no_user isn't clear, and it's prone to misuse.
This commit clarifies no_user's purpose. Anthony suggested to rename it cannot_instantiate_with_device_add_yet_due_to_internal_bugs, which I shorten somewhat to keep checkpatch happy. While there, make it bool.
Every use of cannot_instantiate_with_device_add_yet gets a FIXME comment asking for rationale. The next few commits will clean them all up, either by providing a rationale, or by getting rid of the use.
With that done, the regression fix is hopefully acceptable.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Marcel Apfelbaum <marcel.a@redhat.com> Signed-off-by: Andreas Färber <afaerber@suse.de>
show more ...
|
#
4f8a066b |
| 13-Sep-2013 |
Kevin Wolf <kwolf@redhat.com> |
blockdev: Remove IF_* check for read-only blockdev_init
IF_NONE allows read-only, which makes forbidding it in this place for other types pretty much pointless.
Instead, make sure that all devices
blockdev: Remove IF_* check for read-only blockdev_init
IF_NONE allows read-only, which makes forbidding it in this place for other types pretty much pointless.
Instead, make sure that all devices for which the check would have errored out check in their init function that they don't get a read-only BlockDriverState. This catches even cases where IF_NONE and -device is used.
Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
show more ...
|
#
630f4442 |
| 27-Jul-2013 |
Andreas Färber <afaerber@suse.de> |
pl181: QOM cast cleanup
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
#
1d998d93 |
| 27-Jul-2013 |
Andreas Färber <afaerber@suse.de> |
pl181: Rename pl181_state to PL181State
Signed-off-by: Andreas Färber <afaerber@suse.de>
|
#
8827b0fb |
| 27-Jun-2013 |
Peter Maydell <peter.maydell@linaro.org> |
sd/pl181.c: Avoid undefined shift behaviour in RWORD macro
Add a cast to avoid potentially shifting into the sign bit of a signed value, which is undefined behaviour in C.
(Detected with clang's -f
sd/pl181.c: Avoid undefined shift behaviour in RWORD macro
Add a cast to avoid potentially shifting into the sign bit of a signed value, which is undefined behaviour in C.
(Detected with clang's -fsanitize=undefined.)
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Message-id: 1372341831-4264-1-git-send-email-peter.maydell@linaro.org
show more ...
|
#
29776739 |
| 07-Jun-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
hw/s*: pass owner to memory_region_init* functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
2c9b15ca |
| 06-Jun-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
memory: add owner argument to initialization functions
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
6790f59d |
| 18-Jun-2013 |
liguang <lig.fnst@cn.fujitsu.com> |
sd: pass bool parameter for sd_init
Signed-off-by: liguang <lig.fnst@cn.fujitsu.com> Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
|
#
49ab747f |
| 01-Mar-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
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 <pbonzini@redhat.com>
|
#
83c9f4ca |
| 04-Feb-2013 |
Paolo Bonzini <pbonzini@redhat.com> |
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 - `fin
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.
Instead, files in hw/dataplane are referenced with the relative path. We know they are not going to move to include/, and they are the only include files that are in subdirectories _and_ move.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
show more ...
|
#
8c43a6f0 |
| 10-Jan-2013 |
Andreas Färber <afaerber@suse.de> |
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
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.
Fix the documented QOM examples:
sed -i 's/static TypeInfo/static const TypeInfo/g' include/qom/object.h
Since frequently the wrong examples are being copied by contributors of new devices, fix all types in the tree:
sed -i 's/^static TypeInfo/static const TypeInfo/g' */*.c sed -i 's/^static TypeInfo/static const TypeInfo/g' */*/*.c
This also avoids to piggy-back these changes onto real functional changes or other refactorings.
Signed-off-by: Andreas Färber <afaerber@suse.de> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
9c17d615 |
| 17-Dec-2012 |
Paolo Bonzini <pbonzini@redhat.com> |
softmmu: move include files to include/sysemu/
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
#
a8170e5e |
| 23-Oct-2012 |
Avi Kivity <avi@redhat.com> |
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
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, standards conformant hwaddr.
Outstanding patchsets can be fixed up with the command
git rebase -i --exec 'find -name "*.[ch]" | xargs s/target_phys_addr_t/hwaddr/g' origin
Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
9351d708 |
| 18-Oct-2012 |
Peter Maydell <peter.maydell@linaro.org> |
hw/pl181: Use LOG_UNIMP and LOG_GUEST_ERROR
Rather than a mix of direct printing to stderr and aborting via hw_error(), use LOG_UNIMP and LOG_GUEST_ERROR.
Signed-off-by: Peter Maydell <peter.maydel
hw/pl181: Use LOG_UNIMP and LOG_GUEST_ERROR
Rather than a mix of direct printing to stderr and aborting via hw_error(), use LOG_UNIMP and LOG_GUEST_ERROR.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
show more ...
|
#
83f7d43a |
| 09-Feb-2012 |
Andreas Färber <afaerber@suse.de> |
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 pr
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.
Signed-off-by: Andreas Färber <afaerber@suse.de> Cc: Anthony Liguori <anthony@codemonkey.ws> Cc: malc <av1474@comtv.ru> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
39bffca2 |
| 08-Dec-2011 |
Anthony Liguori <aliguori@us.ibm.com> |
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 touch
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 registration functions.
The second step was another sed-based removal of subclass registration functions while also adding virtual functions from the base class into a class_init function as appropriate.
Finally, a python script was used to convert the DeviceInfo structures and qdev_register_subclass functions to TypeInfo structures, class_init functions, and type_register_static calls.
We are almost fully converted to QOM after this commit.
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
999e12bb |
| 24-Jan-2012 |
Anthony Liguori <aliguori@us.ibm.com> |
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 prohibitiv
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 <aliguori@us.ibm.com>
show more ...
|
#
624923be |
| 19-Dec-2011 |
Peter Maydell <peter.maydell@linaro.org> |
hw/pl181.c: Add save/load support
Add save/load support to the PL181.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
|
#
66a0a2cb |
| 29-Nov-2011 |
Dong Xu Wang <wdongxu@linux.vnet.ibm.com> |
fix spelling in hw sub directory
Correct obvious spelling errors in qemu/hw directory.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.i
fix spelling in hw sub directory
Correct obvious spelling errors in qemu/hw directory.
Signed-off-by: Dong Xu Wang <wdongxu@linux.vnet.ibm.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
show more ...
|
#
750ecd44 |
| 27-Nov-2011 |
Avi Kivity <avi@redhat.com> |
sysbus: rename sysbus_init_mmio_region() to sysbus_init_mmio()
Signed-off-by: Avi Kivity <avi@redhat.com>
|
#
ca45842a |
| 11-Oct-2011 |
Avi Kivity <avi@redhat.com> |
pl181: convert to memory API
Signed-off-by: Avi Kivity <avi@redhat.com>
|
#
8e31bf38 |
| 26-Jun-2011 |
Matthew Fernandez <matthew.fernandez@gmail.com> |
Correct spelling of licensed
Correct typos of "licenced" to "licensed".
Reviewed-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de> Signed-off-by: Matthew
Correct spelling of licensed
Correct typos of "licenced" to "licensed".
Reviewed-by: Stefan Weil <weil@mail.berlios.de> Reviewed-by: Andreas F=E4rber <andreas.faerber@web.de> Signed-off-by: Matthew Fernandez <matthew.fernandez@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
show more ...
|
#
c31a4724 |
| 21-Feb-2011 |
Peter Maydell <peter.maydell@linaro.org> |
hw/pl181: Implement GPIO output pins for card status
Add two GPIO output pins to the PL181 model to indicate the card present and readonly status information. On ARM boards these usually are reflect
hw/pl181: Implement GPIO output pins for card status
Add two GPIO output pins to the PL181 model to indicate the card present and readonly status information. On ARM boards these usually are reflected in a system register.
Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
show more ...
|
#
13839974 |
| 28-Jan-2011 |
Markus Armbruster <armbru@redhat.com> |
blockdev: New drive_get_next(), replacing qdev_init_bdrv()
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus De
blockdev: New drive_get_next(), replacing qdev_init_bdrv()
qdev_init_bdrv() doesn't belong into qdev.c; it's about drives, not qdevs. Rename to drive_get_next, move to blockdev.c, drop the bogus DeviceState argument, and return DriveInfo instead of BlockDriverState.
Signed-off-by: Markus Armbruster <armbru@redhat.com> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
show more ...
|