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]
Date:	Wed, 16 May 2012 19:22:47 +0300
From:	"Michael S. Tsirkin" <mst@...hat.com>
To:	Marcelo Tosatti <mtosatti@...hat.com>
Cc:	x86@...nel.org, kvm@...r.kernel.org,
	Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>, Avi Kivity <avi@...hat.com>,
	gleb@...hat.com, Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 3/5] kvm: host side for eoi optimization

On Wed, May 16, 2012 at 12:49:40PM -0300, Marcelo Tosatti wrote:
> > @@ -1245,9 +1306,20 @@ int kvm_get_apic_interrupt(struct kvm_vcpu *vcpu)
> >  	int vector = kvm_apic_has_interrupt(vcpu);
> >  	struct kvm_lapic *apic = vcpu->arch.apic;
> >  
> > -	if (vector == -1)
> > +	/* Detect interrupt nesting and disable EOI optimization */
> > +	if (pv_eoi_enabled(vcpu) && vector == -2)
> > +		pv_eoi_clr_pending(vcpu);
> > +
> > +	if (vector < 0)
> 
> With interrupt window exiting, the guest will exit:
> 
> - as soon as it sets RFLAGS.IF=1 and there is any 
> interrupt pending in IRR.
> - any new interrupt is set in IRR will kick vcpu
> out of guest mode and recalculate interrupt-window-exiting.
> 
> Doesnt this make this bit unnecessary ?

Looks like we could cut it out.  But I'm not sure how architectural it is
that we exit on interrupt window.
I guess there are reasons to exit on interrupt window but
isn't it better to make the feature independent of it?

This almost never happens in my testing anyway, so
however we handle it is unlikely to affect performance.

-- 
MST
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ