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] [day] [month] [year] [list]
Message-ID: <20120517093417.GB10209@redhat.com>
Date:	Thu, 17 May 2012 12:34:17 +0300
From:	Gleb Natapov <gleb@...hat.com>
To:	Avi Kivity <avi@...hat.com>
Cc:	"Michael S. Tsirkin" <mst@...hat.com>,
	Marcelo Tosatti <mtosatti@...hat.com>, x86@...nel.org,
	kvm@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
	"H. Peter Anvin" <hpa@...or.com>,
	Linus Torvalds <torvalds@...ux-foundation.org>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCHv4 3/5] kvm: host side for eoi optimization

On Thu, May 17, 2012 at 12:24:30PM +0300, Avi Kivity wrote:
> On 05/17/2012 11:07 AM, Gleb Natapov wrote:
> > > 
> > > No, let's refactor this so it makes sense.  The {has|get}_interrupt
> > > split is the cause of the problem, I think.  We need a single function,
> > > with callbacks that are called when an event happens.  The callbacks can
> > > request an irq window exit, inject an interrupt, play with pveoi, or
> > > cause a #vmexit.
> > > 
> > Not sure what do you mean here. I kind of like the code we have now, but
> > this may be because I understand it :)
> 
> Right now we have
> 
>    if (has_interrupt)
>        do something
>    if (get_interrupt)
>        do_something_else
> 
Not exactly. Now we have:
  if (has_interrupt && can inject)
    inject(get_interrupt())
  if (still has_interrupt)
    notify me when I can inject it.

There is not if(get_interrupt).

> this duplicates some of the logic and causes non-atomicty (which isn't a
> problem per se, but requires us to think of what happens if conditions
> change between the two steps).
> 
> What I'm thinking of is
> 
>    void process_interrupt(bool (*handle)());
Why we even want to pass different handle() to the function?

> 
> Where the return value tells us whether the interrupt was accepted by
> the handler.  The callback could decide to enable the irq window, to
> queue the interrupt, or to #vmexit (note that the latter can return
Queuing interrupt and requesting irq window ate not mutually exclusive.

> either true or false, depending on whether vmx is configured to ack the
> interrupt or not; svm would return true here if interrupts are intercepted).
> 
> -- 
> error compiling committee.c: too many arguments to function

--
			Gleb.
--
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