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: <4FC8F042.5050600@siemens.com>
Date:	Fri, 01 Jun 2012 18:39:30 +0200
From:	Jan Kiszka <jan.kiszka@...mens.com>
To:	Alex Williamson <alex.williamson@...hat.com>
CC:	"kvm@...r.kernel.org" <kvm@...r.kernel.org>,
	"avi@...hat.com" <avi@...hat.com>,
	"mtosatti@...hat.com" <mtosatti@...hat.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"yongjie.ren@...el.com" <yongjie.ren@...el.com>
Subject: Re: [PATCH] KVM: Use IRQF_ONESHOT for assigned device MSI interrupts

On 2012-06-01 18:16, Alex Williamson wrote:
> The kernel no longer allows us to pass NULL for a hard interrupt
> handler without IRQF_ONESHOT.  Should have been using this flag
> anyway.

This make the IRQ handling tail a bit slower (due to
irq_finalize_oneshot). MSIs are edge-triggered, so there was no need for
masking in theory. Hmm, can't we trust the information that an IRQ
grabbed here is really a MSI type?

Jan

> 
> Fixes: https://bugzilla.kernel.org/show_bug.cgi?id=43328
> 
> Signed-off-by: Alex Williamson <alex.williamson@...hat.com>
> ---
> 
>  virt/kvm/assigned-dev.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/virt/kvm/assigned-dev.c b/virt/kvm/assigned-dev.c
> index 01f572c..e804d14 100644
> --- a/virt/kvm/assigned-dev.c
> +++ b/virt/kvm/assigned-dev.c
> @@ -347,7 +347,7 @@ static int assigned_device_enable_host_msi(struct kvm *kvm,
>  
>  	dev->host_irq = dev->dev->irq;
>  	if (request_threaded_irq(dev->host_irq, NULL,
> -				 kvm_assigned_dev_thread_msi, 0,
> +				 kvm_assigned_dev_thread_msi, IRQF_ONESHOT,
>  				 dev->irq_name, dev)) {
>  		pci_disable_msi(dev->dev);
>  		return -EIO;
> @@ -375,7 +375,7 @@ static int assigned_device_enable_host_msix(struct kvm *kvm,
>  	for (i = 0; i < dev->entries_nr; i++) {
>  		r = request_threaded_irq(dev->host_msix_entries[i].vector,
>  					 NULL, kvm_assigned_dev_thread_msix,
> -					 0, dev->irq_name, dev);
> +					 IRQF_ONESHOT, dev->irq_name, dev);
>  		if (r)
>  			goto err;
>  	}
> 

-- 
Siemens AG, Corporate Technology, CT T DE IT 1
Corporate Competence Center Embedded Linux
--
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