qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] ec6935: target/ppc: pass const string to kvmp


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ec6935: target/ppc: pass const string to kvmppc_is_mem_bac...
Date: Tue, 13 Jun 2017 04:54:18 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ec69355beffe138c0f97306e65410e5dbc605554
      
https://github.com/qemu/qemu/commit/ec69355beffe138c0f97306e65410e5dbc605554
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M target/ppc/kvm.c
    M target/ppc/kvm_ppc.h

  Log Message:
  -----------
  target/ppc: pass const string to kvmppc_is_mem_backend_page_size_ok()

This function has three implementations. Two are stubs that do nothing
and the third one only passes the obj_path argument to:

Object *object_resolve_path(const char *path, bool *ambiguous);

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


  Commit: 2d3e302ec2246d703ffa8d8f8769a3fa448d8145
      
https://github.com/qemu/qemu/commit/2d3e302ec2246d703ffa8d8f8769a3fa448d8145
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M target/ppc/kvm.c

  Log Message:
  -----------
  target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok()

The string returned by object_property_get_str() is dynamically allocated.

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


  Commit: 8a9e0e7b890b2598da94646bf6a7272f3d3924de
      
https://github.com/qemu/qemu/commit/8a9e0e7b890b2598da94646bf6a7272f3d3924de
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  spapr: fix memory leak in spapr_memory_pre_plug()

The string returned by object_property_get_str() is dynamically allocated.

(Spotted by Coverity, CID 1375942)

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


  Commit: 2c5534776b375bbaff3896420e41cb981d40e2bc
      
https://github.com/qemu/qemu/commit/2c5534776b375bbaff3896420e41cb981d40e2bc
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr_rtas.c

  Log Message:
  -----------
  pseries: Correct panic behaviour for pseries machine type

The pseries machine type doesn't usually use the 'pvpanic' device as such,
because it has a firmware/hypervisor facility with roughly the same
purpose.  The 'ibm,os-term' RTAS call notifies the hypervisor that the
guest has crashed.

Our implementation of this call was sending a GUEST_PANICKED qmp event;
however, it was not doing the other usual panic actions, making its
behaviour different from pvpanic for no good reason.

To correct this, we should call qemu_system_guest_panicked() rather than
directly sending the panic event.

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


  Commit: f224d35be9fb971bf64b569b99ce2a582156bbf2
      
https://github.com/qemu/qemu/commit/f224d35be9fb971bf64b569b99ce2a582156bbf2
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_pci.c
    M hw/ppc/trace-events
    M include/hw/ppc/spapr_drc.h

  Log Message:
  -----------
  spapr: Clean up DR entity sense handling

DRC classes have an entity_sense method to determine (in a specific PAPR
sense) the presence or absence of a device plugged into a DRC.  However,
we only have one implementation of the method, which explicitly tests for
different DRC types.  This changes it to instead have different method
implementations for the two cases: "logical" and "physical" DRCs.

While we're at it, the entity sense method always returns RTAS_OUT_SUCCESS,
and the interesting value is returned via pass-by-reference.  Simplify this
to directly return the value we care about

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: 454b580ae9ae3e7722f1cd5f6da7bb479f86bbd8
      
https://github.com/qemu/qemu/commit/454b580ae9ae3e7722f1cd5f6da7bb479f86bbd8
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  spapr: Don't misuse DR-indicator in spapr_recover_pending_dimm_state()

With some combinations of migration and hotplug we can lost temporary state
indicating how many DRCs (guest side hotplug handles) are still connected
to a DIMM object in the process of removal.  When we hit that situation
spapr_recover_pending_dimm_state() is used to scan more extensively and
work out the right number.

It does this using drc->indicator state to determine what state of
disconnection the DRC is in.  However, this is not safe, because the
indicator state is guest settable - in fact it's more-or-less a purely
guest->host notification mechanism which should have no bearing on the
internals of hotplug state management.

So, replace the test for this with a test on drc->dev, which is a purely
qemu side managed variable, and updated the same BQL critical section as
the indicator state.

This does introduce an off-by-one change, because the indicator state was
updated before the call to spapr_lmb_release() on the current DRC, whereas
drc->dev is updated afterwards.  That's corrected by always decrementing
the nr_lmbs value instead of only doing so in the case where we didn't
have to recover information.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: 7b7258f810d2bd40e2fb99c469c5db318d6c3d92
      
https://github.com/qemu/qemu/commit/7b7258f810d2bd40e2fb99c469c5db318d6c3d92
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr_drc.c
    M hw/ppc/trace-events

  Log Message:
  -----------
  spapr: Clean up RTAS set-indicator

In theory the RTAS set-indicator call can be used for a number of
"indicators" defined by PAPR.  In practice the only ones we're ever likely
to implement are those used for Dynamic Reconfiguration (i.e. hotplug).
Because of this, the current implementation determines the associated DRC
object, before dispatching based on the type of indicator.

However, this means we also need a check that we're dealing with a DR
related indicator at all, which duplicates some of the logic from the
switch further down.

Even though it means a bit of code duplication, things work out cleaner if
we delegate the DRC lookup to the individual indicator type functions -
and it also allows some further cleanups.

While we're there, remove references to "sensor", a copy/paste artefact
from the related, but distinct "get-sensor" call.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: cd74d27e42f25e574195b0d3046acb33fd65b078
      
https://github.com/qemu/qemu/commit/cd74d27e42f25e574195b0d3046acb33fd65b078
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

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

  Log Message:
  -----------
  spapr: Clean up handling of DR-indicator

There are 3 types of "indicator" associated with hotplug in the PAPR spec
the "allocation state", "isolation state" and "DR-indicator".  The first
two are intimately tied to the various state transitions associated with
hotplug.  The DR-indicator, however, is different and simpler.

It's basically just a guest controlled variable which can be used by the
guest to flag state or problems associated with a device.  The idea is that
the hypervisor can use it to present information back on management
consoles (on some machines with PowerVM it may even control physical LEDs
on the machine case associated with the relevant device).

For that reason, there's only ever likely to be a single update
implementation so the set_indicator_state method isn't useful.  Replace it
with a direct function call.

While we're there, make some small associated cleanups:
  * PAPR doesn't use the term "indicator state", just "DR-indicator" and
the allocation state and isolation state are also considered "indicators".
Rename things to be less confusing
  * Fold set_indicator_state() and rtas_set_indicator_state() into a single
rtas_set_dr_indicator() function.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: 0be4e88621df69f044e043f0f16d4017d35f30ae
      
https://github.com/qemu/qemu/commit/0be4e88621df69f044e043f0f16d4017d35f30ae
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 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: Change DRC attach & detach methods to functions

DRC objects have attach & detach methods, but there's only one
implementation.  Although there are some differences in its behaviour for
different DRC types, the overall structure is the same, so while we might
want different method implementations for some parts, we're unlikely to
want them for the top-level functions.

So, replace them with direct function calls.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: 6304fd27ef9f13e00d6f4ac4a56dced69ee82c3f
      
https://github.com/qemu/qemu/commit/6304fd27ef9f13e00d6f4ac4a56dced69ee82c3f
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr_pci.c

  Log Message:
  -----------
  spapr: Fold spapr_phb_{add,remove}_pci_device() into their only callers

Both functions are fairly short, and so are their callers.  There's no
particular logical distinction between them, so fold them together.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: 798083361950ec3fed946bbcf22c924ef820e45e
      
https://github.com/qemu/qemu/commit/798083361950ec3fed946bbcf22c924ef820e45e
  Author: David Gibson <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

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

  Log Message:
  -----------
  spapr: Rework DRC name handling

DRC objects have a get_name method which returns the DRC name generated
when the DRC is created.  Replace that with a fixed spapr_drc_name()
function which generates the name on the fly from other information.  This
means:
  * We get rid of a method with only one implementation, and only local
    callers
  * We don't have to carry the name string around for the lifetime of the
    DRC
  * We use information added to the class structure to generate the name
    in standard format, so we don't need an explicit switch on drc type
    any more

We also eliminate the 'name' property; it's basically useless since the
only information in it can easily be deduced from other things.

Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Michael Roth <address@hidden>
Acked-by: Michael Roth <address@hidden>


  Commit: 67b544d65f92b9987bc05b9da7e6269af48f1b69
      
https://github.com/qemu/qemu/commit/67b544d65f92b9987bc05b9da7e6269af48f1b69
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/pnv_core.c

  Log Message:
  -----------
  pnv_core: drop reference on ICPState object during CPU realization

Similarly to what was done to spapr with commit 249127d0dfeb, this patch
ensures that we don't keep an extra reference on the ICPState object. Also
since the object was just created and not reparented yet, the call to
object_property_add_child() should never fail: let's pass &error_abort to
make this clear.

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


  Commit: a4d4edce7ae23b9136cb9e243d6eab866609315d
      
https://github.com/qemu/qemu/commit/a4d4edce7ae23b9136cb9e243d6eab866609315d
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/intc/xics.c
    M hw/intc/xics_kvm.c
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  xics: add reset() handler to ICPStateClass

Taking into account that qemu_set_irq() returns immediatly if its first
argument is NULL, icp_kvm_reset() largely duplicates icp_reset().

This patch introduces a reset() handler, so that the common logic can
be implemented in icp_reset() only.

While there we can also drop icp_kvm_realize() and icp_kvm_unrealize(). This
causes icp-kvm to be realized in icp_realize(), which sets icp->xics, but
it has no impact.

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


  Commit: 4871dd4c3f70f528147f426fe42676b4193cb3b7
      
https://github.com/qemu/qemu/commit/4871dd4c3f70f528147f426fe42676b4193cb3b7
  Author: Thomas Huth <address@hidden>
  Date:   2017-06-08 (Thu, 08 Jun 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  hw/ppc/spapr: Adjust firmware name for PCI bridges

SLOF uses "pci" as name for PCI bridges nodes in the device tree instead
of "pci-bridges", so booting via bootindex from a device behind a PCI
bridge currently does not work since QEMU passes the wrong name in the
"qemu,boot-list" property. Fix it by changing the name of the PCI bridge
nodes to "pci" instead.

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1459170
Signed-off-by: Thomas Huth <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 3b954105074b6e8ba38b609007a4c0a2f76e4d71
      
https://github.com/qemu/qemu/commit/3b954105074b6e8ba38b609007a4c0a2f76e4d71
  Author: Thomas Huth <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M hw/cpu/Makefile.objs

  Log Message:
  -----------
  hw/cpu: core.c can be compiled as common object

There does not seem to be any target specific code in core.c, so we can
put it into "common-obj" instead of "obj" to compile it only once for
all targets.

Signed-off-by: Thomas Huth <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: ad265631c0a0addc06ec3c4f133e746f4dcc872a
      
https://github.com/qemu/qemu/commit/ad265631c0a0addc06ec3c4f133e746f4dcc872a
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M hw/intc/xics.c
    M hw/ppc/pnv_core.c
    M hw/ppc/pnv_psi.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_cpu_core.c
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  xics: introduce macros for ICP/ICS link properties

These properties are part of the XICS API. They deserve to appear
explicitely in the XICS header file.

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


  Commit: 100f738850639a108d6767316ce4dcc1d1ea4ae4
      
https://github.com/qemu/qemu/commit/100f738850639a108d6767316ce4dcc1d1ea4ae4
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M hw/intc/xics.c
    M hw/intc/xics_kvm.c
    M hw/intc/xics_pnv.c
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  xics: pass appropriate types to realize() handlers.

It makes more sense to pass an IPCState * to handlers of ICPStateClass
instead of a DeviceState *, if only to benefit from compile time type
checking. The same goes with ICSStateClass.

While here, we also change the declaration of ICPStateClass in xics.h
for consistency.

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


  Commit: 9ed656631d73a7564dfe178ca8c48bf049098aaf
      
https://github.com/qemu/qemu/commit/9ed656631d73a7564dfe178ca8c48bf049098aaf
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M hw/intc/xics.c
    M hw/ppc/pnv_core.c
    M hw/ppc/spapr_cpu_core.c
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  xics: setup cpu at realize time

Until recently, spapr used to allocate ICPState objects for the lifetime
of the machine. They would only be associated to vCPUs in xics_cpu_setup()
when plugging a CPU core.

Now that ICPState objects have the same lifecycle as vCPUs, it is
possible to associate them during realization.

This patch hence open-codes xics_cpu_setup() in icp_realize(). The vCPU
is passed as a property. Note that vCPU now needs to be realized first
for the IRQs to be allocated. It also needs to resetted before ICPState
realization in order to synchronize with KVM.

Since ICPState objects are freed when unrealized, xics_cpu_destroy() isn't
needed anymore and can be safely dropped.

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


  Commit: b1fd36c363d73969841468146ebfb9fd84a5ee52
      
https://github.com/qemu/qemu/commit/b1fd36c363d73969841468146ebfb9fd84a5ee52
  Author: Greg Kurz <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

  Changed paths:
    M hw/intc/xics.c
    M hw/intc/xics_kvm.c
    M include/hw/ppc/xics.h

  Log Message:
  -----------
  xics: drop ICPStateClass::cpu_setup() handler

The cpu_setup() handler is only implemented by xics_kvm, where it really
does a typical "realize" job. Moreover, the realize() handler is called
shortly after cpu_setup(), on the same path.

This patch converts xics_kvm to implement realize() instead of cpu_setup().

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


  Commit: 593080936a06a04eacc589350e3a7ebc02f2ed8e
      
https://github.com/qemu/qemu/commit/593080936a06a04eacc589350e3a7ebc02f2ed8e
  Author: Laurent Vivier <address@hidden>
  Date:   2017-06-09 (Fri, 09 Jun 2017)

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

  Log Message:
  -----------
  Revert "spapr: fix memory hot-unplugging"

This reverts commit fe6824d12642b005c69123ecf8631f9b13553f8b.

Conflicts hw/ppc/spapr_drc.c, because get_index() has been renamed
spapr_get_index().

This didn't fix the problem. Once the hotplug has been started
some memory is allocated and some structures are allocated.
We don't free it when we ignore the unplug, and we can't because
they can be in use by the kernel.

Signed-off-by: Laurent Vivier <address@hidden>
Tested-by: Daniel Barboza <address@hidden>
Signed-off-by: David Gibson <address@hidden>


  Commit: 9746211baa6ff1275e9c726c6f3a3bcfe4b1f8bd
      
https://github.com/qemu/qemu/commit/9746211baa6ff1275e9c726c6f3a3bcfe4b1f8bd
  Author: Peter Maydell <address@hidden>
  Date:   2017-06-13 (Tue, 13 Jun 2017)

  Changed paths:
    M hw/cpu/Makefile.objs
    M hw/intc/xics.c
    M hw/intc/xics_kvm.c
    M hw/intc/xics_pnv.c
    M hw/ppc/pnv_core.c
    M hw/ppc/pnv_psi.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_cpu_core.c
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_pci.c
    M hw/ppc/spapr_rtas.c
    M hw/ppc/trace-events
    M include/hw/ppc/spapr_drc.h
    M include/hw/ppc/xics.h
    M target/ppc/kvm.c
    M target/ppc/kvm_ppc.h

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

ppc patch queue 2017-06-09

This batch contains more patches to rework the pseries machine hotplug
infrastructure, plus an assorted batch of bugfixes.

It contains a start on fixes to restore migration from older machine
types on older versions which was broken by some xics changes.  There
are still a few missing pieces here, though.

# gpg: Signature made Fri 09 Jun 2017 06:26:03 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-20170609:
  Revert "spapr: fix memory hot-unplugging"
  xics: drop ICPStateClass::cpu_setup() handler
  xics: setup cpu at realize time
  xics: pass appropriate types to realize() handlers.
  xics: introduce macros for ICP/ICS link properties
  hw/cpu: core.c can be compiled as common object
  hw/ppc/spapr: Adjust firmware name for PCI bridges
  xics: add reset() handler to ICPStateClass
  pnv_core: drop reference on ICPState object during CPU realization
  spapr: Rework DRC name handling
  spapr: Fold spapr_phb_{add,remove}_pci_device() into their only callers
  spapr: Change DRC attach & detach methods to functions
  spapr: Clean up handling of DR-indicator
  spapr: Clean up RTAS set-indicator
  spapr: Don't misuse DR-indicator in spapr_recover_pending_dimm_state()
  spapr: Clean up DR entity sense handling
  pseries: Correct panic behaviour for pseries machine type
  spapr: fix memory leak in spapr_memory_pre_plug()
  target/ppc: fix memory leak in kvmppc_is_mem_backend_page_size_ok()
  target/ppc: pass const string to kvmppc_is_mem_backend_page_size_ok()

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


Compare: https://github.com/qemu/qemu/compare/8e3cf49c4706...9746211baa6f

reply via email to

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