Re: [PATCH v3 1/3] selftests: kvm: s390: Add uc_map_unmap VM test case

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

 



On Fri Sep 13, 2024 at 6:48 PM CEST, Claudio Imbrenda wrote:
> On Fri, 13 Sep 2024 13:52:46 +0200
> Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx> wrote:
>
> > Add a test case verifying basic running and interaction of ucontrol VMs.
> > Fill the segment and page tables for allocated memory and map memory on
> > first access.
> > 
> > * uc_map_unmap
> >   Store and load data to mapped and unmapped memory and use pic segment
> >   translation handling to map memory on access.
> > 
> > Signed-off-by: Christoph Schlameuss <schlameuss@xxxxxxxxxxxxx>
> > ---
> >  .../selftests/kvm/s390x/ucontrol_test.c       | 145 +++++++++++++++++-
> >  1 file changed, 144 insertions(+), 1 deletion(-)
> > 
> > diff --git a/tools/testing/selftests/kvm/s390x/ucontrol_test.c b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> > index 030c59010fe1..084cea02c2fa 100644
> > --- a/tools/testing/selftests/kvm/s390x/ucontrol_test.c
> > +++ b/tools/testing/selftests/kvm/s390x/ucontrol_test.c
>
> [...]
>
> >base_gpa + self->code_gpa;
> > @@ -222,6 +244,60 @@ TEST(uc_cap_hpage)
> >  	close(kvm_fd);
> >  }
> >  
> > +/* calculate host virtual addr from guest physical addr */
> > +static void *gpa2hva(FIXTURE_DATA(uc_kvm) * self, u64 gpa)
>
> why the space? I would have expected *self
>

That is how checkpatch.pl --strict prefers it.

Output from checkpatch without the space:

CHECK: spaces preferred around that '*' (ctx:WxV)
#19: FILE: tools/testing/selftests/kvm/s390x/ucontrol_test.c:278:
+static void *gpa2hva(FIXTURE_DATA(uc_kvm) *self, u64 gpa)
                                           ^

> > +{
> > +	return (void *)(self->base_hva - self->base_gpa + gpa);
> > +}
> > +
> > +/* map / make additional memory available */
>
> [...]






[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