Skip to content

Commit 88b42da

Browse files
kelleymhliuw
authored andcommitted
asm-generic/hyperv: Add definitions for Get/SetVpRegister hypercalls
Add definitions for GetVpRegister and SetVpRegister hypercalls, which are implemented for both x86 and ARM64. Signed-off-by: Michael Kelley <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Wei Liu <[email protected]>
1 parent c55a844 commit 88b42da

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

include/asm-generic/hyperv-tlfs.h

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,8 @@ struct ms_hyperv_tsc_page {
141141
#define HVCALL_FLUSH_VIRTUAL_ADDRESS_SPACE_EX 0x0013
142142
#define HVCALL_FLUSH_VIRTUAL_ADDRESS_LIST_EX 0x0014
143143
#define HVCALL_SEND_IPI_EX 0x0015
144+
#define HVCALL_GET_VP_REGISTERS 0x0050
145+
#define HVCALL_SET_VP_REGISTERS 0x0051
144146
#define HVCALL_POST_MESSAGE 0x005c
145147
#define HVCALL_SIGNAL_EVENT 0x005d
146148
#define HVCALL_RETARGET_INTERRUPT 0x007e
@@ -439,4 +441,53 @@ struct hv_retarget_device_interrupt {
439441
struct hv_device_interrupt_target int_target;
440442
} __packed __aligned(8);
441443

444+
445+
/* HvGetVpRegisters hypercall input with variable size reg name list*/
446+
struct hv_get_vp_registers_input {
447+
struct {
448+
u64 partitionid;
449+
u32 vpindex;
450+
u8 inputvtl;
451+
u8 padding[3];
452+
} header;
453+
struct input {
454+
u32 name0;
455+
u32 name1;
456+
} element[];
457+
} __packed;
458+
459+
460+
/* HvGetVpRegisters returns an array of these output elements */
461+
struct hv_get_vp_registers_output {
462+
union {
463+
struct {
464+
u32 a;
465+
u32 b;
466+
u32 c;
467+
u32 d;
468+
} as32 __packed;
469+
struct {
470+
u64 low;
471+
u64 high;
472+
} as64 __packed;
473+
};
474+
};
475+
476+
/* HvSetVpRegisters hypercall with variable size reg name/value list*/
477+
struct hv_set_vp_registers_input {
478+
struct {
479+
u64 partitionid;
480+
u32 vpindex;
481+
u8 inputvtl;
482+
u8 padding[3];
483+
} header;
484+
struct {
485+
u32 name;
486+
u32 padding1;
487+
u64 padding2;
488+
u64 valuelow;
489+
u64 valuehigh;
490+
} element[];
491+
} __packed;
492+
442493
#endif

0 commit comments

Comments
 (0)