[POWERPC] Implement SLB shadow buffer
This adds a shadow buffer for the SLBs and regsiters it with PHYP. Only the bolted SLB entries (top 3) are shadowed. The SLB shadow buffer tells the hypervisor what the kernel needs to have in the SLB for the kernel to be able to function. The hypervisor can use this information to speed up partition context switches. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
This commit is contained in:
committed by
Paul Mackerras
parent
452b5e2121
commit
2f6093c847
@ -234,9 +234,17 @@ static void pseries_kexec_cpu_down_xics(int crash_shutdown, int secondary)
|
||||
{
|
||||
/* Don't risk a hypervisor call if we're crashing */
|
||||
if (firmware_has_feature(FW_FEATURE_SPLPAR) && !crash_shutdown) {
|
||||
unsigned long vpa = __pa(get_lppaca());
|
||||
unsigned long addr;
|
||||
|
||||
if (unregister_vpa(hard_smp_processor_id(), vpa)) {
|
||||
addr = __pa(get_slb_shadow());
|
||||
if (unregister_slb_shadow(hard_smp_processor_id(), addr))
|
||||
printk("SLB shadow buffer deregistration of "
|
||||
"cpu %u (hw_cpu_id %d) failed\n",
|
||||
smp_processor_id(),
|
||||
hard_smp_processor_id());
|
||||
|
||||
addr = __pa(get_lppaca());
|
||||
if (unregister_vpa(hard_smp_processor_id(), addr)) {
|
||||
printk("VPA deregistration of cpu %u (hw_cpu_id %d) "
|
||||
"failed\n", smp_processor_id(),
|
||||
hard_smp_processor_id());
|
||||
|
Reference in New Issue
Block a user