Lines Matching +full:virtio +full:- +full:pci

1 /* SPDX-License-Identifier: GPL-2.0-only */
5 * Copyright (C) 2022-2023 SolidRun
7 * Author: Alvaro Karsz <alvaro.karsz@solid-run.com>
14 #include <linux/pci.h>
18 #define SNET_ERR(pdev, fmt, ...) dev_err(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__)
19 #define SNET_WARN(pdev, fmt, ...) dev_warn(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__)
20 #define SNET_INFO(pdev, fmt, ...) dev_info(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__)
21 #define SNET_DBG(pdev, fmt, ...) dev_dbg(&(pdev)->dev, "%s"fmt, "snet_vdpa: ", ##__VA_ARGS__)
22 #define SNET_HAS_FEATURE(s, f) ((s)->negotiated_features & BIT_ULL(f))
24 #define SNET_CFG_VER(snet, ver) ((snet)->psnet->negotiated_cfg_ver >= (ver))
46 /* IRQ index, DPU uses this to parse data from MSI-X table */
50 /* pointer to mapped PCI BAR register used by this VQ to kick */
75 /* IRQ index, DPU uses this to parse data from MSI-X table */
81 /* PCI device */
90 /* Device ID following VirtIO spec. */
98 /* Device features, following VirtIO spec */
102 /* VirtIO device specific config size */
104 /* VirtIO device specific config address */
123 /* VirtIO config offset in BAR */
125 /* Offset in PCI BAR for VQ kicks */
127 /* Offset in PCI BAR for HW monitoring */
129 /* Offset in PCI BAR for Control mechanism */
131 /* Config general flags - enum snet_cfg_flags */
143 /* PCI BARs */
166 #define PSNET_FLAG_ON(p, f) ((p)->cfg.flags & (f))
170 return ioread32(psnet->bars[psnet->barno] + off); in psnet_read32()
175 return ioread32(snet->bar + off); in snet_read32()
180 iowrite32(val, snet->bar + off); in snet_write32()