[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 10/46] hyperv: ensure SINTx msrs are reset properly
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 10/46] hyperv: ensure SINTx msrs are reset properly |
Date: |
Wed, 20 Dec 2017 18:14:22 +0100 |
From: Roman Kagan <address@hidden>
Initially SINTx msrs should be in "masked" state. To ensure that
happens on *every* reset, move setting their values to
kvm_arch_vcpu_reset.
Signed-off-by: Roman Kagan <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
target/i386/kvm.c | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index 89fa65e..5d93391 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -662,8 +662,6 @@ static int hyperv_handle_properties(CPUState *cs)
env->features[FEAT_HYPERV_EAX] |= HV_VP_RUNTIME_AVAILABLE;
}
if (cpu->hyperv_synic) {
- int sint;
-
if (!has_msr_hv_synic ||
kvm_vcpu_enable_cap(cs, KVM_CAP_HYPERV_SYNIC, 0)) {
fprintf(stderr, "Hyper-V SynIC is not supported by kernel\n");
@@ -672,9 +670,6 @@ static int hyperv_handle_properties(CPUState *cs)
env->features[FEAT_HYPERV_EAX] |= HV_SYNIC_AVAILABLE;
env->msr_hv_synic_version = HV_SYNIC_VERSION;
- for (sint = 0; sint < ARRAY_SIZE(env->msr_hv_synic_sint); sint++) {
- env->msr_hv_synic_sint[sint] = HV_SINT_MASKED;
- }
}
if (cpu->hyperv_stimer) {
if (!has_msr_hv_stimer) {
@@ -1053,6 +1048,13 @@ void kvm_arch_reset_vcpu(X86CPU *cpu)
} else {
env->mp_state = KVM_MP_STATE_RUNNABLE;
}
+
+ if (cpu->hyperv_synic) {
+ int i;
+ for (i = 0; i < ARRAY_SIZE(env->msr_hv_synic_sint); i++) {
+ env->msr_hv_synic_sint[i] = HV_SINT_MASKED;
+ }
+ }
}
void kvm_arch_do_init_vcpu(X86CPU *cpu)
--
1.8.3.1
- [Qemu-devel] [PULL 00/46] First batch of misc patches for QEMU 2.12, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 01/46] memfd: fix configure test, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 02/46] qemu-thread: fix races on threads that exit very quickly, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 03/46] qemu-pr-helper: miscellaneous fixes, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 04/46] contrib: add systemd unit files, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 06/46] scsi-block: Add share-rw option, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 05/46] Revert "docker: Enable features explicitly in test-full", Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 07/46] MAITAINERS: List Fam Zheng as reviewer for SCSI patches, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 09/46] hyperv: set partition-wide MSRs only on first vcpu, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 10/46] hyperv: ensure SINTx msrs are reset properly,
Paolo Bonzini <=
- [Qemu-devel] [PULL 08/46] x86/cpu: Enable new SSE/AVX/AVX512 cpu features, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 12/46] cpus: make pause_all_cpus() play with SMP on single threaded TCG, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 13/46] cpu-exec: fix missed CPU kick during interrupt injection, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 11/46] hyperv: make SynIC version msr constant, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 14/46] target/i386: Fix compiler warnings, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 15/46] baum: Truncate braille device size to 84x1, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 18/46] tests/boot-serial-test: Make sure that we check the timeout regularly, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 17/46] target/i386: Fix handling of VEX prefixes, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 19/46] tests/boot-serial-test: Add code to allow to specify our own kernel or bios, Paolo Bonzini, 2017/12/20
- [Qemu-devel] [PULL 22/46] hw/moxie/moxiesim: Add support for loading a BIOS on moxiesim, Paolo Bonzini, 2017/12/20