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

Re: [PATCH for-4.16] tests/resource: set grant version for created domains


  • To: Jan Beulich <jbeulich@xxxxxxxx>
  • From: Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Date: Mon, 15 Nov 2021 12:22:23 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=y8sT/hqH5uQ2QMY2HQrVvWLFYRwoakZIqEMNsZAAOWs=; b=hNmqoa4gmXDY4a9OroSxCiHdBBhzQCgx7oQfAvNIqT6Ck8zEfMhClFlPqG9WSggfykXehlJIKu35BdvBGrb6au6eXLpuxdNkGKLqYSdKad/21y5jqWsSXn9Urdu8oj1fPiKaLVDmjBhiINgIoLD41O3dKBrRo10oCtYfssH4kvjPJ1JXx6to+WWTuG8vCTeYenRxkCGgjfFIbKQu2yR6nvxJdidVqnMFl7o8484bxbopWtTGsbgdrZELiDQiGd/r68MFSqQw/vbaF3EUS7Cm8FIpzR68m28ngLP0A9r6Pp3Ud7ULIPZrfJUmyJALsAan3z2TVYAP5FdjOOI3eJZt5w==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AR4tqLBOcGYng8Tbfu6lFCu8bpy2L/LJYaVDakJgyYhCcWHyX1KWNd7S9SxkqC0o5NrDrLW9E2B/lQ7NXnujggpvGPn7cbqMxeMQSUgiIUs0rtRZzJD628bSB0ImVVZQTaGOyfUK94N/ZJ57kw8GAOAfo/J2aLhaehMQUMA8kgZHMEJmukFGoG7mFtUQpqy5tiWarhWGfARl/6FzgCDF5hePlo7rPQNYmwx+U4c6vw8nJPb8nxXhwT0Dk4fQ+476arPhxIkPyilGSgHg3ybFo5Cw+WZ30vH6NleADyMvT1pxUAfNSPK1u+LIh/xXh1xXNBsB0qmu8+3QslOs+19cPw==
  • Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
  • Cc: Wei Liu <wl@xxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, "Ian Jackson" <iwj@xxxxxxxxxxxxxx>, <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • Delivery-date: Mon, 15 Nov 2021 11:22:43 +0000
  • Ironport-data: A9a23:L0ZhsaIiz1BBTbeNFE+RPJIlxSXFcZb7ZxGr2PjKsXjdYENSgWBTz TYbUGrTOfaKMWSjeosiPY6+8BtQusTQzd82GQBlqX01Q3x08seUXt7xwmUcns+xwm8vaGo9s q3yv/GZdJhcokcxIn5BC5C5xZVG/fjgqoHUVaiUZUideSc+EH140Es6xrZg6mJVqYPR7z2l6 IuaT/L3YDdJ6xYsWo7Dw/vewP/HlK2aVAIw5jTSV9gS1LPtvyB94KYkDbOwNxPFrrx8RYZWc QphIIaRpQs19z91Yj+sfy2SnkciGtY+NiDW4pZatjTLbrGvaUXe345iXMfwZ3u7hB2Mv9Yr5 +x0vKevaisoM/L8iNsNDkNHRnQW0a1uoNcrIFC6uM2XiUbHb2Ht07NlC0Re0Y8wo7gtRzsUr LpBdW5LPkvra+GemdpXTsF2gcsuNo/zNZ43sXB81zDJS/0hRPgvRo2XuoQEgW9h26iiG97zJ MUcRD5idi6abkZyJXdPCMIEh8SB0yyXnzpw9wvO+PtfD3Lo5A1u0pD9PdzNYNuISM5J2EGCq Qru72n/Rx0XKtGb4T6E6W63wP/CmzvhX4AfH6H+8eRl6HWRzGEODBwdVXOgvOK0zEW5Xrp3N Eg86ico668o+ySWosLVBkPi5iTe51hFBoQWQ7ZSBByxJrT85iafXEc9dzd6d/8KtcJ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S+Z2njBLz9I+rDum8rE9ISurQYfcegpUdAa0+4QMHfrLqQcfng+OXNWLu v62iIRzADQB0j/I/7LS0UtbqzmnZnmhZjmaRkJC1oO7xSPtyqh7PrfHwKD1hkTfjtTyfN6mF K13DDR1+GGibWW2xXc32jc49B/n8bg8MJKAIiphtIOIjvhpw60bMBKWqGEvhoyvOazgWxa3O XkklMFBYBe+nnRdma6rV/E3BTh6i8n7zvYxVqRkRLY0ITEbQN/L/AEqZNScxPf5UZllsp7yr h302WQsIcSJQ/cnQzmjuK4Fy1Cpw6Rmz4PgOQTh3tQXc81c7lKt7ES+0tTDdMpAD/60oY6C+ NjZfuspcq+SWnqLUwxg1MfheBFBh8Ib1O7qwk5y4KoOgFt7TNEJxBy/r1Zop8CnKhNAqWsqd 60dJiAr4s+O/P+W5gNctvpcfHHeFAlfii8RF56AW6XX53vaEi94aIe3t0OlZaXkdozvcIPpK g=
  • Ironport-sdr: l3Ke40FS7P+ZzbJm66sDlvXhSxvgZxw6VT0CNqzrwwkLWYANsK6tPyYrN0vj88Atusza7i0WzK FLVVGaFJgWFwwBc7V2Q7pS/iLCi23NAv5LUZm/q9E+EnmDBuhlk/19K4aIUygnZI/raboeR+l/ KcNJtREvOX2r2EbwblVX0qm7ulhRj9ZdBoYDEvGzB/ZxSuU/n7iBkRl2ce2u8MWDZKH+oM+hc9 Vakika193RvK/baSgKLjnKO2aAeNIaBlFLliPpP9lH8juckxZDyl3Of3WkijF6Ax2mmDXJQwkC 817kor3XtocfSHzLaWzSi7KD
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

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@xxxxxxxxxx>
> > Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> 
> Technically
> Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> 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.



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.