qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 39b28b: s390x/migration: use zero flag parame


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 39b28b: s390x/migration: use zero flag parameter
Date: Fri, 15 Dec 2017 05:45:43 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 39b28b26cf5b7d397bbc5cd1750971efad331b4b
      
https://github.com/qemu/qemu/commit/39b28b26cf5b7d397bbc5cd1750971efad331b4b
  Author: Christian Borntraeger <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/kvm.c

  Log Message:
  -----------
  s390x/migration: use zero flag parameter

valgrind pointed out that we call KVM_S390_GET_IRQ_STATE with an
undefined value for flags. Kernels prior to 4.15 did not use that
field, and later kernels ignore it for compatibility reasons, but we
better play safe.

The same is true for SET_IRQ_STATE. We should make sure to not use the
flag field, either.

Signed-off-by: Christian Borntraeger <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 339686a358b11a231aa5b6d1424e7a1460d7f277
      
https://github.com/qemu/qemu/commit/339686a358b11a231aa5b6d1424e7a1460d7f277
  Author: Christian Borntraeger <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M pc-bios/s390-ccw/start.S

  Log Message:
  -----------
  pc-bios/s390-ccw: zero out bss section

The QEMU ELF loader does not zero the bss segment.
This resulted in several bugs, e.g. see

commit 5d739a4787a5 (s390-ccw.img: Fix sporadic errors with ccw boot image - 
initialize css)
commit 6a40fa2669d3 (s390-ccw.img: Initialize next_idx)
commit 8775d91a0f42 (pc-bios/s390-ccw: Fix problem with invalid virtio-scsi LUN 
when rebooting)

Let's fix this once and forever by letting the BIOS zero the bss itself.

Suggested-by: Alexander Graf <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Reviewed-by: Richard Henderson <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 039efad77b5923d7b3421d4e60b0d178e500fa34
      
https://github.com/qemu/qemu/commit/039efad77b5923d7b3421d4e60b0d178e500fa34
  Author: Cornelia Huck <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M pc-bios/s390-ccw.img

  Log Message:
  -----------
  pc-bios/s390-ccw.img: update image

Contains the following commit:
- pc-bios/s390-ccw: zero out bss section

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


  Commit: 67ee0cefb09672247f502c0f208f2a0e3c566173
      
https://github.com/qemu/qemu/commit/67ee0cefb09672247f502c0f208f2a0e3c566173
  Author: Cornelia Huck <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-virtio-ccw.c
    M include/hw/compat.h

  Log Message:
  -----------
  s390x: introduce 2.12 compat machine

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


  Commit: 9879003bb82c1351fa84feb81aa1bbcf7442ca84
      
https://github.com/qemu/qemu/commit/9879003bb82c1351fa84feb81aa1bbcf7442ca84
  Author: Cornelia Huck <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/helper.c

  Log Message:
  -----------
  target/s390x: nuke DPRINTF in helper.c

It is not used anywhere.

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


  Commit: 8d2f850a5ab7579a852f23b28273940a47dfd7ff
      
https://github.com/qemu/qemu/commit/8d2f850a5ab7579a852f23b28273940a47dfd7ff
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/cpu.h
    M target/s390x/crypto_helper.c
    M target/s390x/excp_helper.c
    M target/s390x/interrupt.c
    M target/s390x/mem_helper.c
    M target/s390x/misc_helper.c

  Log Message:
  -----------
  s390x/tcg: introduce and use s390_program_interrupt()

Allows to easily convert more callers of program_interrupt() and to
easily introduce new exceptions without forgetting about the cpu state
reset.

Use s390_program_interrupt() in places where we already had the same
pattern. We will later get rid of program_interrupt().

RA != 0 checks are already done behind the scenes.

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


  Commit: 7693f77a7f038393b14e54a578cf4b9aeec7a2da
      
https://github.com/qemu/qemu/commit/7693f77a7f038393b14e54a578cf4b9aeec7a2da
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/fpu_helper.c
    M target/s390x/int_helper.c
    M target/s390x/internal.h
    M target/s390x/misc_helper.c

  Log Message:
  -----------
  s390x/tcg: get rid of runtime_exception()

Let's use s390_program_interrupt() instead.

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


  Commit: fc21eb6bd9f340e8d2083064e86cf09868e69872
      
https://github.com/qemu/qemu/commit/fc21eb6bd9f340e8d2083064e86cf09868e69872
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/css.c
    M include/hw/s390x/css.h
    M target/s390x/internal.h
    M target/s390x/ioinst.c

  Log Message:
  -----------
  s390x/tcg: rip out dead tpi code

It is broken and not even wired up. We'll add a new handler soon, but
that will live somewhere else.

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


  Commit: 1b98fb99d39732231a247acb04823b1ddb5570a1
      
https://github.com/qemu/qemu/commit/1b98fb99d39732231a247acb04823b1ddb5570a1
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/cpu.h
    M target/s390x/internal.h
    M target/s390x/ioinst.c
    M target/s390x/kvm.c
    M target/s390x/misc_helper.c

  Log Message:
  -----------
  s390x/ioinst: pass the retaddr to all IO instructions

TCG needs the retaddr when injecting an interrupt. Let's just pass it
along and use RA_IGNORED for KVM. The value will be completely ignored for
KVM.

Convert program_interrupt() to s390_program_interrupt() directly, making
use of the passed address.

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


  Commit: 468a93898a97639d8ba412d6a3cf9252f1927276
      
https://github.com/qemu/qemu/commit/468a93898a97639d8ba412d6a3cf9252f1927276
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/s390-pci-inst.h
    M target/s390x/kvm.c

  Log Message:
  -----------
  s390x/pci: pass the retaddr to all PCI instructions

Once we wire up TCG, we will need the retaddr to correctly inject
program interrupts. As we want to get rid of the function
program_interrupt(), convert PCI code too.

For KVM, we can simply use RA_IGNORED.

Convert program_interrupt() to s390_program_interrupt() directly, making
use of the passed address.

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


  Commit: 968db419de26d3011670ca7eeab57424f93cd888
      
https://github.com/qemu/qemu/commit/968db419de26d3011670ca7eeab57424f93cd888
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/diag.c
    M target/s390x/internal.h
    M target/s390x/kvm.c
    M target/s390x/misc_helper.c

  Log Message:
  -----------
  s390x/diag: pass the retaddr into handle_diag_308()

Needed to later drop potential_page_fault() from the diag TCG translate
function.

Convert program_interrupt() to s390_program_interrupt() directly, making
use of the passed address.

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


  Commit: 98ee9bedc734e18287902f39e3a3a8adb399386a
      
https://github.com/qemu/qemu/commit/98ee9bedc734e18287902f39e3a3a8adb399386a
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c
    M target/s390x/cpu.h
    M target/s390x/ioinst.c
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x: handle exceptions during s390_cpu_virt_mem_rw() correctly (TCG)

s390_cpu_virt_mem_rw() must always return, so callers can react on
an exception (e.g. see ioinst_handle_stcrw()).

However, for TCG we always have to exit the cpu loop (and restore the
cpu state before that) if we injected a program interrupt. So let's
introduce and use s390_cpu_virt_mem_handle_exc() in code that is not
purely KVM.

Directly pass the retaddr we already have available in these functions.

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


  Commit: 820613b1c1c76cb77a15313eb333a710972614ec
      
https://github.com/qemu/qemu/commit/820613b1c1c76cb77a15313eb333a710972614ec
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/tcg: don't exit the cpu loop in s390_cpu_virt_mem_rw()

s390_cpu_virt_mem_rw() must always return, so callers can react on
an exception (e.g. see ioinst_handle_stcrw()).

Therefore, using program_interrupt() is wrong. Fix that up.

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


  Commit: 0ef28497768d9ff354aaa93087643f7046c89679
      
https://github.com/qemu/qemu/commit/0ef28497768d9ff354aaa93087643f7046c89679
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: io instructions don't need potential_page_fault()

As we handle the retaddr in all cases properly now, we can drop it.

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


  Commit: 1a38921a61d1394089186c03491321b6e682793c
      
https://github.com/qemu/qemu/commit/1a38921a61d1394089186c03491321b6e682793c
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: use s390_program_interrupt() in SCLP Service Call

Now we can drop potential_page_fault(). While at it, move the
unlock further up, looks cleaner.

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


  Commit: 277b156d8dd4d54fa00997ef384d4503dd057479
      
https://github.com/qemu/qemu/commit/277b156d8dd4d54fa00997ef384d4503dd057479
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: use s390_program_interrupt() in DIAG

Now we can drop the two save statements in the translate function.

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


  Commit: 8808338200fe3bb2b475fa7b6492b34c1d32fdd2
      
https://github.com/qemu/qemu/commit/8808338200fe3bb2b475fa7b6492b34c1d32fdd2
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: use s390_program_interrupt() in per_check_exception()

We can now drop updating the cc.

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


  Commit: 005a0491846db216ef9d3b31f8567fd5527aa0c5
      
https://github.com/qemu/qemu/commit/005a0491846db216ef9d3b31f8567fd5527aa0c5
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/cc_helper.c

  Log Message:
  -----------
  s390x/tcg: use s390_program_interrupt() in SACF

Convert this user, too.

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


  Commit: 5e8f154e88c0722377a36ee2d21873cb23c5ef42
      
https://github.com/qemu/qemu/commit/5e8f154e88c0722377a36ee2d21873cb23c5ef42
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: use s390_program_interrupt() in STSI

STSI needs some more love, but let's do one step at a time.
We can now drop potential_page_fault().

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


  Commit: 51dcdbd319f8d46834d8155defc8d384a9958a73
      
https://github.com/qemu/qemu/commit/51dcdbd319f8d46834d8155defc8d384a9958a73
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

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

  Log Message:
  -----------
  s390x/tcg: drop program_interrupt()

All users are gone, we can finally drop it and make sure that all new
program interrupt injections are reminded of the retaddr - as they have to
use s390_program_interrupt() now.

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


  Commit: cb3129c3762ceadabcef7e9d319bae9243fc238e
      
https://github.com/qemu/qemu/commit/cb3129c3762ceadabcef7e9d319bae9243fc238e
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: drop potential_page_fault()

Only one user left, get rid of it so we don't get any new users.

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


  Commit: c748814b20f1f1b43eed1fd32c84579c60f4cc58
      
https://github.com/qemu/qemu/commit/c748814b20f1f1b43eed1fd32c84579c60f4cc58
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  s390x/pci: factor out endianess conversion

There are two places where the same endianness conversion
is done.
Let's factor this out into a static function.

Note that the conversion must always be done for data in a register:

The S390 BE guest converted date to le before issuing the instruction.

After interception in a BE host:
ZPCI VFIO using pwrite must make the conversion back for the BE kernel.
Kernel will do BE to le translation when loading the register for the
real instruction.

After interception in a le host:
TCG stores a BE register in le, swapping bytes.
But since the data in the register was already le it is now BE
ZPCI VFIO must convert it to le before writing to the PCI memory.

In both cases ZPCI VFIO must swap the bytes from the register.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 7645b9a794741be6d007d8074c73c4510d269ad4
      
https://github.com/qemu/qemu/commit/7645b9a794741be6d007d8074c73c4510d269ad4
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/s390-pci-inst.h

  Log Message:
  -----------
  s390x/pci: rework PCI STORE

Enhance the fault detection, correction of the fault reporting.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 8cbd6aab9579a1ce0601049ea4bce5ea37a668ce
      
https://github.com/qemu/qemu/commit/8cbd6aab9579a1ce0601049ea4bce5ea37a668ce
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  s390x/pci: rework PCI LOAD

Enhance the fault detection, correction of the fault reporting.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 0e7c259adff7e97f829a08a5f146e7ee03b5ae47
      
https://github.com/qemu/qemu/commit/0e7c259adff7e97f829a08a5f146e7ee03b5ae47
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-bus.h
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/s390-pci-inst.h

  Log Message:
  -----------
  s390x/pci: rework PCI STORE BLOCK

Enhance the fault detection.

Fixup the precedence to check the destination path existance
before checking for the source accessibility.

Add the maxstbl entry to both the Query PCI Function Group
response and the PCIBusDevice structure.

Initialize the maxstbl to 128 per default until we get
the actual data from the hardware.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: ab0380cab330c986ac6db91df1679c035d19ae77
      
https://github.com/qemu/qemu/commit/ab0380cab330c986ac6db91df1679c035d19ae77
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  s390x/pci: move the memory region read from pcilg

Let's move the memory region read from pcilg into a dedicated function.
This allows us to prepare a later patch.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 8af27a9eab16f92990ce9b562719bdb485ffaf1b
      
https://github.com/qemu/qemu/commit/8af27a9eab16f92990ce9b562719bdb485ffaf1b
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  s390x/pci: move the memory region write from pcistg

Let's move the memory region write from pcistg into a dedicated
function.
This allows us to prepare a later patch searching for subregions
inside of the memory region.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 4f6482bfe3da1e6b51ad4722a0c22f22f0d54a3b
      
https://github.com/qemu/qemu/commit/4f6482bfe3da1e6b51ad4722a0c22f22f0d54a3b
  Author: Pierre Morel <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-pci-inst.c

  Log Message:
  -----------
  s390x/pci: search for subregion inside the BARs

When dispatching memory access to PCI BAR region, we must
look for possible subregions, used by the PCI device to map
different memory areas inside the same PCI BAR.

Since the data offset we received is calculated starting at the
region start address we need to adjust the offset for the subregion.

The data offset inside the subregion is calculated by substracting
the subregion's starting address from the data offset in the region.

The access to the MSIX region is now handled in a generic way,
we do not need the specific trap_msix() function anymore.

Signed-off-by: Pierre Morel <address@hidden>
Reviewed-by: Yi Min Zhao <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 99577c492fb2916165ed9bc215f058877f0a4106
      
https://github.com/qemu/qemu/commit/99577c492fb2916165ed9bc215f058877f0a4106
  Author: Halil Pasic <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/3270-ccw.c
    M hw/s390x/css-bridge.c
    M hw/s390x/css.c
    M hw/s390x/s390-ccw.c
    M hw/s390x/s390-virtio-ccw.c
    M hw/s390x/virtio-ccw.c
    M include/hw/s390x/css.h

  Log Message:
  -----------
  s390x/css: unrestrict cssids

The default css 0xfe is currently restricted to virtual subchannel
devices. The hope when the decision was made was, that non-virtual
subchannel devices will come around when guest can exploit multiple
channel subsystems. Since the guests generally don't do, the pain
of the partitioned (cssid) namespace outweighs the gain.

Let us remove the corresponding restrictions (virtual devices
can be put only in 0xfe and non-virtual devices in any css except
the 0xfe -- while s390-squash-mcss then remaps everything to cssid 0).

At the same time, change our schema for generating css bus ids to put
both virtual and non-virtual devices into the default css (spilling over
into other css images, if needed). The intention is to deprecate
s390-squash-mcss. With this change devices without a specified devno
won't end up hidden to guests not supporting multiple channel subsystems,
unless this can not be avoided (default css full).

Let us also advertise the changes to the management software (so it can
tell are cssids unrestricted or restricted).

The adverse effect of getting rid of the restriction on migration should
not be too severe.  Vfio-ccw devices are not live-migratable yet, and for
virtual devices using the extra freedom would only make sense with the
aforementioned guest support in place.

The auto-generated bus ids are affected by both changes. We hope to not
encounter any auto-generated bus ids in production as Libvirt is always
explicit about the bus id.  Since 8ed179c937 ("s390x/css: catch section
mismatch on load", 2017-05-18) the worst that can happen because the same
device ended up having a different bus id is a cleanly failed migration.
I find it hard to reason about the impact of changed auto-generated bus
ids on migration for command line users as I don't know which rules is
such an user supposed to follow.

Another pain-point is down- or upgrade of QEMU for command line users.
The old way and the new way of doing vfio-ccw are mutually incompatible.
Libvirt is only going to support the new way, so for libvirt users, the
possible problems at QEMU downgrade are the following. If a domain
contains virtual devices placed into a css different than 0xfe the domain
will refuse to start with a QEMU not having this patch. Putting devices
into a css different that 0xfe however won't make much sense in the near
future (guest support). Libvirt will refuse to do vfio-ccw with a QEMU
not having this patch. This is business as usual.

Signed-off-by: Halil Pasic <address@hidden>
Acked-by: Christian Borntraeger <address@hidden>
Reviewed-by: Dong Jia Shi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: d69969e55f2187188c3d2a0ea9c6be29631358fb
      
https://github.com/qemu/qemu/commit/d69969e55f2187188c3d2a0ea9c6be29631358fb
  Author: Halil Pasic <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/s390-virtio-ccw.c
    M qemu-doc.texi
    M qemu-options.hx

  Log Message:
  -----------
  s390x: deprecate s390-squash-mcss machine prop

With the cssids unrestricted (commit "s390x/css: unrestrict cssids") the
s390-squash-mcss machine property should not be used.  Actually Libvirt
never supported this, so the expectation is that removing it should be
pretty painless.  But let's play nice and deprecate it first.

Signed-off-by: Halil Pasic <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 864c2512576ab4e0d84bda0481b15dd1820d43de
      
https://github.com/qemu/qemu/commit/864c2512576ab4e0d84bda0481b15dd1820d43de
  Author: Cornelia Huck <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M hw/s390x/css-bridge.c

  Log Message:
  -----------
  s390x/css: attach css bridge

Logically, the css bridge should be attached to the machine.

Reviewed-by: Christian Borntraeger <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
Tested-by: Bjoern Walk <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: b700d75eda81c371c575b759de8e260d9f147494
      
https://github.com/qemu/qemu/commit/b700d75eda81c371c575b759de8e260d9f147494
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

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

  Log Message:
  -----------
  s390x/kvm: factor out build_channel_report_mcic() into cpu.h

We'll need it later on in two places. Refactor it to just indicate the
validity bits. While at it, introduce a define for the used CR14 bit (we'll
also need later on).

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


  Commit: b8d55db07089493da8cc264ab5991253e1102822
      
https://github.com/qemu/qemu/commit/b8d55db07089493da8cc264ab5991253e1102822
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

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

  Log Message:
  -----------
  s390x/tcg: fix and cleanup mcck injection

The architecture mode indication wasn't stored. The split of certain
64bit fields was unnecessary. Also, the complete clock comparator, not
just bit 0-55 (starting at byte 1) was stored.

We now generate a proper MCIC via the same helper we use for KVM.

There is more to clean up, but we will change the other parts later on
either way.

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


  Commit: 257a119ee3464a0558d47f692fb007b2713e24ec
      
https://github.com/qemu/qemu/commit/257a119ee3464a0558d47f692fb007b2713e24ec
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/helper.h
    M target/s390x/insn-data.def
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD

Needed for machine check handling inside Linux (when restoring registers).

Except for SIGP and machine checks, we don't make use of the register
yet. Sufficient for now.

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


  Commit: a63b7cbf884b98d4de1cf6519143fa8202f76fe1
      
https://github.com/qemu/qemu/commit/a63b7cbf884b98d4de1cf6519143fa8202f76fe1
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: indicate value of TODPR in STCKE

We were not yet using the value of the TOD Programmable Register.

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


  Commit: 5a59bc1de21921996545574822e92004629dbd37
      
https://github.com/qemu/qemu/commit/5a59bc1de21921996545574822e92004629dbd37
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/helper.h
    M target/s390x/insn-data.def
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: wire up STORE CHANNEL REPORT WORD

CRW machine check handling requires STCRW. So let's wire it up.

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


  Commit: 0e9383bca8b92c4b457a46af0e351b7712984622
      
https://github.com/qemu/qemu/commit/0e9383bca8b92c4b457a46af0e351b7712984622
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/insn-data.def
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: ASI/ASGI/ALSI/ALSGI are atomic with Interlocked-acccess facility 1

The semantics of ASI/ASGI/ALSI/ALSGI changed. Let's implement them just
like LOAD AND ADD, so they are atomic. Emulate old behavior.

This fixes random crashes when booting a Linux kernel compiled for
z196+ with SMP + MTTCG.

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


  Commit: f400be1813ee581f15bb2e93b463e2d9857e12f4
      
https://github.com/qemu/qemu/commit/f400be1813ee581f15bb2e93b463e2d9857e12f4
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/cpu_models.c
    M target/s390x/insn-data.def
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: implement Interlocked-Access Facility 2

With this facility, OI/OIY, NI/NIY and XI/XIY are atomic. All operate on
one byte (MO_UB). Emulate old behavior.

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


  Commit: 86c34633c5a822e5eebed96ae163426e2615abc1
      
https://github.com/qemu/qemu/commit/86c34633c5a822e5eebed96ae163426e2615abc1
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/helper.h
    M target/s390x/insn-data.def
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: wire up SET ADDRESS LIMIT

Let's handle it just like KVM:
    Depending on the model, this instruction may not be
    provided. When this instruction is not provided, it is
    checked for operand exception and privileged-opera-
    tion exception, and then is suppressed.

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


  Commit: a9de75a0b8b5acb26f26bd0048f0a33b416e5f66
      
https://github.com/qemu/qemu/commit/a9de75a0b8b5acb26f26bd0048f0a33b416e5f66
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/helper.h
    M target/s390x/insn-data.def
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: wire up SET CHANNEL MONITOR

Let's just wire it up like KVM.

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


  Commit: b9b0a4dc13cc6180c79056a7d15e828e93a24a41
      
https://github.com/qemu/qemu/commit/b9b0a4dc13cc6180c79056a7d15e828e93a24a41
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/insn-data.def
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: Implement STORE CHANNEL PATH STATUS

Just like KVM does, we should suppress this instruction:
    When this instruction is not provided, it is
    checked for privileged operation exception and the
    instruction is suppressed by the machine

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


  Commit: ad0ccf1e6a45c22d6c0564f8365bf1df39c64c15
      
https://github.com/qemu/qemu/commit/ad0ccf1e6a45c22d6c0564f8365bf1df39c64c15
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/insn-data.def
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: Implement SIGNAL ADAPTER instruction

KVM suppresses SIGA, setting cc=3. Let's do the same for TCG, so we're at
least equal.

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


  Commit: 4bac52f5c4b3dd5d0bd7568377ad7e957d5e3c6a
      
https://github.com/qemu/qemu/commit/4bac52f5c4b3dd5d0bd7568377ad7e957d5e3c6a
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/cpu_models.c
    M target/s390x/helper.h
    M target/s390x/insn-data.def
    M target/s390x/misc_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  s390x/tcg: implement extract-CPU-time facility

It only provides the EXTRACT CPU TIME instruction. We can reuse the stpt
helper, which calculates the CPU timer value.

As the instruction is not privileged, but we don't have a CPU timer
value in case of linux user, we simply reuse cpu_get_host_ticks() to
produce some descending value.

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


  Commit: 33ae8a424245bb9ebb66875ca5b16c26f9e88da6
      
https://github.com/qemu/qemu/commit/33ae8a424245bb9ebb66875ca5b16c26f9e88da6
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

  Changed paths:
    M target/s390x/cpu_models.c

  Log Message:
  -----------
  s390x/tcg: we already implement the Set-Program-Parameter facility

The Set-Program-Parameter facility (also known as Load-Program-Parameter
facility) provides the LPP instruction used to load the program
parameter. We already implement that instruction in TCG, so add it to our
list.

Note: Not documented in the PoP but in "The Load-Program-Parameter and
CPU-Measurement Facilities) - SA23-2260-05 document.

While at it, make the whole list ordered (according to cpu_features_def.h).

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


  Commit: 35b4df6417fc3cd9d0150590f770fdd404dfbee7
      
https://github.com/qemu/qemu/commit/35b4df6417fc3cd9d0150590f770fdd404dfbee7
  Author: David Hildenbrand <address@hidden>
  Date:   2017-12-14 (Thu, 14 Dec 2017)

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

  Log Message:
  -----------
  s390x: change the QEMU cpu model to a stripped down z12

We are good enough to boot upstream Linux kernels / Fedora 26/27. That
should be sufficient for now.

As the QEMU CPU model is migration safe, let's add compatibility code.
Generate the feature list to reduce the chance of messing things up in the
future.

Signed-off-by: David Hildenbrand <address@hidden>
Message-Id: <address@hidden>
[CH: squashed 's390x/cpumodel: make qemu cpu model play with "none" machine'
(address@hidden) and 's390x/tcg: don't include z13
features in the qemu model' (address@hidden) into
patch]
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: bb223055b9b327ec66e1f6d2fbaebaee0b8f3dbe
      
https://github.com/qemu/qemu/commit/bb223055b9b327ec66e1f6d2fbaebaee0b8f3dbe
  Author: Christian Borntraeger <address@hidden>
  Date:   2017-12-15 (Fri, 15 Dec 2017)

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

  Log Message:
  -----------
  s390-ccw-virtio: allow for systems larger that 7.999TB

KVM does not allow memory regions > KVM_MEM_MAX_NR_PAGES, basically
limiting the memory per slot to 8TB-4k. As memory slots on s390/kvm must
be a multiple of 1MB we need start a new memory region if we cross
8TB-1M.

With that (and optimistic overcommitment in the kernel) I was able to
start a 24TB guest on a 1TB system.

Signed-off-by: Christian Borntraeger <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: David Hildenbrand <address@hidden>
[CH: 1UL -> 1ULL in KVM_MEM_MAX_NR_PAGES; build fix on 32 bit hosts]
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: a7cf5391a4a13eb63ec3b2da95cc33a762649d80
      
https://github.com/qemu/qemu/commit/a7cf5391a4a13eb63ec3b2da95cc33a762649d80
  Author: Peter Maydell <address@hidden>
  Date:   2017-12-15 (Fri, 15 Dec 2017)

  Changed paths:
    M hw/s390x/3270-ccw.c
    M hw/s390x/css-bridge.c
    M hw/s390x/css.c
    M hw/s390x/s390-ccw.c
    M hw/s390x/s390-pci-bus.h
    M hw/s390x/s390-pci-inst.c
    M hw/s390x/s390-pci-inst.h
    M hw/s390x/s390-virtio-ccw.c
    M hw/s390x/virtio-ccw.c
    M include/hw/compat.h
    M include/hw/s390x/css.h
    M pc-bios/s390-ccw.img
    M pc-bios/s390-ccw/start.S
    M qemu-doc.texi
    M qemu-options.hx
    M target/s390x/cc_helper.c
    M target/s390x/cpu.h
    M target/s390x/cpu_models.c
    M target/s390x/cpu_models.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/helper.h
    M target/s390x/insn-data.def
    M target/s390x/int_helper.c
    M target/s390x/internal.h
    M target/s390x/interrupt.c
    M target/s390x/ioinst.c
    M target/s390x/kvm.c
    M target/s390x/mem_helper.c
    M target/s390x/misc_helper.c
    M target/s390x/mmu_helper.c
    M target/s390x/translate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20171215-v2' into 
staging

s390x changes for 2.12:
- Lots of tcg improvements: ccw hotplug is now working and we can run
  a Linux kernel built for z12 under tcg
- zPCI improvements to get virtio-pci working
- get rid of the cssid restrictions for virtual and non-virtual channel
  devices
- we now support 8TB+ systems
- 2.12 compat machine
- fixes and cleanups

# gpg: Signature made Fri 15 Dec 2017 10:57:01 GMT
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# gpg:                 aka "Cornelia Huck <address@hidden>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* remotes/cohuck/tags/s390x-20171215-v2: (46 commits)
  s390-ccw-virtio: allow for systems larger that 7.999TB
  s390x: change the QEMU cpu model to a stripped down z12
  s390x/tcg: we already implement the Set-Program-Parameter facility
  s390x/tcg: implement extract-CPU-time facility
  s390x/tcg: Implement SIGNAL ADAPTER instruction
  s390x/tcg: Implement STORE CHANNEL PATH STATUS
  s390x/tcg: wire up SET CHANNEL MONITOR
  s390x/tcg: wire up SET ADDRESS LIMIT
  s390x/tcg: implement Interlocked-Access Facility 2
  s390x/tcg: ASI/ASGI/ALSI/ALSGI are atomic with Interlocked-acccess facility 1
  s390x/tcg: wire up STORE CHANNEL REPORT WORD
  s390x/tcg: indicate value of TODPR in STCKE
  s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD
  s390x/tcg: fix and cleanup mcck injection
  s390x/kvm: factor out build_channel_report_mcic() into cpu.h
  s390x/css: attach css bridge
  s390x: deprecate s390-squash-mcss machine prop
  s390x/css: unrestrict cssids
  s390x/pci: search for subregion inside the BARs
  s390x/pci: move the memory region write from pcistg
  ...

# Conflicts:
#       include/hw/compat.h

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


Compare: https://github.com/qemu/qemu/compare/96a6298889d6...a7cf5391a4a1

reply via email to

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