Re: Optimized clocksource with AMD AVIC enabled for Windows guest

2021-02-03 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 03/02/21 07:40, Kechen Lu wrote: >> From the above observations, trying to see if there's a way for >> enabling AVIC while also having the most optimized clock source for >> windows guest. >> > > You would have to change KVM, so that AVIC is only disabled if Auto-EOI

RE: Optimized clocksource with AMD AVIC enabled for Windows guest

2021-02-04 Thread Vitaly Kuznetsov
Kechen Lu writes: > Hi Vitaly and Paolo, > > Thanks so much for quick reply. This makes sense to me. From my > understanding, basically this can be two part of it to resolve it. > > First, we make sure to set and expose 0x4004.EAX Bit9 to windows guest, > like in kvm_vcpu_ioctl_get_hv_cpui

Re: Optimized clocksource with AMD AVIC enabled for Windows guest

2021-02-04 Thread Vitaly Kuznetsov
Paolo Bonzini writes: > On 04/02/21 13:24, Vitaly Kuznetsov wrote: >> I checked Linux VMs on genuine Hyper-V and surprisingly >> 'HV_DEPRECATING_AEOI_RECOMMENDED' is not exposed. > > Did the host have APICv/AVIC (and can Hyper-V use AVIC)? AutoEOI is > still a

Re: Optimized clocksource with AMD AVIC enabled for Windows guest

2021-02-04 Thread Vitaly Kuznetsov
Vitaly Kuznetsov 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_ret

RE: Optimized clocksource with AMD AVIC enabled for Windows guest

2021-02-25 Thread Vitaly Kuznetsov
Kechen Lu writes: > Hi Vitaly and Paolo, > > Sorry for the delay in response, finally got chance to access a machine with > AVIC, and was able to test out the patch and reconfirm through some > benchmarks and tests again today:) > > In summary, this patch works well and resolves the issues o