[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Optimized clocksource with AMD AVIC enabled for Windows guest
From: |
Vitaly Kuznetsov |
Subject: |
Re: Optimized clocksource with AMD AVIC enabled for Windows guest |
Date: |
Thu, 04 Feb 2021 16:19:15 +0100 |
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
> +
> + auto_eoi_new = bitmap_weight(synic->auto_eoi_bitmap, 256);
> +
> + /* Hyper-V SynIC auto EOI SINT's are not compatible with APICV */
> + if (!auto_eoi_old && auto_eoi_new) {
> + if (atomic_inc_return(&hv->synic_auto_eoi_used) == 1)
> + kvm_request_apicv_update(vcpu->kvm, false,
> + APICV_INHIBIT_REASON_HYPERV);
> + } else if (!auto_eoi_old && auto_eoi_new) {
Sigh, this 'else' should be
} else if (!auto_eoi_new && auto_eoi_old) {
...
> + if (atomic_dec_return(&hv->synic_auto_eoi_used) == 0)
> + kvm_request_apicv_update(vcpu->kvm, true,
> + APICV_INHIBIT_REASON_HYPERV);
> + }
> }
>
> static int synic_set_sint(struct kvm_vcpu_hv_synic *synic, int sint,
> @@ -903,12 +923,6 @@ int kvm_hv_activate_synic(struct kvm_vcpu *vcpu, bool
> dont_zero_synic_pages)
> {
> struct kvm_vcpu_hv_synic *synic = vcpu_to_synic(vcpu);
>
> - /*
> - * Hyper-V SynIC auto EOI SINT's are
> - * not compatible with APICV, so request
> - * to deactivate APICV permanently.
> - */
> - kvm_request_apicv_update(vcpu->kvm, false, APICV_INHIBIT_REASON_HYPERV);
> synic->active = true;
> synic->dont_zero_synic_pages = dont_zero_synic_pages;
> synic->control = HV_SYNIC_CONTROL_ENABLE;
--
Vitaly
- Optimized clocksource with AMD AVIC enabled for Windows guest, Kechen Lu, 2021/02/03
- Optimized clocksource with AMD AVIC enabled for Windows guest, Kechen Lu, 2021/02/03
- Re: Optimized clocksource with AMD AVIC enabled for Windows guest, Paolo Bonzini, 2021/02/03
- Re: Optimized clocksource with AMD AVIC enabled for Windows guest, Vitaly Kuznetsov, 2021/02/03
- RE: Optimized clocksource with AMD AVIC enabled for Windows guest, Kechen Lu, 2021/02/03
- RE: Optimized clocksource with AMD AVIC enabled for Windows guest, Vitaly Kuznetsov, 2021/02/04
- Re: Optimized clocksource with AMD AVIC enabled for Windows guest, Paolo Bonzini, 2021/02/04
- Re: Optimized clocksource with AMD AVIC enabled for Windows guest, Vitaly Kuznetsov, 2021/02/04
- Re: Optimized clocksource with AMD AVIC enabled for Windows guest,
Vitaly Kuznetsov <=
- RE: Optimized clocksource with AMD AVIC enabled for Windows guest, Kechen Lu, 2021/02/05
- RE: Optimized clocksource with AMD AVIC enabled for Windows guest, Kechen Lu, 2021/02/17
- RE: Optimized clocksource with AMD AVIC enabled for Windows guest, Vitaly Kuznetsov, 2021/02/25