xref: /openbmc/linux/arch/powerpc/include/asm/vphn.h (revision c040c748)
1*c040c748SMichael Ellerman /* SPDX-License-Identifier: GPL-2.0-or-later */
2*c040c748SMichael Ellerman #ifndef _ASM_POWERPC_VPHN_H
3*c040c748SMichael Ellerman #define _ASM_POWERPC_VPHN_H
4*c040c748SMichael Ellerman 
5*c040c748SMichael Ellerman /* The H_HOME_NODE_ASSOCIATIVITY h_call returns 6 64-bit registers. */
6*c040c748SMichael Ellerman #define VPHN_REGISTER_COUNT 6
7*c040c748SMichael Ellerman 
8*c040c748SMichael Ellerman /*
9*c040c748SMichael Ellerman  * 6 64-bit registers unpacked into up to 24 be32 associativity values. To
10*c040c748SMichael Ellerman  * form the complete property we have to add the length in the first cell.
11*c040c748SMichael Ellerman  */
12*c040c748SMichael Ellerman #define VPHN_ASSOC_BUFSIZE (VPHN_REGISTER_COUNT*sizeof(u64)/sizeof(u16) + 1)
13*c040c748SMichael Ellerman 
14*c040c748SMichael Ellerman /*
15*c040c748SMichael Ellerman  * The H_HOME_NODE_ASSOCIATIVITY hcall takes two values for flags:
16*c040c748SMichael Ellerman  * 1 for retrieving associativity information for a guest cpu
17*c040c748SMichael Ellerman  * 2 for retrieving associativity information for a host/hypervisor cpu
18*c040c748SMichael Ellerman  */
19*c040c748SMichael Ellerman #define VPHN_FLAG_VCPU	1
20*c040c748SMichael Ellerman #define VPHN_FLAG_PCPU	2
21*c040c748SMichael Ellerman 
22*c040c748SMichael Ellerman #endif // _ASM_POWERPC_VPHN_H
23