qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] eac53a: s390x/kvm: call cpu_synchronize_state


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] eac53a: s390x/kvm: call cpu_synchronize_state() on every k...
Date: Tue, 10 Apr 2018 02:08:48 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: eac53ac598cc43e325658a6889d9951fd7244e11
      
https://github.com/qemu/qemu/commit/eac53ac598cc43e325658a6889d9951fd7244e11
  Author: David Hildenbrand <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/s390x/kvm.c

  Log Message:
  -----------
  s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

Manually having to use cpu_synchronize_state() is error prone. And as
Christian Borntraeger discovered, e.g. handle_diag() is currently
missing a cpu_synchronize_state(), as decode_basedisp_s() uses a
general purpose register value internally.

So let's do an overall cpu_synchronize_state(), which fixes at least the
one mentioned BUG. We will clean up the superfluous cpu_synchronize_state()
calls later.

We now also call it (although maybe not neded) for
- KVM_EXIT_S390_RESET -> s390_reipl_request()
- KVM_EXIT_DEBUG -> kvm_arch_handle_debug_exit()
- unmanagable/unimplemented intercepts
- ICPT_CPU_STOP -> do_stop_interrupt() -> cpu gets halted
- Scenarios where we inject an operation exception
- handle_stsi()

I don't think any of these are performance critical. Especially as we
have all information directly contained in kvm_run, there are no
additional IOCTLs to issue on modern kernels.

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


  Commit: 11ef6d50fcfaa29e547c9755bdc56b093bb9ba67
      
https://github.com/qemu/qemu/commit/11ef6d50fcfaa29e547c9755bdc56b093bb9ba67
  Author: Viktor Mihajlovski <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/s390x/ipl.c

  Log Message:
  -----------
  s390: Refactor IPL parameter block generation

Splitting out the the CCW device extraction allows reuse.

Signed-off-by: Viktor Mihajlovski <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Farhan Ali <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 789b5a401b330510da663b4d4ae1ef8a7410c353
      
https://github.com/qemu/qemu/commit/789b5a401b330510da663b4d4ae1ef8a7410c353
  Author: Viktor Mihajlovski <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/s390x/ipl.c

  Log Message:
  -----------
  s390: Ensure IPL from SCSI works as expected

Operating systems may request an IPL from a virtio-scsi device
by specifying an IPL parameter type of CCW. In this case QEMU
won't set up the IPLB correctly. The BIOS will still detect
it's a SCSI device to boot from, but it will now have to search
for the first LUN and attempt to boot from there.
However this may not be the original boot LUN if there's more than
one SCSI disk attached to the HBA.

With this change QEMU will detect that the request is for a
SCSI device and will rebuild the initial IPL parameter info
if it's the SCSI device used for the first boot. In consequence
the BIOS can use the boot LUN from the IPL information block.

In case a different SCSI device has been set, the BIOS will find
and use the first available LUN.

Signed-off-by: Viktor Mihajlovski <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Farhan Ali <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: e8c7ef288abb05b741a95418ee2de85c1071e0db
      
https://github.com/qemu/qemu/commit/e8c7ef288abb05b741a95418ee2de85c1071e0db
  Author: Viktor Mihajlovski <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M pc-bios/s390-ccw/bootmap.c
    M pc-bios/s390-ccw/iplb.h

  Log Message:
  -----------
  s390: Do not pass inofficial IPL type to the guest

IPL over a virtio-scsi device requires special handling not
available in the real architecture. For this purpose the IPL
type 0xFF has been chosen as means of communication between
QEMU and the pc-bios. However, a guest OS could be confused
by seeing an unknown IPL type.

This change sets the IPL parameter type to 0x02 (CCW) to prevent
this. Pre-existing Linux has looked up the IPL parameters only in
the case of FCP IPL. This means that the behavior should stay
the same even if Linux checks for the IPL type unconditionally.

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


  Commit: c607bb8f8a6287704fdf06c78ee24d7443a6a8af
      
https://github.com/qemu/qemu/commit/c607bb8f8a6287704fdf06c78ee24d7443a6a8af
  Author: Cornelia Huck <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

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

  Log Message:
  -----------
  pc-bios/s390: update images

Contains the following commits:
- s390: Do not pass inofficial IPL type to the guest

For s390-netboot.img, this also contains the following commits (update
was forgotten last time):
- pc-bios/s390-ccw: Move string arrays from bootmap header to .c file
- pc-bios/s390-ccw: Increase virtio timeout to 30 seconds

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


  Commit: be4d026f645eb31078e08d431c93a898b895024e
      
https://github.com/qemu/qemu/commit/be4d026f645eb31078e08d431c93a898b895024e
  Author: Greg Kurz <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/vfio/ccw.c

  Log Message:
  -----------
  vfio-ccw: fix memory leaks in vfio_ccw_realize()

If the subchannel is already attached or if vfio_get_device() fails, the
code jumps to the 'out_device_err' label and doesn't free the string it
has just allocated.

The code should be reworked so that vcdev->vdev.name only gets set when
the device has been attached, and freed when it is about to be detached.
This could be achieved  with the addition of a vfio_ccw_get_device()
function that would be the counterpart of vfio_put_device(). But this is
a more elaborate cleanup that should be done in a follow-up. For now,
let's just add calls to g_free() on the buggy error paths.

Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Cornelia Huck <address@hidden>


  Commit: 61a17fea6df45f0219537536b7af92a42df6ade6
      
https://github.com/qemu/qemu/commit/61a17fea6df45f0219537536b7af92a42df6ade6
  Author: David Hildenbrand <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/s390x/mmu_helper.c

  Log Message:
  -----------
  s390x/mmu: don't overwrite pending exception in mmu translate

If we already triggered another exception, don't overwrite it with a
protection exception.

Only applies to old KVM instances without the virtual memory access
IOCTL in KVM.

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


  Commit: b3a184f51fbed3401694a9619e6842f882a64fee
      
https://github.com/qemu/qemu/commit/b3a184f51fbed3401694a9619e6842f882a64fee
  Author: David Hildenbrand <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M target/s390x/helper.c

  Log Message:
  -----------
  s390x: load_psw() should only exchange the PSW for KVM

Let's simplify it a bit. On some weird circumstances we would have
tried to recompute watchpoints when running under KVM. load_psw() is
called from do_restart_interrupt() during a SIGP RESTART if the target
CPU is STOPPED. Let's touch watchpoints only in the TCG case - where
they are used for PER emulation.

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


  Commit: 1e7e92e2ef874aa3a235d59b2be1da7a29b6fd29
      
https://github.com/qemu/qemu/commit/1e7e92e2ef874aa3a235d59b2be1da7a29b6fd29
  Author: Peter Maydell <address@hidden>
  Date:   2018-04-09 (Mon, 09 Apr 2018)

  Changed paths:
    M hw/s390x/ipl.c
    M hw/vfio/ccw.c
    M pc-bios/s390-ccw.img
    M pc-bios/s390-ccw/bootmap.c
    M pc-bios/s390-ccw/iplb.h
    M pc-bios/s390-netboot.img
    M target/s390x/helper.c
    M target/s390x/kvm.c
    M target/s390x/mmu_helper.c

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

Fixes for s390x: kvm, vfio-ccw, ipl code, bios. Includes a rebuild
of s390-ccw.img and s390-netboot.img.

# gpg: Signature made Mon 09 Apr 2018 16:08:19 BST
# gpg:                using RSA key DECF6B93C6F02FAF
# 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-20180409:
  s390x: load_psw() should only exchange the PSW for KVM
  s390x/mmu: don't overwrite pending exception in mmu translate
  vfio-ccw: fix memory leaks in vfio_ccw_realize()
  pc-bios/s390: update images
  s390: Do not pass inofficial IPL type to the guest
  s390: Ensure IPL from SCSI works as expected
  s390: Refactor IPL parameter block generation
  s390x/kvm: call cpu_synchronize_state() on every kvm_arch_handle_exit()

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


Compare: https://github.com/qemu/qemu/compare/915d34c5f99b...1e7e92e2ef87

reply via email to

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