qemu-commits
[Top][All Lists]
Advanced

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

[Qemu-commits] [qemu/qemu] ee4d9e: target/ppc: Move setting of patb_entr


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] ee4d9e: target/ppc: Move setting of patb_entry on hash tab...
Date: Mon, 27 Nov 2017 05:20:57 -0800

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: ee4d9ecc3675af1e68a9c00a8b338641898d613e
      
https://github.com/qemu/qemu/commit/ee4d9ecc3675af1e68a9c00a8b338641898d613e
  Author: Suraj Jitindar Singh <address@hidden>
  Date:   2017-11-27 (Mon, 27 Nov 2017)

  Changed paths:
    M hw/ppc/spapr.c

  Log Message:
  -----------
  target/ppc: Move setting of patb_entry on hash table init

The patb_entry is used to store the location of the process table in
guest memory. The msb is also used to indicate the mmu mode of the
guest, that is patb_entry & 1 << 63 ? radix_mode : hash_mode.

Currently we set this to zero in spapr_setup_hpt_and_vrma() since if
this function gets called then we know we're hash. However some code
paths, such as setting up the hpt on incoming migration of a hash guest,
call spapr_reallocate_hpt() directly bypassing this higher level
function. Since we assume radix if the host is capable this results in
the msb in patb_entry being left set so in spapr_post_load() we call
kvmppc_configure_v3_mmu() and tell the host we're radix which as
expected means addresses cannot be translated once we actually run the cpu.

To fix this move the zeroing of patb_entry into spapr_reallocate_hpt().

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


  Commit: e07cc1929515cfb808b5c2fcc60c079e6be110cf
      
https://github.com/qemu/qemu/commit/e07cc1929515cfb808b5c2fcc60c079e6be110cf
  Author: Suraj Jitindar Singh <address@hidden>
  Date:   2017-11-27 (Mon, 27 Nov 2017)

  Changed paths:
    M target/ppc/machine.c

  Log Message:
  -----------
  target/ppc: Fix setting of cpu->compat_pvr on incoming migration

cpu->compat_pvr is used to store the current compat mode of the cpu.

On the receiving side during incoming migration we check compatibility
with the compat mode by calling ppc_set_compat(). However we fail to set
the compat mode with the hypervisor since the "new" compat mode doesn't
differ from the current (due to a "cpu->compat_pvr != compat_pvr" check).
This means that kvm runs the vcpus without a compat mode, which is the
incorrect behaviour. The implication being that a compatibility mode
will never be in effect after migration.

To fix this so that the compat mode is correctly set with the
hypervisor, store the desired compat mode and reset cpu->compat_pvr to
zero before calling ppc_set_compat().

Fixes: 5dfaa532 ("ppc: fix ppc_set_compat() with KVM PR")

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


  Commit: 5e19aed59ab48ca3c7f1e2da203eed27b91bef2d
      
https://github.com/qemu/qemu/commit/5e19aed59ab48ca3c7f1e2da203eed27b91bef2d
  Author: Peter Maydell <address@hidden>
  Date:   2017-11-27 (Mon, 27 Nov 2017)

  Changed paths:
    M hw/ppc/spapr.c
    M target/ppc/machine.c

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

ppc patch queue 2017-11-27

This series contains a couple of migration fixes for hash guests on
POWER9 radix MMU hosts.

# gpg: Signature made Mon 27 Nov 2017 04:27:15 GMT
# 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.11-20171127:
  target/ppc: Fix setting of cpu->compat_pvr on incoming migration
  target/ppc: Move setting of patb_entry on hash table init

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


Compare: https://github.com/qemu/qemu/compare/e7b47c22e2df...5e19aed59ab4

reply via email to

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