Skip to content

Commit 69c88a6

Browse files
Anirudh Rayabharam (Microsoft)liuw
authored andcommitted
mshv: add definitions for arm64 gpa intercepts
Add definitions required for handling GPA intercepts on arm64. Signed-off-by: Anirudh Rayabharam (Microsoft) <anirudh@anirudhrb.com> Reviewed-by: Stanislav Kinsburskii <skinsburskii@linux.microsoft.com> Signed-off-by: Wei Liu <wei.liu@kernel.org>
1 parent d2999c0 commit 69c88a6

1 file changed

Lines changed: 47 additions & 0 deletions

File tree

include/hyperv/hvhdk.h

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -800,6 +800,53 @@ struct hv_x64_memory_intercept_message {
800800
u8 instruction_bytes[16];
801801
} __packed;
802802

803+
#if IS_ENABLED(CONFIG_ARM64)
804+
union hv_arm64_vp_execution_state {
805+
u16 as_uint16;
806+
struct {
807+
u16 cpl:2; /* Exception Level (EL) */
808+
u16 debug_active:1;
809+
u16 interruption_pending:1;
810+
u16 vtl:4;
811+
u16 virtualization_fault_active:1;
812+
u16 reserved:7;
813+
} __packed;
814+
};
815+
816+
struct hv_arm64_intercept_message_header {
817+
u32 vp_index;
818+
u8 instruction_length;
819+
u8 intercept_access_type;
820+
union hv_arm64_vp_execution_state execution_state;
821+
u64 pc;
822+
u64 cpsr;
823+
} __packed;
824+
825+
union hv_arm64_memory_access_info {
826+
u8 as_uint8;
827+
struct {
828+
u8 gva_valid:1;
829+
u8 gva_gpa_valid:1;
830+
u8 hypercall_output_pending:1;
831+
u8 reserved:5;
832+
} __packed;
833+
};
834+
835+
struct hv_arm64_memory_intercept_message {
836+
struct hv_arm64_intercept_message_header header;
837+
u32 cache_type; /* enum hv_cache_type */
838+
u8 instruction_byte_count;
839+
union hv_arm64_memory_access_info memory_access_info;
840+
u16 reserved1;
841+
u8 instruction_bytes[4];
842+
u32 reserved2;
843+
u64 guest_virtual_address;
844+
u64 guest_physical_address;
845+
u64 syndrome;
846+
} __packed;
847+
848+
#endif /* CONFIG_ARM64 */
849+
803850
/*
804851
* Dispatch state for the VP communicated by the hypervisor to the
805852
* VP-dispatching thread in the root on return from HVCALL_DISPATCH_VP.

0 commit comments

Comments
 (0)