lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170921140628.zliqlz7mrlqs5pzz@hirez.programming.kicks-ass.net>
Date:   Thu, 21 Sep 2017 16:06:28 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Cc:     Marcelo Tosatti <mtosatti@...hat.com>, mingo@...hat.com,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>
Subject: Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO
 hypercall

On Thu, Sep 21, 2017 at 09:36:53AM -0400, Konrad Rzeszutek Wilk wrote:
> On Thu, Sep 21, 2017 at 08:38:38AM -0300, Marcelo Tosatti wrote:
> > Add hypercalls to spinlock/unlock to set/unset FIFO priority
> > for the vcpu, protected by a static branch to avoid performance
> > increase in the normal kernels.
> > 
> > Enable option by "kvmfifohc" kernel command line parameter (disabled
> > by default).

WTF kind of fudge is this? Changelog completely fails to explain the
problem this would solve. Why are you doing insane things like this?


NAK!

> > Index: kvm.fifopriohc-submit/include/linux/spinlock_api_smp.h
> > ===================================================================
> > --- kvm.fifopriohc-submit.orig/include/linux/spinlock_api_smp.h
> > +++ kvm.fifopriohc-submit/include/linux/spinlock_api_smp.h
> > @@ -136,11 +136,28 @@ static inline void __raw_spin_lock_bh(ra
> >  	LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
> >  }
> >  
> > +#ifdef CONFIG_KVM_GUEST
> > +DECLARE_STATIC_KEY_FALSE(kvm_fifo_hc_key);
> > +#endif
> > +
> >  static inline void __raw_spin_lock(raw_spinlock_t *lock)
> >  {
> >  	preempt_disable();
> > +
> > +#if defined(CONFIG_KVM_GUEST) && defined(CONFIG_SMP)
> > +	/* enable FIFO priority */
> > +	if (static_branch_unlikely(&kvm_fifo_hc_key))
> > +		kvm_hypercall1(KVM_HC_RT_PRIO, 0x1);
> > +#endif
> > +
> >  	spin_acquire(&lock->dep_map, 0, 0, _RET_IP_);
> >  	LOCK_CONTENDED(lock, do_raw_spin_trylock, do_raw_spin_lock);
> > +
> > +#if defined(CONFIG_KVM_GUEST) && defined(CONFIG_SMP)
> > +	/* disable FIFO priority */
> > +	if (static_branch_unlikely(&kvm_fifo_hc_key))
> > +		kvm_hypercall1(KVM_HC_RT_PRIO, 0);
> > +#endif
> >  }
> >  
> >  #endif /* !CONFIG_GENERIC_LOCKBREAK || CONFIG_DEBUG_LOCK_ALLOC */

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ