Re: [kvm-unit-tests PATCH v7 3/4] s390x: lib: add SPX and STPX instruction wrapper

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

 



On Mon, 13 Jan 2020 10:42:01 +0100
Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:

> On 1/10/20 7:40 PM, Claudio Imbrenda wrote:
> > Add a wrapper for the SET PREFIX and STORE PREFIX instructions, and
> > use it instead of using inline assembly.
> > 
> > Signed-off-by: Claudio Imbrenda <imbrenda@xxxxxxxxxxxxx>
> > Reviewed-by: Thomas Huth <thuth@xxxxxxxxxx>  
> 
> Reviewed-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
> 
> > @@ -63,14 +60,10 @@ static void test_spx(void)
> >  	 * some facility bits there ... at least some of them
> > should be
> >  	 * set in our buffer afterwards.
> >  	 */
> > -	asm volatile (
> > -		" stpx	%0\n"
> > -		" spx	%1\n"
> > -		" stfl	0\n"
> > -		" spx	%0\n"
> > -		: "+Q"(old_prefix)
> > -		: "Q"(new_prefix)
> > -		: "memory");
> > +	old_prefix = get_prefix();
> > +	set_prefix(new_prefix);
> > +	asm volatile("	stfl 0" : : : "memory");  
> 
> Couldn't we also use stfl from facility.h here?
> And do we need to add a memory clobber to it?

will do both

> > +	set_prefix(old_prefix);
> >  	report(pagebuf[GEN_LC_STFL] != 0, "stfl to new prefix");
> >  
> >  	expect_pgm_int();
> >   
> 
> 




[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