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: <20100916135556.GI3008@redhat.com>
Date:	Thu, 16 Sep 2010 15:55:56 +0200
From:	Gleb Natapov <gleb@...hat.com>
To:	"Michael S. Tsirkin" <mst@...hat.com>
Cc:	Avi Kivity <avi@...hat.com>, Marcelo Tosatti <mtosatti@...hat.com>,
	kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC] kvm: enable irq injection from interrupt context

On Thu, Sep 16, 2010 at 03:38:28PM +0200, Michael S. Tsirkin wrote:
> On Thu, Sep 16, 2010 at 03:14:11PM +0200, Avi Kivity wrote:
> >  On 09/16/2010 02:57 PM, Michael S. Tsirkin wrote:
> > >>
> > >>  >  >  If you want to split parts that asserts irq and de-asserts it then we
> > >>  >  >  should have irqfd that tracks line status and knows interrupt line
> > >>  >  >  polarity.
> > >>  >
> > >>  >  Yes, it can know about polarity even though I think it's cleaner to do this
> > >>  >  per gsi. But it can not track line status as line is shared with
> > >>  >  other devices.
> > >>  It should track only device's line status.
> > >
> > >There is no such thing as device's line status on real hardware, either.
> > >Devices do not drive INT# high: they drive it low (all the time)
> > >or do not drive it at all.
> > >
> > 
> > That's just an implementation detail.  Devices either assert INT# or
> > they do not.  Tying the wires together constitutes an AND gate.
> > This gate has to be modelled somewhere, currently it's in qemu's pci
> > emulation.
> 
> Right. kvm in kernel has this as well, we need to keep this in
> kvm kernel if we want to support level with irqfd.
> Where it does not belong is individual devices: these
> should be able to assert INTx multiple times
> and it should have no effect, as per spec.
Assert_INTx/Deassert_INTx you mentioned are internal PCI thing. What KVM
sees logically is status of the line between pci controller and irq
chip. We do not emulate PCI inside kernel, but I agree that kernel should
handle multiple asserts without de-assert in the middle and, in fact, it does.
But the thread started with you trying to optimize this non-optimal
device behaviour and I am saying that the fix should be elsewhere. Namely in
irqfd.

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