aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorJon Doron <arilou@gmail.com>2020-04-24 15:34:39 +0300
committerPaolo Bonzini <pbonzini@redhat.com>2020-06-10 12:09:39 -0400
commitd42cd96100724bc9fbac18cc17c5f5f9b9b2f181 (patch)
tree5b871cf39afda2af58b4aeb86345e1b9d3768135 /hw
parentfdbff6bd145c1e27520cfe206f04cc664fbb2b30 (diff)
hyperv: expose API to determine if synic is enabled
Signed-off-by: Jon Doron <arilou@gmail.com> Message-Id: <20200424123444.3481728-2-arilou@gmail.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/hyperv/hyperv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c
index 4b11f7a76b..a3933c34c6 100644
--- a/hw/hyperv/hyperv.c
+++ b/hw/hyperv/hyperv.c
@@ -38,6 +38,13 @@ typedef struct SynICState {
#define TYPE_SYNIC "hyperv-synic"
#define SYNIC(obj) OBJECT_CHECK(SynICState, (obj), TYPE_SYNIC)
+static bool synic_enabled;
+
+bool hyperv_is_synic_enabled(void)
+{
+ return synic_enabled;
+}
+
static SynICState *get_synic(CPUState *cs)
{
return SYNIC(object_resolve_path_component(OBJECT(cs), "synic"));
@@ -134,6 +141,7 @@ void hyperv_synic_add(CPUState *cs)
object_property_add_child(OBJECT(cs), "synic", obj);
object_unref(obj);
object_property_set_bool(obj, true, "realized", &error_abort);
+ synic_enabled = true;
}
void hyperv_synic_reset(CPUState *cs)