qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] 1b6e74: migration: remove register_savevm()


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 1b6e74: migration: remove register_savevm()
Date: Tue, 06 Jun 2017 07:37:37 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1b6e74824659ef10bd2a2924a98df388b78e175e
      
https://github.com/qemu/qemu/commit/1b6e74824659ef10bd2a2924a98df388b78e175e
  Author: Laurent Vivier <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/net/vmxnet3.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-virtio-ccw.c
    M include/migration/vmstate.h
    M migration/savevm.c
    M slirp/slirp.c

  Log Message:
  -----------
  migration: remove register_savevm()

We can replace the four remaining calls of register_savevm() by
calls to register_savevm_live(). So we can remove the function and
as we don't allocate anymore the ops pointer with g_new0()
we don't have to free it then.

Signed-off-by: Laurent Vivier <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>
Signed-off-by: David Gibson <address@hidden>


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

  Changed paths:
    M cpus.c
    M include/sysemu/cpus.h
    M include/sysemu/hax.h
    M include/sysemu/hw_accel.h
    M include/sysemu/kvm.h
    M kvm-all.c
    M migration/savevm.c
    M target/i386/hax-all.c

  Log Message:
  -----------
  migration: Mark CPU states dirty before incoming migration/loadvm

As a rule, CPU internal state should never be updated when
!cpu->kvm_vcpu_dirty (or the HAX equivalent).  If that is done, then
subsequent calls to cpu_synchronize_state() - usually safe and idempotent -
will clobber state.

However, we routinely do this during a loadvm or incoming migration.
Usually this is called shortly after a reset, which will clear all the cpu
dirty flags with cpu_synchronize_all_post_reset().  Nothing is expected
to set the dirty flags again before the cpu state is loaded from the
incoming stream.

This means that it isn't safe to call cpu_synchronize_state() from a
post_load handler, which is non-obvious and potentially inconvenient.

We could cpu_synchronize_all_state() before the loadvm, but that would be
overkill since a) we expect the state to already be synchronized from the
reset and b) we expect to completely rewrite the state with a call to
cpu_synchronize_all_post_init() at the end of qemu_loadvm_state().

To clear this up, this patch introduces cpu_synchronize_pre_loadvm() and
associated helpers, which simply marks the cpu state as dirty without
actually changing anything.  i.e. it says we want to discard any existing
KVM (or HAX) state and replace it with what we're going to load.

Cc: Juan Quintela <address@hidden>
Cc: Dave Gilbert <address@hidden>
Signed-off-by: David Gibson <address@hidden>
Reviewed-by: Juan Quintela <address@hidden>


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

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

  Log Message:
  -----------
  spapr: Move DRC RTAS calls into spapr_drc.c

Currently implementations of the RTAS calls related to DRCs are in
spapr_rtas.c.  They belong better in spapr_drc.c - that way they're closer
to related code, and we'll be able to make some more things local.

spapr_rtas.c was intended to contain the RTAS infrastructure and core calls
that don't belong anywhere else, not every RTAS implementation.

Code motion only.

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


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

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

  Log Message:
  -----------
  spapr: Abolish DRC get_fdt method

The DRConnectorClass includes a get_fdt method.  However
  * There's only one implementation, and there's only likely to ever be one
  * Both callers are local to spapr_drc
  * Each caller only uses one half of the actual implementation

So abolish get_fdt() entirely, and just open-code what we need.

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


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

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

  Log Message:
  -----------
  spapr: Abolish DRC set_configured method

DRConnectorClass has a set_configured method, however:
  * There is only one implementation, and only ever likely to be one
  * There's exactly one caller, and that's (now) local
  * The implementation is very straightforward

So abolish the method entirely, and just open-code what we need.

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


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

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

  Log Message:
  -----------
  spapr: Make DRC get_index and get_type methods into plain functions

These two methods only have one implementation, and the spec they're
implementing means any other implementation is unlikely, verging on
impossible.

So replace them with simple functions.

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


  Commit: a09f7443bcccd1703adf7c2954af695629c784a5
      
https://github.com/qemu/qemu/commit/a09f7443bcccd1703adf7c2954af695629c784a5
  Author: Aaron Larson <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/intc/openpic.c

  Log Message:
  -----------
  target-ppc: Fix openpic timer read register offset

openpic_tmr_read() is incorrectly computing register offset of the
TCCR, TBCR, TVPR, and TDR registers when accessing the open pic timer
registers.  Specifically the offset of timer registers for
openpic_tmr_read() is not accounting for the timer frequency reporting
register (TFFR) which is the first register in the "tmr" memory
region.

openpic_tmr_write() *is* correctly computing the offset by adding
0x10f0 to the address prior to computing the register index.  This
patch instead subtracts 0x10 in both the read and write routines and
eliminates some other gratuitous differences between the functions.

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


  Commit: 60694bc67837ac1678fa9d67e0f5f83f8cf5436e
      
https://github.com/qemu/qemu/commit/60694bc67837ac1678fa9d67e0f5f83f8cf5436e
  Author: Suraj Jitindar Singh <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/ppc/spapr_hcall.c

  Log Message:
  -----------
  target/ppc: Fixup set_spr error in h_register_process_table

set_spr is used in the function h_register_process_table() to update the
LPCR_GTSE and LPCR_UPRT values based on the flags passed by the guest.
The set_spr function takes the last two arguments mask and value used to
mask and set the value of the spr respectively.

The current call site passes these arguments in the wrong order and thus
bot GTSE and UPRT will be set irrespective, which is obviously
incorrect.

Rearrange the function call so that these arguments are passed in the
correct order and the correct behaviour is exhibited.

It is worth noting that this wasn't detected earlier since these were
always both set in all cases where this H_CALL was made.

Fixes: 6de833070ca2 ("target/ppc: Set UPRT and GTSE on all cpus in 
H_REGISTER_PROCESS_TABLE")

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


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

  Changed paths:
    M hw/nvram/spapr_nvram.c

  Log Message:
  -----------
  spapr_nvram: Check return value from blk_getlength()

The blk_getlength() function can return an error value if the
image size cannot be determined. Check for this rather than
ploughing on and trying to g_malloc0() a negative number.
(Spotted by Coverity, CID 1288484.)

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


  Commit: 7032d92ac83c13987be302b96ab1f26d4b0f404e
      
https://github.com/qemu/qemu/commit/7032d92ac83c13987be302b96ab1f26d4b0f404e
  Author: Cédric Le Goater <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/ppc/pnv.c

  Log Message:
  -----------
  ppc/pnv: check the return value of fdt_setprop()

Signed-off-by: Cédric Le Goater <address@hidden>
[dwg: Correct typo in commit message]
Signed-off-by: David Gibson <address@hidden>


  Commit: c4e13492afad2c49d41ec2abf4727c69be637f9f
      
https://github.com/qemu/qemu/commit/c4e13492afad2c49d41ec2abf4727c69be637f9f
  Author: Felipe Franciosi <address@hidden>
  Date:   2017-06-06 (Tue, 06 Jun 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  spapr: Allow boot from vhost-*-scsi backends

The current implementation of spapr_get_fw_dev_path() doesn't take into
consideration vhost-*-scsi devices. This makes said devices unbootable
on PPC as SLOF is unable to work out the path to scan boot disks.

This makes VMs bootable on spapr when using vhost-*-scsi by implementing
a disk path for VHostSCSICommon (which currently includes both
vhost-user-scsi and vhost-scsi).

Signed-off-by: Felipe Franciosi <address@hidden>
Signed-off-by: Mike Cui <address@hidden>
Signed-off-by: David Gibson <address@hidden>


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

  Changed paths:
    M hw/ppc/spapr_drc.c

  Log Message:
  -----------
  spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs

As explained in commit 5c0139a8c2f0 ("spapr: fix default DRC state for
coldplugged LMBs"), guests expect cold-plugged LMBs to be pre-allocated
and unisolated. The same goes for cold-plugged CPUs.

While here, let's convert g_assert(false) to the better self documenting
g_assert_not_reached().

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


  Commit: 2d33581899edcaba9b7e48def11c4ddfcd2423ec
      
https://github.com/qemu/qemu/commit/2d33581899edcaba9b7e48def11c4ddfcd2423ec
  Author: David Gibson <address@hidden>
  Date:   2017-06-06 (Tue, 06 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: Introduce DRC subclasses

Currently we only have a single QOM type for all DRCs, but lots of
places where we switch behaviour based on the DRC's PAPR defined type.
This is a poor use of our existing type system.

So, instead create QOM subclasses for each PAPR defined DRC type.  We
also introduce intermediate subclasses for physical and logical DRCs,
a division which will be useful later on.

Instead of being stored in the DRC object itself, the PAPR type is now
stored in the class structure.  There are still many places where we
switch directly on the PAPR type value, but this at least provides the
basis to start to remove those.

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


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

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

  Log Message:
  -----------
  spapr: Clean up spapr_dr_connector_by_*()

 * Change names to something less ludicrously verbose
 * Now that we have QOM subclasses for the different DRC types, use a QOM
   typename instead of a PAPR type value parameter

The latter allows removal of the get_type_shift() helper.

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


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

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

  Log Message:
  -----------
  spapr: Move configure-connector state into DRC

Currently the sPAPRMachineState contains a list of sPAPRConfigureConnector
structures which store intermediate state for the ibm,configure-connector
RTAS call.

This was an attempt to separate this state from the core of the DRC state.
However the configure connector process is intimately tied to the DRC
model, so there's really no point trying to have two levels of interface
here.

Moving the configure-connector state into its corresponding DRC allows
removal of a number of helpers for maintaining the anciliary list.

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


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

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

  Log Message:
  -----------
  spapr: Eliminate spapr_drc_get_type_str()

This function was used in generating the device tree.  However, now that
we have different QOM types for different DRC types we can easily store
the information we need in the class structure and avoid this specialized
lookup function.

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


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

  Changed paths:
    M hw/ppc/spapr_drc.c

  Log Message:
  -----------
  spapr: Remove some non-useful properties on DRC objects

 * 'connector_type' is easily derived from the 'index' property, so there's
   no point to it (it's also implicit in the QOM type of the DRC)
 * 'isolation-state', 'indicator-state' and 'allocation-state' are
   part of the transaction between qemu and guest during PAPR hotplug
   operations, and outside tools really have no business looking at it
   (especially not changing, and these were RW properties)
 * 'entity-sense' is basically just a weird PAPR encoding of whether there
   is a device connected to this DRC

Strictly speaking removing these properties is breaking the qemu interface.
However, I'm pretty sure no management tools have ever used these.  For
debugging there are better alternatives.  Therefore, I think removing these
broken interfaces is the better option.

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


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

  Changed paths:
    M cpus.c
    M hw/intc/openpic.c
    M hw/net/vmxnet3.c
    M hw/nvram/spapr_nvram.c
    M hw/ppc/pnv.c
    M hw/ppc/spapr.c
    M hw/ppc/spapr_drc.c
    M hw/ppc/spapr_events.c
    M hw/ppc/spapr_hcall.c
    M hw/ppc/spapr_pci.c
    M hw/ppc/spapr_rtas.c
    M hw/s390x/s390-skeys.c
    M hw/s390x/s390-virtio-ccw.c
    M include/hw/ppc/spapr.h
    M include/hw/ppc/spapr_drc.h
    M include/migration/vmstate.h
    M include/sysemu/cpus.h
    M include/sysemu/hax.h
    M include/sysemu/hw_accel.h
    M include/sysemu/kvm.h
    M kvm-all.c
    M migration/savevm.c
    M slirp/slirp.c
    M target/i386/hax-all.c

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

ppc patch queue 2017-06-06

Accumulated patches for ppc targets and the pseries machine type.

The big thing in this batch is a start on a substantial cleanup of the
pseries hotplug mechanisms, which were pretty confusing.  For now
these shouldn't cause substantial behavioural changes, but I am hoping
these lead to clearer code and eventually to fixes for the bugs we
have in hotplug handling, particularly when hotplug and migration are
combined.

The remaining patches are mostly bugfixes.

# gpg: Signature made Tue 06 Jun 2017 03:48:50 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-20170606:
  spapr: Remove some non-useful properties on DRC objects
  spapr: Eliminate spapr_drc_get_type_str()
  spapr: Move configure-connector state into DRC
  spapr: Clean up spapr_dr_connector_by_*()
  spapr: Introduce DRC subclasses
  spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs
  spapr: Allow boot from vhost-*-scsi backends
  ppc/pnv: check the return value of fdt_setprop()
  spapr_nvram: Check return value from blk_getlength()
  target/ppc: Fixup set_spr error in h_register_process_table
  target-ppc: Fix openpic timer read register offset
  spapr: Make DRC get_index and get_type methods into plain functions
  spapr: Abolish DRC set_configured method
  spapr: Abolish DRC get_fdt method
  spapr: Move DRC RTAS calls into spapr_drc.c
  migration: Mark CPU states dirty before incoming migration/loadvm
  migration: remove register_savevm()

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


Compare: https://github.com/qemu/qemu/compare/a65afaae0fd6...e02bbe1956d8

reply via email to

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