mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 10:13:56 -06:00
target/ppc: Rename PATB/PATBE -> PATE
That "b" means "base address" and thus shouldn't be in the name of actual entries and related constants. This patch keeps the synthetic patb_entry field of the spapr virtual hypervisor unchanged until I figure out if that has an impact on the migration stream. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Cédric Le Goater <clg@kaod.org> Message-Id: <20190215170029.15641-11-clg@kaod.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
This commit is contained in:
parent
c4dae9cd37
commit
79825f4d58
6 changed files with 54 additions and 31 deletions
|
@ -1420,11 +1420,13 @@ void spapr_set_all_lpcrs(target_ulong value, target_ulong mask)
|
|||
}
|
||||
}
|
||||
|
||||
static uint64_t spapr_get_patbe(PPCVirtualHypervisor *vhyp)
|
||||
static void spapr_get_pate(PPCVirtualHypervisor *vhyp, ppc_v3_pate_t *entry)
|
||||
{
|
||||
sPAPRMachineState *spapr = SPAPR_MACHINE(vhyp);
|
||||
|
||||
return spapr->patb_entry;
|
||||
/* Copy PATE1:GR into PATE0:HR */
|
||||
entry->dw0 = spapr->patb_entry & PATE0_HR;
|
||||
entry->dw1 = spapr->patb_entry;
|
||||
}
|
||||
|
||||
#define HPTE(_table, _i) (void *)(((uint64_t *)(_table)) + ((_i) * 2))
|
||||
|
@ -1667,17 +1669,21 @@ static void spapr_machine_reset(void)
|
|||
if (kvm_enabled() && kvmppc_has_cap_mmu_radix() &&
|
||||
ppc_type_check_compat(machine->cpu_type, CPU_POWERPC_LOGICAL_3_00, 0,
|
||||
spapr->max_compat_pvr)) {
|
||||
/* If using KVM with radix mode available, VCPUs can be started
|
||||
/*
|
||||
* If using KVM with radix mode available, VCPUs can be started
|
||||
* without a HPT because KVM will start them in radix mode.
|
||||
* Set the GR bit in PATB so that we know there is no HPT. */
|
||||
spapr->patb_entry = PATBE1_GR;
|
||||
* Set the GR bit in PATE so that we know there is no HPT.
|
||||
*/
|
||||
spapr->patb_entry = PATE1_GR;
|
||||
spapr_set_all_lpcrs(LPCR_HR | LPCR_UPRT, LPCR_HR | LPCR_UPRT);
|
||||
} else {
|
||||
spapr_setup_hpt_and_vrma(spapr);
|
||||
}
|
||||
|
||||
/* if this reset wasn't generated by CAS, we should reset our
|
||||
* negotiated options and start from scratch */
|
||||
/*
|
||||
* If this reset wasn't generated by CAS, we should reset our
|
||||
* negotiated options and start from scratch
|
||||
*/
|
||||
if (!spapr->cas_reboot) {
|
||||
spapr_ovec_cleanup(spapr->ov5_cas);
|
||||
spapr->ov5_cas = spapr_ovec_new();
|
||||
|
@ -1827,7 +1833,7 @@ static int spapr_post_load(void *opaque, int version_id)
|
|||
|
||||
if (kvm_enabled() && spapr->patb_entry) {
|
||||
PowerPCCPU *cpu = POWERPC_CPU(first_cpu);
|
||||
bool radix = !!(spapr->patb_entry & PATBE1_GR);
|
||||
bool radix = !!(spapr->patb_entry & PATE1_GR);
|
||||
bool gtse = !!(cpu->env.spr[SPR_LPCR] & LPCR_GTSE);
|
||||
|
||||
/*
|
||||
|
@ -4118,7 +4124,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data)
|
|||
vhc->map_hptes = spapr_map_hptes;
|
||||
vhc->unmap_hptes = spapr_unmap_hptes;
|
||||
vhc->store_hpte = spapr_store_hpte;
|
||||
vhc->get_patbe = spapr_get_patbe;
|
||||
vhc->get_pate = spapr_get_pate;
|
||||
vhc->encode_hpt_for_kvm_pr = spapr_encode_hpt_for_kvm_pr;
|
||||
xic->ics_get = spapr_ics_get;
|
||||
xic->ics_resend = spapr_ics_resend;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue