mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
Merge remote-tracking branch 'origin/master' into HEAD
Resolve conflicts around apb. Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
commit
acc95bc850
579 changed files with 67167 additions and 9215 deletions
|
@ -11,11 +11,11 @@
|
|||
* directory.
|
||||
*/
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include <linux/vfio.h>
|
||||
#include <linux/vfio_ccw.h>
|
||||
#include <sys/ioctl.h>
|
||||
|
||||
#include "qemu/osdep.h"
|
||||
#include "qapi/error.h"
|
||||
#include "hw/sysbus.h"
|
||||
#include "hw/vfio/vfio.h"
|
||||
|
|
|
@ -968,6 +968,7 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
|
|||
if (!ioctl(group->fd, VFIO_GROUP_SET_CONTAINER, &container->fd)) {
|
||||
group->container = container;
|
||||
QLIST_INSERT_HEAD(&container->group_list, group, container_next);
|
||||
vfio_kvm_device_add_group(group);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
@ -990,6 +991,8 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
|
|||
container = g_malloc0(sizeof(*container));
|
||||
container->space = space;
|
||||
container->fd = fd;
|
||||
QLIST_INIT(&container->giommu_list);
|
||||
QLIST_INIT(&container->hostwin_list);
|
||||
if (ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1_IOMMU) ||
|
||||
ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1v2_IOMMU)) {
|
||||
bool v2 = !!ioctl(fd, VFIO_CHECK_EXTENSION, VFIO_TYPE1v2_IOMMU);
|
||||
|
@ -1039,6 +1042,11 @@ static int vfio_connect_container(VFIOGroup *group, AddressSpace *as,
|
|||
container->iommu_type =
|
||||
v2 ? VFIO_SPAPR_TCE_v2_IOMMU : VFIO_SPAPR_TCE_IOMMU;
|
||||
ret = ioctl(fd, VFIO_SET_IOMMU, container->iommu_type);
|
||||
if (ret) {
|
||||
container->iommu_type = VFIO_SPAPR_TCE_IOMMU;
|
||||
v2 = false;
|
||||
ret = ioctl(fd, VFIO_SET_IOMMU, container->iommu_type);
|
||||
}
|
||||
if (ret) {
|
||||
error_setg_errno(errp, errno, "failed to set iommu for container");
|
||||
ret = -errno;
|
||||
|
|
|
@ -93,8 +93,6 @@ typedef struct VFIOMSIXInfo {
|
|||
uint16_t entries;
|
||||
uint32_t table_offset;
|
||||
uint32_t pba_offset;
|
||||
MemoryRegion mmap_mem;
|
||||
void *mmap;
|
||||
unsigned long *pending;
|
||||
} VFIOMSIXInfo;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue