1. 20 1月, 2018 10 次提交
    • B
      sm501: Add missing break to case · cf4969ec
      BALATON Zoltan 提交于
      Noticed by Coverity, forgotten in 5690d9ecReported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      cf4969ec
    • P
      target-ppc: optimize cmp translation · b62b3686
      pbonzini@redhat.com 提交于
      We know that only one bit (in addition to SO) is going to be set in
      the condition register, so do two movconds instead of three setconds,
      three shifts and two ORs.
      
      For ppc64-linux-user, the code size reduction is around 5% and the
      performance improvement slightly less than 10%.  For softmmu, the
      improvement is around 5%.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b62b3686
    • G
      spapr: fix device tree properties when using compatibility mode · 9012a53f
      Greg Kurz 提交于
      Commit 51f84465 changed the compatility mode setting logic:
      - machine reset only sets compatibility mode for the boot CPU
      - compatibility mode is set for other CPUs when they are put online
        by the guest with the "start-cpu" RTAS call
      
      This causes a regression for machines started with max-compat-cpu:
      the device tree nodes related to secondary CPU cores contain wrong
      "cpu-version" and "ibm,pa-features" values, as shown below.
      
      Guest started on a POWER8 host with:
           -smp cores=2 -machine pseries,max-cpu-compat=compat7
      
                              ibm,pa-features = [18 00 f6 3f c7 c0 80 f0 80 00
       00 00 00 00 00 00 00 00 80 00 80 00 80 00 00 00];
                              cpu-version = <0x4d0200>;
      
                                     ^^^
                              second CPU core
      
                              ibm,pa-features = <0x600f63f 0xc70080c0>;
                              cpu-version = <0xf000003>;
      
                                     ^^^
                                boot CPU core
      
      The second core is advertised in raw POWER8 mode. This happens because
      CAS assumes all CPUs to have the same compatibility mode. Since the
      boot CPU already has the requested compatibility mode, the CAS code
      does not set it for the secondary one, and exposes the bogus device
      tree properties in in the CAS response to the guest.
      
      A similar situation is observed when hot-plugging a CPU core. The
      related device tree properties are generated and exposed to guest
      with the "ibm,configure-connector" RTAS before "start-cpu" is called.
      The CPU core is advertised to the guest in raw mode as well.
      
      It both cases, it boils down to the fact that "start-cpu" happens too
      late. This can be fixed globally by propagating the compatibility mode
      of the boot CPU to the other CPUs during reset.  For this to work, the
      compatibility mode of the boot CPU must be set before the machine code
      actually resets all CPUs.
      
      It is not needed to set the compatibility mode in "start-cpu" anymore,
      so the code is dropped.
      
      Fixes: 51f84465Signed-off-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      9012a53f
    • G
      spapr: drop duplicate variable in spapr_core_plug() · bc877283
      Greg Kurz 提交于
      A variable is already defined at the begining of the function to
      hold a pointer to the CPU core object:
      
          sPAPRCPUCore *core = SPAPR_CPU_CORE(OBJECT(dev));
      
      No need to define it again in the pre-2.10 compatibility code snipplet.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      bc877283
    • C
    • C
      target/ppc: fix doorbell and hypervisor doorbell definitions · 1414c75d
      Cédric Le Goater 提交于
      commit f03a1af5 ("ppc: Fix POWER7 and POWER8 exception definitions")
      introduced definitions for the server doorbell exceptions by reusing
      the embedded definitions but this adds complexity in the powerpc_excp()
      routine. Let's introduce specific definitions for the Server doorbells
      exception.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      1414c75d
    • T
      hw/ppc/Makefile: Add a way to disable the PPC4xx boards · f8567a11
      Thomas Huth 提交于
      We've got the config switch CONFIG_PPC4XX, so we should use it
      in the Makefile accordingly and only include the PPC4xx boards
      if this switch has been enabled. (Note: Unfortunately, the files
      ppc4xx_devs.c and ppc405_uc.c still have to be included in the
      build anyway to fulfil some complicated linker dependencies ...
      so these are subject to a more thourough clean-up later)
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      f8567a11
    • T
      default-configs/ppc-softmmu: Restructure the switches according to the machines · 70218555
      Thomas Huth 提交于
      Order the CONFIG switches in ppc-softmmu.mak according to the machine
      classes where they are used (embedded, Mac or PReP), so that it is
      easier for the users to disable a set of switches completely if they
      are not needed.
      
      Also add the missing CONFIG_IDE_SII3112 switch to the embedded section
      which was previously only added to ppcemb-softmmu.mak.
      
      And while we're at it, also remove the CONFIG_IDE_CMD646 switch since
      this controller does not seem to be used by any ppc machine in QEMU.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      70218555
    • T
      default-configs/ppc64-softmmu: Include 32-bit configs instead of copying them · 21d64275
      Thomas Huth 提交于
      qemu-softmmu-ppc64 is supposed to be a superset of qemu-softmmu-ppc.
      However, instead of simply including the 32-bit config file, we've
      duplicated all CONFIG_xxx settings there instead. This way, we've missed
      some CONFIG switches in ppc64-softmmu.mak which were only added to the
      32-bit config file (e.g. CONFIG_SUNGEM). Let's fix this problem by
      including the 32-bit config file into the 64-bit config file instead
      of duplicating all the CONFIG switches there.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      21d64275
    • P
      Merge remote-tracking branch 'remotes/ehabkost/tags/machine-next-pull-request' into staging · b384cd95
      Peter Maydell 提交于
      machine queue, 2018-01-19
      
      # gpg: Signature made Fri 19 Jan 2018 16:30:19 GMT
      # gpg:                using RSA key 0x2807936F984DC5A6
      # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
      # Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6
      
      * remotes/ehabkost/tags/machine-next-pull-request:
        fw_cfg: fix memory corruption when all fw_cfg slots are used
        possible_cpus: add CPUArchId::type field
        nvdimm: add 'unarmed' option
        nvdimm: add a macro for property "label-size"
        hostmem-file: add "align" option
        scripts: Remove fixed entries from the device-crash-test
        qdev: Check for the availability of a hotplug controller before adding a device
        qdev_monitor: Simplify error handling in qdev_device_add()
        q35: Allow only supported dynamic sysbus devices
        xen: Add only xen-sysdev to dynamic sysbus device list
        spapr: Allow only supported dynamic sysbus devices
        ppc: e500: Allow only supported dynamic sysbus devices
        hw/arm/virt: Allow only supported dynamic sysbus devices
        machine: Replace has_dynamic_sysbus with list of allowed devices
        numa: fix missing '-numa cpu' in '-help' output
        qemu-options: document memory-backend-ram
        qemu-options: document missing memory-backend-file options
        memfd: remove needless include
        memfd: split qemu_memfd_alloc()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      b384cd95
  2. 19 1月, 2018 30 次提交