mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-24 10:17:28 +00:00
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>
This commit is contained in:
@@ -32,6 +32,11 @@
|
||||
|
||||
#include <pci.h>
|
||||
|
||||
static inline bool is_quirk_ptdev(const struct pci_vdev *vdev)
|
||||
{
|
||||
return ((vdev->flags & QUIRK_PTDEV) != 0U);
|
||||
}
|
||||
|
||||
static inline bool in_range(uint32_t value, uint32_t lower, uint32_t len)
|
||||
{
|
||||
return ((value >= lower) && (value < (lower + len)));
|
||||
|
Reference in New Issue
Block a user