hv: vpci: remove vm structure pointer from vpci

We could use container_of to get vm structure pointer from vpci. So vm
structure pointer is no need in vpci structure.

Tracked-On: #4550
Signed-off-by: Li Fei1 <fei1.li@intel.com>
This commit is contained in:
Li Fei1
2020-03-30 13:32:27 +08:00
committed by wenlingz
parent a7768fdb6a
commit 0a7770cbb7
8 changed files with 46 additions and 39 deletions

View File

@@ -30,8 +30,14 @@
#ifndef VPCI_PRIV_H_
#define VPCI_PRIV_H_
#include <list.h>
#include <pci.h>
static inline struct acrn_vm *vpci2vm(const struct acrn_vpci *vpci)
{
return container_of(vpci, struct acrn_vm, vpci);
}
static inline bool is_quirk_ptdev(const struct pci_vdev *vdev)
{
return ((vdev->flags & QUIRK_PTDEV) != 0U);