qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Jon Doron <arilou@gmail.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, vkuznets@redhat.com, ehabkost@redhat.com,
	Jon Doron <arilou@gmail.com>
Subject: [PATCH v1 1/5] hyperv: expose API to determine if synic is enabled
Date: Fri,  3 Apr 2020 17:23:04 +0300	[thread overview]
Message-ID: <20200403142308.82990-2-arilou@gmail.com> (raw)
In-Reply-To: <20200403142308.82990-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-03 14:24 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-03 14:23 [PATCH v1 0/5] hyperv: VMBus implementation Jon Doron
2020-04-03 14:23 ` Jon Doron [this message]
2020-04-03 14:23 ` [PATCH v1 2/5] hyperv: SControl is optional to enable SynIc Jon Doron
2020-04-03 14:23 ` [PATCH v1 3/5] vmbus: add vmbus protocol definitions Jon Doron
2020-04-03 14:23 ` [PATCH v1 4/5] vmbus: vmbus implementation Jon Doron
2020-04-03 14:23 ` [PATCH v1 5/5] i386: Hyper-V VMBus ACPI DSDT entry Jon Doron
2020-04-03 14:56   ` Maciej S. Szmigiero
2020-04-03 15:06     ` Jon Doron
2020-04-03 15:30       ` Jon Doron
2020-04-03 15:50         ` Maciej S. Szmigiero
2020-04-03 17:18         ` Maciej S. Szmigiero
2020-04-03 21:00           ` Maciej S. Szmigiero
2020-04-06  7:32             ` Roman Kagan
2020-04-06  8:20               ` Jon Doron
2020-04-07 18:56                 ` Roman Kagan
2020-04-07 19:03                   ` Maciej S. Szmigiero
2020-04-08  4:16                     ` Jon Doron
2020-04-08 20:47                       ` Roman Kagan
2020-04-09  3:35                         ` Jon Doron
2020-05-12 14:05                           ` Roman Kagan
2020-05-12 15:01                             ` Jon Doron
2020-05-12 15:05                               ` Jon Doron
2020-04-08 20:26                     ` Roman Kagan
2020-04-08 21:42                       ` Maciej S. Szmigiero
2020-04-06 10:14   ` Igor Mammedov
2020-04-03 22:48 ` [PATCH v1 0/5] hyperv: VMBus implementation no-reply

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=20200403142308.82990-2-arilou@gmail.com \
    --to=arilou@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).