mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 17:27:53 +00:00
hv: vpci: remove is_own_device()
Now we could know a device status by 'user' filed, like --------------------------------------------------------------------------- | NULL | == vdev | != NULL && != vdev vdev->user | device is de-init | used by itself VM | assigned to another VM --------------------------------------------------------------------------- So we don't need to modify 'vpci' field accordingly. Tracked-On: #4550 Signed-off-by: Li Fei1 <fei1.li@intel.com> Acked-by: Eddie Dong<eddie.dong@Intel.com>
This commit is contained in:
@@ -208,19 +208,6 @@ static inline uint16_t vmid_2_rel_vmid(uint16_t sos_vmid, uint16_t vmid) {
|
||||
return (vmid - sos_vmid);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the vdev belongs to the vm
|
||||
*
|
||||
* @param vm Pointer to a vm instance
|
||||
* @param vdev Pointer to a vdev instance
|
||||
*
|
||||
* @return If the vm owns the vdev device return true, otherwsie return false
|
||||
*/
|
||||
static inline bool is_own_device(const struct acrn_vm *vm, const struct pci_vdev *vdev)
|
||||
{
|
||||
return (&vm->vpci == vdev->vpci);
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief Check if the specified vdev is a zombie VF instance
|
||||
*
|
||||
|
Reference in New Issue
Block a user