qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] fe8377: ppc/pnv: Fix NMI system reset SRR1 va


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] fe8377: ppc/pnv: Fix NMI system reset SRR1 value
Date: Thu, 28 May 2020 03:30:38 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: fe837714f3462e02e856d441ea6e9a6a0aad4695
      
https://github.com/qemu/qemu/commit/fe837714f3462e02e856d441ea6e9a6a0aad4695
  Author: Nicholas Piggin <npiggin@gmail.com>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/ppc/pnv.c

  Log Message:
  -----------
  ppc/pnv: Fix NMI system reset SRR1 value

Commit a77fed5bd926 ("ppc/pnv: Add support for NMI interface") got the
SRR1 setting wrong for sresets that hit outside of power-save states.

Fix this, better documenting the source for the bit definitions.

Fixes: 01b552b05b0f ("ppc/pnv: Add support for NMI interface")
Cc: Cédric Le Goater <clg@kaod.org>
Cc: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20200507114824.788942-1-npiggin@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
[dwg: Fixed up some tab indentation]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 0bbf14a0954322e72bb1845bc0b0fd55fd531d68
      
https://github.com/qemu/qemu/commit/0bbf14a0954322e72bb1845bc0b0fd55fd531d68
  Author: Cédric Le Goater <clg@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/ppc/spapr_cpu_core.c

  Log Message:
  -----------
  ppc/spapr: add a POWER10 CPU model

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20200507073855.2485680-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: ececb880d61a3b7e255f873ba66388877218c036
      
https://github.com/qemu/qemu/commit/ececb880d61a3b7e255f873ba66388877218c036
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/excp_helper.c

  Log Message:
  -----------
  target/ppc: Untabify excp_helper.c

Some tabs crept in with a recent change.

Fixes: 6dc6b557913f "target/ppc: Improve syscall exception logging"
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158886788307.1560068.14096740175576278978.stgit@bahia.lan>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 3c89b8d6ac5b8728cd7620f9885bd953edd18a11
      
https://github.com/qemu/qemu/commit/3c89b8d6ac5b8728cd7620f9885bd953edd18a11
  Author: Nicholas Piggin <npiggin@gmail.com>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M linux-user/ppc/cpu_loop.c
    M target/ppc/cpu.h
    M target/ppc/excp_helper.c
    M target/ppc/helper.h
    M target/ppc/translate.c
    M target/ppc/translate_init.inc.c

  Log Message:
  -----------
  target/ppc: Add support for scv and rfscv instructions

POWER9 adds scv and rfscv instructions and the system call vectored
interrupt. Linux does not support this instruction yet but it has
been tested with a modified kernel that runs on real hardware.

Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Message-Id: <20200507115328.789175-1-npiggin@gmail.com>
[dwg: Corrected an overlong line]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 0911a60c76b8598f1863c6951b2b690059465153
      
https://github.com/qemu/qemu/commit/0911a60c76b8598f1863c6951b2b690059465153
  Author: Leonardo Bras <leonardo@linux.ibm.com>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/ppc/pnv.c
    M hw/ppc/spapr.c
    M include/hw/ppc/spapr.h
    M target/ppc/cpu.h
    M target/ppc/excp_helper.c

  Log Message:
  -----------
  ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2

On reboot, all memory that was previously added using object_add and
device_add is placed in this DIMM area.

The new SPAPR_LMB_FLAGS_HOTREMOVABLE flag helps Linux to put this memory in
the correct memory zone, so no unmovable allocations are made there,
allowing the object to be easily hot-removed by device_del and
object_del.

This new flag was accepted in Power Architecture documentation.

Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
Reviewed-by: Bharata B Rao <bharata@linux.ibm.com>
Message-Id: <20200511200201.58537-1-leobras.c@gmail.com>
[dwg: Fixed syntax error spotted by Cédric Le Goater]
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 6fc009603c64a35f30c7f1047ca38d4f1ff753c7
      
https://github.com/qemu/qemu/commit/6fc009603c64a35f30c7f1047ca38d4f1ff753c7
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.h

  Log Message:
  -----------
  target/ppc: Pass const pointer to ppc_radix64_get_prot_amr()

This doesn't require write access to the CPU structure.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158941060817.240484.14621015211317485106.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 1830422611806abba07694605e933a566d634eec
      
https://github.com/qemu/qemu/commit/1830422611806abba07694605e933a566d634eec
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.c

  Log Message:
  -----------
  target/ppc: Pass const pointer to ppc_radix64_get_fully_qualified_addr()

This doesn't require write access to the CPU registers.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158941061434.240484.10700096396035994133.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 7caee782e996988d5d178ed0838e73781f608ae1
      
https://github.com/qemu/qemu/commit/7caee782e996988d5d178ed0838e73781f608ae1
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.c

  Log Message:
  -----------
  target/ppc: Don't initialize some local variables in ppc_radix64_xlate()

It is the job of the ppc_radix64_get_fully_qualified_addr() function
which is called at the beginning of ppc_radix64_xlate() to set both
lpid *and* pid. It doesn't buy us anything to initialize them first.

Worse, a bug in ppc_radix64_get_fully_qualified_addr(), eg. failing to
set either lpid or pid, would be undetectable by static analysis tools
like coverity.

Some recent versions of gcc (eg. gcc-9.3.1-2.fc30) may still think
that lpid or pid is used uninitialized though, so this also adds
default cases in the switch statements to make it clear this cannot
happen.

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158941062048.240484.9693581559252337111.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: b577031cf21e367583616e9f1ab530ee755c726d
      
https://github.com/qemu/qemu/commit/b577031cf21e367583616e9f1ab530ee755c726d
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.c

  Log Message:
  -----------
  target/ppc: Add missing braces in ppc_radix64_partition_scoped_xlate()

As per CODING_STYLE.

Fixes: d04ea940c597 "target/ppc: Add support for Radix partition-scoped 
translation"
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158941062665.240484.2663106458734800894.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 31efae9958a8a085d248a74a9448048bac5d6e68
      
https://github.com/qemu/qemu/commit/31efae9958a8a085d248a74a9448048bac5d6e68
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.c

  Log Message:
  -----------
  target/ppc: Fix arguments to ppc_radix64_partition_scoped_xlate()

The last two arguments have the bool type. Also, we shouldn't raise an
exception when using gdbstub.

This was found while reading the code. Since it only affects the powernv
machine, I didn't dig further to find an actual bug.

Fixes: d04ea940c597 "target/ppc: Add support for Radix partition-scoped 
translation"
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158941063281.240484.9114539141307005992.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: e606a5580131855ce79f1f585e91ac0b6dd805ae
      
https://github.com/qemu/qemu/commit/e606a5580131855ce79f1f585e91ac0b6dd805ae
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.c

  Log Message:
  -----------
  target/ppc: Don't update radix PTE R/C bits with gdbstub

gdbstub shouldn't silently change guest visible state when doing address
translation. Since the R/C bits can only be updated when handling a MMU
fault, let's reuse the cause_excp flag and rename it to guest_visible.
While here drop a not very useful comment.

This was found while reading the code. I could verify that this affects
both powernv and pseries, but I failed to observe any actual bug.

Fixes: d04ea940c597 "target/ppc: Add support for Radix partition-scoped 
translation"
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <158941063899.240484.2778628492106387793.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: a1cf0c7ce54942f9a45ac6026faffb9814b502b4
      
https://github.com/qemu/qemu/commit/a1cf0c7ce54942f9a45ac6026faffb9814b502b4
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/pci-bridge/dec.c

  Log Message:
  -----------
  hw/pci-bridge/dec: Remove dead debug code

Remove debug code never used since added in commit e1c6bbabee30.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200525033910.26166-1-f4bug@amsat.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 1521735c2a6df9396ae232fe077af9def85eef91
      
https://github.com/qemu/qemu/commit/1521735c2a6df9396ae232fe077af9def85eef91
  Author: Philippe Mathieu-Daudé <f4bug@amsat.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/nvram/mac_nvram.c
    M hw/nvram/trace-events

  Log Message:
  -----------
  hw/nvram/mac_nvram: Convert debug printf()s to trace events

Convert NVR_DPRINTF() to trace events and remove ifdef'ry.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20200524165126.13920-1-f4bug@amsat.org>
Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 47e112c4dd8ca0bd4d7872f8bf1a97183915069f
      
https://github.com/qemu/qemu/commit/47e112c4dd8ca0bd4d7872f8bf1a97183915069f
  Author: Greg Kurz <groug@kaod.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M target/ppc/mmu-radix64.c

  Log Message:
  -----------
  target/ppc: Fix argument to ppc_radix64_partition_scoped_xlate() again

The penultimate argument of function ppc_radix64_partition_scoped_xlate()
has the bool type.

Fixes: d04ea940c597 "target/ppc: Add support for Radix partition-scoped 
translation"
Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <159051003729.407106.10610703877543955831.stgit@bahia.lan>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 9c7c0407028355ca83349b8a60fddfad46f2ebd8
      
https://github.com/qemu/qemu/commit/9c7c0407028355ca83349b8a60fddfad46f2ebd8
  Author: Leonardo Bras <leobras.c@gmail.com>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/vfio/pci-quirks.c

  Log Message:
  -----------
  vfio/nvlink: Remove exec permission to avoid SELinux AVCs

If SELinux is setup without 'execmem' permission for qemu, all mmap
with (PROT_WRITE | PROT_EXEC) will fail and print a warning in
SELinux log.

If "nvlink2-mr" memory allocation fails (fist diff), it will cause
guest NUMA nodes to not be correctly configured (V100 memory will
not be visible for guest, nor its NUMA nodes).

Not having 'execmem' permission is intesting for virtual machines to
avoid buffer-overflow based attacks, and it's adopted in distros
like RHEL.

So, removing the PROT_EXEC flag seems the right thing to do.

Browsing some other code that mmaps memory for usage with
memory_region_init_ram_device_ptr, I could notice it's usual to
not have PROT_EXEC (only PROT_READ | PROT_WRITE), so it should be
no problem around this.

Signed-off-by: Leonardo Bras <leobras.c@gmail.com>
Message-Id: <20200501055448.286518-1-leobras.c@gmail.com>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>


  Commit: 8b92b9ef86077f9ec77998666cd7de137c33e9bf
      
https://github.com/qemu/qemu/commit/8b92b9ef86077f9ec77998666cd7de137c33e9bf
  Author: Peter Maydell <peter.maydell@linaro.org>
  Date:   2020-05-27 (Wed, 27 May 2020)

  Changed paths:
    M hw/nvram/mac_nvram.c
    M hw/nvram/trace-events
    M hw/pci-bridge/dec.c
    M hw/ppc/pnv.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_cpu_core.c
    M hw/vfio/pci-quirks.c
    M include/hw/ppc/spapr.h
    M linux-user/ppc/cpu_loop.c
    M target/ppc/cpu.h
    M target/ppc/excp_helper.c
    M target/ppc/helper.h
    M target/ppc/mmu-radix64.c
    M target/ppc/mmu-radix64.h
    M target/ppc/translate.c
    M target/ppc/translate_init.inc.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.1-20200527' into 
staging

ppc patch queue 2020-05-27

Here's the next pull request for qemu-5.1.  It includes:
 * Support for the scv and rfscv POWER9 instructions in TCG
 * Support for the new SPAPR_LMB_FLAGS_HOTREMOVABLE flag, which
   provides a way for guests to know memory which should be removable
   (so the guest can avoid putting immovable allocations there).
 * Some fixes for the recently added partition scope radix translation
   in softmmu
 * Assorted minor fixes and cleanups

It includes one patch to avoid a clash with SELinux when using NVLink
VFIO devices.  That's not technically within the files under my
maintainership, but it is in a section of the VFIO quirks code that's
specific to the POWER-only NVLink devices, and has an ack from Alex
Williamson.

# gpg: Signature made Wed 27 May 2020 06:36:59 BST
# gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" 
[full]
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" 
[unknown]
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-5.1-20200527:
  vfio/nvlink: Remove exec permission to avoid SELinux AVCs
  target/ppc: Fix argument to ppc_radix64_partition_scoped_xlate() again
  hw/nvram/mac_nvram: Convert debug printf()s to trace events
  hw/pci-bridge/dec: Remove dead debug code
  target/ppc: Don't update radix PTE R/C bits with gdbstub
  target/ppc: Fix arguments to ppc_radix64_partition_scoped_xlate()
  target/ppc: Add missing braces in ppc_radix64_partition_scoped_xlate()
  target/ppc: Don't initialize some local variables in ppc_radix64_xlate()
  target/ppc: Pass const pointer to ppc_radix64_get_fully_qualified_addr()
  target/ppc: Pass const pointer to ppc_radix64_get_prot_amr()
  ppc/spapr: Add hotremovable flag on DIMM LMBs on drmem_v2
  target/ppc: Add support for scv and rfscv instructions
  target/ppc: Untabify excp_helper.c
  ppc/spapr: add a POWER10 CPU model
  ppc/pnv: Fix NMI system reset SRR1 value

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>


Compare: https://github.com/qemu/qemu/compare/06539ebc76b8...8b92b9ef8607



reply via email to

[Prev in Thread] Current Thread [Next in Thread]