hv: enable MSI remapping on vm0

When enabled, hypervisor will handle MSI/MSI-X remapping for SOS.

Tracked-On: #1568
Signed-off-by: dongshen <dongsheng.x.zhang@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
Reviewed-by: Li, Fei1 <fei1.li@intel.com>
Acked-by: Anthony Xu <anthony.xu@intel.com>
This commit is contained in:
Zide Chen 2018-10-08 17:38:14 -07:00 committed by Xie, Nanlin
parent 8c398f7d7e
commit c1d2499e5c
3 changed files with 10 additions and 8 deletions

View File

@ -176,15 +176,19 @@ endif
C_SRCS += dm/vpic.c
C_SRCS += dm/vioapic.c
ifeq ($(CONFIG_PARTITION_MODE),y)
C_SRCS += $(wildcard partition/*.c)
C_SRCS += dm/hw/pci.c
C_SRCS += dm/vpci/core.c
C_SRCS += dm/vpci/vpci.c
ifeq ($(CONFIG_PARTITION_MODE),y)
C_SRCS += $(wildcard partition/*.c)
C_SRCS += dm/vpci/partition_mode.c
C_SRCS += dm/vpci/hostbridge.c
C_SRCS += dm/vpci/pci_pt.c
C_SRCS += dm/vrtc.c
else
C_SRCS += dm/vpci/sharing_mode.c
C_SRCS += dm/vpci/msi.c
C_SRCS += dm/vpci/msix.c
endif
C_SRCS += bsp/$(CONFIG_PLATFORM)/$(CONFIG_PLATFORM).c

View File

@ -152,9 +152,10 @@ int create_vm(struct vm_description *vm_desc, struct vm **rtn_vm)
vuart_init(vm);
}
vrtc_init(vm);
vpci_init(vm);
#endif
vpci_init(vm);
/* vpic wire_mode default is INTR */
vm->wire_mode = VPIC_WIRE_INTR;
@ -231,10 +232,7 @@ int shutdown_vm(struct vm *vm)
free_vm_id(vm);
#endif
#ifdef CONFIG_PARTITION_MODE
vpci_cleanup(vm);
#endif
/* Return status to caller */
return status;

View File

@ -7,10 +7,10 @@
#ifndef VM_H_
#define VM_H_
#include <bsp_extern.h>
#include <vpci.h>
#ifdef CONFIG_PARTITION_MODE
#include <mptable.h>
#include <vpci.h>
#endif
enum vm_privilege_level {
VM_PRIVILEGE_LEVEL_HIGH = 0,
@ -155,9 +155,9 @@ struct vm {
uint32_t vcpuid_entry_nr, vcpuid_level, vcpuid_xlevel;
struct vcpuid_entry vcpuid_entries[MAX_VM_VCPUID_ENTRIES];
struct vpci vpci;
#ifdef CONFIG_PARTITION_MODE
struct vm_description *vm_desc;
struct vpci vpci;
uint8_t vrtc_offset;
#endif