RE: [PATCH v3 1/4] Allow system to allocate IRQ 0 to ATA devices

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: Sergei Shtylyov [mailto:sergei.shtylyov@xxxxxxxxxxxxxxxxxx]
> Sent: Tuesday, November 6, 2018 11:34 PM
> To: Guo, Chaohong <chaohong.guo@xxxxxxxxx>; linux-ide@xxxxxxxxxxxxxxx
> Cc: b.zolnierkie@xxxxxxxxxxx; axboe@xxxxxxxxx; vireshk@xxxxxxxxxx
> Subject: Re: [PATCH v3 1/4] Allow system to allocate IRQ 0 to ATA devices
> 
> On 11/06/2018 05:42 AM, Chaohong guo wrote:
> 
> > Interrupt vector 0 can be used on some platform.
> 
>    It exists even on x86. However, it's never passed to request_irq() there IIRC,
> just to setup_irq()...

[Guo, Chaohong] 
Yes.  normally on x86 platform,  the vector 0 won't be allocated to device. It is a system vector for handling the exception of dividing zero.
After my changing,  the AHCI driver can work with vector 0 in non-root jailhouse cell just because jailhouse will remap it via VT-D interrupt remapping.

How do you think about it ?  Do we fix it in somewhere else to prevent kernel in non-root cell from allocating vector less than 0x20 ?

-minskey

> 
> > In libata, the routine
> > ata_host_activate() considers irq=0 as invalid.
> 
>    As a matter of fact, Linus told everybody to consider IRQ0 invalid, hence
> this code perhaps...
> 
> > As a result, when running
> > linux in non-root cell of Jailhouse,  if we allocate just one PCI ATA
> > device to the guest, the device will get an IRQ of value 0. Although
> > IRQ0 is perfectly legal, ATA device will fail to start up.
> 
>    I've just rechecked the PCI specs and they say that on x86 IRQ0 is valid, so
> your software is OK.
> 
> >     Signed-off-by: Chaohong guo <chaohong.guo@xxxxxxxxx>
> > ---
> >  drivers/ata/libata-core.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> 
>    Like Bart said, this patch alone would break some drivers...
> 
> [...]
> 
> MBR, Sergei




[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux