Re: [kvm-unit-tests PATCH v7 4/4] s390x: SCLP unit test

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

 



On 13.01.20 16:24, Claudio Imbrenda wrote:
> On Mon, 13 Jan 2020 15:43:28 +0100
> David Hildenbrand <david@xxxxxxxxxx> wrote:
> 
>> On 13.01.20 15:05, Claudio Imbrenda wrote:
>>> On Mon, 13 Jan 2020 14:10:10 +0100
>>> David Hildenbrand <david@xxxxxxxxxx> wrote:
>>>
>>> [...]
>>>   
>>>> :) I'm confused by the fact that you "expect_pgm_int()" but
>>>> actually don't expect one ...
>>>>
>>>> Please enlighten me why this isn't
>>>>
>>>> +	sclp_mark_busy();
>>>> +	h->length = 8;
>>>> +	sclp_setup_int();
>>>> +
>>>> +	asm volatile(
>>>> +		"       .insn   rre,0xb2204200,%1,%2\n"  /* servc
>>>> %1,%2 */
>>>> +		"       ipm     %0\n"
>>>> +		"       srl     %0,28"
>>>> +		: "=&d" (cc) : "d" (valid_code), "a"
>>>> (__pa(pagebuf))
>>>> +		: "cc", "memory");
>>>> +	if (!cc)
>>>> +		sclp_wait_busy();
>>>> +	report(cc == 0, "Instruction format ignored bits");
>>>>
>>>> I feel like I am missing something important.  
>>>
>>> because if we take an unexpected pgm interrupt:
>>> * the interrupt handler will write stuff on the console using SCLP
>>> * it will wait for the busy flag to be cleared before doing so
>>> * thus it will hang.
>>>
>>> this would be solved by adding special logic to the pgm interrupt
>>> handler (as we have discussed in your previous email)
>>>   
>>
>> I see, so the issue should hold for all SCLP checks where we don't
>> expect an exception ... hmmm
>  
> which is why my wrapper in the unit test is so complicated :)
> 

so .... if we would implement my suggestion (if we get an exception on a
servc instruction, clear sclp_busy) that code would get simplified as
well? :)

It would be really beneficial if we could rely on

expect_pgm_int()
...
check_pgm_int_code(whatever)

if we *expect an interrupt and none of that if we don't. So if it's a
matter of clearing sclp_busy on PGM exceptions, that shouldn't be too
hard ... but maybe I am missing something (haven't looked again at the
whole patch ...).

-- 
Thanks,

David / dhildenb





[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