All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Doron <arilou@gmail.com>
To: qemu-devel@nongnu.org
Cc: mail@maciej.szmigiero.name, eyakovlev@virtuozzo.com,
	ehabkost@redhat.com, rvkagan@gmail.com, liran.alon@oracle.com,
	pbonzini@redhat.com, vkuznets@redhat.com,
	Jon Doron <arilou@gmail.com>
Subject: [PATCH v4 1/6] hyperv: expose API to determine if synic is enabled
Date: Fri, 24 Apr 2020 15:34:39 +0300	[thread overview]
Message-ID: <20200424123444.3481728-2-arilou@gmail.com> (raw)
In-Reply-To: <20200424123444.3481728-1-arilou@gmail.com>

Signed-off-by: Jon Doron <arilou@gmail.com>
---
 hw/hyperv/hyperv.c         | 8 ++++++++
 include/hw/hyperv/hyperv.h | 1 +
 2 files changed, 9 insertions(+)

diff --git a/hw/hyperv/hyperv.c b/hw/hyperv/hyperv.c
index 8ca3706f5b..ddf4f32c60 100644
--- a/hw/hyperv/hyperv.c
+++ b/hw/hyperv/hyperv.c
@@ -37,6 +37,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"));
@@ -133,6 +140,7 @@ void hyperv_synic_add(CPUState *cs)
     object_property_add_child(OBJECT(cs), "synic", obj, &error_abort);
     object_unref(obj);
     object_property_set_bool(obj, true, "realized", &error_abort);
+    synic_enabled = true;
 }
 
 void hyperv_synic_reset(CPUState *cs)
diff --git a/include/hw/hyperv/hyperv.h b/include/hw/hyperv/hyperv.h
index 597381cb01..a63ee0003c 100644
--- a/include/hw/hyperv/hyperv.h
+++ b/include/hw/hyperv/hyperv.h
@@ -79,5 +79,6 @@ void hyperv_synic_add(CPUState *cs);
 void hyperv_synic_reset(CPUState *cs);
 void hyperv_synic_update(CPUState *cs, bool enable,
                          hwaddr msg_page_addr, hwaddr event_page_addr);
+bool hyperv_is_synic_enabled(void);
 
 #endif
-- 
2.24.1



  reply	other threads:[~2020-04-24 12:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-24 12:34 [PATCH v4 0/6] hyperv: VMBus implementation Jon Doron
2020-04-24 12:34 ` Jon Doron [this message]
2020-04-24 12:34 ` [PATCH v4 2/6] vmbus: add vmbus protocol definitions Jon Doron
2020-04-24 12:34 ` [PATCH v4 3/6] vmbus: vmbus implementation Jon Doron
2020-04-24 12:34 ` [PATCH v4 4/6] i386:pc: whitelist dynamic vmbus-bridge Jon Doron
2020-04-24 12:34 ` [PATCH v4 5/6] i386: Hyper-V VMBus ACPI DSDT entry Jon Doron
2020-05-05 13:06   ` Igor Mammedov
2020-05-05 15:38     ` Jon Doron
2020-05-06 13:37       ` Maciej S. Szmigiero
2020-05-07  3:14         ` Jon Doron
2020-05-11 20:11           ` Roman Kagan
2020-05-13 15:37             ` Igor Mammedov
2020-05-15  8:56               ` Jon Doron
2020-05-15 12:35                 ` Roman Kagan
2020-05-11 18:21     ` Roman Kagan
2020-05-13 15:34       ` Igor Mammedov
2020-05-21 16:02         ` Paolo Bonzini
2020-05-22  8:40           ` Igor Mammedow
2020-05-28  5:26             ` Jon Doron
2020-05-28  5:36               ` Jon Doron
2020-05-28 10:37               ` Igor Mammedov
2020-05-28 11:02                 ` Jon Doron
2020-06-14 14:11                   ` Jon Doron
2020-06-14 15:20                     ` Jon Doron
2020-06-14 21:40                     ` Maciej S. Szmigiero
2020-06-15  2:40                       ` Jon Doron
2020-06-15  6:54                         ` Maciej S. Szmigiero
2020-04-24 12:34 ` [PATCH v4 6/6] vmbus: add infrastructure to save/load vmbus requests Jon Doron
2020-05-21 16:03 ` [PATCH v4 0/6] hyperv: VMBus implementation Paolo Bonzini
2020-05-22  2:53   ` Jon Doron
2020-05-22  7:19     ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200424123444.3481728-2-arilou@gmail.com \
    --to=arilou@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=eyakovlev@virtuozzo.com \
    --cc=liran.alon@oracle.com \
    --cc=mail@maciej.szmigiero.name \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rvkagan@gmail.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.