PCI: hv: Move retarget related structures into tlfs header
authorBoqun Feng <boqun.feng@gmail.com>
Mon, 10 Feb 2020 03:39:52 +0000 (11:39 +0800)
committerLorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Mon, 9 Mar 2020 14:50:53 +0000 (14:50 +0000)
commit61bfd920abbf2c8c9c3b10bb335475e707247573
tree4eceaddbc102b89163cdefa0bb89e501ad28d3ca
parentb00f80fcfaa098f987dde99585e73e8ed7edae51
PCI: hv: Move retarget related structures into tlfs header

Currently, retarget_msi_interrupt and other structures it relys on are
defined in pci-hyperv.c. However, those structures are actually defined
in Hypervisor Top-Level Functional Specification [1] and may be
different in sizes of fields or layout from architecture to
architecture. Let's move those definitions into x86's tlfs header file
to support virtual PCI on non-x86 architectures in the future. Note that
"__packed" attribute is added to these structures during the movement
for the same reason as we use the attribute for other TLFS structures in
the header file: make sure the structures meet the specification and
avoid anything unexpected from the compilers.

Additionally, rename struct retarget_msi_interrupt to
hv_retarget_msi_interrupt for the consistent naming convention, also
mirroring the name in TLFS.

[1]: https://docs.microsoft.com/en-us/virtualization/hyper-v-on-windows/reference/tlfs

Signed-off-by: Boqun Feng (Microsoft) <boqun.feng@gmail.com>
Signed-off-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Reviewed-by: Dexuan Cui <decui@microsoft.com>
arch/x86/include/asm/hyperv-tlfs.h
drivers/pci/controller/pci-hyperv.c