Re: [PATCH v3 2/4] KVM: SVM: Enable Bus lock threshold exit

2024-11-05 Thread Manali Shukla
On 11/5/2024 7:52 AM, Sean Christopherson wrote: > On Sun, Nov 03, 2024, Manali Shukla wrote: >> On 10/15/2024 11:19 PM, Sean Christopherson wrote: >>> On Fri, Oct 04, 2024, Manali Shukla wrote: >> ... +static int bus_lock_exit(struct kvm_vcpu *vcpu) +{ + struct vcpu_svm *svm

Re: [PATCH v3 2/4] KVM: SVM: Enable Bus lock threshold exit

2024-11-04 Thread Sean Christopherson
On Sun, Nov 03, 2024, Manali Shukla wrote: > On 10/15/2024 11:19 PM, Sean Christopherson wrote: > > On Fri, Oct 04, 2024, Manali Shukla wrote: > ... > >> > >> +static int bus_lock_exit(struct kvm_vcpu *vcpu) > >> +{ > >> + struct vcpu_svm *svm = to_svm(vcpu); > >> + > >> + vcpu->run->exit_reaso

Re: [PATCH v3 2/4] KVM: SVM: Enable Bus lock threshold exit

2024-11-03 Thread Manali Shukla
On 10/15/2024 11:19 PM, Sean Christopherson wrote: > On Fri, Oct 04, 2024, Manali Shukla wrote: ... >> >> +static int bus_lock_exit(struct kvm_vcpu *vcpu) >> +{ >> +struct vcpu_svm *svm = to_svm(vcpu); >> + >> +vcpu->run->exit_reason = KVM_EXIT_X86_BUS_LOCK; >> +vcpu->run->flags |= KV

Re: [PATCH v3 2/4] KVM: SVM: Enable Bus lock threshold exit

2024-10-18 Thread Manali Shukla
Hi Sean, Thanks for reviewing my patches. On 10/15/2024 11:19 PM, Sean Christopherson wrote: > On Fri, Oct 04, 2024, Manali Shukla wrote: >> When a VMRUN instruction is executed, the bus lock threshold count is >> loaded into an internal count register. Before the processor executes >> a bus lock

Re: [PATCH v3 2/4] KVM: SVM: Enable Bus lock threshold exit

2024-10-15 Thread Sean Christopherson
On Fri, Oct 04, 2024, Manali Shukla wrote: > When a VMRUN instruction is executed, the bus lock threshold count is > loaded into an internal count register. Before the processor executes > a bus lock in the guest, it checks the value of this register: > > - If the value is greater than '0', the p

[PATCH v3 2/4] KVM: SVM: Enable Bus lock threshold exit

2024-10-03 Thread Manali Shukla
From: Nikunj A Dadhania Virtual machines can exploit bus locks to degrade the performance of the system. Bus locks can be caused by Non-WB(Write back) and misaligned locked RMW (Read-modify-Write) instructions and require systemwide synchronization among all processors which can result into signi