Re: [RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-09-02 Thread Sean Christopherson
On Thu, Sep 03, 2020 at 08:52:41AM +0800, Xiaoyao Li wrote: > On 9/3/2020 6:44 AM, Sean Christopherson wrote: > > On Tue, Sep 01, 2020 at 10:43:12AM +0200, Vitaly Kuznetsov wrote: > > > > + vcpu->arch.bus_lock_detected = true; > > > > + } else { > > > > +

Re: [RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-09-02 Thread Xiaoyao Li
On 9/3/2020 6:44 AM, Sean Christopherson wrote: On Tue, Sep 01, 2020 at 10:43:12AM +0200, Vitaly Kuznetsov wrote: @@ -6809,6 +6824,19 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) if (unlikely(vmx->exit_reason.failed_vmentry)) return EXIT_FASTPATH_NONE; + /*

Re: [RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-09-02 Thread Sean Christopherson
On Tue, Sep 01, 2020 at 10:43:12AM +0200, Vitaly Kuznetsov wrote: > > @@ -6809,6 +6824,19 @@ static fastpath_t vmx_vcpu_run(struct kvm_vcpu *vcpu) > > if (unlikely(vmx->exit_reason.failed_vmentry)) > > return EXIT_FASTPATH_NONE; > > > > + /* > > +* check the exit_reason to s

Re: [RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-09-01 Thread Chenyi Qiang
On 9/1/2020 4:43 PM, Vitaly Kuznetsov wrote: Chenyi Qiang writes: Virtual Machine can exploit bus locks to degrade the performance of system. Bus lock can be caused by split locked access to writeback(WB) memory or by using locks on uncacheable(UC) memory. The bus lock is typically >1000 cy

Re: [RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-09-01 Thread Vitaly Kuznetsov
Chenyi Qiang writes: > Virtual Machine can exploit bus locks to degrade the performance of > system. Bus lock can be caused by split locked access to writeback(WB) > memory or by using locks on uncacheable(UC) memory. The bus lock is > typically >1000 cycles slower than an atomic operation within

[RESEND RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-08-16 Thread Chenyi Qiang
Virtual Machine can exploit bus locks to degrade the performance of system. Bus lock can be caused by split locked access to writeback(WB) memory or by using locks on uncacheable(UC) memory. The bus lock is typically >1000 cycles slower than an atomic operation within a cache line. It also disrupts

[RFC v2 2/2] KVM: VMX: Enable bus lock VM exit

2020-08-16 Thread Chenyi Qiang
Virtual Machine can exploit bus locks to degrade the performance of system. Bus lock can be caused by split locked access to writeback(WB) memory or by using locks on uncacheable(UC) memory. The bus lock is typically >1000 cycles slower than an atomic operation within a cache line. It also disrupts