[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 02/18] spapr: Don't check capabilities removed between CAS calls
From: |
David Gibson |
Subject: |
[PULL 02/18] spapr: Don't check capabilities removed between CAS calls |
Date: |
Thu, 7 May 2020 15:02:12 +1000 |
From: Greg Kurz <address@hidden>
We currently check if some capability in OV5 was removed by the guest
since the previous CAS, and we trigger a CAS reboot in that case. This
was required because it could call for a device-tree property or node
removal, that we didn't support until recently (see commit 6787d27b04a7
"spapr: add option vector handling in CAS-generated resets" for details).
Now that we render a full FDT at CAS and that SLOF is able to handle
node removal, we don't need to do a CAS reset in this case anymore.
Also, this check can only return true if the guest has already called
CAS since the last full system reset (otherwise spapr->ov5_cas is
empty). Linux doesn't do that so this can be considered as dead code
for the vast majority of existing setups.
Drop the check. Since the only use of the ov5_cas_old variable is
precisely the check itself, drop the variable as well.
Signed-off-by: Greg Kurz <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: David Gibson <address@hidden>
---
hw/ppc/spapr_hcall.c | 14 +-------------
1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/hw/ppc/spapr_hcall.c b/hw/ppc/spapr_hcall.c
index 0d50fc9117..e8ee447537 100644
--- a/hw/ppc/spapr_hcall.c
+++ b/hw/ppc/spapr_hcall.c
@@ -1676,7 +1676,7 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu,
target_ulong fdt_bufsize = args[2];
target_ulong ov_table;
uint32_t cas_pvr;
- SpaprOptionVector *ov1_guest, *ov5_guest, *ov5_cas_old;
+ SpaprOptionVector *ov1_guest, *ov5_guest;
bool guest_radix;
Error *local_err = NULL;
bool raw_mode_supported = false;
@@ -1782,22 +1782,10 @@ static target_ulong
h_client_architecture_support(PowerPCCPU *cpu,
* by LoPAPR 1.1, 14.5.4.8, which QEMU doesn't implement, we don't need
* to worry about this for now.
*/
- ov5_cas_old = spapr_ovec_clone(spapr->ov5_cas);
-
- /* also clear the radix/hash bit from the current ov5_cas bits to
- * be in sync with the newly ov5 bits. Else the radix bit will be
- * seen as being removed and this will generate a reset loop
- */
- spapr_ovec_clear(ov5_cas_old, OV5_MMU_RADIX_300);
/* full range of negotiated ov5 capabilities */
spapr_ovec_intersect(spapr->ov5_cas, spapr->ov5, ov5_guest);
spapr_ovec_cleanup(ov5_guest);
- /* capabilities that have been added since CAS-generated guest reset.
- * if capabilities have since been removed, generate another reset
- */
- spapr->cas_reboot = !spapr_ovec_subset(ov5_cas_old, spapr->ov5_cas);
- spapr_ovec_cleanup(ov5_cas_old);
/* Now that processing is finished, set the radix/hash bit for the
* guest if it requested a valid mode; otherwise terminate the boot. */
if (guest_radix) {
--
2.26.2
- [PULL 00/18] ppc-for-5.1 queue 20200507, David Gibson, 2020/05/07
- [PULL 03/18] ppc/spapr: tweak change system reset helper, David Gibson, 2020/05/07
- [PULL 01/18] target/ppc: Improve syscall exception logging, David Gibson, 2020/05/07
- [PULL 04/18] ppc/pnv: Add support for NMI interface, David Gibson, 2020/05/07
- [PULL 02/18] spapr: Don't check capabilities removed between CAS calls,
David Gibson <=
- [PULL 11/18] spapr: Don't allow unplug of NVLink2 devices, David Gibson, 2020/05/07
- [PULL 07/18] spapr: Drop CAS reboot flag, David Gibson, 2020/05/07
- [PULL 06/18] spapr/cas: Separate CAS handling from rebuilding the FDT, David Gibson, 2020/05/07
- [PULL 05/18] spapr: Simplify selection of radix/hash during CAS, David Gibson, 2020/05/07
- [PULL 09/18] target/ppc: Introduce a relocation bool in ppc_radix64_handle_mmu_fault(), David Gibson, 2020/05/07
- [PULL 15/18] target/ppc: Add support for Radix partition-scoped translation, David Gibson, 2020/05/07
- [PULL 08/18] target/ppc: Enforce that the root page directory size must be at least 5, David Gibson, 2020/05/07
- [PULL 16/18] spapr_nvdimm.c: make 'label-size' mandatory, David Gibson, 2020/05/07
- [PULL 17/18] spapr_nvdimm: Tweak error messages, David Gibson, 2020/05/07
- [PULL 13/18] target/ppc: Extend ppc_radix64_check_prot() with a 'partition_scoped' bool, David Gibson, 2020/05/07