acrn-hypervisor/devicemodel/include/passthru.h
Rong Liu 7e93f31e2c dm: PTM: Add virtual root port to vm
If PTM can be enabled on passthru device, a virtual root port
	is added to vm to act as ptm root.  And the passthru device is
	connected to the virtual root port instead of the virtual host bridge.

Tracked-On: #5915
Signed-off-by: Rong Liu <rong.l.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
2021-05-19 13:54:24 +08:00

43 lines
693 B
C

/*
* Copyright (C) 2021 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#ifndef __PASSTHRU_H__
#define __PASSTHRU_H__
#include <types.h>
#include "pciaccess.h"
#include "pci_core.h"
#include "pciio.h"
struct passthru_dev {
struct pci_vdev *dev;
struct pcibar bar[PCI_BARMAX + 1];
struct {
int capoff;
} msi;
struct {
int capoff;
} msix;
struct {
int capoff;
} pmcap;
bool pcie_cap;
struct pcisel sel;
int phys_pin;
uint16_t phys_bdf;
struct pci_device *phys_dev;
/* Options for passthrough device:
* need_reset - reset dev before passthrough
*/
bool need_reset;
bool d3hot_reset;
bool (*has_virt_pcicfg_regs)(int offset);
};
#endif