Re: [kvm-unit-tests PATCH v1 2/2] lib: s390x: better smp interrupt checks

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

 



On Tue, 7 Jun 2022 16:23:09 +0200
Nico Boehr <nrb@xxxxxxxxxxxxx> wrote:

> On Fri,  3 Jun 2022 17:40:37 +0200
> Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx> wrote:
> 
> > 0x1200 */ diff --git a/lib/s390x/interrupt.c b/lib/s390x/interrupt.c
> > index 27d3b767..e57946f0 100644  
> [...]
> > @@ -30,7 +27,7 @@ void expect_pgm_int(void)
> >  
> >  void expect_ext_int(void)
> >  {
> > -	ext_int_expected = true;
> > +	lc->ext_int_expected = 1;  
> 
> External Interrupts can be floating; so if I am not mistaken it could be delivered to a different CPU which didn't expect it.

yes I have considered that (maybe I should add this in the patch
description)

for floating interrupts, the testcase should take care to mask the
interrupt on the CPUs where it should not be received.

by default all interrupts are masked anyway and CPUs should only enable
them on a case by case basis

> 
> [...]
> > @@ -237,17 +231,17 @@ void handle_io_int(void)
> >  
> >  int register_io_int_func(void (*f)(void))
> >  {
> > -	if (io_int_func)
> > +	if (lc->io_int_func)
> >  		return -1;  
> 
> IO interrupts also are floating. Same concern as for the external interrupts.

same here

the alternative is to have a separate handling of floating vs
non-floating interrupts, which maybe would get a little out of hand



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux