From 1850b6b7d027bb4b45010a7d1da919267fff2cd4 Mon Sep 17 00:00:00 2001 From: Eric Auger Date: Tue, 2 Jun 2015 14:56:23 +0100 Subject: kvm: introduce kvm_arch_msi_data_to_gsi On ARM the MSI data corresponds to the shared peripheral interrupt (SPI) ID. This latter equals to the SPI index + 32. to retrieve the SPI index, matching the gsi, an architecture specific function is introduced. Signed-off-by: Eric Auger Acked-by: Christoffer Dall Acked-by: Cornelia Huck Signed-off-by: Peter Maydell --- target-ppc/kvm.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'target-ppc') diff --git a/target-ppc/kvm.c b/target-ppc/kvm.c index 1da9ea81e5..8f7cee5ec1 100644 --- a/target-ppc/kvm.c +++ b/target-ppc/kvm.c @@ -2410,3 +2410,8 @@ int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route, { return 0; } + +int kvm_arch_msi_data_to_gsi(uint32_t data) +{ + return data & 0xffff; +} -- cgit v1.2.3