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:
Li Fei1
2020-05-12 14:45:57 +08:00
committed by wenlingz
parent af8329394b
commit 15e3062631
4 changed files with 9 additions and 26 deletions

View File

@@ -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
*