[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-ppc] [PULL 06/18] spapr: only update SDR1 once per-cpu during CAS
From: |
David Gibson |
Subject: |
[Qemu-ppc] [PULL 06/18] spapr: only update SDR1 once per-cpu during CAS |
Date: |
Fri, 15 Sep 2017 13:51:18 +1000 |
From: Greg Kurz <address@hidden>
Commit b55d295e3ec9 added the possibility to support HPT resizing with KVM.
In the case of PR, we need to pass the userspace address of the HPT to KVM
using the SDR1 slot.
This is handled by kvmppc_update_sdr1() which uses CPU_FOREACH() to update
all CPUs. It is hence not needed to call kvmppc_update_sdr1() for each CPU.
Signed-off-by: Greg Kurz <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_hcall.c | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 8b3c0e17e7..6ab8c188f3 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1559,20 +1559,16 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu,
}
if (spapr->htab_shift < maxshift) {
- CPUState *cs;
-
/* Guest doesn't know about HPT resizing, so we
* pre-emptively resize for the maximum permitted RAM. At
* the point this is called, nothing should have been
* entered into the existing HPT */
spapr_reallocate_hpt(spapr, maxshift, &error_fatal);
- CPU_FOREACH(cs) {
- if (kvm_enabled()) {
- /* For KVM PR, update the HPT pointer */
- target_ulong sdr1 = (target_ulong)(uintptr_t)spapr->htab
- | (spapr->htab_shift - 18);
- kvmppc_update_sdr1(sdr1);
- }
+ if (kvm_enabled()) {
+ /* For KVM PR, update the HPT pointer */
+ target_ulong sdr1 = (target_ulong)(uintptr_t)spapr->htab
+ | (spapr->htab_shift - 18);
+ kvmppc_update_sdr1(sdr1);
}
}
}
--
2.13.5
- [Qemu-ppc] [PULL 17/18] spapr_events: use QTAILQ_FOREACH_SAFE() in spapr_clear_pending_events(), (continued)
- [Qemu-ppc] [PULL 17/18] spapr_events: use QTAILQ_FOREACH_SAFE() in spapr_clear_pending_events(), David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 13/18] spapr_cpu_core: fail gracefully with non-pseries machine types, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 10/18] spapr_pci: handle FDT creation errors with _FDT(), David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 11/18] vfio, spapr: Fix levels calculation, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 02/18] hw/ppc/spapr.c: cleaning up qdev_get_machine() calls, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 05/18] spapr_pci: use g_strdup_printf(), David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 14/18] spapr_pci: convert sprintf() to g_strdup_printf(), David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 04/18] spapr_pci: drop useless check in spapr_populate_pci_child_dt(), David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 07/18] ppc/xive: fix OV5_XIVE_EXPLOIT bits, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 15/18] spapr_pci: don't create 64-bit MMIO window if we don't need to, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 06/18] spapr: only update SDR1 once per-cpu during CAS,
David Gibson <=
- [Qemu-ppc] [PULL 12/18] xics: fix several error leaks, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 16/18] spapr_cpu_core: cleaning up qdev_get_machine() calls, David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 18/18] ppc/kvm: use kvm_vm_check_extension() in kvmppc_is_pr(), David Gibson, 2017/09/14
- [Qemu-ppc] [PULL 01/18] net: Add SunGEM device emulation as found on Apple UniNorth, David Gibson, 2017/09/14
- Re: [Qemu-ppc] [Qemu-devel] [PULL 00/18] ppc-for-2.11 queue 20170915, no-reply, 2017/09/15
- Re: [Qemu-ppc] [PULL 00/18] ppc-for-2.11 queue 20170915, Peter Maydell, 2017/09/15