From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <jbeulich@suse.com>
Cc: Wei Liu <wl@xen.org>, Andrew Cooper <andrew.cooper3@citrix.com>,
"Ian Jackson" <iwj@xenproject.org>,
<xen-devel@lists.xenproject.org>
Subject: Re: [PATCH for-4.16] tests/resource: set grant version for created domains
Date: Mon, 15 Nov 2021 12:22:23 +0100 [thread overview]
Message-ID: <YZJC706fOJQPxvG2@Air-de-Roger> (raw)
In-Reply-To: <ec9b71ee-c687-3556-a999-941886610329@suse.com>
On Mon, Nov 15, 2021 at 12:02:53PM +0100, Jan Beulich wrote:
> On 15.11.2021 11:51, Roger Pau Monne wrote:
> > Set the grant table version for the created domains to use version 1,
> > as that's the used by the test cases. Without setting the grant
> > version the domains for the tests cannot be created.
> >
> > Fixes: 7379f9e10a ('gnttab: allow setting max version per-domain')
> > Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
> > Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
>
> Technically
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>
> However, two remarks:
>
> > --- a/tools/tests/resource/test-resource.c
> > +++ b/tools/tests/resource/test-resource.c
> > @@ -120,6 +120,7 @@ static void test_domain_configurations(void)
> > .create = {
> > .max_vcpus = 2,
> > .max_grant_frames = 40,
> > + .grant_opts = 1,
> > },
> > },
> > {
> > @@ -128,6 +129,7 @@ static void test_domain_configurations(void)
> > .flags = XEN_DOMCTL_CDF_hvm,
> > .max_vcpus = 2,
> > .max_grant_frames = 40,
> > + .grant_opts = 1,
> > .arch = {
> > .emulation_flags = XEN_X86_EMU_LAPIC,
> > },
> > @@ -140,6 +142,7 @@ static void test_domain_configurations(void)
> > .flags = XEN_DOMCTL_CDF_hvm | XEN_DOMCTL_CDF_hap,
> > .max_vcpus = 2,
> > .max_grant_frames = 40,
> > + .grant_opts = 1,
> > },
> > },
> > #endif
>
> The literal 1-s here are really odd to read already now. It would get
> worse if some flags were specified later on and then used here, ending
> in e.g.
>
> .grant_opts = XEN_DOMCTL_CDG_feature | 1,
>
> Imo there really ought to be a wrapper macro, such that use sites
> will at the same time have documented what this 1 is about:
>
> .grant_opts = XEN_DOMCTL_CDG_version(1),
OK. I better add one now before we start gaining more of those.
>
> And then I guess tools/tests/tsx/test-tsx.c needs similar adjustment.
Yes, and the python bindings will also need an adjustment.
Thanks, Roger.
next prev parent reply other threads:[~2021-11-15 11:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-15 10:51 [PATCH for-4.16] tests/resource: set grant version for created domains Roger Pau Monne
2021-11-15 11:02 ` Jan Beulich
2021-11-15 11:22 ` Roger Pau Monné [this message]
2021-11-16 14:40 ` Ian Jackson
2021-11-16 16:32 ` Jan Beulich
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YZJC706fOJQPxvG2@Air-de-Roger \
--to=roger.pau@citrix.com \
--cc=andrew.cooper3@citrix.com \
--cc=iwj@xenproject.org \
--cc=jbeulich@suse.com \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.