Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-31 Thread Chenyi Qiang
Hi Paolo, Do we have any comment for this Bus lock VM exit QEMU patch? On 3/17/2021 4:47 PM, Chenyi Qiang wrote: Virtual Machines can exploit bus locks to degrade the performance of system. To address this kind of performance DOS attack, bus lock VM exit is introduced in KVM and it will report

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-21 Thread Chenyi Qiang
On 3/19/2021 8:37 PM, Marcelo Tosatti wrote: On Fri, Mar 19, 2021 at 10:59:20AM +0800, Chenyi Qiang wrote: Hi Marcelo, Thank you for your comment. On 3/19/2021 1:32 AM, Marcelo Tosatti wrote: On Wed, Mar 17, 2021 at 04:47:09PM +0800, Chenyi Qiang wrote: Virtual Machines can exploit bus lo

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-19 Thread Marcelo Tosatti
On Fri, Mar 19, 2021 at 10:59:20AM +0800, Chenyi Qiang wrote: > Hi Marcelo, > > Thank you for your comment. > > On 3/19/2021 1:32 AM, Marcelo Tosatti wrote: > > On Wed, Mar 17, 2021 at 04:47:09PM +0800, Chenyi Qiang wrote: > > > Virtual Machines can exploit bus locks to degrade the performance of

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-18 Thread Xiaoyao Li
On 3/19/2021 10:59 AM, Chenyi Qiang wrote: Hi Marcelo, Thank you for your comment. On 3/19/2021 1:32 AM, Marcelo Tosatti wrote: On Wed, Mar 17, 2021 at 04:47:09PM +0800, Chenyi Qiang wrote: Virtual Machines can exploit bus locks to degrade the performance of system. To address this kind of pe

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-18 Thread Chenyi Qiang
On 3/19/2021 9:23 AM, Xiaoyao Li wrote: On 3/17/2021 4:47 PM, Chenyi Qiang wrote: [...]   MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run)   {   X86CPU *x86_cpu = X86_CPU(cpu); @@ -4236,6 +4271,11 @@ MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run)  

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-18 Thread Chenyi Qiang
Hi Marcelo, Thank you for your comment. On 3/19/2021 1:32 AM, Marcelo Tosatti wrote: On Wed, Mar 17, 2021 at 04:47:09PM +0800, Chenyi Qiang wrote: Virtual Machines can exploit bus locks to degrade the performance of system. To address this kind of performance DOS attack, bus lock VM exit is in

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-18 Thread Xiaoyao Li
On 3/17/2021 4:47 PM, Chenyi Qiang wrote: [...] MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run) { X86CPU *x86_cpu = X86_CPU(cpu); @@ -4236,6 +4271,11 @@ MemTxAttrs kvm_arch_post_run(CPUState *cpu, struct kvm_run *run) } else { env->eflags &= ~IF_MASK;

Re: [RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-18 Thread Marcelo Tosatti
On Wed, Mar 17, 2021 at 04:47:09PM +0800, Chenyi Qiang wrote: > Virtual Machines can exploit bus locks to degrade the performance of > system. To address this kind of performance DOS attack, bus lock VM exit > is introduced in KVM and it will report the bus locks detected in guest, > which can help

[RFC PATCH] i386: Add ratelimit for bus locks acquired in guest

2021-03-17 Thread Chenyi Qiang
Virtual Machines can exploit bus locks to degrade the performance of system. To address this kind of performance DOS attack, bus lock VM exit is introduced in KVM and it will report the bus locks detected in guest, which can help userspace to enforce throttling policies. The availability of bus lo