[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 1/1] hyperv: Enable SCONTROL if SYNIC is enabled
From: |
Paolo Bonzini |
Subject: |
Re: [PATCH v1 1/1] hyperv: Enable SCONTROL if SYNIC is enabled |
Date: |
Mon, 10 Aug 2020 19:27:54 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.9.0 |
On 17/07/20 14:56, Jon Doron wrote:
> 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;
> }
>
Are both patches needed or only the Hyper-V one?
Paolo
- Re: [PATCH v1 1/1] hyperv: Enable SCONTROL if SYNIC is enabled,
Paolo Bonzini <=