From: Jon Doron <arilou@gmail.com>
To: qemu-devel@nongnu.org
Cc: pbonzini@redhat.com, vkuznets@redhat.com, Jon Doron <arilou@gmail.com>
Subject: [PATCH v1 1/1] hyperv: Enable SCONTROL if SYNIC is enabled
Date: Fri, 17 Jul 2020 15:56:39 +0300 [thread overview]
Message-ID: <20200717125639.1103876-2-arilou@gmail.com> (raw)
In-Reply-To: <20200717125639.1103876-1-arilou@gmail.com>
Based on an analysis of the HyperV firmwares (Gen1 and Gen2) it seems
like the SCONTROL is not being set to the ENABLED state as like we have
thought.
Also from a test done by Vitaly Kuznetsov, running a nested HyperV it
was concluded that the first access to the SCONTROL MSR with a read
resulted with the value of 0x1, aka HV_SYNIC_CONTROL_ENABLE.
It's important to note that this diverges from the value states in the
HyperV TLFS of 0.
Signed-off-by: Jon Doron <arilou@gmail.com>
---
target/i386/kvm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index b8455c89ed..6a62e8ae94 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -1904,6 +1904,8 @@ void kvm_arch_reset_vcpu(X86CPU *cpu)
if (hyperv_feat_enabled(cpu, HYPERV_FEAT_SYNIC)) {
int i;
+
+ env->msr_hv_synic_control = HV_SYNIC_ENABLE;
for (i = 0; i < ARRAY_SIZE(env->msr_hv_synic_sint); i++) {
env->msr_hv_synic_sint[i] = HV_SINT_MASKED;
}
--
2.24.1
next prev parent reply other threads:[~2020-07-17 13:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-17 12:56 [PATCH v1 0/1] hyperv: Enable SCONTROL if SYNIC is enabled Jon Doron
2020-07-17 12:56 ` Jon Doron [this message]
2020-08-10 17:27 ` [PATCH v1 1/1] " Paolo Bonzini
2020-08-10 17:40 ` Jon Doron
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=20200717125639.1103876-2-arilou@gmail.com \
--to=arilou@gmail.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).