search for: vmd_membar2

Displaying 2 results from an estimated 2 matches for "vmd_membar2".

2020 May 13
0
[PATCH for QEMU v2] hw/vfio: Add VMD Passthrough Quirk
...oes the translation on the supplied address using > pci_add_resource_offset prior to creating the root bus and enumerating > the domain: > > offset[0] = vmd->dev->resource[VMD_MEMBAR1].start - > readq(membar2 + MB2_SHADOW_OFFSET); > offset[1] = vmd->dev->resource[VMD_MEMBAR2].start - > readq(membar2 + MB2_SHADOW_OFFSET + 8); > ... > pci_add_resource(&resources, &vmd->resources[0]); > pci_add_resource_offset(&resources, &vmd->resources[1], offset[0]); > pci_add_resource_offset(&resources, &vmd->resources[2], offset[1...
2020 May 11
0
[PATCH for QEMU v2] hw/vfio: Add VMD Passthrough Quirk
...gt;membar_phys + addr, size); > + return val; > +} > + > +static const MemoryRegionOps vfio_vmd_quirk = { > + .read = vfio_vmd_quirk_read, > + .endianness = DEVICE_LITTLE_ENDIAN, > +}; > + > +#define VMD_VMLOCK 0x70 > +#define VMD_SHADOW 0x2000 > +#define VMD_MEMBAR2 4 > + > +static int vfio_vmd_emulate_shadow_registers(VFIOPCIDevice *vdev) > +{ > + VFIOQuirk *quirk; > + VFIOVMDQuirk *data; > + PCIDevice *pdev = &vdev->pdev; > + int ret; > + > + data = g_malloc0(sizeof(*data)); > + ret = pread(vdev->vbas...