qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] a780d0: s390x/mmu: Drop debug logging from MM


From: Peter Maydell
Subject: [Qemu-commits] [qemu/qemu] a780d0: s390x/mmu: Drop debug logging from MMU code
Date: Mon, 14 Oct 2019 04:26:18 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: a780d096e640ce736577aba17163a3f6ec4b50b0
      
https://github.com/qemu/qemu/commit/a780d096e640ce736577aba17163a3f6ec4b50b0
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Drop debug logging from MMU code

Let's get it out of the way to make some further refactorings easier.
Personally, I've never used these debug statements at all. And if I had
to debug issues, I used plain GDB instead (debug prints are just way too
much noise in the MMU). We might want to introduce tracing at some point
instead, so we can able selected events on demand.

Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 124ada6810277983b0ba3faea6b900bf879a67ea
      
https://github.com/qemu/qemu/commit/124ada6810277983b0ba3faea6b900bf879a67ea
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Move DAT protection handling out of mmu_translate_asce()

We'll reuse the ilen and tec definitions in mmu_translate
soon also for all other DAT exceptions we inject. Move it to the caller,
where we can later pair it up with other protection checks, like IEP.

Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 81d7e3bc45a3245d3a078f153aaecc989eeae106
      
https://github.com/qemu/qemu/commit/81d7e3bc45a3245d3a078f153aaecc989eeae106
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Inject DAT exceptions from a single place

Let's return the PGM from the translation functions on error and inject
based on that.

Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 2ed0cd7cd7c55945cc9f16cdc3b102a14f22920a
      
https://github.com/qemu/qemu/commit/2ed0cd7cd7c55945cc9f16cdc3b102a14f22920a
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Inject PGM_ADDRESSING on bogus table addresses

Let's document how it works and inject PGM_ADDRESSING if reading of
table entries fails.

Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: ae6d48d43ff66d6d0f39db210af273a73348ea98
      
https://github.com/qemu/qemu/commit/ae6d48d43ff66d6d0f39db210af273a73348ea98
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Use TARGET_PAGE_MASK in mmu_translate_pte()

While ASCE_ORIGIN is not wrong, it is certainly confusing. We want a
page frame address.

Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 3fd0e85f3f3db70e6b6a70bdacc90bbea0e396de
      
https://github.com/qemu/qemu/commit/3fd0e85f3f3db70e6b6a70bdacc90bbea0e396de
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/cpu.h
    M target/s390x/mem_helper.c
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: DAT table definition overhaul

Let's use consistent names for the region/section/page table entries and
for the macros to extract relevant parts from virtual address. Make them
match the definitions in the PoP - e.g., how the relevant bits are actually
called.

Introduce defines for all bits declared in the PoP. This will come in
handy in follow-up patches.

Add a note where additional information about s390x and the used
definitions can be found.

Acked-by: Richard Henderson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: a4e95b41a1bd3fe82d130773357d0df52b50e67f
      
https://github.com/qemu/qemu/commit/a4e95b41a1bd3fe82d130773357d0df52b50e67f
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Convert to non-recursive page table walk

A non-recursive implementation allows to make better use of the
branch predictor, avoids function calls, and makes the implementation of
new features only for a subset of region table levels easier.

We can now directly compare our implementation to the KVM gaccess
implementation in arch/s390/kvm/gaccess.c:guest_translate().

Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 90790898a1c93072d080f46b30259ee5ca4e6435
      
https://github.com/qemu/qemu/commit/90790898a1c93072d080f46b30259ee5ca4e6435
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Add EDAT2 translation support

This only adds basic support to the DAT translation, but no EDAT2 support
for TCG. E.g., the gdbstub under kvm uses this function, too, to
translate virtual addresses.

Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 3dc29061f3291bf0b6cda9cc7bc04aa94101b52e
      
https://github.com/qemu/qemu/commit/3dc29061f3291bf0b6cda9cc7bc04aa94101b52e
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Implement ESOP-2 and access-exception-fetch/store-indication 
facility

We already implement ESOP-1. For ESOP-2, we only have to indicate all
protection exceptions properly. Due to EDAT-1, we already indicate DAT
exceptions properly. We don't trigger KCP/ALCP/IEP exceptions yet.

So all we have to do is set the TEID (TEC) to the right values
(bit 56, 60, 61) in case of LAP.

We don't have any side-effects (e.g., no guarded-storage facility),
therefore, bit 64 of the TEID (TEC) is always 0.

We always have to indicate whether it is a fetch or a store for all access
exceptions. This is only missing for LAP exceptions.

Acked-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 3a06f981925bfade8f5e650655fce0b38dbd6649
      
https://github.com/qemu/qemu/commit/3a06f981925bfade8f5e650655fce0b38dbd6649
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/cpu.h
    M target/s390x/helper.c
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: Implement Instruction-Execution-Protection Facility

IEP support in the mmu is fairly easy. Set the right permissions for TLB
entries and properly report an exception.

Make sure to handle EDAT-2 by setting bit 56/60/61 of the TEID (TEC) to
the right values.

Let's keep s390_cpu_get_phys_page_debug() working even if IEP is
active. Switch MMU_DATA_LOAD - this has no other effects any more as the
ASC to be used is now fully selected outside of mmu_translate().

Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: faa40177bb1c2e597f878428d056043a511ad306
      
https://github.com/qemu/qemu/commit/faa40177bb1c2e597f878428d056043a511ad306
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M hw/s390x/s390-virtio-ccw.c
    M target/s390x/gen-features.c

  Log Message:
  -----------
  s390x/cpumodel: Prepare for changes of QEMU model

Setup the 4.1 compatibility model so we can add new features to the
LATEST model.

Reviewed-by: Cornelia Huck <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: b580b6ee05c156c334a67f719996c258460cf54d
      
https://github.com/qemu/qemu/commit/b580b6ee05c156c334a67f719996c258460cf54d
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/gen-features.c

  Log Message:
  -----------
  s390x/cpumodel: Add new TCG features to QEMU cpu model

We now implement a bunch of new facilities we can properly indicate.

ESOP-1/ESOP-2 handling is discussed in the PoP Chafter 3-15
("Suppression on Protection"). The "Basic suppression-on-protection (SOP)
facility" is a core part of z/Architecture without a facility
indication. ESOP-2 is indicated by ESOP-1 + Side-effect facility
("ESOP-2"). Besides ESOP-2, the side-effect facility is only relevant for
the guarded-storage facility (we don't implement).

S390_ESOP:
- We indicate DAT exeptions by setting bit 61 of the TEID (TEC) to 1 and
  bit 60 to zero. We don't trigger ALCP exceptions yet. Also, we set
  bit 0-51 and bit 62/63 to the right values.
S390_ACCESS_EXCEPTION_FS_INDICATION:
- The TEID (TEC) properly indicates in bit 52/53 on any access if it was
  a fetch or a store
S390_SIDE_EFFECT_ACCESS_ESOP2:
- We have no side-effect accesses (esp., we don't implement the
  guarded-storage faciliy), we correctly set bit 64 of the TEID (TEC) to
  0 (no side-effect).
- ESOP2: We properly set bit 56, 60, 61 in the TEID (TEC) to indicate the
  type of protection. We don't trigger KCP/ALCP exceptions yet.
S390_INSTRUCTION_EXEC_PROT:
- The MMU properly detects and indicates the exception on instruction fetches
- Protected TLB entries will never get PAGE_EXEC set.

There is no need to fake the abscence of any of the facilities - without
the facilities, some bits of the TEID (TEC) are simply unpredictable.

As IEP was added with z14 and we currently implement a z13, add it to
the MAX model instead.

Acked-by: Cornelia Huck <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: c87ff4d108efce2546150be057721cb41ca1f74d
      
https://github.com/qemu/qemu/commit/c87ff4d108efce2546150be057721cb41ca1f74d
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/cpu.h
    M target/s390x/interrupt.c
    M target/s390x/translate.c

  Log Message:
  -----------
  target/s390x: Add ilen to unwind data

Use ILEN_UNWIND to signal that we have in fact that cpu_restore_state
will have been called by the time we arrive in do_program_interrupt.

Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 3e2018589244b1af8f046ebe387670aecd4156c2
      
https://github.com/qemu/qemu/commit/3e2018589244b1af8f046ebe387670aecd4156c2
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c
    M target/s390x/interrupt.c
    M target/s390x/tcg-stub.c
    M target/s390x/tcg_s390x.h

  Log Message:
  -----------
  target/s390x: Remove ilen parameter from tcg_s390_program_interrupt

Since we begin the operation with an unwind, we have the proper
value of ilen immediately available.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 77b703f84f0099c2e863a05122537a252ca005d1
      
https://github.com/qemu/qemu/commit/77b703f84f0099c2e863a05122537a252ca005d1
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M hw/s390x/s390-pci-inst.c
    M target/s390x/cc_helper.c
    M target/s390x/cpu.h
    M target/s390x/crypto_helper.c
    M target/s390x/diag.c
    M target/s390x/excp_helper.c
    M target/s390x/fpu_helper.c
    M target/s390x/int_helper.c
    M target/s390x/interrupt.c
    M target/s390x/ioinst.c
    M target/s390x/mem_helper.c
    M target/s390x/misc_helper.c

  Log Message:
  -----------
  target/s390x: Remove ilen parameter from s390_program_interrupt

This is no longer used, and many of the existing uses -- particularly
within hw/s390x -- seem questionable.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 1e36aee6364746839578738c7a7b55740911ad7b
      
https://github.com/qemu/qemu/commit/1e36aee6364746839578738c7a7b55740911ad7b
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/cc_helper.c
    M target/s390x/crypto_helper.c
    M target/s390x/excp_helper.c
    M target/s390x/fpu_helper.c
    M target/s390x/int_helper.c
    M target/s390x/mem_helper.c
    M target/s390x/misc_helper.c

  Log Message:
  -----------
  target/s390x: Use tcg_s390_program_interrupt in TCG helpers

Replace all uses of s390_program_interrupt within files
that are marked CONFIG_TCG.  These are necessarily tcg-only.

This lets each of these users benefit from the QEMU_NORETURN
attribute on tcg_s390_program_interrupt.

Acked-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 18ab936d0017a1a0bf041f4e4e277c83384684fe
      
https://github.com/qemu/qemu/commit/18ab936d0017a1a0bf041f4e4e277c83384684fe
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c

  Log Message:
  -----------
  target/s390x: Push trigger_pgm_exception lower in s390_cpu_tlb_fill

Delay triggering an exception until the end, after we have
determined ultimate success or failure, and also taken into
account whether this is a non-faulting probe.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 1ab3302886b6b4278b439439ceacb46c4effbb5d
      
https://github.com/qemu/qemu/commit/1ab3302886b6b4278b439439ceacb46c4effbb5d
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c

  Log Message:
  -----------
  target/s390x: Handle tec in s390_cpu_tlb_fill

As a step toward moving all excption handling out of mmu_translate,
copy handling of the LowCore tec value from trigger_access_exception
into s390_cpu_tlb_fill.  So far this new plumbing isn't used.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 31b59419069eb844348b55bee4694f5685cfd8c0
      
https://github.com/qemu/qemu/commit/31b59419069eb844348b55bee4694f5685cfd8c0
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c
    M target/s390x/internal.h
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Return exception from mmu_translate_real

Do not raise the exception directly within mmu_translate_real,
but pass it back so that caller may do so.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: c7363b28ffd2008dab09ffe7077e84f090cc80d0
      
https://github.com/qemu/qemu/commit/c7363b28ffd2008dab09ffe7077e84f090cc80d0
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Remove exc argument to mmu_translate_asce

Now that mmu_translate_asce returns the exception instead of
raising it, the argument is unused.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: ce7ac79d28edd72ee4ada624a709706b9ff312f8
      
https://github.com/qemu/qemu/commit/ce7ac79d28edd72ee4ada624a709706b9ff312f8
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c
    M target/s390x/helper.c
    M target/s390x/internal.h
    M target/s390x/mem_helper.c
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Return exception from mmu_translate

Do not raise the exception directly within mmu_translate,
but pass it back so that caller may do so.

Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: a79d2253351e9ef33048eac594693a3c01b6ea71
      
https://github.com/qemu/qemu/commit/a79d2253351e9ef33048eac594693a3c01b6ea71
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Return exception from translate_pages

Do not raise the exception directly within translate_pages,
but pass it back so that caller may do so.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 42007b1982a0b69b5b25ba515076d6576f2c6cdc
      
https://github.com/qemu/qemu/commit/42007b1982a0b69b5b25ba515076d6576f2c6cdc
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c

  Log Message:
  -----------
  target/s390x: Remove fail variable from s390_cpu_tlb_fill

Now that excp always contains a real exception number, we can
use that instead of a separate fail variable.  This allows a
redundant test to be removed.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 9accc852d807ec6b74d6c3bb2bcafb4863b080f5
      
https://github.com/qemu/qemu/commit/9accc852d807ec6b74d6c3bb2bcafb4863b080f5
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mem_helper.c

  Log Message:
  -----------
  target/s390x: Simplify helper_lra

We currently call trigger_pgm_exception to set cs->exception_index
and env->int_pgm_code and then read the values back and then
reset cs->exception_index so that the exception is not delivered.

Instead, use the exception type that we already have directly
without ever triggering an exception that must be suppressed.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 9e1dae315fcd525d156c38671271829aca7cfee4
      
https://github.com/qemu/qemu/commit/9e1dae315fcd525d156c38671271829aca7cfee4
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c

  Log Message:
  -----------
  target/s390x: Rely on unwinding in s390_cpu_tlb_fill

We currently set ilen to AUTO, then overwrite that during
unwinding, then overwrite that for the code access case.

This can be simplified to setting ilen to our arbitrary
value for the (undefined) code access case, then rely on
unwinding to overwrite that with the correct value for
the data access case.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 2550953b20f609326e7bde2ee48d9852d5c21c94
      
https://github.com/qemu/qemu/commit/2550953b20f609326e7bde2ee48d9852d5c21c94
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Rely on unwinding in s390_cpu_virt_mem_rw

For TCG, we will always call s390_cpu_virt_mem_handle_exc,
which will go through the unwinder to set ILEN.  For KVM,
we do not go through do_program_interrupt, so this argument
is unused.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 20e1372b7c18fdbeeb5f9da93d3d8637c1a1bd3d
      
https://github.com/qemu/qemu/commit/20e1372b7c18fdbeeb5f9da93d3d8637c1a1bd3d
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/cpu.h
    M target/s390x/excp_helper.c

  Log Message:
  -----------
  target/s390x: Remove ILEN_AUTO

This setting is no longer used.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: f5cbdc4397939b4a0fbae554bfe45ea37cf55804
      
https://github.com/qemu/qemu/commit/f5cbdc4397939b4a0fbae554bfe45ea37cf55804
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Remove ilen argument from trigger_access_exception

The single caller passes ILEN_UNWIND; pass that along to
trigger_pgm_exception directly.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 5c58704b070e18bfa7a858cfa32b4f8b1d0d7ce8
      
https://github.com/qemu/qemu/commit/5c58704b070e18bfa7a858cfa32b4f8b1d0d7ce8
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/excp_helper.c
    M target/s390x/internal.h
    M target/s390x/interrupt.c
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  target/s390x: Remove ilen argument from trigger_pgm_exception

All but one caller passes ILEN_UNWIND, which is not stored.
For the one use case in s390_cpu_tlb_fill, set int_pgm_ilen
directly, simply to avoid the assert within do_program_interrupt.

Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 1cccdef3e34ba45811cce413b51f3b15833e84d3
      
https://github.com/qemu/qemu/commit/1cccdef3e34ba45811cce413b51f3b15833e84d3
  Author: Richard Henderson <address@hidden>
  Date:   2019-10-09 (Wed, 09 Oct 2019)

  Changed paths:
    M target/s390x/cpu.h

  Log Message:
  -----------
  target/s390x: Remove ILEN_UNWIND

This setting is no longer used.

Signed-off-by: Richard Henderson <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: 1f6493be088da969efeeee0100ea4330fb804cdf
      
https://github.com/qemu/qemu/commit/1f6493be088da969efeeee0100ea4330fb804cdf
  Author: David Hildenbrand <address@hidden>
  Date:   2019-10-10 (Thu, 10 Oct 2019)

  Changed paths:
    M include/exec/exec-all.h
    M target/s390x/mem_helper.c

  Log Message:
  -----------
  s390x/tcg: MVCL: Exit to main loop if requested

MVCL is interruptible and we should check for interrupts and process
them after writing back the variables to the registers. Let's check
for any exit requests and exit to the main loop. Introduce a new helper
function for that: cpu_loop_exit_requested().

When booting Fedora 30, I can see a handful of these exits and it seems
to work reliable. Also, Richard explained why this works correctly even
when MVCL is called via EXECUTE:

    (1) TB with EXECUTE runs, at address Ae
        - env->psw_addr stored with Ae.
        - helper_ex() runs, memory address Am computed
          from D2a(X2a,B2a) or from psw.addr+RI2.
        - env->ex_value stored with memory value modified by R1a

    (2) TB of executee runs,
        - env->ex_value stored with 0.
        - helper_mvcl() runs, using and updating R1b, R1b+1, R2b, R2b+1.

    (3a) helper_mvcl() completes,
         - TB of executee continues, psw.addr += ilen.
         - Next instruction is the one following EXECUTE.

    (3b) helper_mvcl() exits to main loop,
         - cpu_loop_exit_restore() unwinds psw.addr = Ae.
         - Next instruction is the EXECUTE itself...
         - goto 1.

As the PoP mentiones that an interruptible instruction called via EXECUTE
should avoid modifying storage/registers that are used by EXECUTE itself,
it is fine to retrigger EXECUTE.

Cc: Alex Bennée <address@hidden>
Cc: Peter Maydell <address@hidden>
Cc: Paolo Bonzini <address@hidden>
Suggested-by: Richard Henderson <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Signed-off-by: David Hildenbrand <address@hidden>


  Commit: cdfc44ac3c6d0deaae4f5152cda830598963630c
      
https://github.com/qemu/qemu/commit/cdfc44ac3c6d0deaae4f5152cda830598963630c
  Author: Peter Maydell <address@hidden>
  Date:   2019-10-14 (Mon, 14 Oct 2019)

  Changed paths:
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/s390-virtio-ccw.c
    M include/exec/exec-all.h
    M target/s390x/cc_helper.c
    M target/s390x/cpu.h
    M target/s390x/crypto_helper.c
    M target/s390x/diag.c
    M target/s390x/excp_helper.c
    M target/s390x/fpu_helper.c
    M target/s390x/gen-features.c
    M target/s390x/helper.c
    M target/s390x/int_helper.c
    M target/s390x/internal.h
    M target/s390x/interrupt.c
    M target/s390x/ioinst.c
    M target/s390x/mem_helper.c
    M target/s390x/misc_helper.c
    M target/s390x/mmu_helper.c
    M target/s390x/tcg-stub.c
    M target/s390x/tcg_s390x.h
    M target/s390x/translate.c

  Log Message:
  -----------
  Merge remote-tracking branch 
'remotes/davidhildenbrand/tags/s390x-tcg-2019-10-10' into staging

- MMU DAT translation rewrite and cleanup
- Implement more TCG CPU features related to the MMU (e.g., IEP)
- Add the current instruction length to unwind data and clean up
- Resolve one TODO for the MVCL instruction

# gpg: Signature made Thu 10 Oct 2019 12:25:06 BST
# gpg:                using RSA key 1BD9CAAD735C4C3A460DFCCA4DDE10F700FF835A
# gpg:                issuer "address@hidden"
# gpg: Good signature from "David Hildenbrand <address@hidden>" [unknown]
# gpg:                 aka "David Hildenbrand <address@hidden>" [full]
# Primary key fingerprint: 1BD9 CAAD 735C 4C3A 460D  FCCA 4DDE 10F7 00FF 835A

* remotes/davidhildenbrand/tags/s390x-tcg-2019-10-10: (31 commits)
  s390x/tcg: MVCL: Exit to main loop if requested
  target/s390x: Remove ILEN_UNWIND
  target/s390x: Remove ilen argument from trigger_pgm_exception
  target/s390x: Remove ilen argument from trigger_access_exception
  target/s390x: Remove ILEN_AUTO
  target/s390x: Rely on unwinding in s390_cpu_virt_mem_rw
  target/s390x: Rely on unwinding in s390_cpu_tlb_fill
  target/s390x: Simplify helper_lra
  target/s390x: Remove fail variable from s390_cpu_tlb_fill
  target/s390x: Return exception from translate_pages
  target/s390x: Return exception from mmu_translate
  target/s390x: Remove exc argument to mmu_translate_asce
  target/s390x: Return exception from mmu_translate_real
  target/s390x: Handle tec in s390_cpu_tlb_fill
  target/s390x: Push trigger_pgm_exception lower in s390_cpu_tlb_fill
  target/s390x: Use tcg_s390_program_interrupt in TCG helpers
  target/s390x: Remove ilen parameter from s390_program_interrupt
  target/s390x: Remove ilen parameter from tcg_s390_program_interrupt
  target/s390x: Add ilen to unwind data
  s390x/cpumodel: Add new TCG features to QEMU cpu model
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/98b2e3c9ab3a...cdfc44ac3c6d



reply via email to

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