QEMU With E2K User Support
Go to file
Alexander Graf 61de36761b qdev: Keep global allocation counter per bus
When we have 2 separate qdev devices that both create a qbus of the
same type without specifying a bus name or device name, we end up
with two buses of the same name, such as ide.0 on the Mac machines:

  dev: macio-ide, id ""
    bus: ide.0
      type IDE
  dev: macio-ide, id ""
    bus: ide.0
      type IDE

If we now spawn a device that connects to a ide.0 the last created
bus gets the device, with the first created bus inaccessible to the
command line.

After some discussion on IRC we concluded that the best quick fix way
forward for this is to make automated bus-class type based allocation
count a global counter. That's what this patch implements. With this
we instead get

  dev: macio-ide, id ""
    bus: ide.1
      type IDE
  dev: macio-ide, id ""
    bus: ide.0
      type IDE

on the example mentioned above.

This also means that if you did -device ...,bus=ide.0 you got a device
on the first bus (the last created one) before this patch and get that
device on the second one (the first created one) now.  Breaks
migration unless you change bus=ide.0 to bus=ide.1 on the destination.

This is intended and makes the bus enumeration work as expected.

As per review request follows a list of otherwise affected boards and
the reasoning for the conclusion that they are ok:

   target      machine         bus id              times
   ------      -------         ------              -----

   aarch64     n800            i2c-bus.0           2
   aarch64     n810            i2c-bus.0           2
   arm         n800            i2c-bus.0           2
   arm         n810            i2c-bus.0           2

-> Devices are only created explicitly on one of the two buses, using
   s->mpu->i2c[0], so no change to the guest.

   aarch64     vexpress-a15    virtio-mmio-bus.0   4
   aarch64     vexpress-a9     virtio-mmio-bus.0   4
   aarch64     virt            virtio-mmio-bus.0   32
   arm         vexpress-a15    virtio-mmio-bus.0   4
   arm         vexpress-a9     virtio-mmio-bus.0   4
   arm         virt            virtio-mmio-bus.0   32

-> Makes -device bus= work for all virtio-mmio buses.  Breaks
   migration.  Workaround for migration from old to new: specify
   virtio-mmio-bus.4 or .32 respectively rather than .0 on the
   destination.

   aarch64     xilinx-zynq-a9  usb-bus.0           2
   arm         xilinx-zynq-a9  usb-bus.0           2
   mips64el    fulong2e        usb-bus.0           2

-> Normal USB operation not affected. Migration driver needs command
   line to use the other bus.

   i386        isapc           ide.0               2
   x86_64      isapc           ide.0               2
   mips        mips            ide.0               2
   mips64      mips            ide.0               2
   mips64el    mips            ide.0               2
   mipsel      mips            ide.0               2
   ppc         g3beige         ide.0               2
   ppc         mac99           ide.0               2
   ppc         prep            ide.0               2
   ppc64       g3beige         ide.0               2
   ppc64       mac99           ide.0               2
   ppc64       prep            ide.0               2

-> Makes -device bus= work for all IDE buses.  Breaks migration.
   Workaround for migration from old to new: specify ide.1 rather than
   ide.0 on the destination.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Andreas Faerber <afaerber@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
2014-03-05 03:06:47 +01:00
audio Add the ability to vary Spice playback and record rates, to facilitate Opus support. 2014-02-03 11:05:15 +01:00
backends virtio_rng: replace custom backend API with UserCreatable.complete() callback 2014-01-28 12:47:11 -05:00
block block/gluster: Add missing argument to qemu_gluster_init() call 2014-03-04 20:20:57 +00:00
bsd-user
default-configs Add Enhanced Three-Speed Ethernet Controller (eTSEC) 2014-03-05 03:06:45 +01:00
disas disas/i386: Disassemble ANDN/SHLX/SHRX/SHAX 2014-02-17 10:12:29 -06:00
docs qmp: Make Quorum error events more palatable. 2014-02-28 18:59:06 +01:00
dtc@bc895d6d09
fpu softfloat: Support halving the result of muladd operation 2014-02-20 10:35:50 +00:00
fsdev
gdb-xml
hw qdev: Keep global allocation counter per bus 2014-03-05 03:06:47 +01:00
include qdev: Keep global allocation counter per bus 2014-03-05 03:06:47 +01:00
libcacard libcacard: Don't link with all libraries QEMU links to 2014-02-09 13:06:02 +02:00
linux-headers update linux headers to kvm/next 2014-02-27 09:50:45 +01:00
linux-user target-arm queue: 2014-02-21 15:04:58 +00:00
net net: remove implicit peer from offload API 2014-02-25 14:31:05 +01:00
pc-bios Several features, fixes and cleanups for kvm/s390: 2014-03-04 14:50:46 +00:00
pixman@97336fad32
po
qapi qapi: Add missing null check to opts_start_struct() 2014-03-03 11:17:45 -05:00
qga qga: Remove unneeded include file 2014-03-03 09:46:27 +04:00
qobject qdict: Extract non-QDicts in qdict_array_split() 2014-02-21 22:11:23 +01:00
qom qapi: Add human mode to StringOutputVisitor 2014-02-14 21:12:03 +01:00
roms Update seabios to 1.7.4 2014-02-07 16:42:13 +00:00
scripts qapi: Clean up null checking in generated visitors 2014-03-03 11:17:20 -05:00
slirp
stubs stubs: Optimize dependencies for gdbstub.c 2014-03-02 17:13:31 +04:00
sysconfigs/target
target-alpha exec: Make stl_*_phys input an AddressSpace 2014-02-11 22:57:18 +10:00
target-arm target-arm: Add support for AArch32 ARMv8 CRC32 instructions 2014-02-26 17:20:07 +00:00
target-cris cris: Add interrupt signals to the CPU device 2014-02-03 14:03:59 +00:00
target-i386 Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-03-04 17:01:07 +00:00
target-lm32 target-lm32: stop VM on illegal or unknown instruction 2014-02-04 19:47:39 +01:00
target-m68k
target-microblaze Microblaze: Convert Microblaze-pic handling to GPIOs 2014-01-14 11:08:36 +10:00
target-mips target-mips: add user-mode FR switch support for MIPS32r5 2014-02-10 16:46:38 +01:00
target-moxie
target-openrisc target-openrisc: Use new qemu_ld/st opcodes 2014-02-12 08:47:57 +08:00
target-ppc PPC: KVM: suppress warnings about not supported SPRs 2014-03-05 03:06:45 +01:00
target-s390x Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-03-04 17:01:07 +00:00
target-sh4
target-sparc exec: Make stb_phys input an AddressSpace 2014-02-11 22:57:38 +10:00
target-unicore32 exec: Make ldl_*_phys input an AddressSpace 2014-02-11 22:56:54 +10:00
target-xtensa target-xtensa: provide HW confg ID registers 2014-02-24 04:47:02 +04:00
tcg tcg: Fix typo in comment (dependancies -> dependencies) 2014-03-02 17:12:51 +04:00
tests trivial patches for 2014-03-04 2014-03-04 18:12:02 +00:00
trace Adapt Makefiles to the new LTTng ust interface 2014-02-19 11:08:53 +01:00
ui gtk: Support keyboard translation for hosts running Windows 2014-01-20 19:30:28 +01:00
util target-ppc: Add ISA2.06 divde[o] Instructions 2014-03-05 03:06:39 +01:00
.exrc
.gitignore Merge remote-tracking branch 'remotes/bonzini/configure' into staging 2014-02-24 15:38:00 +00:00
.gitmodules
.mailmap
.travis.yml .travis.yml: Add aarch64-* targets 2014-01-08 19:07:20 +00:00
aio-posix.c
aio-win32.c
arch_init.c Fix two XBZRLE corruption issues 2014-02-25 14:30:28 +01:00
async.c
balloon.c
block-migration.c
block.c block: use /var/tmp instead of /tmp for -snapshot 2014-02-28 18:59:07 +01:00
blockdev-nbd.c
blockdev.c block: Add reference parameter to bdrv_open() 2014-02-21 21:02:22 +01:00
blockjob.c Use error_is_set() only when necessary 2014-02-17 11:57:23 -05:00
bt-host.c
bt-vhci.c
Changelog
CODING_STYLE
configure dump: add support for lzo/snappy 2014-02-28 11:52:03 -05:00
COPYING
COPYING.LIB
coroutine-gthread.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
cpu-exec.c target-arm: Store AIF bits in env->pstate for AArch32 2014-02-26 17:20:06 +00:00
cpus.c cpu: Add per-cpu address space 2014-02-11 22:56:37 +10:00
cputlb.c cpu: Add per-cpu address space 2014-02-11 22:56:37 +10:00
device_tree.c
device-hotplug.c
disas.c disas: Implement disassembly output for A64 2014-02-08 14:50:48 +00:00
dma-helpers.c
dump.c dump: add 'query-dump-guest-memory-capability' command 2014-02-28 11:52:03 -05:00
exec.c exec: Remove unneeded include files 2014-03-03 09:46:27 +04:00
gdbstub.c
HACKING
hmp-commands.hx block: update block commit documentation regarding image truncation 2014-01-24 16:12:49 +01:00
hmp.c dump: make kdump-compressed format available for 'dump-guest-memory' 2014-02-28 11:52:03 -05:00
hmp.h
iohandler.c
ioport.c
kvm-all.c kvm: Add a new machine option kvm-type 2014-03-05 03:06:24 +01:00
kvm-stub.c kvm: Add a new machine option kvm-type 2014-03-05 03:06:24 +01:00
LICENSE
main-loop.c
MAINTAINERS MAINTAINERS: update status for HMP, QAPI and QMP trees 2014-02-28 11:41:43 -05:00
Makefile Merge remote-tracking branch 'remotes/mcayland/qemu-sparc' into staging 2014-03-04 13:09:06 +00:00
Makefile.objs Makefile: introduce common-obj-m and block-obj-m for DSO 2014-02-20 13:14:18 +01:00
Makefile.target build: softmmu targets do not have a "main.o" file 2014-02-20 13:14:18 +01:00
memory_mapping.c
memory.c memory: split cpu_physical_memory_* functions to its own include 2014-01-13 14:04:54 +01:00
migration-exec.c
migration-fd.c
migration-rdma.c rdma: rename 'x-rdma' => 'rdma' 2014-02-25 14:30:28 +01:00
migration-tcp.c
migration-unix.c
migration.c rdma: rename 'x-rdma' => 'rdma' 2014-02-25 14:30:28 +01:00
module-common.c module: implement module loading 2014-02-20 13:14:18 +01:00
monitor.c monitor: Remove left-over code in do_info_profile. 2014-02-28 13:49:42 -05:00
nbd.c nbd: move socket wrappers to qemu-nbd 2014-02-21 21:02:23 +01:00
os-posix.c util: Split out exec_dir from os_find_datadir 2014-02-20 13:12:54 +01:00
os-win32.c util: Split out exec_dir from os_find_datadir 2014-02-20 13:12:54 +01:00
page_cache.c Fix two XBZRLE corruption issues 2014-02-25 14:30:28 +01:00
qapi-schema.json Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging 2014-03-04 17:01:07 +00:00
qdev-monitor.c qdev-monitor: set DeviceState opts before calling realize 2014-02-26 10:32:40 -07:00
qdict-test-data.txt
qemu-bridge-helper.c
qemu-char.c qmp: expose list of supported character device backends 2014-02-17 11:57:23 -05:00
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-doc.texi Describe flaws in qcow/qcow2 encryption in the docs 2014-01-31 22:05:03 +01:00
qemu-file.c qemu_file: use fwrite() correctly 2014-02-25 14:26:59 +01:00
qemu-img-cmds.hx
qemu-img.c qemu-img: Remove unneeded include files 2014-03-03 09:46:27 +04:00
qemu-img.texi Describe flaws in qcow/qcow2 encryption in the docs 2014-01-31 22:05:03 +01:00
qemu-io-cmds.c qemu-io: New command 'sleep' 2014-01-24 17:40:03 +01:00
qemu-io.c Block patches 2014-02-25 10:50:11 +00:00
qemu-log.c
qemu-nbd.c Block patches 2014-02-25 10:50:11 +00:00
qemu-nbd.texi
qemu-options-wrapper.h
qemu-options.h
qemu-options.hx
qemu-seccomp.c seccomp: add some basic shared memory syscalls to the whitelist 2014-01-20 11:19:34 -02:00
qemu-tech.texi
qemu-timer.c
qemu.nsi
qemu.sasl
qmp-commands.hx dump: add 'query-dump-guest-memory-capability' command 2014-02-28 11:52:03 -05:00
qmp.c object: Report type in error when not user creatable. 2014-03-02 17:12:41 +04:00
qtest.c kvm: Add a new machine option kvm-type 2014-03-05 03:06:24 +01:00
README
rules.mak module: implement module loading 2014-02-20 13:14:18 +01:00
savevm.c Use error_is_set() only when necessary 2014-02-17 11:57:23 -05:00
spice-qemu-char.c spice: hook qemu_chr_fe_set_open() event to ports 2014-02-03 11:05:15 +01:00
tcg-runtime.c
tci.c
thread-pool.c
thunk.c
tpm.c Use error_is_set() only when necessary 2014-02-17 11:57:23 -05:00
trace-events PPC: KVM: suppress warnings about not supported SPRs 2014-03-05 03:06:45 +01:00
translate-all.c exec: Make tb_invalidate_phys_addr input an AS 2014-02-11 22:55:55 +10:00
translate-all.h
user-exec.c
VERSION
version.rc
vl.c kvm: Add a new machine option kvm-type 2014-03-05 03:06:24 +01:00
vmstate.c Fix vmstate_info_int32_le comparison/assign 2014-02-25 14:30:28 +01:00
xbzrle.c
xen-all.c kvm: Add a new machine option kvm-type 2014-03-05 03:06:24 +01:00
xen-mapcache.c
xen-stub.c kvm: Add a new machine option kvm-type 2014-03-05 03:06:24 +01:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team