qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 04d0ff: spapr: make spapr_populate_hotplug_cp


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 04d0ff: spapr: make spapr_populate_hotplug_cpu_dt() static
Date: Tue, 11 Jul 2017 09:13:28 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 04d0ffbd52ccd3d6e9db3d74e29d89dc8ff3fa75
      
https://github.com/qemu/qemu/commit/04d0ffbd52ccd3d6e9db3d74e29d89dc8ff3fa75
  Author: Greg Kurz <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c
    M include/hw/ppc/spapr.h

  Log Message:
  -----------
  spapr: make spapr_populate_hotplug_cpu_dt() static

Since commit ff9006ddbfd1 ("spapr: move spapr_core_[foo]plug() callbacks
close to machine code in spapr.c"), this function doesn't need to be extern
anymore.

Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 498cd99544a456f003e92342c7be471e967c1f31
      
https://github.com/qemu/qemu/commit/498cd99544a456f003e92342c7be471e967c1f31
  Author: Greg Kurz <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M include/hw/ppc/spapr.h

  Log Message:
  -----------
  spapr: refresh "platform-specific" hcalls comment

We have more of these since the addition of KVMPPC_H_LOGICAL_MEMOP in 2012.

Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: f3728f9cbbe3b5114e07ee5fdde810a63fee147e
      
https://github.com/qemu/qemu/commit/f3728f9cbbe3b5114e07ee5fdde810a63fee147e
  Author: Greg Kurz <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  spapr: fix bogus function name in comment

$ git grep spapr_ppc_reset
hw/ppc/spapr.c: * as part of spapr_ppc_reset().

$ git grep ppc_spapr_reset
hw/ppc/spapr.c:static void ppc_spapr_reset(void)
hw/ppc/spapr.c:    mc->reset = ppc_spapr_reset;
hw/ppc/spapr_hcall.c:        /* If ppc_spapr_reset() did not set up a HPT
 but one is necessary

Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: e806b4db1477a1c6bfda7bba28c7f26c47f18e1e
      
https://github.com/qemu/qemu/commit/e806b4db1477a1c6bfda7bba28c7f26c47f18e1e
  Author: Laurent Vivier <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr_pci.c

  Log Message:
  -----------
  spapr: fix migration to pseries machine < 2.8

since commit 5c4537bd ("spapr: Fix 2.7<->2.8 migration of PCI host bridge"),
some migration fields are forged from the new ones in spapr_pci_pre_save().

It works well, except when the number of MSI devices is 0,
because in this case the function exits immediately.

This fix moves the migration code before the exit code.

The problem can be reproduced with these commands:

source qemu-2.9:

    qemu-system-ppc64 -monitor stdio -M pseries-2.6 -nodefaults -S

destination qemu-2.6:

    qemu-system-ppc64 -monitor stdio -M pseries-2.6 -nodefaults \
                -incoming tcp:0:4444

on the source:

    migrate tcp:localhost:4444

Destination fails with the following error:

    qemu-system-ppc64: error while loading state for
                 instance 0x0 of device 'spapr_pci'
    qemu-system-ppc64: load of migration failed: Invalid argument

Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 0ee604abce61ab091b00ced40610866e02f55790
      
https://github.com/qemu/qemu/commit/0ee604abce61ab091b00ced40610866e02f55790
  Author: Aaron Larson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M target/ppc/excp_helper.c

  Log Message:
  -----------
  target-ppc: SPR_BOOKE_ESR not set on FP exceptions

Properly set the book E exception syndrome register when a floating
point exception occurs.

Currently on a book E processor, the POWERPC_EXCP_FP exception handler
fails to set "env->spr[SPR_BOOKE_ESR] = ESR_FP;" as required by the
book E specification.

Signed-off-by: Aaron Larson <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: f8dc29834c6b90ef05ac9463624ad0a680feb379
      
https://github.com/qemu/qemu/commit/f8dc29834c6b90ef05ac9463624ad0a680feb379
  Author: David Gibson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr_drc.c

  Log Message:
  -----------
  spapr: Leave DR-indicator management to the guest

The DR-indicator is essentially a "virtual LED" attached to a hotpluggable
device, which the guest can set to various states for the attention of
the operator or management layers.

It's mostly guest managed, except that we once-off set it to
ACTIVE/INACTIVE in the attach/detach path.  While that makes certain sense,
there's no indication in PAPR that the hypervisor should do this, and the
drmgr code on the guest side doesn't appear to need it (it will already set
the indicator to ACTIVE on hotplug, and INACTIVE on remove).

So, leave the DR-indicator entirely to the guest; the only thing we need
to do is ensure it's in a sane state on reset.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>


  Commit: 6caf3ac6131f4981c722a48d57cb4a5af3a18675
      
https://github.com/qemu/qemu/commit/6caf3ac6131f4981c722a48d57cb4a5af3a18675
  Author: David Gibson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c
    M hw/ppc/spapr_drc.c

  Log Message:
  -----------
  spapr: Uniform DRC reset paths

DRC objects have a regular device reset method.  However, it only gets
called in the usual way for PCI DRCs.  Because of where CPU and LMB DRCs
are in the QOM tree, their device reset method isn't automatically called.
So, the machine manually registers reset handlers to call device_reset().

This patch removes the device reset method, and instead always explicitly
registers the reset handler from realize().  This means the callers don't
have to worry about the two cases, and we always get proper resets.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>


  Commit: 6b762f29a8bc9feb3e45d512169571d3cc8a4f48
      
https://github.com/qemu/qemu/commit/6b762f29a8bc9feb3e45d512169571d3cc8a4f48
  Author: David Gibson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

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

  Log Message:
  -----------
  spapr: Add DRC release method

At the moment, spapr_drc_release() has an ugly switch on the DRC type to
call the right, device-specific release function.  This cleans it up by
doing that via a proper QOM method.

It's still arguably an abstraction violation for the DRC code to call into
the specific device code, but one mess at a time.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>


  Commit: 5c1da81215c7f4f010fbc0c146945a6f182e5586
      
https://github.com/qemu/qemu/commit/5c1da81215c7f4f010fbc0c146945a6f182e5586
  Author: David Gibson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

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

  Log Message:
  -----------
  spapr: Remove unnecessary differences between hotplug and coldplug paths

spapr_drc_attach() has a 'coldplug' parameter which sets the DRC into
configured state initially, instead of the usual ISOLATED/UNUSABLE state.
It turns out this is unnecessary: although coldplugged devices do need to
be in CONFIGURED state once the guest starts, that will already be
accomplished by the reset code which will move DRCs for already plugged
devices into a coldplug equivalent state.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>


  Commit: 3340e5c4f28363348a0b3654624ff72ed14aa7cf
      
https://github.com/qemu/qemu/commit/3340e5c4f28363348a0b3654624ff72ed14aa7cf
  Author: David Gibson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr_pci.c

  Log Message:
  -----------
  spapr: Use unplug_request for PCI hot unplug

AIUI, ->unplug_request in the HotplugHandler is used for "soft"
unplug, where acknowledgement from the guest is required before
completing the unplug, whereas ->unplug is used for "hard" unplug
where qemu unilaterally removes the device, and the guest just has to
cope with its sudden absence.  For spapr we (correctly) use
->unplug_request for CPU and memory hot unplug but we use ->unplug for
PCI.

While I think it might be possible to support "hard" PCI unplug within
the PAPR model, that's not how it actually works now.  Although it's
called from ->unplug, the PCI unplug path will usually just mark the
device for removal, with completion of the unplug delayed until
userspace responds to the unplug notification. If the guest doesn't
respond as expected, that could delay the unplug completion arbitrarily
long.

To reflect that, change the PCI unplug path to be called from
->unplug_request.  We also rename spapr_phb_hot_plug_child() and
spapr_phb_hot_unplug_child() to spapr_pci_plug() and
spapr_pci_unplug_request() to more obviously reflect the callbacks they're
implementing.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Greg Kurz <address@hidden>


  Commit: 6a042827b638dc73da6a72c72596f5be80bd4581
      
https://github.com/qemu/qemu/commit/6a042827b638dc73da6a72c72596f5be80bd4581
  Author: Suraj Jitindar Singh <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

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

  Log Message:
  -----------
  target/ppc: Refactor tcg radix mmu code

The mmu-radix64.c file implements functions to enable the radix mmu
emulation in tcg mode. There is a function ppc_radix64_walk_tree() which
performs the radix tree walk and also implicitly checks the pte
protection.

Move the protection checking of the pte from the ppc_radix64_walk_tree()
function into the caller. This means the ppc_radix64_walk_tree() function
can be used without protection checking which is useful for debugging.

ppc_radix64_walk_tree() no longer needs to take the rwx and prot variables.

Signed-off-by: Suraj Jitindar Singh <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 95cb0657766a495ca54caa15ab9feb5681c20f15
      
https://github.com/qemu/qemu/commit/95cb0657766a495ca54caa15ab9feb5681c20f15
  Author: Suraj Jitindar Singh <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

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

  Log Message:
  -----------
  target/ppc: Add debug function for radix mmu translation

In target/ppc/mmu-hash64.c there already exists the function
ppc_hash64_get_phys_page_debug() to get the physical (real) address for
a given effective address in hash mode.

Implement the function ppc_radix64_get_phys_page_debug() to allow a real
address to be obtained for a given effective address in radix mode.
This is used when a debugger is attached to qemu.

Previously we just had a comment saying this is unimplemented which then
fell through to the default case and caused an abort due to
unrecognised mmu model as the default had no case for the V3 mmu, which
was misleading at best.

We reuse ppc_radix64_walk_tree() which is used by the radix fault
handler since the process of walking the radix tree is identical.

Reported-by: Balbir Singh <address@hidden>
Signed-off-by: Suraj Jitindar Singh <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 160bb67885c22f98e3045d9223e2fc915d61c274
      
https://github.com/qemu/qemu/commit/160bb67885c22f98e3045d9223e2fc915d61c274
  Author: Greg Kurz <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  spapr: fix memory hotplug error path

QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails.
Let's propagate the error instead, like it is done everywhere else
where spapr_drc_attach() is called.

Signed-off-by: Greg Kurz <address@hidden>
Reviewed-by: Daniel Barboza <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 2a0d90fed5b09e27854ac5ca2af836a8248c00c1
      
https://github.com/qemu/qemu/commit/2a0d90fed5b09e27854ac5ca2af836a8248c00c1
  Author: David Gibson <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr_pci.c

  Log Message:
  -----------
  spapr: Only report host/guest IOMMU page size mismatches on KVM

We print a warning if the spapr IOMMU isn't configured to support a page
size matching the host page size backing RAM.  When that's the case we need
more complex logic to translate VFIO mappings, which is slower.

But, it's not so slow that it would be at all noticeable against the
general slowness of TCG.  So, only warn when using KVM.  This removes some
noisy and unhelpful warnings from make check on hosts with page sizes
which typically differ from those on POWER (e.g. Sparc).

Reported-by: Peter Maydell <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>


  Commit: 92e926e1e37aea7e1632535b6611ed4f62414af1
      
https://github.com/qemu/qemu/commit/92e926e1e37aea7e1632535b6611ed4f62414af1
  Author: Greg Kurz <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M target/ppc/kvm.c

  Log Message:
  -----------
  ppc/kvm: have the "family" CPU alias to point to TYPE_HOST_POWERPC_CPU

When running KVM on POWER, we allow the user to pass "-cpu POWERx" instead
of "-cpu host". This is achieved by patching the ppc_cpu_aliases[] array
so that "POWERx" points to the CPU class with the same PVR as the host CPU.
This causes CPUs to be instantiated from this CPU class instead of the
TYPE_HOST_POWERPC_CPU class which is used with "-cpu host". These CPUs thus
miss all the KVM specific tuning from kvmppc_host_cpu_class_init().

This currently causes QEMU with "-cpu POWER9" to fail when running KVM on a
POWER9 DD1 host:

qemu-system-ppc64: Register sync failed... If you're using kvm-hv.ko, only
 "-cpu host" is possible
kvm_init_vcpu failed: Invalid argument

Let's have the "POWERx" alias to point to TYPE_HOST_POWERPC_CPU directly,
so that "-cpu POWERx" instantiates CPUs from the same class as "-cpu host".

Signed-off-by: Greg Kurz <address@hidden>
Tested-by: Laurent Vivier <address@hidden>
Reviewed-by: Laurent Vivier <address@hidden>
Reviewed-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: f2b14e3a9f2e6c6c35a90dd282ea55e8bcb61b8d
      
https://github.com/qemu/qemu/commit/f2b14e3a9f2e6c6c35a90dd282ea55e8bcb61b8d
  Author: Cédric Le Goater <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c
    M include/hw/ppc/spapr_ovec.h

  Log Message:
  -----------
  spapr: introduce the XIVE_EXPLOIT option in CAS

On POWER9, the Client Architecture Support (CAS) negotiation process
determines whether the guest operates in XIVE Legacy compatibility
(the former POWER8 interrupt model) or in XIVE exploitation mode (the
newer POWER9 interrupt model).

Bit 7 of Byte 23 of vector 5 is used for this purpose.

Signed-off-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: b87680427e8a3ff682f66514e99a8344e7437247
      
https://github.com/qemu/qemu/commit/b87680427e8a3ff682f66514e99a8344e7437247
  Author: Cédric Le Goater <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  spapr: populate device tree depending on XIVE_EXPLOIT option

When XIVE is supported, the device tree should be populated
accordingly and the XIVE memory regions mapped to activate MMIOs.

Depending on the design we choose, we could also allocate different
ICS and ICP objects, or switch between objects. This needs to be
discussed.

Signed-off-by: Cédric Le Goater <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: aa916e409c04cb614ec2fee8b6b33836bf5998bb
      
https://github.com/qemu/qemu/commit/aa916e409c04cb614ec2fee8b6b33836bf5998bb
  Author: Peter Maydell <address@hidden>
  Date:   2017-07-11 (Tue, 11 Jul 2017)

  Changed paths:
    M hw/ppc/spapr.c
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_pci.c
    M include/hw/ppc/spapr.h
    M include/hw/ppc/spapr_drc.h
    M include/hw/ppc/spapr_ovec.h
    M target/ppc/excp_helper.c
    M target/ppc/kvm.c
    M target/ppc/mmu-radix64.c
    M target/ppc/mmu-radix64.h
    M target/ppc/mmu_helper.c

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

ppc patch queue 2017-07-11

  * Several minor cleanups from Greg Kurz
  * Fix for migration of pseries-2.7 and earlier machine types
  * More reworking of the DRC hotplug code, fixing several problems
    though there are still more to go
  * Fixes for CPU family / alias handling on POWER9
  * Preliminary patches for POWER9 XIVE (new interrupt controller)
    support
  * Assorted other fixes

# gpg: Signature made Tue 11 Jul 2017 05:35:16 BST
# gpg:                using RSA key 0x6C38CACA20D9B392
# 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:                 aka "David Gibson (kernel.org) <address@hidden>"
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-2.10-20170711:
  spapr: populate device tree depending on XIVE_EXPLOIT option
  spapr: introduce the XIVE_EXPLOIT option in CAS
  ppc/kvm: have the "family" CPU alias to point to TYPE_HOST_POWERPC_CPU
  spapr: Only report host/guest IOMMU page size mismatches on KVM
  spapr: fix memory hotplug error path
  target/ppc: Add debug function for radix mmu translation
  target/ppc: Refactor tcg radix mmu code
  spapr: Use unplug_request for PCI hot unplug
  spapr: Remove unnecessary differences between hotplug and coldplug paths
  spapr: Add DRC release method
  spapr: Uniform DRC reset paths
  spapr: Leave DR-indicator management to the guest
  target-ppc: SPR_BOOKE_ESR not set on FP exceptions
  spapr: fix migration to pseries machine < 2.8
  spapr: fix bogus function name in comment
  spapr: refresh "platform-specific" hcalls comment
  spapr: make spapr_populate_hotplug_cpu_dt() static

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


Compare: https://github.com/qemu/qemu/compare/29741be341d5...aa916e409c04

reply via email to

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