aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/arch/x86/include/asm/hyperv-tlfs.h
diff options
context:
space:
mode:
authorSunil Muthuswamy <sunilmut@microsoft.com>2022-01-05 11:32:35 -0800
committerBjorn Helgaas <bhelgaas@google.com>2022-01-12 08:21:54 -0600
commit831c1ae725f7d2f8f858b0840692b48e75b49331 (patch)
treed302828f165b0f1b36f7182c429a0a4317b4b7f5 /arch/x86/include/asm/hyperv-tlfs.h
parentLinux 5.16-rc1 (diff)
downloadwireguard-linux-831c1ae725f7d2f8f858b0840692b48e75b49331.tar.xz
wireguard-linux-831c1ae725f7d2f8f858b0840692b48e75b49331.zip
PCI: hv: Make the code arch neutral by adding arch specific interfaces
Encapsulate arch dependencies in Hyper-V vPCI through a set of arch-dependent interfaces. Adding these arch specific interfaces will allow for an implementation for other architectures, such as arm64. There are no functional changes expected from this patch. Link: https://lore.kernel.org/r/1641411156-31705-2-git-send-email-sunilmut@linux.microsoft.com Signed-off-by: Sunil Muthuswamy <sunilmut@microsoft.com> Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Reviewed-by: Boqun Feng <boqun.feng@gmail.com> Reviewed-by: Marc Zyngier <maz@kernel.org> Reviewed-by: Michael Kelley <mikelley@microsoft.com>
Diffstat (limited to 'arch/x86/include/asm/hyperv-tlfs.h')
-rw-r--r--arch/x86/include/asm/hyperv-tlfs.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/arch/x86/include/asm/hyperv-tlfs.h b/arch/x86/include/asm/hyperv-tlfs.h
index 381e88122a5f..0a9407dc0859 100644
--- a/arch/x86/include/asm/hyperv-tlfs.h
+++ b/arch/x86/include/asm/hyperv-tlfs.h
@@ -602,6 +602,39 @@ enum hv_interrupt_type {
HV_X64_INTERRUPT_TYPE_MAXIMUM = 0x000A,
};
+union hv_msi_address_register {
+ u32 as_uint32;
+ struct {
+ u32 reserved1:2;
+ u32 destination_mode:1;
+ u32 redirection_hint:1;
+ u32 reserved2:8;
+ u32 destination_id:8;
+ u32 msi_base:12;
+ };
+} __packed;
+
+union hv_msi_data_register {
+ u32 as_uint32;
+ struct {
+ u32 vector:8;
+ u32 delivery_mode:3;
+ u32 reserved1:3;
+ u32 level_assert:1;
+ u32 trigger_mode:1;
+ u32 reserved2:16;
+ };
+} __packed;
+
+/* HvRetargetDeviceInterrupt hypercall */
+union hv_msi_entry {
+ u64 as_uint64;
+ struct {
+ union hv_msi_address_register address;
+ union hv_msi_data_register data;
+ } __packed;
+};
+
#include <asm-generic/hyperv-tlfs.h>
#endif