Message ID | 20230914015531.1419405-29-seanjc@google.com (mailing list archive) |
---|---|
State | New |
Headers | show
Return-Path: <owner-linux-mm@kvack.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id C8237EE0203 for <linux-mm@archiver.kernel.org>; Thu, 14 Sep 2023 01:56:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 46EC28D000B; Wed, 13 Sep 2023 21:56:35 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 41D068D0001; Wed, 13 Sep 2023 21:56:35 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2A0DA8D000B; Wed, 13 Sep 2023 21:56:35 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 144DA8D0001 for <linux-mm@kvack.org>; Wed, 13 Sep 2023 21:56:35 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id DA6CE1A0F07 for <linux-mm@kvack.org>; Thu, 14 Sep 2023 01:56:34 +0000 (UTC) X-FDA: 81233538708.07.4214C65 Received: from mail-pl1-f201.google.com (mail-pl1-f201.google.com [209.85.214.201]) by imf07.hostedemail.com (Postfix) with ESMTP id 2145640009 for <linux-mm@kvack.org>; Thu, 14 Sep 2023 01:56:32 +0000 (UTC) Authentication-Results: imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=rhgeZWBU; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of 3T2gCZQYKCFgI40D926EE6B4.2ECB8DKN-CCAL02A.EH6@flex--seanjc.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=3T2gCZQYKCFgI40D926EE6B4.2ECB8DKN-CCAL02A.EH6@flex--seanjc.bounces.google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1694656593; a=rsa-sha256; cv=none; b=bmfVuyQI0cZk38265uJXuVsEm8R+Wahb12HBL7AF2C/bll25xM2N8qyuNiTQW5SFL0ANG+ OKO5nhEtJH6QeEKDWa2QdYRCl3eC/lHZWLxKOV1B51+x/fyD5aS829g7DDwl4ZxXHY2EU5 Kw5qPAW9afxB+GF21xBpPcWmK9iPBIw= ARC-Authentication-Results: i=1; imf07.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=rhgeZWBU; dmarc=pass (policy=reject) header.from=google.com; spf=pass (imf07.hostedemail.com: domain of 3T2gCZQYKCFgI40D926EE6B4.2ECB8DKN-CCAL02A.EH6@flex--seanjc.bounces.google.com designates 209.85.214.201 as permitted sender) smtp.mailfrom=3T2gCZQYKCFgI40D926EE6B4.2ECB8DKN-CCAL02A.EH6@flex--seanjc.bounces.google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1694656593; h=from:from:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=Vjv0zC4RrtxbIkJLIAO5e3EhKuQZW28HjcF6ypERxIg=; b=3xUk/k5zOmH3KJG/s8chm+CsIJNWNbmB4pBid0zEeSneleKOryO/BtgeyyX9T+0UYHzsr2 9xHMW2c79WPEX6TrqOZ0FgrY5xWYPwVcbEtIni90awBf1ZPhFcl2T/YIUailaSnKYINETy XFhdFOue9coxrHDTY0KXkIR7ffvpht0= Received: by mail-pl1-f201.google.com with SMTP id d9443c01a7336-1c1fe87fc29so4092685ad.0 for <linux-mm@kvack.org>; Wed, 13 Sep 2023 18:56:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1694656592; x=1695261392; darn=kvack.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=Vjv0zC4RrtxbIkJLIAO5e3EhKuQZW28HjcF6ypERxIg=; b=rhgeZWBUUg0VlFtn1xzNiRVmc/OglmRO5WWEDzX+VE/y6ZMfYYnMgSExoQTXRzXT/4 BBJb2wXVTP6ubx/mRNOrJiVF2/GntwjE6sc8gG0SecDfyhS9hmvCw/bmBy1ZIS93s7kt Qpz5qYhpSscwApesIhD2h5l/nelZxgp+6V74jAgFnlXUFDoUTKzfNiuyZ/81B0yTNBe9 71iLwd2/HYsaVCwhDqWic2MbbK+PmKdc57Ng7JRWZpuGtma5tkaUjUU4L3tlVYwhnUdx Fm3Fe/miZ+lyTh0YI/EeTh2oRD8Vu/Gqr2SMCJjUiz4mUjzOwbBUSh9+5O2ybhHwfq0p N9iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694656592; x=1695261392; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Vjv0zC4RrtxbIkJLIAO5e3EhKuQZW28HjcF6ypERxIg=; b=BTO6CRSGtxFrChO7S7cOVBpZZuHfUvuZ0T2CnzVzgKj88b5jIbk6e4F3N31eJeKmMo d/FyNdbYjiGC7kHJFGtEJQ96Gd5CQ2EtVNLTo1/PSuPDsSCPnpp38AINSU/GCLuhIrIT jjo37OWoiVd6NAA8KU7r9ydAHAE6jG9k60vt5CSLb/g9kzstwfpfloBZZ5CqPP4jG73/ HIDkUFExow300gbisGXj6tHSGUNH+T+5jMqGKTx7c8O54g2hYGVtDrLFLwrMzJVJt8Lb 5J104wqjKNtPfdpB/gppilne4Uh0prPD8GKtx30tTtYnZoC2oum3kqIMx1utXInrvTQ9 zBAA== X-Gm-Message-State: AOJu0YxZ/eG5pyqEThr9Wb4gxwljRcUXOLTOqfyaUo+e/VJCCDplfe35 k48X0GF0PHD3SbmUyQCm0Rtkw1hxEE8= X-Google-Smtp-Source: AGHT+IH29SvaM4IJ2/NXJnaPAeFMS+fjtgLQL7Rq48UqpO83PYLOZng2qV6FMiS0c4sL4jzOiYmTHdNxdV0= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:e551:b0:1c3:a4f2:7c85 with SMTP id n17-20020a170902e55100b001c3a4f27c85mr212223plf.6.1694656591946; Wed, 13 Sep 2023 18:56:31 -0700 (PDT) Reply-To: Sean Christopherson <seanjc@google.com> Date: Wed, 13 Sep 2023 18:55:26 -0700 In-Reply-To: <20230914015531.1419405-1-seanjc@google.com> Mime-Version: 1.0 References: <20230914015531.1419405-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.283.g2d96d420d3-goog Message-ID: <20230914015531.1419405-29-seanjc@google.com> Subject: [RFC PATCH v12 28/33] KVM: selftests: Add GUEST_SYNC[1-6] macros for synchronizing more data From: Sean Christopherson <seanjc@google.com> To: Paolo Bonzini <pbonzini@redhat.com>, Marc Zyngier <maz@kernel.org>, Oliver Upton <oliver.upton@linux.dev>, Huacai Chen <chenhuacai@kernel.org>, Michael Ellerman <mpe@ellerman.id.au>, Anup Patel <anup@brainfault.org>, Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, Sean Christopherson <seanjc@google.com>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Andrew Morton <akpm@linux-foundation.org>, Paul Moore <paul@paul-moore.com>, James Morris <jmorris@namei.org>, "Serge E. Hallyn" <serge@hallyn.com> Cc: kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, Chao Peng <chao.p.peng@linux.intel.com>, Fuad Tabba <tabba@google.com>, Jarkko Sakkinen <jarkko@kernel.org>, Anish Moorthy <amoorthy@google.com>, Yu Zhang <yu.c.zhang@linux.intel.com>, Isaku Yamahata <isaku.yamahata@intel.com>, Xu Yilun <yilun.xu@intel.com>, Vlastimil Babka <vbabka@suse.cz>, Vishal Annapurve <vannapurve@google.com>, Ackerley Tng <ackerleytng@google.com>, Maciej Szmigiero <mail@maciej.szmigiero.name>, David Hildenbrand <david@redhat.com>, Quentin Perret <qperret@google.com>, Michael Roth <michael.roth@amd.com>, Wang <wei.w.wang@intel.com>, Liam Merwick <liam.merwick@oracle.com>, Isaku Yamahata <isaku.yamahata@gmail.com>, "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com> Content-Type: text/plain; charset="UTF-8" X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 2145640009 X-Stat-Signature: t54gygsahq56t8wbd88etdooxpzc183b X-HE-Tag: 1694656592-934804 X-HE-Meta: U2FsdGVkX1+PvfaYKKvIWu0BrKQEBFsho1tt0SV03ukha+0x0LpMZsfuOJtFgYqb4hoGldG1lafqJc/8OgMTrTesxwBXVNkJnacZYRJ3YP7SdFsBqRAyzxbBjmP8dHUQaiP9w2wQ3eDmTFO6bC4u2TqnffOwkiDolw1aqlvxfXIj55egc7BvC4Lbn1DeZPvK9fS8fVJ0GA05o2ub1U3ps9LQdr/LaZWs7nZsRlQlutTTyzEO/NBal5JR4MXg+lFr1couLLD5xOx8URzFjP+tBxpqixjERWyerQFtTlK4XZdWpT0Vnmwg07KabvPSo94vaM9bPsBgcpbDlGoVpSnOTiz2Uz2GzqL9l+3mMdd6kozLO4Xfgs9HvV4yovYyVDtAUBTeb/+vatuYbElnOMn+2zaXCSQussyKr0m4bInhNggZPOEYgHqaaC8X0mePHwA4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zEEpNDXWiYsp+BfVR4GzPV9hKmaxz1kXu48NJXUfKFbC3IojkvGwuGyX45wR4rZjyKat4dSLEcm7835dK8qLOi97JGPLEp645MvIJnSkCmyoPTMkWgNvNTbDD3raZqt70YNwsQvu0BQGViJyvQsE2oL2fpxaO9hRst1AhC8x1qenTix0hzUNPu01/0l1NVi5qjCAuw2ttY2LbAmXlisYMuT8RLjrIK//l5eKEVq/5M8fh5VHRj1DmMWdAZEbKUzQ5xhawZME17whp5bHMsDyezXqtZmBgz2wBp3cK0QFryKURWR X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> |
Series |
KVM: guest_memfd() and per-page attributes
|
expand
|
diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/testing/selftests/kvm/include/ucall_common.h index 112bc1da732a..7cf40aba7add 100644 --- a/tools/testing/selftests/kvm/include/ucall_common.h +++ b/tools/testing/selftests/kvm/include/ucall_common.h @@ -54,6 +54,17 @@ int ucall_nr_pages_required(uint64_t page_size); #define GUEST_SYNC_ARGS(stage, arg1, arg2, arg3, arg4) \ ucall(UCALL_SYNC, 6, "hello", stage, arg1, arg2, arg3, arg4) #define GUEST_SYNC(stage) ucall(UCALL_SYNC, 2, "hello", stage) +#define GUEST_SYNC1(arg0) ucall(UCALL_SYNC, 1, arg0) +#define GUEST_SYNC2(arg0, arg1) ucall(UCALL_SYNC, 2, arg0, arg1) +#define GUEST_SYNC3(arg0, arg1, arg2) \ + ucall(UCALL_SYNC, 3, arg0, arg1, arg2) +#define GUEST_SYNC4(arg0, arg1, arg2, arg3) \ + ucall(UCALL_SYNC, 4, arg0, arg1, arg2, arg3) +#define GUEST_SYNC5(arg0, arg1, arg2, arg3, arg4) \ + ucall(UCALL_SYNC, 5, arg0, arg1, arg2, arg3, arg4) +#define GUEST_SYNC6(arg0, arg1, arg2, arg3, arg4, arg5) \ + ucall(UCALL_SYNC, 6, arg0, arg1, arg2, arg3, arg4, arg5) + #define GUEST_PRINTF(_fmt, _args...) ucall_fmt(UCALL_PRINTF, _fmt, ##_args) #define GUEST_DONE() ucall(UCALL_DONE, 0)
Add GUEST_SYNC[1-6]() so that tests can pass the maximum amount of information supported via ucall(), without needing to resort to shared memory. Signed-off-by: Sean Christopherson <seanjc@google.com> --- tools/testing/selftests/kvm/include/ucall_common.h | 11 +++++++++++ 1 file changed, 11 insertions(+)