1. 16 3月, 2017 11 次提交
  2. 15 3月, 2017 2 次提交
    • E
      machine: Convert abstract typename on compat_props to subclass names · 0bcba41f
      Eduardo Habkost 提交于
      Original problem description by Greg Kurz:
      
      > Since commit "9a4c0e22 hw/virtio-pci: fix virtio
      > behaviour", passing -device virtio-blk-pci.disable-modern=off
      > has no effect on 2.6 machine types because the internal
      > virtio-pci.disable-modern=on compat property always prevail.
      
      The same bug also affects other abstract type names mentioned on
      compat_props by machine-types: apic-common, i386-cpu, pci-device,
      powerpc64-cpu, s390-skeys, spapr-pci-host-bridge, usb-device,
      virtio-pci, x86_64-cpu.
      
      The right fix for this problem is to make sure compat_props and
      -global options are always applied in the order they are
      registered, instead of reordering them based on the type
      hierarchy. But changing the ordering rules of -global is risky
      and might break existing configurations, so we shouldn't do that
      on a stable branch.
      
      This is a temporary hack that will work around the bug when
      registering compat_props properties: if we find an abstract class
      on compat_props, register properties for all its non-abstract
      subtypes instead. This will make sure -global won't be overridden
      by compat_props, while keeping the existing ordering rules on
      -global options.
      
      Note that there's one case that won't be fixed by this hack:
      "-global spapr-pci-vfio-host-bridge.<option>=<value>" won't be
      able to override compat_props, because spapr-pci-host-bridge is
      not an abstract class.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Message-Id: <1481575745-26120-1-git-send-email-ehabkost@redhat.com>
      Reviewed-by: NCornelia Huck <cornelia.huck@de.ibm.com>
      Reviewed-by: NHalil Pasic <pasic@linux.vnet.ibm.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Tested-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      0bcba41f
    • P
      hw/misc/imx6_src: Don't crash trying to reset missing CPUs · 5e2fb7c5
      Peter Maydell 提交于
      Commit 4881658a introduced a call to arm_get_cpu_by_id(),
      and Coverity noticed that we weren't checking that it didn't
      return NULL (CID 1371652).
      
      Normally this won't happen (because all 4 CPUs are expected
      to exist), but it's possible the user requested fewer CPUs
      on the command line. Handle this possibility by silently
      doing nothing, which is the same behaviour as before commit
      4881658a and also how we handle the other CPU operations
      (since we ignore the INVALID_PARAM returns from arm_set_cpu_on()
      and friends).
      
      There is a slight behavioural difference to the pre-4881658a
      situation: the "reset this core" bit will remain set rather
      than not being permitted to be set. The imx6 datasheet is
      unclear about the behaviour in this odd corner case, so we
      opt for the simpler code rather than complicated logic to
      maintain identical behaviour.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1488542374-1256-1-git-send-email-peter.maydell@linaro.org
      Reviewed-by: NAlex Bennée <alex.bennee@linaro.org>
      5e2fb7c5
  3. 14 3月, 2017 6 次提交
  4. 09 3月, 2017 4 次提交
  5. 07 3月, 2017 6 次提交
  6. 06 3月, 2017 9 次提交
  7. 05 3月, 2017 1 次提交
    • M
      qapi: Make input visitors detect unvisited list tails · a4a1c70d
      Markus Armbruster 提交于
      Fix the design flaw demonstrated in the previous commit: new method
      check_list() lets input visitors report that unvisited input remains
      for a list, exactly like check_struct() lets them report that
      unvisited input remains for a struct or union.
      
      Implement the method for the qobject input visitor (straightforward),
      and the string input visitor (less so, due to the magic list syntax
      there).  The opts visitor's list magic is even more impenetrable, and
      all I can do there today is a stub with a FIXME comment.  No worse
      than before.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Message-Id: <1488544368-30622-26-git-send-email-armbru@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      a4a1c70d
  8. 03 3月, 2017 1 次提交
    • S
      spapr: Small cleanup of PPC MMU enums · ec975e83
      Sam Bobroff 提交于
      The PPC MMU types are sometimes treated as if they were a bit field
      and sometime as if they were an enum which causes maintenance
      problems: flipping bits in the MMU type (which is done on both the 1TB
      segment and 64K segment bits) currently produces new MMU type
      values that are not handled in every "switch" on it, sometimes causing
      an abort().
      
      This patch provides some macros that can be used to filter out the
      "bit field-like" bits so that the remainder of the value can be
      switched on, like an enum. This allows removal of all of the
      "degraded" types from the list and should ease maintenance.
      Signed-off-by: NSam Bobroff <sam.bobroff@au1.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      ec975e83