aboutsummaryrefslogtreecommitdiff
path: root/hw/xen
diff options
context:
space:
mode:
Diffstat (limited to 'hw/xen')
-rw-r--r--hw/xen/xen-common.c18
-rw-r--r--hw/xen/xen_pt.c2
2 files changed, 20 insertions, 0 deletions
diff --git a/hw/xen/xen-common.c b/hw/xen/xen-common.c
index 5284b0dec1..15650d7f6a 100644
--- a/hw/xen/xen-common.c
+++ b/hw/xen/xen-common.c
@@ -11,7 +11,9 @@
#include "qemu/osdep.h"
#include "qemu/error-report.h"
#include "qemu/module.h"
+#include "qapi/error.h"
#include "hw/xen/xen-legacy-backend.h"
+#include "hw/xen/xen_pt.h"
#include "chardev/char.h"
#include "sysemu/accel.h"
#include "sysemu/runstate.h"
@@ -124,6 +126,16 @@ static void xen_change_state_handler(void *opaque, int running,
}
}
+static bool xen_get_igd_gfx_passthru(Object *obj, Error **errp)
+{
+ return has_igd_gfx_passthru;
+}
+
+static void xen_set_igd_gfx_passthru(Object *obj, bool value, Error **errp)
+{
+ has_igd_gfx_passthru = value;
+}
+
static void xen_setup_post(MachineState *ms, AccelState *accel)
{
int rc;
@@ -177,6 +189,12 @@ static void xen_accel_class_init(ObjectClass *oc, void *data)
ac->compat_props = g_ptr_array_new();
compat_props_add(ac->compat_props, compat, G_N_ELEMENTS(compat));
+
+ object_class_property_add_bool(oc, "igd-passthru",
+ xen_get_igd_gfx_passthru, xen_set_igd_gfx_passthru,
+ &error_abort);
+ object_class_property_set_description(oc, "igd-passthru",
+ "Set on/off to enable/disable igd passthrou", &error_abort);
}
#define TYPE_XEN_ACCEL ACCEL_CLASS_NAME("xen")
diff --git a/hw/xen/xen_pt.c b/hw/xen/xen_pt.c
index 8fbaf2eae9..9e767d4244 100644
--- a/hw/xen/xen_pt.c
+++ b/hw/xen/xen_pt.c
@@ -65,6 +65,8 @@
#include "qemu/range.h"
#include "exec/address-spaces.h"
+bool has_igd_gfx_passthru;
+
#define XEN_PT_NR_IRQS (256)
static uint8_t xen_pt_mapped_machine_irq[XEN_PT_NR_IRQS] = {0};