dm: PTM: Check if hw supports ptm

This patch probes whether hw supports ptm.  It is used to check whether ptm
	can be enabled on the passthru pci device.  It checks whether passthru
	device support PTM requestor capability, then check whether its upstream
	root port support PTM root role.  Errors are reported to user if sanity
	check fails.

Tracked-On: #5915
Signed-off-by: Rong Liu <rong.l.liu@intel.com>
Acked-by: Yu Wang <yu1.wang@intel.com>
This commit is contained in:
Rong Liu
2021-04-28 21:28:12 +00:00
committed by wenlingz
parent a7b0d9848f
commit d5d792aa96
5 changed files with 178 additions and 27 deletions

15
devicemodel/include/ptm.h Normal file
View File

@@ -0,0 +1,15 @@
/*
* Copyright (C) 2021 Intel Corporation.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#ifndef __PTM_H__
#define __PTM_H__
#include "passthru.h"
int ptm_probe(struct vmctx *ctx, struct passthru_dev *pdev);
#endif