From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Roman Kagan <rvkagan@yandex-team.ru>, Jon Doron <arilou@gmail.com>
Cc: kvm@vger.kernel.org, linux-hyperv@vger.kernel.org
Subject: Re: [PATCH v2 0/1] x86/kvm/hyper-v: Add support to SYNIC exit on EOM
Date: Mon, 04 May 2020 17:55:10 +0200 [thread overview]
Message-ID: <87a72nelup.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20200503191900.GA389956@rvkaganb>
Roman Kagan <rvkagan@yandex-team.ru> writes:
> On Sat, Apr 25, 2020 at 09:16:37AM +0300, Jon Doron wrote:
>
>> If that's indeed the case then probably the only thing needs fixing in my
>> scenario is in QEMU where it should not really care for the SCONTROL if it's
>> enabled or not.
>
> Right. However, even this shouldn't be necessary as SeaBIOS from that
> branch would enable SCONTROL and leave it that way when passing the
> control over to the bootloader, so, unless something explicitly clears
> SCONTROL, it should remain set thereafter. I'd rather try going ahead
> with that scheme first, because making QEMU ignore SCONTROL appears to
> violate the spec.
FWIW, I just checked 'genuine' Hyper-V 2016 with
diff --git a/arch/x86/hyperv/hv_init.c b/arch/x86/hyperv/hv_init.c
index fd51bac11b46..c5ea759728d9 100644
--- a/arch/x86/hyperv/hv_init.c
+++ b/arch/x86/hyperv/hv_init.c
@@ -314,10 +314,14 @@ void __init hyperv_init(void)
u64 guest_id, required_msrs;
union hv_x64_msr_hypercall_contents hypercall_msr;
int cpuhp, i;
+ u64 val;
if (x86_hyper_type != X86_HYPER_MS_HYPERV)
return;
+ hv_get_synic_state(val);
+ printk("Hyper-V: SCONTROL state: %llx\n", val);
+
/* Absolutely required MSRs */
required_msrs = HV_X64_MSR_HYPERCALL_AVAILABLE |
HV_X64_MSR_VP_INDEX_AVAILABLE;
and it seems the default state of HV_X64_MSR_SCONTROL is '1', we should
probably do the same. Is there any reason to *not* do this in KVM when
KVM_CAP_HYPERV_SYNIC[,2] is enabled?
--
Vitaly
next prev parent reply other threads:[~2020-05-04 15:55 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-16 8:38 [PATCH v2 0/1] x86/kvm/hyper-v: Add support to SYNIC exit on EOM Jon Doron
2020-04-16 8:38 ` [PATCH v2 1/1] " Jon Doron
2020-04-16 12:00 ` [PATCH v2 0/1] " Roman Kagan
2020-04-16 12:54 ` Jon Doron
2020-04-17 10:42 ` Roman Kagan
2020-04-18 6:41 ` Jon Doron
2020-04-24 12:20 ` Jon Doron
2020-04-24 13:37 ` Roman Kagan
2020-04-25 6:16 ` Jon Doron
2020-05-02 14:47 ` Jon Doron
2020-05-03 19:19 ` Roman Kagan
2020-05-04 15:55 ` Vitaly Kuznetsov [this message]
2020-05-05 8:01 ` Roman Kagan
2020-05-05 10:38 ` Jon Doron
2020-05-05 20:00 ` Roman Kagan
2020-05-06 4:49 ` Jon Doron
2020-05-06 8:46 ` Roman Kagan
2020-05-07 3:00 ` Jon Doron
2020-05-08 14:29 ` Jon Doron
2020-05-08 16:56 ` Roman Kagan
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=87a72nelup.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=arilou@gmail.com \
--cc=kvm@vger.kernel.org \
--cc=linux-hyperv@vger.kernel.org \
--cc=rvkagan@yandex-team.ru \
/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.