1. 23 6月, 2015 2 次提交
    • M
      qdev-monitor: Fix check for full bus · ed238ba2
      Markus Armbruster 提交于
      Property bus has always been too screwed up to be really usable for
      values other than plain bus IDs.  This just fixes a bug that crept in
      in commit 1395af6f "qdev: add a maximum device allowed field for the
      bus."
      
      It doesn't always fail when it should:
      
          $ qemu-system-x86_64 -nodefaults -device virtio-serial-pci -device virtio-rng-device,bus=pci.0/virtio-serial-pci/virtio-bus
      
      Happily plugs the virtio-rng-device into the virtio-bus provided by
      virtio-serial-pci, even though its only slot is already occupied by a
      virtio-serial-device.
      
      And sometimes fails when it shouldn't:
      
          $ qemu-system-x86_64 -nodefaults -device virtio-serial-pci -device virtserialport,bus=virtio-bus/virtio-serial-device
      
      Yes, the virtio-bus is full, but the virtio-serial-bus provided by
      virtio-serial-device isn't, and that's the one we're trying to use.
      
      Root cause: we check "bus full" when we resolve the first element of
      the path.  That's the correct one only when it's also the last one.
      
      Fix by moving the "bus full" check to right before we return a bus.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      ed238ba2
    • M
      qdev-monitor: Stop error avalanche in qbus_find_recursive() · a5ec494e
      Markus Armbruster 提交于
      Reproducer:
      
          $ qemu-system-x86_64 -nodefaults -device virtio-rng-pci -device virtio-rng-pci -device virtio-rng-device,bus=virtio-bus
          qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 'virtio-bus' is full
          qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 'virtio-bus' is full
          qemu-system-x86_64: -device virtio-rng-device,bus=virtio-bus: Bus 'virtio-bus' not found
      
      qbus_find_recursive() reports the "is full" error itself, and leaves
      reporting "not found" to its caller.  The result is confusion.  Write
      it a function contract that permits leaving all error reporting to the
      caller, and implement it.  Update callers to detect and report "is
      full".
      
      Screwed up when commit 1395af6f added the max_dev limit and the "is
      full" error condition to enforce it.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      a5ec494e
  2. 22 6月, 2015 10 次提交
  3. 21 6月, 2015 16 次提交
  4. 20 6月, 2015 11 次提交
  5. 19 6月, 2015 1 次提交
    • L
      semihosting: add --semihosting-config arg sub-argument · a59d31a1
      Leon Alrae 提交于
      Add new "arg" sub-argument to the --semihosting-config allowing the user
      to pass multiple input arguments separately. It is required for example
      by UHI semihosting to construct argc and argv.
      
      Also, update ARM semihosting to support new option (at the moment it is
      the only target which cares about arguments).
      
      If the semihosting is enabled and no semihosting args have been specified,
      then fall back to -kernel/-append. The -append string is split on whitespace
      before initializing semihosting.argv[1..n]; this is different from what
      QEMU MIPS machines' pseudo-bootloaders do (i.e. argv[1] contains the whole
      -append), but is more intuitive from UHI user's point of view and Linux
      kernel just does not care as it concatenates argv[1..n] into single cmdline
      string anyway.
      Signed-off-by: NLeon Alrae <leon.alrae@imgtec.com>
      Message-id: 1434643256-16858-3-git-send-email-leon.alrae@imgtec.com
      Reviewed-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      a59d31a1