mirror of
https://github.com/qemu/qemu.git
synced 2025-08-16 06:43:21 +00:00
vfio: Rename PCI_VFIO to VFIO_PCI
Make the type checking macro name consistent with the TYPE_* constant. Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Reviewed-by: Eric Auger <eric.auger@redhat.com> Message-Id: <20200902224311.1321159-56-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
bdd5f27ec8
commit
01b4606440
@ -230,7 +230,7 @@ static void vfio_intx_update(VFIOPCIDevice *vdev, PCIINTxRoute *route)
|
|||||||
|
|
||||||
static void vfio_intx_routing_notifier(PCIDevice *pdev)
|
static void vfio_intx_routing_notifier(PCIDevice *pdev)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
PCIINTxRoute route;
|
PCIINTxRoute route;
|
||||||
|
|
||||||
if (vdev->interrupt != VFIO_INT_INTx) {
|
if (vdev->interrupt != VFIO_INT_INTx) {
|
||||||
@ -456,7 +456,7 @@ static void vfio_update_kvm_msi_virq(VFIOMSIVector *vector, MSIMessage msg,
|
|||||||
static int vfio_msix_vector_do_use(PCIDevice *pdev, unsigned int nr,
|
static int vfio_msix_vector_do_use(PCIDevice *pdev, unsigned int nr,
|
||||||
MSIMessage *msg, IOHandler *handler)
|
MSIMessage *msg, IOHandler *handler)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
VFIOMSIVector *vector;
|
VFIOMSIVector *vector;
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ static int vfio_msix_vector_use(PCIDevice *pdev,
|
|||||||
|
|
||||||
static void vfio_msix_vector_release(PCIDevice *pdev, unsigned int nr)
|
static void vfio_msix_vector_release(PCIDevice *pdev, unsigned int nr)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
VFIOMSIVector *vector = &vdev->msi_vectors[nr];
|
VFIOMSIVector *vector = &vdev->msi_vectors[nr];
|
||||||
|
|
||||||
trace_vfio_msix_vector_release(vdev->vbasedev.name, nr);
|
trace_vfio_msix_vector_release(vdev->vbasedev.name, nr);
|
||||||
@ -1048,7 +1048,7 @@ static const MemoryRegionOps vfio_vga_ops = {
|
|||||||
*/
|
*/
|
||||||
static void vfio_sub_page_bar_update_mapping(PCIDevice *pdev, int bar)
|
static void vfio_sub_page_bar_update_mapping(PCIDevice *pdev, int bar)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
VFIORegion *region = &vdev->bars[bar].region;
|
VFIORegion *region = &vdev->bars[bar].region;
|
||||||
MemoryRegion *mmap_mr, *region_mr, *base_mr;
|
MemoryRegion *mmap_mr, *region_mr, *base_mr;
|
||||||
PCIIORegion *r;
|
PCIIORegion *r;
|
||||||
@ -1094,7 +1094,7 @@ static void vfio_sub_page_bar_update_mapping(PCIDevice *pdev, int bar)
|
|||||||
*/
|
*/
|
||||||
uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len)
|
uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
uint32_t emu_bits = 0, emu_val = 0, phys_val = 0, val;
|
uint32_t emu_bits = 0, emu_val = 0, phys_val = 0, val;
|
||||||
|
|
||||||
memcpy(&emu_bits, vdev->emulated_config_bits + addr, len);
|
memcpy(&emu_bits, vdev->emulated_config_bits + addr, len);
|
||||||
@ -1127,7 +1127,7 @@ uint32_t vfio_pci_read_config(PCIDevice *pdev, uint32_t addr, int len)
|
|||||||
void vfio_pci_write_config(PCIDevice *pdev,
|
void vfio_pci_write_config(PCIDevice *pdev,
|
||||||
uint32_t addr, uint32_t val, int len)
|
uint32_t addr, uint32_t val, int len)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
uint32_t val_le = cpu_to_le32(val);
|
uint32_t val_le = cpu_to_le32(val);
|
||||||
|
|
||||||
trace_vfio_pci_write_config(vdev->vbasedev.name, addr, val, len);
|
trace_vfio_pci_write_config(vdev->vbasedev.name, addr, val, len);
|
||||||
@ -2701,7 +2701,7 @@ static void vfio_unregister_req_notifier(VFIOPCIDevice *vdev)
|
|||||||
|
|
||||||
static void vfio_realize(PCIDevice *pdev, Error **errp)
|
static void vfio_realize(PCIDevice *pdev, Error **errp)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
VFIODevice *vbasedev_iter;
|
VFIODevice *vbasedev_iter;
|
||||||
VFIOGroup *group;
|
VFIOGroup *group;
|
||||||
char *tmp, *subsys, group_path[PATH_MAX], *group_name;
|
char *tmp, *subsys, group_path[PATH_MAX], *group_name;
|
||||||
@ -3033,7 +3033,7 @@ error:
|
|||||||
|
|
||||||
static void vfio_instance_finalize(Object *obj)
|
static void vfio_instance_finalize(Object *obj)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(obj);
|
VFIOPCIDevice *vdev = VFIO_PCI(obj);
|
||||||
VFIOGroup *group = vdev->vbasedev.group;
|
VFIOGroup *group = vdev->vbasedev.group;
|
||||||
|
|
||||||
vfio_display_finalize(vdev);
|
vfio_display_finalize(vdev);
|
||||||
@ -3057,7 +3057,7 @@ static void vfio_instance_finalize(Object *obj)
|
|||||||
|
|
||||||
static void vfio_exitfn(PCIDevice *pdev)
|
static void vfio_exitfn(PCIDevice *pdev)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(pdev);
|
VFIOPCIDevice *vdev = VFIO_PCI(pdev);
|
||||||
|
|
||||||
vfio_unregister_req_notifier(vdev);
|
vfio_unregister_req_notifier(vdev);
|
||||||
vfio_unregister_err_notifier(vdev);
|
vfio_unregister_err_notifier(vdev);
|
||||||
@ -3075,7 +3075,7 @@ static void vfio_exitfn(PCIDevice *pdev)
|
|||||||
|
|
||||||
static void vfio_pci_reset(DeviceState *dev)
|
static void vfio_pci_reset(DeviceState *dev)
|
||||||
{
|
{
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(dev);
|
VFIOPCIDevice *vdev = VFIO_PCI(dev);
|
||||||
|
|
||||||
trace_vfio_pci_reset(vdev->vbasedev.name);
|
trace_vfio_pci_reset(vdev->vbasedev.name);
|
||||||
|
|
||||||
@ -3115,7 +3115,7 @@ post_reset:
|
|||||||
static void vfio_instance_init(Object *obj)
|
static void vfio_instance_init(Object *obj)
|
||||||
{
|
{
|
||||||
PCIDevice *pci_dev = PCI_DEVICE(obj);
|
PCIDevice *pci_dev = PCI_DEVICE(obj);
|
||||||
VFIOPCIDevice *vdev = PCI_VFIO(obj);
|
VFIOPCIDevice *vdev = VFIO_PCI(obj);
|
||||||
|
|
||||||
device_add_bootindex_property(obj, &vdev->bootindex,
|
device_add_bootindex_property(obj, &vdev->bootindex,
|
||||||
"bootindex", NULL,
|
"bootindex", NULL,
|
||||||
|
@ -116,7 +116,7 @@ typedef struct VFIOMSIXInfo {
|
|||||||
|
|
||||||
#define TYPE_VFIO_PCI "vfio-pci"
|
#define TYPE_VFIO_PCI "vfio-pci"
|
||||||
typedef struct VFIOPCIDevice VFIOPCIDevice;
|
typedef struct VFIOPCIDevice VFIOPCIDevice;
|
||||||
DECLARE_INSTANCE_CHECKER(VFIOPCIDevice, PCI_VFIO,
|
DECLARE_INSTANCE_CHECKER(VFIOPCIDevice, VFIO_PCI,
|
||||||
TYPE_VFIO_PCI)
|
TYPE_VFIO_PCI)
|
||||||
|
|
||||||
struct VFIOPCIDevice {
|
struct VFIOPCIDevice {
|
||||||
|
Loading…
Reference in New Issue
Block a user