Commit 233ccd0d authored by Olof Johansson's avatar Olof Johansson Committed by Linus Torvalds

[PATCH] ppc64: Add VMX save flag to VPA

We need to indicate to the hypervisor that it needs to save our VMX
registers when switching partitions on a shared-processor system, just as
it needs to for FP and PMC registers.

This could be made to be on-demand when VMX is used, but we don't do that
for FP nor PMC right now either so let's not overcomplicate things.
Signed-off-by: default avatarOlof Johansson <olof@lixom.net>
Acked-by: default avatarPaul Mackerras <paulus@samba.org>
Cc: Anton Blanchard <anton@samba.org>
Cc: <engebret@us.ibm.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent b749bfcd
...@@ -266,6 +266,10 @@ void vpa_init(int cpu) ...@@ -266,6 +266,10 @@ void vpa_init(int cpu)
/* Register the Virtual Processor Area (VPA) */ /* Register the Virtual Processor Area (VPA) */
flags = 1UL << (63 - 18); flags = 1UL << (63 - 18);
if (cpu_has_feature(CPU_FTR_ALTIVEC))
paca[cpu].lppaca.vmxregs_in_use = 1;
ret = register_vpa(flags, hwcpu, __pa(vpa)); ret = register_vpa(flags, hwcpu, __pa(vpa));
if (ret) if (ret)
......
...@@ -59,6 +59,7 @@ extern unsigned long __toc_start; ...@@ -59,6 +59,7 @@ extern unsigned long __toc_start;
.fpregs_in_use = 1, \ .fpregs_in_use = 1, \
.end_of_quantum = 0xfffffffffffffffful, \ .end_of_quantum = 0xfffffffffffffffful, \
.slb_count = 64, \ .slb_count = 64, \
.vmxregs_in_use = 0, \
}, \ }, \
#ifdef CONFIG_PPC_ISERIES #ifdef CONFIG_PPC_ISERIES
......
...@@ -108,7 +108,7 @@ struct lppaca ...@@ -108,7 +108,7 @@ struct lppaca
volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B volatile u32 virtual_decr; // Virtual DECR for shared procsx78-x7B
u16 slb_count; // # of SLBs to maintain x7C-x7D u16 slb_count; // # of SLBs to maintain x7C-x7D
u8 idle; // Indicate OS is idle x7E u8 idle; // Indicate OS is idle x7E
u8 reserved5; // Reserved x7F u8 vmxregs_in_use; // VMX registers in use x7F
//============================================================================= //=============================================================================
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment