Re: [kvm-unit-tests PATCH v5 6/6] s390x: add a test for SIE without MSO/MSL

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

 



Quoting Thomas Huth (2023-07-13 10:29:48)
[...]
> > diff --git a/s390x/sie-dat.c b/s390x/sie-dat.c
> > new file mode 100644
> > index 000000000000..b326995dfa85
> > --- /dev/null
> > +++ b/s390x/sie-dat.c
> > @@ -0,0 +1,115 @@
> > +/* SPDX-License-Identifier: GPL-2.0-only */
> > +/*
> > + * Tests SIE with paging.
> > + *
> > + * Copyright 2023 IBM Corp.
> > + *
> > + * Authors:
> > + *    Nico Boehr <nrb@xxxxxxxxxxxxx>
> > + */
> > +#include <libcflat.h>
> > +#include <vmalloc.h>
> > +#include <asm/pgtable.h>
> > +#include <mmu.h>
> > +#include <asm/page.h>
> > +#include <asm/interrupt.h>
> > +#include <alloc_page.h>
> > +#include <sclp.h>
> > +#include <sie.h>
> > +#include <snippet.h>
> > +
> > +static struct vm vm;
> > +static pgd_t *guest_root;
> > +
> > +/* keep in sync with TEST_PAGE_COUNT in s390x/snippets/c/sie-dat.c */
> > +#define GUEST_TEST_PAGE_COUNT 10
> > +
> > +/* keep in sync with TOTAL_PAGE_COUNT in s390x/snippets/c/sie-dat.c */
> > +#define GUEST_TOTAL_PAGE_COUNT 256
> 
> I'd maybe put the defines rather in a header a la s390x/snippets/c/sie-dat.h 
> and include that header here and in the snippet C code.

I'd have to

#include "../s390x/snippets/c/sie-dat.h"

and it feels like I shouldn't be doing this, should I?

Or move the include to lib, but we agreed we don't want test-specific stuff
in the lib.




[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