mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-08-21 01:24:19 +00:00
Passthrough of lpss devices, such as sdio, spi, uart, is not supported for user vm due to irq and acpi info missing. Here provides new pci device passthrough options to pass irq and acpi dsdt info by users. Considering spi dsdt info varies from HW, to add the flexibility of configuration, it is designed to pass dsdt file of spi device by users rather than hard code. Besides, remove the limit of the lpss device passthrough for rtvm. Tracked-On: #8615 Signed-off-by: nacui <na.cui@intel.com> Reviewed-by: Jian Jun Chen <jian.jun.chen@intel.com>
48 lines
790 B
C
48 lines
790 B
C
/*
|
|
* Copyright (C) 2021 Intel Corporation.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*
|
|
*/
|
|
|
|
#ifndef __PASSTHRU_H__
|
|
#define __PASSTHRU_H__
|
|
|
|
#include <types.h>
|
|
#include <limits.h>
|
|
|
|
#include "pciaccess.h"
|
|
#include "pci_core.h"
|
|
#include "pciio.h"
|
|
|
|
struct passthru_dev {
|
|
struct pci_vdev *dev;
|
|
struct pcibar bar[PCI_BARMAX + 2];
|
|
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 need_rombar;
|
|
bool need_dsdt;
|
|
char *rom_buffer;
|
|
char dsdt_path[256];
|
|
bool (*has_virt_pcicfg_regs)(int offset);
|
|
};
|
|
|
|
#endif
|