#include "qemu/main-loop.h"
#include "qapi/error.h"
#include "hw/core/sysbus.h"
+#include "hw/core/iommu.h"
#include "intel_iommu_internal.h"
#include "hw/pci/pci.h"
#include "hw/pci/pci_bus.h"
vtd_iommu_unlock(s);
}
+static uint64_t vtd_get_viommu_flags(void *opaque)
+{
+ IntelIOMMUState *s = opaque;
+ uint64_t flags;
+
+ flags = s->fsts ? VIOMMU_FLAG_WANT_NESTING_PARENT : 0;
+
+ return flags;
+}
+
/* Unmap the whole range in the notifier's scope. */
static void vtd_address_space_unmap(VTDAddressSpace *as, IOMMUNotifier *n)
{
.pri_register_notifier = vtd_pri_register_notifier,
.pri_unregister_notifier = vtd_pri_unregister_notifier,
.pri_request_page = vtd_pri_request_page,
+ .get_viommu_flags = vtd_get_viommu_flags,
};
static bool vtd_decide_config(IntelIOMMUState *s, Error **errp)