x86_iommu: move vtd_generate_msi_message in common file
commit35c2450191634bd0ac0ae3c6e9da3f590124e8e2
authorSingh, Brijesh <brijesh.singh@amd.com>
Mon, 1 Oct 2018 19:44:29 +0000 (1 19:44 +0000)
committerMichael S. Tsirkin <mst@redhat.com>
Mon, 5 Nov 2018 18:24:02 +0000 (5 13:24 -0500)
treed65f88b8918d225f37b955e894daea9f79086985
parent50662ce16da37479533e7ae9f515d4e9d49b9d14
x86_iommu: move vtd_generate_msi_message in common file

The vtd_generate_msi_message() in intel-iommu is used to construct a MSI
Message from IRQ. A similar function will be needed when we add interrupt
remapping support in amd-iommu. Moving the function in common file to
avoid the code duplication. Rename it to x86_iommu_irq_to_msi_message().
There is no logic changes in the code flow.

Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
Suggested-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Cc: Peter Xu <peterx@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>
Cc: Eduardo Habkost <ehabkost@redhat.com>
Cc: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Cc: Tom Lendacky <Thomas.Lendacky@amd.com>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/i386/intel_iommu.c
hw/i386/x86-iommu.c
include/hw/i386/intel_iommu.h
include/hw/i386/x86-iommu.h