qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 5c94b2: ppc: Rework POWER7 & POWER8 exception


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 5c94b2: ppc: Rework POWER7 & POWER8 exception model
Date: Tue, 05 Apr 2016 03:00:08 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 5c94b2a5e5ef7f91270ce034d2095c6ed924c61d
      
https://github.com/qemu/qemu/commit/5c94b2a5e5ef7f91270ce034d2095c6ed924c61d
  Author: Cédric Le Goater <address@hidden>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M hw/ppc/spapr_hcall.c
    M include/hw/ppc/spapr.h
    M target-ppc/cpu.h
    M target-ppc/excp_helper.c
    M target-ppc/translate_init.c

  Log Message:
  -----------
  ppc: Rework POWER7 & POWER8 exception model

From: Benjamin Herrenschmidt <address@hidden>

This patch fixes the current AIL implementation for POWER8. The
interrupt vector address can be calculated directly from LPCR when the
exception is handled. The excp_prefix update becomes useless and we
can cleanup the H_SET_MODE hcall.

Signed-off-by: Benjamin Herrenschmidt <address@hidden>
[clg: Removed LPES0/1 handling for HV vs. !HV
      Fixed LPCR_ILE case for POWERPC_EXCP_POWER8 ]
Signed-off-by: Cédric Le Goater <address@hidden>
[dwg: This was written as a cleanup, but it also fixes a real bug
      where setting an alternative interrupt location would not be
      correctly migrated]
Signed-off-by: David Gibson <address@hidden>


  Commit: f40eb921da78d7524f4d1d96a5c04c77c4a26a28
      
https://github.com/qemu/qemu/commit/f40eb921da78d7524f4d1d96a5c04c77c4a26a28
  Author: Michael Roth <address@hidden>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_events.c
    M include/hw/ppc/spapr_drc.h

  Log Message:
  -----------
  spapr_drc: enable immediate detach for unsignalled devices

Currently spapr doesn't support "aborting" hotplug of PCI
devices by allowing device_del to immediately remove the
device if we haven't signalled the presence of the device
to the guest.

In the past this wasn't an issue, since we always immediately
signalled device attach and simply relied on full guest-aware
add->remove path for device removal. However, as of 788d259,
we now defer signalling for PCI functions until function 0
is attached, so now we need to deal with these "abort" operations
for cases where a user hotplugs a non-0 function, then opts to
remove it prior hotplugging function 0. Currently they'd have to
reboot before the unplug completed. PCIe multifunction hotplug
does not have this requirement however, so from a management
implementation perspective it would be good to address this within
the same release as 788d259.

We accomplish this by simply adding a 'signalled' flag to track
whether a device hotplug event has been sent to the guest. If it
hasn't, we allow immediate removal under the assumption that the
guest will not be using the device. Devices present at boot/reset
time are also assumed to be 'signalled'.

For CPU/memory/etc, signalling will still happen immediately
as part of device_add, so only PCI functions should be affected.

Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Cc: address@hidden
Signed-off-by: Michael Roth <address@hidden>
[dwg: This fixes a regression where an incorrect hot-add of a non-zero
      function can no longer be backed out until function 0 is added]
Signed-off-by: David Gibson <address@hidden>


  Commit: efdaf797de009e194db89dcd8b171fa35181a6f2
      
https://github.com/qemu/qemu/commit/efdaf797de009e194db89dcd8b171fa35181a6f2
  Author: David Gibson <address@hidden>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M vl.c

  Log Message:
  -----------
  vl: Move cpu_synchronize_all_states() into qemu_system_reset()

There are currently 3 calls to qemu_system_reset() in vl.c.  Two of them
are immediately preceded by a cpu_synchronize_all_states9) and the
remaining one should be.

The one which doesn't is the very first reset called directly from main().
Without a cpu_synchronize_all_states(), kvm_vcpu_dirty is false at this
point from the earlier cpu_synchronize_all_post_init().  That's incorrect
because the reset path is quite likely to update the CPU state, and that
updated state should be pushed back to KVM, not overwritten with stale
data pushed to KVM immediately after init.

This patch moves the call to cpu_synchronize_all_states() into
qemu_system_reset() for safety, so it is always called.  AFAICT this should
be safe for the handful of callers outside vl.c - these all appear to be in
places where the cpu state is already synchronized so the extra call
will be a no-op.

Signed-off-by: David Gibson <address@hidden>
Acked-by: Paolo Bonzini <address@hidden>
Tested-by: Laurent Vivier <address@hidden>


  Commit: 1dbc7cc9b91ba229ec958418bef483364f06fe72
      
https://github.com/qemu/qemu/commit/1dbc7cc9b91ba229ec958418bef483364f06fe72
  Author: Peter Maydell <address@hidden>
  Date:   2016-04-05 (Tue, 05 Apr 2016)

  Changed paths:
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_events.c
    M hw/ppc/spapr_hcall.c
    M include/hw/ppc/spapr.h
    M include/hw/ppc/spapr_drc.h
    M target-ppc/cpu.h
    M target-ppc/excp_helper.c
    M target-ppc/translate_init.c
    M vl.c

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

ppc patch queue for 2016-03-24

Three bugfixes for target-ppc, pseries machine type and related devices.

1. Fix a bug in the core code where kvm_vcpu_dirty would not be set
   before the very first system reset.  This meant that if things in
   the reset path did their own cpu_synchronize_state() it would pull
   stale data out of KVM.

   On ppc this, in combination with a previous cleanup meant that the
   MSR would be zeroed before entry, instead of correctly having the
   SF (64-bit mode) bit set.

2. Allow immediate detach of hot-added PCI devices which haven't yet
   been announced to the guest.

   This fixes a regression: because of a case where we now defer
   announcement of non-zero functions to the guest, an incorrect
   hot-add of such a device can't be backed out until the add is
   completed, which is counter-intuitive to say the least.

3. Fix migration of alternate interrupt locations.  The location of
   interrupt vectors can be affected by the LPCR, and we weren't
   correctly recalculating this after migration of a non-standard LPCR
   value.

# gpg: Signature made Tue 05 Apr 2016 03:13:41 BST using RSA key ID 20D9B392
# gpg: Good signature from "David Gibson <address@hidden>"
# gpg:                 aka "David Gibson (Red Hat) <address@hidden>"
# gpg:                 aka "David Gibson (ozlabs.org) <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.6-20160405:
  vl: Move cpu_synchronize_all_states() into qemu_system_reset()
  spapr_drc: enable immediate detach for unsignalled devices
  ppc: Rework POWER7 & POWER8 exception model

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


Compare: https://github.com/qemu/qemu/compare/2e3a76ae3e47...1dbc7cc9b91b

reply via email to

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