Re: [kvm-unit-tests PATCH 2/2] s390x: add test for SIGP STORE_ADTL_STATUS order

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

 



On Mon, 11 Apr 2022 15:23:17 +0200
Nico Boehr <nrb@xxxxxxxxxxxxx> wrote:

> On Wed, 2022-04-06 at 15:31 +0200, Claudio Imbrenda wrote:
> > > diff --git a/s390x/adtl-status.c b/s390x/adtl-status.c
> > > new file mode 100644
> > > index 000000000000..c3ecdbc35a9d
> > >   
> [...]
> > > +static void restart_write_vector(void)
> > > +{
> > > +       uint8_t *vec_reg;
> > > +       /* vlm handles at most 16 registers at a time */
> > > +       uint8_t *vec_reg_16_31 = &expected_vec_contents[16][0];
> > > +       uint64_t cr0, cr0_mask = ~(1ULL << CTL0_VECTOR);  
> > 
> > cr0_mask can be const, and you can use ~BIT_ULL(CTL0_VECTOR)  
> 
> I don't think so, since ng in the inline ASM will store its result
> there.

oops, right

> 
> BIT_ULL is much better, thanks. I tend to forget about that.
> 
> >   
> > > +       int one = 1;  
> > 
> > one can also be const, although I wonder if this can just become an
> > constant in the asm statement  
> 
> Yes, right, thanks. Should work with mvhi.
> 





[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux