All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roger Pau Monne <roger.pau@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: Roger Pau Monne <roger.pau@citrix.com>, Wei Liu <wl@xen.org>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <jbeulich@suse.com>, Ian Jackson <iwj@xenproject.org>
Subject: [PATCH for-4.16 3/4] test/tsx: set grant version for created domains
Date: Mon, 15 Nov 2021 13:17:40 +0100	[thread overview]
Message-ID: <20211115121741.3719-4-roger.pau@citrix.com> (raw)
In-Reply-To: <20211115121741.3719-1-roger.pau@citrix.com>

Set the grant table version for the created domains to use version 1,
as such tests domains don't require the usage of the grant table at
all. A TODO note is added to switch those dummy domains to not have a
grant table at all when possible. 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>
Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Ian Jackson <iwj@xenproject.org>

This patch only modifies a test, so it should be safe to commit as
it's not going to cause any changes to the hypervisor or the tools.
Worse that could happen is it makes the test even more broken, but
it's already unusable.
---
 tools/tests/tsx/test-tsx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/tools/tests/tsx/test-tsx.c b/tools/tests/tsx/test-tsx.c
index fab99c135e..f1dcff4c30 100644
--- a/tools/tests/tsx/test-tsx.c
+++ b/tools/tests/tsx/test-tsx.c
@@ -444,6 +444,8 @@ static void test_guests(void)
         struct xen_domctl_createdomain c = {
             .max_vcpus = 1,
             .max_grant_frames = 1,
+            /* TODO: switch to 0 once support for no grant table is added. */
+            .grant_opts = XEN_DOMCTL_GRANT_version(1),
         };
 
         printf("Testing PV guest\n");
@@ -456,6 +458,8 @@ static void test_guests(void)
             .flags = XEN_DOMCTL_CDF_hvm,
             .max_vcpus = 1,
             .max_grant_frames = 1,
+            /* TODO: switch to 0 once support for no grant table is added. */
+            .grant_opts = XEN_DOMCTL_GRANT_version(1),
             .arch = {
                 .emulation_flags = XEN_X86_EMU_LAPIC,
             },
-- 
2.33.0



  parent reply	other threads:[~2021-11-15 12:18 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 12:17 [PATCH for-4.16 0/4] gnttab: fallout/improvements from max version Roger Pau Monne
2021-11-15 12:17 ` [PATCH for-4.16 1/4] domctl: introduce a macro to set the grant table " Roger Pau Monne
2021-11-15 12:20   ` Jan Beulich
2021-11-15 12:26   ` Andrew Cooper
2021-11-15 13:23   ` Bertrand Marquis
2021-11-15 13:58   ` Julien Grall
2021-11-16 17:14     ` Ian Jackson
2021-11-15 12:17 ` [PATCH for-4.16 2/4] tests/resource: set grant version for created domains Roger Pau Monne
2021-11-15 12:21   ` Jan Beulich
2021-11-15 12:27   ` Andrew Cooper
2021-11-15 12:17 ` Roger Pau Monne [this message]
2021-11-15 12:21   ` [PATCH for-4.16 3/4] test/tsx: " Jan Beulich
2021-11-15 12:43   ` Andrew Cooper
2021-11-15 13:58     ` Roger Pau Monné
2021-11-15 14:01       ` Andrew Cooper
2021-11-16 17:15   ` Ian Jackson
2021-11-15 12:17 ` [PATCH for-4.16 4/4] tools/python: fix python libxc bindings to pass a max grant version Roger Pau Monne
2021-11-15 12:44   ` Andrew Cooper
2021-11-17 11:16     ` Ian Jackson
2021-11-16 17:12   ` Ian Jackson
2021-11-17 11:39   ` Marek Marczykowski-Górecki
2021-11-17  7:18 ` [PATCH for-4.16 0/4] gnttab: fallout/improvements from max version 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=20211115121741.3719-4-roger.pau@citrix.com \
    --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.