mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-21 16:57:20 +00:00
hv: vpci: minor refine the vdev ownership data structure
Add a new field 'parent_user' to record the parent user of the vdev. And refine 'new_owner' to 'user' to record who is the current user of the vdev. Like ----------------------------------------------------------------------------------------------- vdev in | HV | pre-VM | SOS | post-VM | | |vdev used by SOS|vdev used by post-VM| ----------------------------------------------------------------------------------------------- parent_user| NULL(HV) | NULL(HV) | NULL(HV) | NULL(HV) | vdev in SOS ----------------------------------------------------------------------------------------------- user | vdev in HV | vdev in pre-VM | vdev in SOS | vdev in post-VM | vdev in post-VM ----------------------------------------------------------------------------------------------- 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:
@@ -123,8 +123,16 @@ struct pci_vdev {
|
||||
/* Pointer to corressponding operations */
|
||||
const struct pci_vdev_ops *vdev_ops;
|
||||
|
||||
/* For SOS, if the device is latterly assigned to a UOS, we use this field to track the new owner. */
|
||||
struct pci_vdev *new_owner;
|
||||
/*
|
||||
* vdev in | HV | pre-VM | SOS | post-VM
|
||||
* | | |vdev used by SOS|vdev used by post-VM|
|
||||
* -----------------------------------------------------------------------------------------------
|
||||
* parent_user| NULL(HV) | NULL(HV) | NULL(HV) | NULL(HV) | vdev in SOS
|
||||
* -----------------------------------------------------------------------------------------------
|
||||
* user | vdev in HV | vdev in pre-VM | vdev in SOS | vdev in post-VM | vdev in post-VM
|
||||
*/
|
||||
struct pci_vdev *parent_user;
|
||||
struct pci_vdev *user;
|
||||
};
|
||||
|
||||
union pci_cfg_addr_reg {
|
||||
|
Reference in New Issue
Block a user