QEMU zero-inits Hyper-V SynIC vectors. We should allow that,
and don't reject zero values if set by the host.
Signed-off-by: Andrey Smetanin <asmetanin@virtuozzo.com>
Reviewed-by: Roman Kagan <rkagan@virtuozzo.com>
CC: Gleb Natapov <gleb@kernel.org>
CC: Paolo Bonzini <pbonzini@redhat.com>
CC: Roman Kagan <rkagan@virtuozzo.com>
CC: Denis V. Lunev <den@openvz.org>
CC: qemu-devel@nongnu.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
return false;
}
-static int synic_set_sint(struct kvm_vcpu_hv_synic *synic, int sint, u64 data)
+static int synic_set_sint(struct kvm_vcpu_hv_synic *synic, int sint,
+ u64 data, bool host)
{
int vector;
vector = data & HV_SYNIC_SINT_VECTOR_MASK;
- if (vector < 16)
+ if (vector < 16 && !host)
return 1;
/*
* Guest may configure multiple SINTs to use the same vector, so
break;
}
case HV_X64_MSR_SINT0 ... HV_X64_MSR_SINT15:
- ret = synic_set_sint(synic, msr - HV_X64_MSR_SINT0, data);
+ ret = synic_set_sint(synic, msr - HV_X64_MSR_SINT0, data, host);
break;
default:
ret = 1;