Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: qemu/qemu
base: 57b93c0f8ea3
Choose a base ref
...
head repository: qemu/qemu
compare: aa9bbd865502
Choose a head ref
  • 11 commits
  • 26 files changed
  • 6 contributors

Commits on May 27, 2023

  1. target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs

    The following commits changed the code such that the fallback to MFSS for MFFSCRN,
    MFFSCRNI, MFFSCE and MFFSL on pre 3.0 ISAs was removed and became an illegal instruction:
    
      bf8adfd - target/ppc: Move mffscrn[i] to decodetree
      394c2e2 - target/ppc: Move mffsce to decodetree
      3e5bce7 - target/ppc: Move mffsl to decodetree
    
    The hardware will handle them as a MFFS instruction as the code did previously.
    This means applications that were segfaulting under qemu when encountering these
    instructions which is used in glibc libm functions for example.
    
    The fallback for MFFSCDRN and MFFSCDRNI added in a later patch was also missing.
    
    This patch restores the fallback to MFSS for these instructions on pre 3.0s ISAs
    as the hardware decoder would, fixing the segfaulting libm code. It doesn't have
    the fallback for 3.0 onwards to match hardware behaviour.
    
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
    Reviewed-by: Matheus Ferst <matheus.ferst@eldorado.org.br>
    Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
    Message-Id: <20230510111913.1718734-1-richard.purdie@linuxfoundation.org>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    rpurdie authored and danielhb committed May 27, 2023
    Copy the full SHA
    5260ecf View commit details
    Browse the repository at this point in the history
  2. target/ppc: Fix width of some 32-bit SPRs

    Some 32-bit SPRs are incorrectly implemented as 64-bits on 64-bit
    targets.
    
    This changes VRSAVE, DSISR, HDSISR, DAWRX0, PIDR, LPIDR, DEXCR,
    HDEXCR, CTRL, TSCR, MMCRH, and PMC[1-6] from to be 32-bit registers.
    
    This only goes by the 32/64 classification in the architecture, it
    does not try to implement finer details of SPR implementation (e.g.,
    not all bits implemented as simple read/write storage).
    
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
    Message-Id: <20230515092655.171206-2-npiggin@gmail.com>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    npiggin authored and danielhb committed May 27, 2023
    Copy the full SHA
    fbda88f View commit details
    Browse the repository at this point in the history
  3. target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward

    This optional behavior was removed from the ISA in v3.0, see
    Summary of Changes preface:
    
      Data Storage Interrupt Status Register for Alignment Interrupt:
      Simplifies the Alignment interrupt by remov- ing the Data Storage
      Interrupt Status Register (DSISR) from the set of registers modified
      by the Alignment interrupt.
    
    Reviewed-by: Fabiano Rosas <farosas@suse.de>
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Message-Id: <20230515092655.171206-5-npiggin@gmail.com>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    npiggin authored and danielhb committed May 27, 2023
    Copy the full SHA
    4ee5d28 View commit details
    Browse the repository at this point in the history

Commits on May 28, 2023

  1. spapr: Add SPAPR_CAP_AIL_MODE_3 for AIL mode 3 support for H_SET_MODE…

    … hcall
    
    The behaviour of the Address Translation Mode on Interrupt resource is
    not consistently supported by all CPU versions or all KVM versions: KVM
    HV does not support mode 2, and does not support mode 3 on POWER7 or
    early POWER9 processesors. KVM PR only supports mode 0. TCG supports all
    modes (0, 2, 3) on CPUs with support for the corresonding LPCR[AIL] mode.
    This leads to inconsistencies in guest behaviour and could cause problems
    migrating guests.
    
    This was not noticable for Linux guests for a long time because the
    kernel only uses modes 0 and 3, and it used to consider AIL-3 to be
    advisory in that it would always keep the AIL-0 vectors around, so it
    did not matter whether or not interrupts were delivered according to
    the AIL mode. Recent Linux guests depend on AIL mode 3 working as
    specified in order to support the SCV facility interrupt. If AIL-3 can
    not be provided, then H_SET_MODE must return an error to Linux so it can
    disable the SCV facility (failure to do so can lead to userspace being
    able to crash the guest kernel).
    
    Add the ail-mode-3 capability to specify that AIL-3 is supported. AIL-0
    is implied as the baseline, and AIL-2 is no longer supported by spapr.
    AIL-2 is not known to be used by any software, but support in TCG could
    be restored with an ail-mode-2 capability quite easily if a regression
    is reported.
    
    Modify the H_SET_MODE Address Translation Mode on Interrupt resource
    handler to check capabilities and correctly return error if not
    supported.
    
    KVM has a cap to advertise support for AIL-3.
    
    Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Message-Id: <20230515160216.394612-1-npiggin@gmail.com>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    npiggin authored and danielhb committed May 28, 2023
    Copy the full SHA
    ccc5a4c View commit details
    Browse the repository at this point in the history
  2. hw/ppc/prep: Fix wiring of PIC -> CPU interrupt

    Commit cef2e71 ("hw/isa/i82378: Remove intermediate IRQ forwarder")
    passes s->cpu_intr to i8259_init() in i82378_realize() directly. However, s-
    >cpu_intr isn't initialized yet since that happens after the south bridge's
    pci_realize_and_unref() in board code. Fix this by initializing s->cpu_intr
    before realizing the south bridge.
    
    Fixes: cef2e71 ("hw/isa/i82378: Remove intermediate IRQ forwarder")
    Signed-off-by: Bernhard Beschow <shentey@gmail.com>
    Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Message-Id: <20230304114043.121024-4-shentey@gmail.com>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    shentok authored and danielhb committed May 28, 2023
    Copy the full SHA
    2237af5 View commit details
    Browse the repository at this point in the history
  3. target/ppc: Use SMT4 small core chip type in POWER9/10 PVRs

    QEMU's PVR value for POWER9 DD2.0 has chip type 1, which is the SMT4
    "small core" type that OpenPOWER processors use. QEMU's PVR for all
    other POWER9/10 have chip type 0, which "enterprise" systems use.
    
    The difference does not really matter to QEMU (because it does not care
    about SMT mode in the target), but for consistency all PVRs should use
    the same chip type. We'll go with the SMT4 OpenPOWER type.
    
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Message-Id: <20230515160131.394562-1-npiggin@gmail.com>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    npiggin authored and danielhb committed May 28, 2023
    Copy the full SHA
    7f65ebb View commit details
    Browse the repository at this point in the history
  4. pnv_lpc: disable reentrancy detection for lpc-hc

    As lpc-hc is designed for re-entrant calls from xscom, mark it
    re-entrancy safe.
    
    Reported-by: Thomas Huth <thuth@redhat.com>
    Signed-off-by: Alexander Bulekov <alxndr@bu.edu>
    [clg: mark opb_master_regs as re-entrancy safe also ]
    Signed-off-by: Cédric Le Goater <clg@kaod.org>
    Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
    Tested-by: Thomas Huth <thuth@redhat.com>
    Message-Id: <20230526073850.2772197-1-clg@kaod.org>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    a1xndr authored and danielhb committed May 28, 2023
    Copy the full SHA
    76f9ebf View commit details
    Browse the repository at this point in the history
  5. target/ppc: Merge COMPUTE_CLASS and COMPUTE_FPRF

    Instead of computing an artificial "class" bitmask then converting that
    to the fprf value, compute the final value from the start.
    
    Reorder the tests to check the most likely cases first.
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    Tested-by: Alex Bennée <alex.bennee@linaro.org>
    Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
    Message-Id: <20230523202507.688859-1-richard.henderson@linaro.org>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    rth7680 authored and danielhb committed May 28, 2023
    Copy the full SHA
    03ec9d9 View commit details
    Browse the repository at this point in the history
  6. target/ppc: Add POWER9 DD2.2 model

    POWER9 DD2.1 and earlier had significant limitations when running KVM,
    including lack of "mixed mode" MMU support (ability to run HPT and RPT
    mode on threads of the same core), and a translation prefetch issue
    which is worked around by disabling "AIL" mode for the guest.
    
    These processors are not widely available, and it's difficult to deal
    with all these quirks in qemu +/- KVM, so create a POWER9 DD2.2 CPU
    and make it the default POWER9 CPU.
    
    Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
    Reviewed-by: Frederic Barrat <fbarrat@linux.ibm.com>
    Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
    Message-Id: <20230515160201.394587-1-npiggin@gmail.com>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    npiggin authored and danielhb committed May 28, 2023
    Copy the full SHA
    277ee17 View commit details
    Browse the repository at this point in the history
  7. ppc/pegasos2: Change default CPU to 7457

    Previously 7400 was selected as a safe choice as that is used by other
    machines so it's better tested but AmigaOS does not know this CPU and
    disables some features when running on it. The real hardware has
    7447/7457 G4 CPU so change the default to match that now that it was
    confirmed to work better with AmigaOS.
    
    Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
    Tested-by: Rene Engel <ReneEngel80@emailn.de>
    Reviewed-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    Message-Id: <20230528152937.B8DAD74633D@zero.eik.bme.hu>
    Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
    zbalaton authored and danielhb committed May 28, 2023
    Copy the full SHA
    56b8bfe View commit details
    Browse the repository at this point in the history

Commits on May 29, 2023

  1. Merge tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu int…

    …o staging
    
    ppc patch queue for 2023-05-28:
    
    This queue includes several assorted fixes for PowerPC SPR
    emulation, a change in the default Pegasos2 CPU, the addition
    of AIL mode 3 for spapr, a PIC->CPU interrupt fix for prep and
    performance enhancements in fpu_helper.c.
    
    # -----BEGIN PGP SIGNATURE-----
    #
    # iIwEABYKADQWIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCZHOFiRYcZGFuaWVsaGI0
    # MTNAZ21haWwuY29tAAoJEDzZypbeAzFkVZ0BAMV+9RlHKRlldOSPMEWCWo6hmA/U
    # 9SMyJsZPY3OpDbE3AP9XOQR1boqyT5MJXoeOUq1OLlFm6mY7UA300kBZ7wxVCw==
    # =IGNT
    # -----END PGP SIGNATURE-----
    # gpg: Signature made Sun 28 May 2023 09:47:05 AM PDT
    # gpg:                using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164
    # gpg:                issuer "danielhb413@gmail.com"
    # gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.com>" [unknown]
    # gpg: WARNING: This key is not certified with a trusted signature!
    # gpg:          There is no indication that the signature belongs to the owner.
    # Primary key fingerprint: 17EB FF99 23D0 1800 AF28  3819 3CD9 CA96 DE03 3164
    
    * tag 'pull-ppc-20230528' of https://gitlab.com/danielhb/qemu:
      ppc/pegasos2: Change default CPU to 7457
      target/ppc: Add POWER9 DD2.2 model
      target/ppc: Merge COMPUTE_CLASS and COMPUTE_FPRF
      pnv_lpc: disable reentrancy detection for lpc-hc
      target/ppc: Use SMT4 small core chip type in POWER9/10 PVRs
      hw/ppc/prep: Fix wiring of PIC -> CPU interrupt
      spapr: Add SPAPR_CAP_AIL_MODE_3 for AIL mode 3 support for H_SET_MODE hcall
      target/ppc: Alignment faults do not set DSISR in ISA v3.0 onward
      target/ppc: Fix width of some 32-bit SPRs
      target/ppc: Fix fallback to MFSS for MFFS* instructions on pre 3.0 ISAs
    
    Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
    rth7680 committed May 29, 2023
    Copy the full SHA
    aa9bbd8 View commit details
    Browse the repository at this point in the history