struct perm_bits {
        u8      *virt;          /* read/write virtual data, not hw */
        u8      *write;         /* writeable bits */
-       int     (*readfn)(struct vfio_pci_device *vdev, int pos, int count,
+       int     (*readfn)(struct vfio_pci_core_device *vdev, int pos, int count,
                          struct perm_bits *perm, int offset, __le32 *val);
-       int     (*writefn)(struct vfio_pci_device *vdev, int pos, int count,
+       int     (*writefn)(struct vfio_pci_core_device *vdev, int pos, int count,
                           struct perm_bits *perm, int offset, __le32 val);
 };
 
        return ret;
 }
 
-static int vfio_default_config_read(struct vfio_pci_device *vdev, int pos,
+static int vfio_default_config_read(struct vfio_pci_core_device *vdev, int pos,
                                    int count, struct perm_bits *perm,
                                    int offset, __le32 *val)
 {
        return count;
 }
 
-static int vfio_default_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_default_config_write(struct vfio_pci_core_device *vdev, int pos,
                                     int count, struct perm_bits *perm,
                                     int offset, __le32 val)
 {
 }
 
 /* Allow direct read from hardware, except for capability next pointer */
-static int vfio_direct_config_read(struct vfio_pci_device *vdev, int pos,
+static int vfio_direct_config_read(struct vfio_pci_core_device *vdev, int pos,
                                   int count, struct perm_bits *perm,
                                   int offset, __le32 *val)
 {
 }
 
 /* Raw access skips any kind of virtualization */
-static int vfio_raw_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_raw_config_write(struct vfio_pci_core_device *vdev, int pos,
                                 int count, struct perm_bits *perm,
                                 int offset, __le32 val)
 {
        return count;
 }
 
-static int vfio_raw_config_read(struct vfio_pci_device *vdev, int pos,
+static int vfio_raw_config_read(struct vfio_pci_core_device *vdev, int pos,
                                int count, struct perm_bits *perm,
                                int offset, __le32 *val)
 {
 }
 
 /* Virt access uses only virtualization */
-static int vfio_virt_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_virt_config_write(struct vfio_pci_core_device *vdev, int pos,
                                  int count, struct perm_bits *perm,
                                  int offset, __le32 val)
 {
        return count;
 }
 
-static int vfio_virt_config_read(struct vfio_pci_device *vdev, int pos,
+static int vfio_virt_config_read(struct vfio_pci_core_device *vdev, int pos,
                                 int count, struct perm_bits *perm,
                                 int offset, __le32 *val)
 {
 }
 
 /* Caller should hold memory_lock semaphore */
-bool __vfio_pci_memory_enabled(struct vfio_pci_device *vdev)
+bool __vfio_pci_memory_enabled(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        u16 cmd = le16_to_cpu(*(__le16 *)&vdev->vconfig[PCI_COMMAND]);
  * Restore the *real* BARs after we detect a FLR or backdoor reset.
  * (backdoor = some device specific technique that we didn't catch)
  */
-static void vfio_bar_restore(struct vfio_pci_device *vdev)
+static void vfio_bar_restore(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        u32 *rbar = vdev->rbar;
  * Pretend we're hardware and tweak the values of the *virtual* PCI BARs
  * to reflect the hardware capabilities.  This implements BAR sizing.
  */
-static void vfio_bar_fixup(struct vfio_pci_device *vdev)
+static void vfio_bar_fixup(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        int i;
        vdev->bardirty = false;
 }
 
-static int vfio_basic_config_read(struct vfio_pci_device *vdev, int pos,
+static int vfio_basic_config_read(struct vfio_pci_core_device *vdev, int pos,
                                  int count, struct perm_bits *perm,
                                  int offset, __le32 *val)
 {
 }
 
 /* Test whether BARs match the value we think they should contain */
-static bool vfio_need_bar_restore(struct vfio_pci_device *vdev)
+static bool vfio_need_bar_restore(struct vfio_pci_core_device *vdev)
 {
        int i = 0, pos = PCI_BASE_ADDRESS_0, ret;
        u32 bar;
        return false;
 }
 
-static int vfio_basic_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_basic_config_write(struct vfio_pci_core_device *vdev, int pos,
                                   int count, struct perm_bits *perm,
                                   int offset, __le32 val)
 {
        return 0;
 }
 
-static int vfio_pm_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_pm_config_write(struct vfio_pci_core_device *vdev, int pos,
                                int count, struct perm_bits *perm,
                                int offset, __le32 val)
 {
        return 0;
 }
 
-static int vfio_vpd_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_vpd_config_write(struct vfio_pci_core_device *vdev, int pos,
                                 int count, struct perm_bits *perm,
                                 int offset, __le32 val)
 {
        return 0;
 }
 
-static int vfio_exp_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_exp_config_write(struct vfio_pci_core_device *vdev, int pos,
                                 int count, struct perm_bits *perm,
                                 int offset, __le32 val)
 {
        return 0;
 }
 
-static int vfio_af_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_af_config_write(struct vfio_pci_core_device *vdev, int pos,
                                int count, struct perm_bits *perm,
                                int offset, __le32 val)
 {
        return ret;
 }
 
-static int vfio_find_cap_start(struct vfio_pci_device *vdev, int pos)
+static int vfio_find_cap_start(struct vfio_pci_core_device *vdev, int pos)
 {
        u8 cap;
        int base = (pos >= PCI_CFG_SPACE_SIZE) ? PCI_CFG_SPACE_SIZE :
        return pos;
 }
 
-static int vfio_msi_config_read(struct vfio_pci_device *vdev, int pos,
+static int vfio_msi_config_read(struct vfio_pci_core_device *vdev, int pos,
                                int count, struct perm_bits *perm,
                                int offset, __le32 *val)
 {
        return vfio_default_config_read(vdev, pos, count, perm, offset, val);
 }
 
-static int vfio_msi_config_write(struct vfio_pci_device *vdev, int pos,
+static int vfio_msi_config_write(struct vfio_pci_core_device *vdev, int pos,
                                 int count, struct perm_bits *perm,
                                 int offset, __le32 val)
 {
 }
 
 /* Determine MSI CAP field length; initialize msi_perms on 1st call per vdev */
-static int vfio_msi_cap_len(struct vfio_pci_device *vdev, u8 pos)
+static int vfio_msi_cap_len(struct vfio_pci_core_device *vdev, u8 pos)
 {
        struct pci_dev *pdev = vdev->pdev;
        int len, ret;
 }
 
 /* Determine extended capability length for VC (2 & 9) and MFVC */
-static int vfio_vc_cap_len(struct vfio_pci_device *vdev, u16 pos)
+static int vfio_vc_cap_len(struct vfio_pci_core_device *vdev, u16 pos)
 {
        struct pci_dev *pdev = vdev->pdev;
        u32 tmp;
        return len;
 }
 
-static int vfio_cap_len(struct vfio_pci_device *vdev, u8 cap, u8 pos)
+static int vfio_cap_len(struct vfio_pci_core_device *vdev, u8 cap, u8 pos)
 {
        struct pci_dev *pdev = vdev->pdev;
        u32 dword;
        return 0;
 }
 
-static int vfio_ext_cap_len(struct vfio_pci_device *vdev, u16 ecap, u16 epos)
+static int vfio_ext_cap_len(struct vfio_pci_core_device *vdev, u16 ecap, u16 epos)
 {
        struct pci_dev *pdev = vdev->pdev;
        u8 byte;
        return 0;
 }
 
-static int vfio_fill_vconfig_bytes(struct vfio_pci_device *vdev,
+static int vfio_fill_vconfig_bytes(struct vfio_pci_core_device *vdev,
                                   int offset, int size)
 {
        struct pci_dev *pdev = vdev->pdev;
        return ret;
 }
 
-static int vfio_cap_init(struct vfio_pci_device *vdev)
+static int vfio_cap_init(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        u8 *map = vdev->pci_config_map;
        return 0;
 }
 
-static int vfio_ecap_init(struct vfio_pci_device *vdev)
+static int vfio_ecap_init(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        u8 *map = vdev->pci_config_map;
  * for each area requiring emulated bits, but the array of pointers
  * would be comparable in size (at least for standard config space).
  */
-int vfio_config_init(struct vfio_pci_device *vdev)
+int vfio_config_init(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        u8 *map, *vconfig;
        return pcibios_err_to_errno(ret);
 }
 
-void vfio_config_free(struct vfio_pci_device *vdev)
+void vfio_config_free(struct vfio_pci_core_device *vdev)
 {
        kfree(vdev->vconfig);
        vdev->vconfig = NULL;
  * Find the remaining number of bytes in a dword that match the given
  * position.  Stop at either the end of the capability or the dword boundary.
  */
-static size_t vfio_pci_cap_remaining_dword(struct vfio_pci_device *vdev,
+static size_t vfio_pci_cap_remaining_dword(struct vfio_pci_core_device *vdev,
                                           loff_t pos)
 {
        u8 cap = vdev->pci_config_map[pos];
        return i;
 }
 
-static ssize_t vfio_config_do_rw(struct vfio_pci_device *vdev, char __user *buf,
+static ssize_t vfio_config_do_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                                 size_t count, loff_t *ppos, bool iswrite)
 {
        struct pci_dev *pdev = vdev->pdev;
        return ret;
 }
 
-ssize_t vfio_pci_config_rw(struct vfio_pci_device *vdev, char __user *buf,
+ssize_t vfio_pci_config_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                           size_t count, loff_t *ppos, bool iswrite)
 {
        size_t done = 0;
 
  */
 static unsigned int vfio_pci_set_vga_decode(void *opaque, bool single_vga)
 {
-       struct vfio_pci_device *vdev = opaque;
+       struct vfio_pci_core_device *vdev = opaque;
        struct pci_dev *tmp = NULL, *pdev = vdev->pdev;
        unsigned char max_busnr;
        unsigned int decodes;
        return (pdev->class >> 8) == PCI_CLASS_DISPLAY_VGA;
 }
 
-static void vfio_pci_probe_mmaps(struct vfio_pci_device *vdev)
+static void vfio_pci_probe_mmaps(struct vfio_pci_core_device *vdev)
 {
        struct resource *res;
        int i;
 
 struct vfio_pci_group_info;
 static bool vfio_pci_dev_set_try_reset(struct vfio_device_set *dev_set);
-static void vfio_pci_disable(struct vfio_pci_device *vdev);
+static void vfio_pci_disable(struct vfio_pci_core_device *vdev);
 static int vfio_pci_dev_set_hot_reset(struct vfio_device_set *dev_set,
                                      struct vfio_pci_group_info *groups);
 
        return false;
 }
 
-static void vfio_pci_probe_power_state(struct vfio_pci_device *vdev)
+static void vfio_pci_probe_power_state(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        u16 pmcsr;
  * by PM capability emulation and separately from pci_dev internal saved state
  * to avoid it being overwritten and consumed around other resets.
  */
-int vfio_pci_set_power_state(struct vfio_pci_device *vdev, pci_power_t state)
+int vfio_pci_set_power_state(struct vfio_pci_core_device *vdev, pci_power_t state)
 {
        struct pci_dev *pdev = vdev->pdev;
        bool needs_restore = false, needs_save = false;
        return ret;
 }
 
-static int vfio_pci_enable(struct vfio_pci_device *vdev)
+static int vfio_pci_enable(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        int ret;
        return ret;
 }
 
-static void vfio_pci_disable(struct vfio_pci_device *vdev)
+static void vfio_pci_disable(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        struct vfio_pci_dummy_resource *dummy_res, *tmp;
 
 static struct pci_driver vfio_pci_driver;
 
-static struct vfio_pci_device *get_pf_vdev(struct vfio_pci_device *vdev)
+static struct vfio_pci_core_device *get_pf_vdev(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *physfn = pci_physfn(vdev->pdev);
        struct vfio_device *pf_dev;
                return NULL;
        }
 
-       return container_of(pf_dev, struct vfio_pci_device, vdev);
+       return container_of(pf_dev, struct vfio_pci_core_device, vdev);
 }
 
-static void vfio_pci_vf_token_user_add(struct vfio_pci_device *vdev, int val)
+static void vfio_pci_vf_token_user_add(struct vfio_pci_core_device *vdev, int val)
 {
-       struct vfio_pci_device *pf_vdev = get_pf_vdev(vdev);
+       struct vfio_pci_core_device *pf_vdev = get_pf_vdev(vdev);
 
        if (!pf_vdev)
                return;
 
 static void vfio_pci_close_device(struct vfio_device *core_vdev)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
 
        vfio_pci_vf_token_user_add(vdev, -1);
        vfio_spapr_pci_eeh_release(vdev->pdev);
 
 static int vfio_pci_open_device(struct vfio_device *core_vdev)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
        int ret = 0;
 
        ret = vfio_pci_enable(vdev);
        return 0;
 }
 
-static int vfio_pci_get_irq_count(struct vfio_pci_device *vdev, int irq_type)
+static int vfio_pci_get_irq_count(struct vfio_pci_core_device *vdev, int irq_type)
 {
        if (irq_type == VFIO_PCI_INTX_IRQ_INDEX) {
                u8 pin;
        return walk.ret;
 }
 
-static int msix_mmappable_cap(struct vfio_pci_device *vdev,
+static int msix_mmappable_cap(struct vfio_pci_core_device *vdev,
                              struct vfio_info_cap *caps)
 {
        struct vfio_info_cap_header header = {
        return vfio_info_add_capability(caps, &header, sizeof(header));
 }
 
-int vfio_pci_register_dev_region(struct vfio_pci_device *vdev,
+int vfio_pci_register_dev_region(struct vfio_pci_core_device *vdev,
                                 unsigned int type, unsigned int subtype,
                                 const struct vfio_pci_regops *ops,
                                 size_t size, u32 flags, void *data)
 static long vfio_pci_ioctl(struct vfio_device *core_vdev,
                           unsigned int cmd, unsigned long arg)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
        unsigned long minsz;
 
        if (cmd == VFIO_DEVICE_GET_INFO) {
        return -ENOTTY;
 }
 
-static ssize_t vfio_pci_rw(struct vfio_pci_device *vdev, char __user *buf,
+static ssize_t vfio_pci_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                           size_t count, loff_t *ppos, bool iswrite)
 {
        unsigned int index = VFIO_PCI_OFFSET_TO_INDEX(*ppos);
 static ssize_t vfio_pci_read(struct vfio_device *core_vdev, char __user *buf,
                             size_t count, loff_t *ppos)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
 
        if (!count)
                return 0;
 static ssize_t vfio_pci_write(struct vfio_device *core_vdev, const char __user *buf,
                              size_t count, loff_t *ppos)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
 
        if (!count)
                return 0;
 }
 
 /* Return 1 on zap and vma_lock acquired, 0 on contention (only with @try) */
-static int vfio_pci_zap_and_vma_lock(struct vfio_pci_device *vdev, bool try)
+static int vfio_pci_zap_and_vma_lock(struct vfio_pci_core_device *vdev, bool try)
 {
        struct vfio_pci_mmap_vma *mmap_vma, *tmp;
 
        }
 }
 
-void vfio_pci_zap_and_down_write_memory_lock(struct vfio_pci_device *vdev)
+void vfio_pci_zap_and_down_write_memory_lock(struct vfio_pci_core_device *vdev)
 {
        vfio_pci_zap_and_vma_lock(vdev, false);
        down_write(&vdev->memory_lock);
        mutex_unlock(&vdev->vma_lock);
 }
 
-u16 vfio_pci_memory_lock_and_enable(struct vfio_pci_device *vdev)
+u16 vfio_pci_memory_lock_and_enable(struct vfio_pci_core_device *vdev)
 {
        u16 cmd;
 
        return cmd;
 }
 
-void vfio_pci_memory_unlock_and_restore(struct vfio_pci_device *vdev, u16 cmd)
+void vfio_pci_memory_unlock_and_restore(struct vfio_pci_core_device *vdev, u16 cmd)
 {
        pci_write_config_word(vdev->pdev, PCI_COMMAND, cmd);
        up_write(&vdev->memory_lock);
 }
 
 /* Caller holds vma_lock */
-static int __vfio_pci_add_vma(struct vfio_pci_device *vdev,
+static int __vfio_pci_add_vma(struct vfio_pci_core_device *vdev,
                              struct vm_area_struct *vma)
 {
        struct vfio_pci_mmap_vma *mmap_vma;
 
 static void vfio_pci_mmap_close(struct vm_area_struct *vma)
 {
-       struct vfio_pci_device *vdev = vma->vm_private_data;
+       struct vfio_pci_core_device *vdev = vma->vm_private_data;
        struct vfio_pci_mmap_vma *mmap_vma;
 
        mutex_lock(&vdev->vma_lock);
 static vm_fault_t vfio_pci_mmap_fault(struct vm_fault *vmf)
 {
        struct vm_area_struct *vma = vmf->vma;
-       struct vfio_pci_device *vdev = vma->vm_private_data;
+       struct vfio_pci_core_device *vdev = vma->vm_private_data;
        struct vfio_pci_mmap_vma *mmap_vma;
        vm_fault_t ret = VM_FAULT_NOPAGE;
 
 
 static int vfio_pci_mmap(struct vfio_device *core_vdev, struct vm_area_struct *vma)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
        struct pci_dev *pdev = vdev->pdev;
        unsigned int index;
        u64 phys_len, req_len, pgoff, req_start;
 
 static void vfio_pci_request(struct vfio_device *core_vdev, unsigned int count)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
        struct pci_dev *pdev = vdev->pdev;
 
        mutex_lock(&vdev->igate);
        mutex_unlock(&vdev->igate);
 }
 
-static int vfio_pci_validate_vf_token(struct vfio_pci_device *vdev,
+static int vfio_pci_validate_vf_token(struct vfio_pci_core_device *vdev,
                                      bool vf_token, uuid_t *uuid)
 {
        /*
                return 0; /* No VF token provided or required */
 
        if (vdev->pdev->is_virtfn) {
-               struct vfio_pci_device *pf_vdev = get_pf_vdev(vdev);
+               struct vfio_pci_core_device *pf_vdev = get_pf_vdev(vdev);
                bool match;
 
                if (!pf_vdev) {
 
 static int vfio_pci_match(struct vfio_device *core_vdev, char *buf)
 {
-       struct vfio_pci_device *vdev =
-               container_of(core_vdev, struct vfio_pci_device, vdev);
+       struct vfio_pci_core_device *vdev =
+               container_of(core_vdev, struct vfio_pci_core_device, vdev);
        bool vf_token = false;
        uuid_t uuid;
        int ret;
 static int vfio_pci_bus_notifier(struct notifier_block *nb,
                                 unsigned long action, void *data)
 {
-       struct vfio_pci_device *vdev = container_of(nb,
-                                                   struct vfio_pci_device, nb);
+       struct vfio_pci_core_device *vdev = container_of(nb,
+                                                   struct vfio_pci_core_device, nb);
        struct device *dev = data;
        struct pci_dev *pdev = to_pci_dev(dev);
        struct pci_dev *physfn = pci_physfn(pdev);
        return 0;
 }
 
-static int vfio_pci_vf_init(struct vfio_pci_device *vdev)
+static int vfio_pci_vf_init(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        int ret;
        return 0;
 }
 
-static void vfio_pci_vf_uninit(struct vfio_pci_device *vdev)
+static void vfio_pci_vf_uninit(struct vfio_pci_core_device *vdev)
 {
        if (!vdev->vf_token)
                return;
        kfree(vdev->vf_token);
 }
 
-static int vfio_pci_vga_init(struct vfio_pci_device *vdev)
+static int vfio_pci_vga_init(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        int ret;
        return 0;
 }
 
-static void vfio_pci_vga_uninit(struct vfio_pci_device *vdev)
+static void vfio_pci_vga_uninit(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
 
 
 static int vfio_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 {
-       struct vfio_pci_device *vdev;
+       struct vfio_pci_core_device *vdev;
        struct iommu_group *group;
        int ret;
 
 
 static void vfio_pci_remove(struct pci_dev *pdev)
 {
-       struct vfio_pci_device *vdev = dev_get_drvdata(&pdev->dev);
+       struct vfio_pci_core_device *vdev = dev_get_drvdata(&pdev->dev);
 
        pci_disable_sriov(pdev);
 
 static pci_ers_result_t vfio_pci_aer_err_detected(struct pci_dev *pdev,
                                                  pci_channel_state_t state)
 {
-       struct vfio_pci_device *vdev;
+       struct vfio_pci_core_device *vdev;
        struct vfio_device *device;
 
        device = vfio_device_get_from_dev(&pdev->dev);
        if (device == NULL)
                return PCI_ERS_RESULT_DISCONNECT;
 
-       vdev = container_of(device, struct vfio_pci_device, vdev);
+       vdev = container_of(device, struct vfio_pci_core_device, vdev);
 
        mutex_lock(&vdev->igate);
 
        .err_handler            = &vfio_err_handlers,
 };
 
-static bool vfio_dev_in_groups(struct vfio_pci_device *vdev,
+static bool vfio_dev_in_groups(struct vfio_pci_core_device *vdev,
                               struct vfio_pci_group_info *groups)
 {
        unsigned int i;
         * reset, so any pci_dev will have the same outcomes for
         * pci_probe_reset_*() and pci_reset_bus().
         */
-       pdev = list_first_entry(&dev_set->device_list, struct vfio_pci_device,
+       pdev = list_first_entry(&dev_set->device_list,
+                               struct vfio_pci_core_device,
                                vdev.dev_set_list)->pdev;
 
        /* pci_reset_bus() is supported */
 static int vfio_pci_dev_set_hot_reset(struct vfio_device_set *dev_set,
                                      struct vfio_pci_group_info *groups)
 {
-       struct vfio_pci_device *cur_mem;
-       struct vfio_pci_device *cur_vma;
-       struct vfio_pci_device *cur;
+       struct vfio_pci_core_device *cur_mem;
+       struct vfio_pci_core_device *cur_vma;
+       struct vfio_pci_core_device *cur;
        struct pci_dev *pdev;
        bool is_mem = true;
        int ret;
 
        mutex_lock(&dev_set->lock);
        cur_mem = list_first_entry(&dev_set->device_list,
-                                  struct vfio_pci_device, vdev.dev_set_list);
+                                  struct vfio_pci_core_device,
+                                  vdev.dev_set_list);
 
        pdev = vfio_pci_dev_set_resettable(dev_set);
        if (!pdev) {
 
 static bool vfio_pci_dev_set_needs_reset(struct vfio_device_set *dev_set)
 {
-       struct vfio_pci_device *cur;
+       struct vfio_pci_core_device *cur;
        bool needs_reset = false;
 
        list_for_each_entry(cur, &dev_set->device_list, vdev.dev_set_list) {
  */
 static bool vfio_pci_dev_set_try_reset(struct vfio_device_set *dev_set)
 {
-       struct vfio_pci_device *cur;
+       struct vfio_pci_core_device *cur;
        struct pci_dev *pdev;
        int ret;
 
 
 
 struct vfio_pci_ioeventfd {
        struct list_head        next;
-       struct vfio_pci_device  *vdev;
+       struct vfio_pci_core_device     *vdev;
        struct virqfd           *virqfd;
        void __iomem            *addr;
        uint64_t                data;
        struct irq_bypass_producer      producer;
 };
 
-struct vfio_pci_device;
+struct vfio_pci_core_device;
 struct vfio_pci_region;
 
 struct vfio_pci_regops {
-       ssize_t (*rw)(struct vfio_pci_device *vdev, char __user *buf,
+       ssize_t (*rw)(struct vfio_pci_core_device *vdev, char __user *buf,
                      size_t count, loff_t *ppos, bool iswrite);
-       void    (*release)(struct vfio_pci_device *vdev,
+       void    (*release)(struct vfio_pci_core_device *vdev,
                           struct vfio_pci_region *region);
-       int     (*mmap)(struct vfio_pci_device *vdev,
+       int     (*mmap)(struct vfio_pci_core_device *vdev,
                        struct vfio_pci_region *region,
                        struct vm_area_struct *vma);
-       int     (*add_capability)(struct vfio_pci_device *vdev,
+       int     (*add_capability)(struct vfio_pci_core_device *vdev,
                                  struct vfio_pci_region *region,
                                  struct vfio_info_cap *caps);
 };
        struct list_head        vma_next;
 };
 
-struct vfio_pci_device {
+struct vfio_pci_core_device {
        struct vfio_device      vdev;
        struct pci_dev          *pdev;
        void __iomem            *barmap[PCI_STD_NUM_BARS];
 #define is_irq_none(vdev) (!(is_intx(vdev) || is_msi(vdev) || is_msix(vdev)))
 #define irq_is(vdev, type) (vdev->irq_type == type)
 
-extern void vfio_pci_intx_mask(struct vfio_pci_device *vdev);
-extern void vfio_pci_intx_unmask(struct vfio_pci_device *vdev);
+extern void vfio_pci_intx_mask(struct vfio_pci_core_device *vdev);
+extern void vfio_pci_intx_unmask(struct vfio_pci_core_device *vdev);
 
-extern int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev,
+extern int vfio_pci_set_irqs_ioctl(struct vfio_pci_core_device *vdev,
                                   uint32_t flags, unsigned index,
                                   unsigned start, unsigned count, void *data);
 
-extern ssize_t vfio_pci_config_rw(struct vfio_pci_device *vdev,
+extern ssize_t vfio_pci_config_rw(struct vfio_pci_core_device *vdev,
                                  char __user *buf, size_t count,
                                  loff_t *ppos, bool iswrite);
 
-extern ssize_t vfio_pci_bar_rw(struct vfio_pci_device *vdev, char __user *buf,
+extern ssize_t vfio_pci_bar_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                               size_t count, loff_t *ppos, bool iswrite);
 
-extern ssize_t vfio_pci_vga_rw(struct vfio_pci_device *vdev, char __user *buf,
+extern ssize_t vfio_pci_vga_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                               size_t count, loff_t *ppos, bool iswrite);
 
-extern long vfio_pci_ioeventfd(struct vfio_pci_device *vdev, loff_t offset,
+extern long vfio_pci_ioeventfd(struct vfio_pci_core_device *vdev, loff_t offset,
                               uint64_t data, int count, int fd);
 
 extern int vfio_pci_init_perm_bits(void);
 extern void vfio_pci_uninit_perm_bits(void);
 
-extern int vfio_config_init(struct vfio_pci_device *vdev);
-extern void vfio_config_free(struct vfio_pci_device *vdev);
+extern int vfio_config_init(struct vfio_pci_core_device *vdev);
+extern void vfio_config_free(struct vfio_pci_core_device *vdev);
 
-extern int vfio_pci_register_dev_region(struct vfio_pci_device *vdev,
+extern int vfio_pci_register_dev_region(struct vfio_pci_core_device *vdev,
                                        unsigned int type, unsigned int subtype,
                                        const struct vfio_pci_regops *ops,
                                        size_t size, u32 flags, void *data);
 
-extern int vfio_pci_set_power_state(struct vfio_pci_device *vdev,
+extern int vfio_pci_set_power_state(struct vfio_pci_core_device *vdev,
                                    pci_power_t state);
 
-extern bool __vfio_pci_memory_enabled(struct vfio_pci_device *vdev);
-extern void vfio_pci_zap_and_down_write_memory_lock(struct vfio_pci_device
+extern bool __vfio_pci_memory_enabled(struct vfio_pci_core_device *vdev);
+extern void vfio_pci_zap_and_down_write_memory_lock(struct vfio_pci_core_device
                                                    *vdev);
-extern u16 vfio_pci_memory_lock_and_enable(struct vfio_pci_device *vdev);
-extern void vfio_pci_memory_unlock_and_restore(struct vfio_pci_device *vdev,
+extern u16 vfio_pci_memory_lock_and_enable(struct vfio_pci_core_device *vdev);
+extern void vfio_pci_memory_unlock_and_restore(struct vfio_pci_core_device *vdev,
                                               u16 cmd);
 
 #ifdef CONFIG_VFIO_PCI_IGD
-extern int vfio_pci_igd_init(struct vfio_pci_device *vdev);
+extern int vfio_pci_igd_init(struct vfio_pci_core_device *vdev);
 #else
-static inline int vfio_pci_igd_init(struct vfio_pci_device *vdev)
+static inline int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)
 {
        return -ENODEV;
 }
 #endif
 
 #ifdef CONFIG_S390
-extern int vfio_pci_info_zdev_add_caps(struct vfio_pci_device *vdev,
+extern int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev,
                                       struct vfio_info_cap *caps);
 #else
-static inline int vfio_pci_info_zdev_add_caps(struct vfio_pci_device *vdev,
+static inline int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev,
                                              struct vfio_info_cap *caps)
 {
        return -ENODEV;
 
 #define OPREGION_RVDS          0x3c2
 #define OPREGION_VERSION       0x16
 
-static ssize_t vfio_pci_igd_rw(struct vfio_pci_device *vdev, char __user *buf,
-                              size_t count, loff_t *ppos, bool iswrite)
+static ssize_t vfio_pci_igd_rw(struct vfio_pci_core_device *vdev,
+                              char __user *buf, size_t count, loff_t *ppos,
+                              bool iswrite)
 {
        unsigned int i = VFIO_PCI_OFFSET_TO_INDEX(*ppos) - VFIO_PCI_NUM_REGIONS;
        void *base = vdev->region[i].data;
        return count;
 }
 
-static void vfio_pci_igd_release(struct vfio_pci_device *vdev,
+static void vfio_pci_igd_release(struct vfio_pci_core_device *vdev,
                                 struct vfio_pci_region *region)
 {
        memunmap(region->data);
        .release        = vfio_pci_igd_release,
 };
 
-static int vfio_pci_igd_opregion_init(struct vfio_pci_device *vdev)
+static int vfio_pci_igd_opregion_init(struct vfio_pci_core_device *vdev)
 {
        __le32 *dwordp = (__le32 *)(vdev->vconfig + OPREGION_PCI_ADDR);
        u32 addr, size;
        return ret;
 }
 
-static ssize_t vfio_pci_igd_cfg_rw(struct vfio_pci_device *vdev,
+static ssize_t vfio_pci_igd_cfg_rw(struct vfio_pci_core_device *vdev,
                                   char __user *buf, size_t count, loff_t *ppos,
                                   bool iswrite)
 {
        return count;
 }
 
-static void vfio_pci_igd_cfg_release(struct vfio_pci_device *vdev,
+static void vfio_pci_igd_cfg_release(struct vfio_pci_core_device *vdev,
                                     struct vfio_pci_region *region)
 {
        struct pci_dev *pdev = region->data;
        .release        = vfio_pci_igd_cfg_release,
 };
 
-static int vfio_pci_igd_cfg_init(struct vfio_pci_device *vdev)
+static int vfio_pci_igd_cfg_init(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *host_bridge, *lpc_bridge;
        int ret;
        return 0;
 }
 
-int vfio_pci_igd_init(struct vfio_pci_device *vdev)
+int vfio_pci_igd_init(struct vfio_pci_core_device *vdev)
 {
        int ret;
 
 
  */
 static void vfio_send_intx_eventfd(void *opaque, void *unused)
 {
-       struct vfio_pci_device *vdev = opaque;
+       struct vfio_pci_core_device *vdev = opaque;
 
        if (likely(is_intx(vdev) && !vdev->virq_disabled))
                eventfd_signal(vdev->ctx[0].trigger, 1);
 }
 
-void vfio_pci_intx_mask(struct vfio_pci_device *vdev)
+void vfio_pci_intx_mask(struct vfio_pci_core_device *vdev)
 {
        struct pci_dev *pdev = vdev->pdev;
        unsigned long flags;
  */
 static int vfio_pci_intx_unmask_handler(void *opaque, void *unused)
 {
-       struct vfio_pci_device *vdev = opaque;
+       struct vfio_pci_core_device *vdev = opaque;
        struct pci_dev *pdev = vdev->pdev;
        unsigned long flags;
        int ret = 0;
        return ret;
 }
 
-void vfio_pci_intx_unmask(struct vfio_pci_device *vdev)
+void vfio_pci_intx_unmask(struct vfio_pci_core_device *vdev)
 {
        if (vfio_pci_intx_unmask_handler(vdev, NULL) > 0)
                vfio_send_intx_eventfd(vdev, NULL);
 
 static irqreturn_t vfio_intx_handler(int irq, void *dev_id)
 {
-       struct vfio_pci_device *vdev = dev_id;
+       struct vfio_pci_core_device *vdev = dev_id;
        unsigned long flags;
        int ret = IRQ_NONE;
 
        return ret;
 }
 
-static int vfio_intx_enable(struct vfio_pci_device *vdev)
+static int vfio_intx_enable(struct vfio_pci_core_device *vdev)
 {
        if (!is_irq_none(vdev))
                return -EINVAL;
        return 0;
 }
 
-static int vfio_intx_set_signal(struct vfio_pci_device *vdev, int fd)
+static int vfio_intx_set_signal(struct vfio_pci_core_device *vdev, int fd)
 {
        struct pci_dev *pdev = vdev->pdev;
        unsigned long irqflags = IRQF_SHARED;
        return 0;
 }
 
-static void vfio_intx_disable(struct vfio_pci_device *vdev)
+static void vfio_intx_disable(struct vfio_pci_core_device *vdev)
 {
        vfio_virqfd_disable(&vdev->ctx[0].unmask);
        vfio_virqfd_disable(&vdev->ctx[0].mask);
        return IRQ_HANDLED;
 }
 
-static int vfio_msi_enable(struct vfio_pci_device *vdev, int nvec, bool msix)
+static int vfio_msi_enable(struct vfio_pci_core_device *vdev, int nvec, bool msix)
 {
        struct pci_dev *pdev = vdev->pdev;
        unsigned int flag = msix ? PCI_IRQ_MSIX : PCI_IRQ_MSI;
        return 0;
 }
 
-static int vfio_msi_set_vector_signal(struct vfio_pci_device *vdev,
+static int vfio_msi_set_vector_signal(struct vfio_pci_core_device *vdev,
                                      int vector, int fd, bool msix)
 {
        struct pci_dev *pdev = vdev->pdev;
        return 0;
 }
 
-static int vfio_msi_set_block(struct vfio_pci_device *vdev, unsigned start,
+static int vfio_msi_set_block(struct vfio_pci_core_device *vdev, unsigned start,
                              unsigned count, int32_t *fds, bool msix)
 {
        int i, j, ret = 0;
        return ret;
 }
 
-static void vfio_msi_disable(struct vfio_pci_device *vdev, bool msix)
+static void vfio_msi_disable(struct vfio_pci_core_device *vdev, bool msix)
 {
        struct pci_dev *pdev = vdev->pdev;
        int i;
 /*
  * IOCTL support
  */
-static int vfio_pci_set_intx_unmask(struct vfio_pci_device *vdev,
+static int vfio_pci_set_intx_unmask(struct vfio_pci_core_device *vdev,
                                    unsigned index, unsigned start,
                                    unsigned count, uint32_t flags, void *data)
 {
        return 0;
 }
 
-static int vfio_pci_set_intx_mask(struct vfio_pci_device *vdev,
+static int vfio_pci_set_intx_mask(struct vfio_pci_core_device *vdev,
                                  unsigned index, unsigned start,
                                  unsigned count, uint32_t flags, void *data)
 {
        return 0;
 }
 
-static int vfio_pci_set_intx_trigger(struct vfio_pci_device *vdev,
+static int vfio_pci_set_intx_trigger(struct vfio_pci_core_device *vdev,
                                     unsigned index, unsigned start,
                                     unsigned count, uint32_t flags, void *data)
 {
        return 0;
 }
 
-static int vfio_pci_set_msi_trigger(struct vfio_pci_device *vdev,
+static int vfio_pci_set_msi_trigger(struct vfio_pci_core_device *vdev,
                                    unsigned index, unsigned start,
                                    unsigned count, uint32_t flags, void *data)
 {
        return -EINVAL;
 }
 
-static int vfio_pci_set_err_trigger(struct vfio_pci_device *vdev,
+static int vfio_pci_set_err_trigger(struct vfio_pci_core_device *vdev,
                                    unsigned index, unsigned start,
                                    unsigned count, uint32_t flags, void *data)
 {
                                               count, flags, data);
 }
 
-static int vfio_pci_set_req_trigger(struct vfio_pci_device *vdev,
+static int vfio_pci_set_req_trigger(struct vfio_pci_core_device *vdev,
                                    unsigned index, unsigned start,
                                    unsigned count, uint32_t flags, void *data)
 {
                                               count, flags, data);
 }
 
-int vfio_pci_set_irqs_ioctl(struct vfio_pci_device *vdev, uint32_t flags,
+int vfio_pci_set_irqs_ioctl(struct vfio_pci_core_device *vdev, uint32_t flags,
                            unsigned index, unsigned start, unsigned count,
                            void *data)
 {
-       int (*func)(struct vfio_pci_device *vdev, unsigned index,
+       int (*func)(struct vfio_pci_core_device *vdev, unsigned index,
                    unsigned start, unsigned count, uint32_t flags,
                    void *data) = NULL;
 
 
 #define vfio_iowrite8  iowrite8
 
 #define VFIO_IOWRITE(size) \
-static int vfio_pci_iowrite##size(struct vfio_pci_device *vdev,                \
+static int vfio_pci_iowrite##size(struct vfio_pci_core_device *vdev,           \
                        bool test_mem, u##size val, void __iomem *io)   \
 {                                                                      \
        if (test_mem) {                                                 \
 #endif
 
 #define VFIO_IOREAD(size) \
-static int vfio_pci_ioread##size(struct vfio_pci_device *vdev,         \
+static int vfio_pci_ioread##size(struct vfio_pci_core_device *vdev,            \
                        bool test_mem, u##size *val, void __iomem *io)  \
 {                                                                      \
        if (test_mem) {                                                 \
  * reads with -1.  This is intended for handling MSI-X vector tables and
  * leftover space for ROM BARs.
  */
-static ssize_t do_io_rw(struct vfio_pci_device *vdev, bool test_mem,
+static ssize_t do_io_rw(struct vfio_pci_core_device *vdev, bool test_mem,
                        void __iomem *io, char __user *buf,
                        loff_t off, size_t count, size_t x_start,
                        size_t x_end, bool iswrite)
        return done;
 }
 
-static int vfio_pci_setup_barmap(struct vfio_pci_device *vdev, int bar)
+static int vfio_pci_setup_barmap(struct vfio_pci_core_device *vdev, int bar)
 {
        struct pci_dev *pdev = vdev->pdev;
        int ret;
        return 0;
 }
 
-ssize_t vfio_pci_bar_rw(struct vfio_pci_device *vdev, char __user *buf,
+ssize_t vfio_pci_bar_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                        size_t count, loff_t *ppos, bool iswrite)
 {
        struct pci_dev *pdev = vdev->pdev;
        return done;
 }
 
-ssize_t vfio_pci_vga_rw(struct vfio_pci_device *vdev, char __user *buf,
+ssize_t vfio_pci_vga_rw(struct vfio_pci_core_device *vdev, char __user *buf,
                               size_t count, loff_t *ppos, bool iswrite)
 {
        int ret;
 static int vfio_pci_ioeventfd_handler(void *opaque, void *unused)
 {
        struct vfio_pci_ioeventfd *ioeventfd = opaque;
-       struct vfio_pci_device *vdev = ioeventfd->vdev;
+       struct vfio_pci_core_device *vdev = ioeventfd->vdev;
 
        if (ioeventfd->test_mem) {
                if (!down_read_trylock(&vdev->memory_lock))
        vfio_pci_ioeventfd_do_write(ioeventfd, ioeventfd->test_mem);
 }
 
-long vfio_pci_ioeventfd(struct vfio_pci_device *vdev, loff_t offset,
+long vfio_pci_ioeventfd(struct vfio_pci_core_device *vdev, loff_t offset,
                        uint64_t data, int count, int fd)
 {
        struct pci_dev *pdev = vdev->pdev;
 
 /*
  * Add all supported capabilities to the VFIO_DEVICE_GET_INFO capability chain.
  */
-int vfio_pci_info_zdev_add_caps(struct vfio_pci_device *vdev,
+int vfio_pci_info_zdev_add_caps(struct vfio_pci_core_device *vdev,
                                struct vfio_info_cap *caps)
 {
        struct zpci_dev *zdev = to_zpci(vdev->pdev);