Commit Graph

2610 Commits

Author SHA1 Message Date
Li Fei1 e99ddf28c3 hv: vpci: handle the quirk part for pass through pci device cfg access in dm
There're some PCI devices need special handler for vendor-specical feature or
capability CFG access. The Intel GPU is one of them. In order to keep the ACRN-HV
clean, we want to throw the qurik part of PCI CFG asccess to DM to handle.

To achieve this, we implement per-device policy base on whether it needs quirk handler
for a VM: each device could configure as "quirk pass through device" or not. For a
"quirk pass through device", we will handle the general part in HV and the quirk part
in DM. For a non "quirk pass through device",  we will handle all the part in HV.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-20 10:08:43 +08:00
Li Fei1 e5c7a96513 hv: vpci: sos could access low severity guest pci cfg space
There're some cases the SOS (higher severity guest) needs to access the
post-launched VM (lower severity guest) PCI CFG space:
1. The SR-IOV PF needs to reset the VF
2. Some pass through device still need DM to handle some quirk.
In the case a device is assigned to a UOS and is not in a zombie state, the SOS
is able to access, if and only if the SOS has higher severity than the UOS.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-20 10:08:43 +08:00
Yuan Liu 9375c634dc hv: unmap SR-IOV VF MMIO when the VF physical device is disabled
To avoid information leakage, we need to ensure that the device is
inaccessble when it does not exist.

For SR-IOV disabled VF device, we have the following operations.
    1. The configuration space accessing will get 0xFFFFFFFF as a
       return value after set the device state to zombie.
    2. The BAR MMIO EPT mapping are removed, the accesssing causes
       EPT violation.
    3. The device will be detached from IOMMU.
    4. The IRQ pin and vector are released.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-18 21:46:54 +08:00
Mingqiang Chi 14692ef60c hv:Rename two VM states
Rename:
  VM_STARTED --> VM_RUNNING
  VM_POWERING_OFF --> VM_READY_TO_POWEROFF

Tracked-On: #4320
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-13 10:34:29 +08:00
Victor Sun a8c2ba03fc HV: add pci_devices.h for nuc6cayh and apl-up2
As pci_devices.h is included by <page.h>, need to prepare pci_devices.h
for nuc6cayh and apl-up2 board.

Also the #error info in generic/pci_devices.h should be removed, otherwise
the build will be failed in sdc/sdc2/industry scenarios.

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-03-12 14:56:34 +08:00
Victor Sun a68f655a11 HV: update ept address range for pre-launched VM
For a pre-launched VM, a region from PTDEV_HI_MMIO_START is used to store
64bit vBARs of PT devices which address is high than 4G. The region should
be located after all user memory space and be coverd by guest EPT address.

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-12 14:56:34 +08:00
Victor Sun e74553492a HV: move create_sos_vm_e820 to ve820.c
ve820.c is a common file in arch/x86/guest/ now, so move function of
create_sos_vm_e820() to this file to make code structure clear;

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-12 14:56:34 +08:00
Victor Sun a7b61d2511 HV: remove board specific ve820
Remove useless per board ve820.c as arch/x86/guest/ve820.c is common for
all boards now;

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-12 14:56:34 +08:00
Victor Sun d7eac3fe6a HV: decouple prelaunch VM ve820 from board configs
hypervisor/arch/x86/configs/$(BOARD)/ve820.c is used to store pre-launched
VM specific e820 entries according to memory configuration of customer.
It should be a scenario based configurations but we had to put it in per
board foler because of different board memory settings. This brings concerns
to customer on configuration orgnization.

Currently the file provides same e820 layout for all pre-launched VMs, but
they should have different e820 when their memory are configured differently.
Although we have acrn-config tool to generate ve802.c automatically, it
is not friendly to modify hardcoded ve820 layout manually, so the patch
changes the entries initialization method by calculating each entry item
in C code.

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-12 14:56:34 +08:00
Victor Sun 4c0965d89e HV: correct ept page array usage
Currently ept_pages_info[] is initialized with first element only that force
VM of id 0 using SOS EPT pages. This is incorrect for logical partition and
hybrid scenario. Considering SOS_RAM_SIZE and UOS_RAM_SIZE are configured
separately, we should use different ept pages accordingly.

So, the PRE_VM_NUM/SOS_VM_NUM and MAX_POST_VM_NUM macros are introduced to
resolve this issue. The macros would be generated by acrn-config tool when
user configure ACRN for their specific scenario.

One more thing, that when UOS_RAM_SIZE is less then 2GB, the EPT address
range should be (4G + PLATFORM_HI_MMIO_SIZE).

Tracked-On: #4458

Signed-off-by: Victor Sun <victor.sun@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-12 14:56:34 +08:00
Yuan Liu e9a99845f6 hv: refine read/write configuration APIs for vmsi/vmsix
change vmsi_read_cfg to read_vmsi_cfg, same applies to writing
change vmsix_read_cfg to read_vmsix_cfg, same applies to writing

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-12 10:40:02 +08:00
Li Fei1 4b6dd19ad1 hv: pci: rename CFG read/write function for PCI-compatible Configuration Mechanism
Move CFG read/write function for PCI-compatible Configuration Mechanism from
debug/uartuart16550.c to hw/pci.c and rename CFG read/write function for
PCI-compatible Configuration Mechanism to pci_pio_read/write_cfg to align with
CFG read/write function pci_mmcfg_read/write_cfg for PCI Express Enhanced
Configuration Access Mechanism.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-12 09:17:02 +08:00
Mingqiang Chi 790614e952 hv:rename several variables and api for ioapic
rename:
  ioapic_get_gsi_irq_addr --> gsi_to_ioapic_base
  ioapic_addr -->ioapic_base

Tracked-On: #861
Signed-off-by: Mingqiang Chi <mingqiang.chi@intel.com>
2020-03-11 13:26:15 +08:00
Li Fei1 fa74bf401d hv: vpci: pass through stolen memory and opregion memory for GVT-D
In order to add GVT-D support, we need pass through stolen memory and opregion memroy
to the post-launched VM. To implement this, we first reserve the GPA for stolen memory
and opregion memory through post-launched VM e820 table. Then we would build EPT mapping
between the GPA and the stolen memory and opregion memory real HPA. The last, we need to
return the GPA to post-launched VM if it wants to read the stolen memory and opregion
memory address and prevent post-launched VM to write the stolen memory and opregion memory
address register for now.
We do the GPA reserve and GPA to HPA EPT mapping in ACRN-DM and the stolen memory and
opregion memory CFG space register access emulation in ACRN-HV.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-11 10:59:23 +08:00
Zide Chen 659e5420df hv: add static check for CONFIG_HV_RAM_START and CONFIG_HV_RAM_SIZE
Hypervisor uses 2MB large page, and if either CONFIG_HV_RAM_START or
CONFIG_HV_RAM_SIZE is not aligned to 2MB, ACRN won't boot. Add static check
to avoid unexpected boot failures.

If CONFIG_RELOC is enabled, CONFIG_HV_RAM_START is not directly referred
by the code, but it causes problems because ld_text_end could be relocated
to an address that is not 2MB aligned which fails mmu_modify_or_del().

Tracked-On: #4441
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-11 10:37:50 +08:00
Yuan Liu 696f6c7ba4 hv: the VM can only deinit its own devices
VM needs to check if it owns this device before deiniting it.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu d8a19f9978 hv: refine naming
Change enable_vf/disable_vf to create_vfs/disable_vfs
Change base member of pci_vbar to base_gpa

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu 08ed45f4b4 hv: fix wrong VF BDF
The vf_bdf is not initialized when invoking pci_pdev_read_cfg function.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu 7b429fe483 hv: prohibit PF from being assigned
We didn't support SR-IOV capability of PF in UOS for now, we should
hide the SR-IOV capability if we pass through the PF to a UOS.

For now, we don't support assignment of PF to a UOS.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@Intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu 657af925c1 hv: passthrough a VF device
Emulate Device ID, Vendor ID and MSE(Memory Space Enable) bit in
configuration space for an assigned VF, initialize assgined VF Bars.

The Device ID comes from PF's SRIOV capability
The Vendor ID comes from PF's Vendor ID
The PCI MSE bit always be set when VM reads from an assigned VF.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu 640cf57c14 hv: disable VF device
If a VF instance is disabled, we didn’t remove the vdev instance,
only set the vdev as a zombie vdev instance, indicating that it
cannot be accessed anymore.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu 2a4235f200 hv: refine function find_vdev
Change name find_vdev to find_available_vdev and add comments

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu d67d0538e6 hv: initialize VF BARs
The VF BARs are initialized by its PF SRIOV capability

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Yuan Liu ddd6253a4c hv: wrap msix map/unmap operations
Refine coding style to wrap msix map/unmap operations, clean up repeated
assignments for msix mmio_hpa and mmio_size.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-11 08:35:30 +08:00
Li Fei1 41350c533c hv: vpci: add _v prefix for some function name
Add _v prefix for some function name to indicate this function wants to operate
on virtual CFG space or virtual BAR register.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-09 17:09:55 +08:00
fuzhongl f727d1e741 HV: sdc2 UUID update
Since there is no RTVM requirement for sdc2 scenario, replace uuid
495ae2e5-2603-4d64-af76-d4bc5a8ec0e5 which is dedicated to RTVM with
615db82a-e189-4b4f-8dbb-d321343e4ab3

Tracked-On: #4472
Signed-off-by: fuzhongl <fuzhong.liu@intel.com>
Reviewed-by: Sun Victor <victor.sun@intel.com>
2020-03-09 13:28:31 +08:00
Yuan Liu 60a7c49bb0 hv: Refine code for API reduction
Removed the pci_vdev_write_cfg_u8/u16/u32 APIs and only used
pci_vdev_write_cfg as the API for writing vdev's cfgdata

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-09 12:56:00 +08:00
Li Fei1 e5ae37eb69 hv: mmu: minor fix about add_pte
In Commit 127c73c3, we remove the strict check for adding page table mapping. However,
we just replace the ASSERT of pr_fatal in add_pte. This is not enough. We still add
the virtual address by 4K if the page table mapping is exist and check the virtual
address is over the virtual address region for this mapping. Otherwise, The complain
will continue for 512 times at most.

Tracked-On: #3475
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-09 10:03:01 +08:00
Li Fei1 4367657771 hv: vpci: add a global CFG header configuration access handler
Add cfg_header_read_cfg and cfg_header_write_cfg to handle the 1st 64B
CFG Space header PCI configuration space.
Only Command and Status Registers are pass through;
Only Command and Status Registers and Base Address Registers are writable.
In order to implement this, we add two type bit mask for per 4B register:
pass through mask and read-only mask. When pass through bit mask is set, this
means this bit of this 4B register is pass through, otherwise, it is virtualized;
When read-only mask is set, this means this bit of this 4B register is read-only,
otherwise, it's writable. We should write it to physical CFG space or virtual
CFG space base on whether the pass through bit mask is set or not.

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-06 14:08:04 +08:00
Sainath Grandhi 460e7ee5b1 hv: Variable/macro renaming for intr handling of PT devices using IO-APIC/PIC
1. Renames DEFINE_IOAPIC_SID with DEFINE_INTX_SID as the virtual source can
   be IOAPIC or PIC
2. Rename the src member of source_id.intx_id to ctlr to indicate interrupt
   controller
2. Changes the type of src member of source_id.intx_id from uint32_t to
   enum with INTX_CTLR_IOAPIC and INTX_CTLR_PIC

Tracked-On: #4447
Signed-off-by: Sainath Grandhi <sainath.grandhi@intel.com>
2020-03-06 11:29:02 +08:00
Minggui Cao 2aaa050cab HV: move out physical cfg write from vpci-bridge
for vpci_bridge it is better just write the virtual configure space,
so move out the PCI bridge phyiscal cfg write to pci.c

also add some rules in config pci bridge.

Tracked-On: #3381
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Reviewed-by: Yin Fengwei <fengwei.yin@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-06 08:47:46 +08:00
Minggui Cao ad4d14e37f HV: enable ARI if PCI bridge support it
For SRIOV needs ARI support, so enable it in HV if
the PCI bridge support it.

TODO:
  need check all the PCI devices under this bridge can support ARI,
if not, it is better not enable it as PCIe spec. That check will be
done when scanning PCI devices.

Tracked-On: #3381
Signed-off-by: Yin Fengwei <fengwei.yin@intel.com>
Signed-off-by: Minggui Cao <minggui.cao@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-06 08:47:46 +08:00
Victor Sun b6684f5b61 HV: sanitize config file for whl-ipc-i5
- remove limit of CONFIG_HV_RAM_SIZE which is for scenario of 2 VMs only,
the default size from Kconfig could build scenario which up to 5 VMs;

- rename whl-ipc-i5_acpi_info.h to platform_acpi_info.h, since the former
one should be generated by acrn-config tool;

- add SOS related macros in misc.h, otherwise build scenarios which has
SOS VM would be failed;

Tracked-On: #4463

Signed-off-by: Victor Sun <victor.sun@intel.com>
2020-03-06 08:34:12 +08:00
Zide Chen 67cb1029d9 hv: update the hypervisor 64-bit entry address for efi-stub
- remove .data and .text directives. We want to place all the boot data and
  text in the .entry section since the boot code is different from others
  in terms of relocation fixup. With this change, the page tables are in
  entry section now and it's aligned at 4KB.

- regardless CONFIG_MULTIBOOT2 is set or not, the 64-bit entry offset is
  fixed at 0x1200:

  0x00 -- 0x10: Multiboot1 header
  0x10 -- 0x88: Multiboot2 header if CONFIG_MULTIBOOT2 is set
  0x1000: start of entry section: cpu_primary_start_32
  0x1200: cpu_primary_start_64 (thanks to the '.org 0x200' directive)
          GDT tables
	  initial page tables
	  etc.

Tracked-On: #4441
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-06 08:27:46 +08:00
Zide Chen 49ffe168af hv: fixup relocation delta for symbols belong to entry section
This is to enable relocation for code32.

- RIP relative addressing is available in x86-64 only so we manually add
  relocation delta to the target symbols to fixup code32.

- both code32 and code64 need to load GDT hence both need to fixup GDT
  pointer. This patch declares separate GDT pointer cpu_primary64_gdt_ptr
  for code64 to avoid double fixup.

- manually fixup cpu_primary64_gdt_ptr in code64, but not rely on relocate()
  to do that. Otherwise it's very confusing that symbols from same file could
  be fixed up externally by relocate() or self-relocated.

- to make it clear, define a new symbol ld_entry_end representing the end of
  the boot code that needs manually fixup, and use this symbol in relocate()
  to filter out all symbols belong to the entry sections.

Tracked-On: #4441
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-06 08:27:46 +08:00
Chen, Zide 2aa8c9e5d4 hv: add multiboot2 tags to load relocatable raw binary
GRUB multiboot2 doesn't support relocation for ELF, which means it can't
load acrn.32.out to other address other than the one specified in ELF
header. Thus we need to use the raw binary file acrn.bin, and add
address/entry address/relocatable tags to instruct multiboot2 loader
how to load the raw binary.

Tracked-On: #4441
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-06 08:27:46 +08:00
Chen, Zide 97fc0efe20 hv: remove unused cpu_primary_save_32()
In direct boot mode, boot_context[] which is saved from cpu_primary_save_32()
is no longer used since commit 6beb34c3cb ("vm_load: update init gdt
preparation"). Thus, the call to it and the function itself can be removed.

Tracked-On: #4441
Reviewed-by: Fengwei Yin <fengwei.yin@intel.com>
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-06 08:27:46 +08:00
Yuan Liu f0e5387e1c hv: remove pci_vdev_read_cfg_u8/16/32
reduce the use of similar APIs (particularly the name confusion) for
CFG space read/write.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-05 22:21:21 +08:00
Yuan Liu e1ca1ae2e9 hv: refine functions name
Make the name of the functions more accurate

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-05 22:21:21 +08:00
Li Fei1 7c82efb938 hv: pci: add some pre-assumption and safety check for PCIe ECAM
Add some pre-assumption and safety check for PCIe ECAM:
1) ACRN only support platforms with PCIe ECAM to access PCIe device CFG space;
2) Must not use ECAM to access PCIe device CFG space before
pci_switch_to_mmio_cfg_ops was called. (In release version, ACRN didn't support
IO port Mechanism. ECAM is the only way to access the PCIe device CFG space).

Tracked-On: #4371
Signed-off-by: Li Fei1 <fei1.li@intel.com>
2020-03-05 15:42:53 +08:00
Binbin Wu 667639b591 doc: fix a missing argument in the function description
One argument is missing for the function ptirq_alloc_entry.
This patch fixes the doc generation error.

Tracked-On: #3882
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
2020-03-05 13:08:57 +08:00
Zide Chen 93fa2bc0fc hv: minor fixes in init_paging()
- change variable name from hpa to hva because in this function we are
  dealing with hva, not hpa.

- can get the address of ld_text_end by directly referring to this symbol,
  because relative addressing yields the correct hva, not the hva before
  relocation.

Tracked-On: #4441
Signed-off-by: Zide Chen <zide.chen@intel.com>
2020-03-05 10:18:56 +08:00
Yuan Liu 734ad6ce30 hv: refine pci_read_cap and pci_read_ext_cap
The pci_read_cap and pci_read_ext_cap are used to enumerate PCI
legacy capability and extended capability.

Change the name pci_read_cap to pci_enumerate_cap
Change the name pci_read_ext_cap to pci_enumerate_ext_cap

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-05 10:15:15 +08:00
Binbin Wu 76f2e28e13 doc: update hv device passthrough document
Fixed misspellings and rst formatting issues.
Added ptdev.h to the list of include file for doxygen

Tracked-On: #3882
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2020-03-04 18:05:15 -05:00
Binbin Wu b05c1afa0b doc: add doxygen style comments to ptdev
Add doxygen style comments to ptdev public APIs.
Add these API descriptions to group acrn_passthrough.

Tracked-On: #3882
Signed-off-by: Binbin Wu <binbin.wu@intel.com>
2020-03-04 18:05:15 -05:00
Vijay Dhanraj b6c0558b60 HV: Update existing board.c files for RDT MBA
This patch updates board.c files for RDT MBA on existing
platforms. Also, fixes setting RDT flag in  WHL config file.

Tracked-On: #3725
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-04 17:33:50 +08:00
Vijay Dhanraj 92ee33b035 HV: Add MBA support in ACRN
This patch adds RDT MBA support to detect, configure and
and setup MBA throttle registers based on VM configuration.

Tracked-On: #3725
Signed-off-by: Vijay Dhanraj <vijay.dhanraj@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-04 17:33:50 +08:00
Yuan Liu d54deca87a hv: initialize SRIOV VF device
create new pdev and vdev structures for a SRIOV VF device initialization

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-03 09:32:11 +08:00
Yuan Liu 176cb31c31 hv: refine vpci_init_vdev function
Add a new parameter pf_vdev for function vpci_init_vdev to support SRIOV
VF vdev initializaiton.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-03 09:32:11 +08:00
Yuan Liu 320ed6c238 hv: refine init_one_dev_config
The init_one_dev_config is used to initialize a acrn_vm_pci_dev_config
SRIOV needs a explicit acrn_vm_pci_dev_config to create a VF vdev,so
refine it to return acrn_vm_pci_dev_config.

Tracked-On: #4433

Signed-off-by: Yuan Liu <yuan1.liu@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
2020-03-03 09:32:11 +08:00