Message ID | 20231027182217.3615211-31-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 7A7FAC25B48 for <linux-mm@archiver.kernel.org>; Fri, 27 Oct 2023 18:23:44 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 0CC2480025; Fri, 27 Oct 2023 14:23:28 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 0533280018; Fri, 27 Oct 2023 14:23:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id D4B3080025; Fri, 27 Oct 2023 14:23:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id B727580018 for <linux-mm@kvack.org>; Fri, 27 Oct 2023 14:23:27 -0400 (EDT) Received: from smtpin21.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 943B740779 for <linux-mm@kvack.org>; Fri, 27 Oct 2023 18:23:27 +0000 (UTC) X-FDA: 81392064054.21.942A4F8 Received: from mail-yw1-f201.google.com (mail-yw1-f201.google.com [209.85.128.201]) by imf13.hostedemail.com (Postfix) with ESMTP id C99DD2000D for <linux-mm@kvack.org>; Fri, 27 Oct 2023 18:23:25 +0000 (UTC) Authentication-Results: imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=tHB79qhs; spf=pass (imf13.hostedemail.com: domain of 3HAA8ZQYKCD0rdZmibfnnfkd.bnlkhmtw-lljuZbj.nqf@flex--seanjc.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3HAA8ZQYKCD0rdZmibfnnfkd.bnlkhmtw-lljuZbj.nqf@flex--seanjc.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1698431005; 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=zYKW06Y9tS7nzBZmp5ooZeVm0pRKPQ996s+RZNHFHDA=; b=18d57D7utMx6vNt1cno2luKo2WebAvzkmkQypqzYf/Cq/Rm4grvQwbWKLA3EdAXeF/6OJH 1tvz5xwC05LeMEC/7fXcup5btZitdv0FdyZVx5U5/nsyavN2QOp+Z2+/nQbCsMnWRSRN2i mP/JgjDS3bkY/OR6WBXDx24v8kBxrsk= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1698431005; a=rsa-sha256; cv=none; b=x4jgEpcGAz2gRw7s3rGK/iOctT8GZno0hs8Z4hTP7d2pdHQ7TdZefUdJn6g3PR1eWMSja8 szVYddcK9MdWVEXzZEjswr51k4+Hg6M+onXN27feefom07VtkJCxe7mGjOX8dieSkSPROZ YQNy7U5UruUGCDjZsbjC3E71Ql1ohwI= ARC-Authentication-Results: i=1; imf13.hostedemail.com; dkim=pass header.d=google.com header.s=20230601 header.b=tHB79qhs; spf=pass (imf13.hostedemail.com: domain of 3HAA8ZQYKCD0rdZmibfnnfkd.bnlkhmtw-lljuZbj.nqf@flex--seanjc.bounces.google.com designates 209.85.128.201 as permitted sender) smtp.mailfrom=3HAA8ZQYKCD0rdZmibfnnfkd.bnlkhmtw-lljuZbj.nqf@flex--seanjc.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com Received: by mail-yw1-f201.google.com with SMTP id 00721157ae682-59b5a586da6so22567597b3.1 for <linux-mm@kvack.org>; Fri, 27 Oct 2023 11:23:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698431005; x=1699035805; 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=zYKW06Y9tS7nzBZmp5ooZeVm0pRKPQ996s+RZNHFHDA=; b=tHB79qhsbnOlFMSSOUSiINdtCh+XGxJajb8oGSNVMkt1NX47WZiX5MWHwDP5L6UMkQ zLui5oG5kvadnjwylug5pcrZuHJxEfC47Bs8ZWtyC/JCkIW0LMYfgDL2jy2u5EH8B6DV MN1UhWKVisdLPtIQT8TXhbNxOJ243cizsVc6g6ipu1BN0VUYCyKM1EYgdwJiDnVzNPXu xSdsXqoX0MqQvVLN4oeD+5We7FRcRFx9FeUzJvJJ5kWTTsyUxr/Vji+xKFv8es6cnvo1 AtPIB+tq6A/9/X2FxuuqXHbYVdnSfEgP2bVvXxWj+ptKcWmfvuq18TgEWJ3rgw3YNjcw F9Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698431005; x=1699035805; 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=zYKW06Y9tS7nzBZmp5ooZeVm0pRKPQ996s+RZNHFHDA=; b=vBTbu4mlIXs+6jFzTd7XbCo2Qi4eKSqxWyOYzuetB58UYML1NgCnphLxuecFhX2wRY DDcywJxbF6Pj0ABR7c3uqYGwUommfzOWEBQzxZ2nyrPxd8NGkleIGp65IIGPcHh9HoNd pbltwnLqqKuBUmE+oq45A5DR3Xn1y11H5muw03fN4kEHbsQHZnAbnvTcBiq5kCjtOHgR 0tMpI3k6tlUtN3ld6pVONyFflAku0tDyD8qf/eMzBBMBrdNzW98Gj7F4zAZHhbcvzsGp prEXTrsU41JefRMlOjOaBnpmyCgM24sBkvP9SzaImXxmJZwv/uf6I2smoHeAeTeZnJ8y dJZw== X-Gm-Message-State: AOJu0YxR8nFWm59+CxAlVwfe4FCVLOY1NS8LqHztr/1sssEtityw1EsD 98oBcl8fYMd2VhUnszapZYsKGRPsIo8= X-Google-Smtp-Source: AGHT+IErWdjWWNGtxZOL2jGOuLZz5+Zkhfhc0XQVVHxJSZZLCXWd4MbZY0rGLoG0iR2uIHcgyGOCoD0Mx1Q= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a0d:ca0f:0:b0:59b:e663:23b0 with SMTP id m15-20020a0dca0f000000b0059be66323b0mr102891ywd.4.1698431004987; Fri, 27 Oct 2023 11:23:24 -0700 (PDT) Reply-To: Sean Christopherson <seanjc@google.com> Date: Fri, 27 Oct 2023 11:22:12 -0700 In-Reply-To: <20231027182217.3615211-1-seanjc@google.com> Mime-Version: 1.0 References: <20231027182217.3615211-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog Message-ID: <20231027182217.3615211-31-seanjc@google.com> Subject: [PATCH v13 30/35] 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>, Alexander Viro <viro@zeniv.linux.org.uk>, Christian Brauner <brauner@kernel.org>, "Matthew Wilcox (Oracle)" <willy@infradead.org>, Andrew Morton <akpm@linux-foundation.org> 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-kernel@vger.kernel.org, Xiaoyao Li <xiaoyao.li@intel.com>, Xu Yilun <yilun.xu@intel.com>, Chao Peng <chao.p.peng@linux.intel.com>, Fuad Tabba <tabba@google.com>, Jarkko Sakkinen <jarkko@kernel.org>, Anish Moorthy <amoorthy@google.com>, David Matlack <dmatlack@google.com>, Yu Zhang <yu.c.zhang@linux.intel.com>, Isaku Yamahata <isaku.yamahata@intel.com>, " =?utf-8?q?Micka=C3=ABl_Sala?= =?utf-8?q?=C3=BCn?= " <mic@digikod.net>, 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-Rspamd-Queue-Id: C99DD2000D X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: bzresrrn31weeuzoxz56c8kse8489qfh X-HE-Tag: 1698431005-989966 X-HE-Meta: U2FsdGVkX1/Ov2L935bGzrNk/SbnFVaVl5Mq4DEDQisqA70EWqYmjFe7ORxEdHGGfSkw2fEu7Yev5AEUQMva8rMpbGuhS68CKU14HaU4TyIwZWhXA+U+cNIefCE6wo+77YEI7Dw9P36bculihDG/A1ZhRD+DLrnOsnp3S6YMgzQbdEHaurNAZQtydHOUyO0V+DncnwN/ZP2kSGTXcdHmyoWHh5LdTzp9689m3WgNBRN2orvZsjrD7/VjFLs5qdqQ+sBnwDyrTLuJE2mcG2srZu09Vx7AG4bfXW05hybuDVbZ9XoztcoFRLuQAJ7soOognzzH/R4s7ROuVR9mW2q4Sfl1he0z7WLLeW2UvfN40qH4LugxUVg85Dx02CvRd0fm0stKSUtUusc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z2x9O3T01+tFirk9ReOkz7mTIPHKHEcAOlghiZCda0y3OoKdDRg1VedrDFRt/In7cSCbkZXu0mNtoY4BnB1dFOR+w+C2wJ5foPoSx+z3QeOr3OxNXJhITSKHhCwbowoQKYCese6Ys+riAZxoxUN0jSlK3ueS09d1+eN9VL67WnixhSk060y2ydLJN19hzN52MBZYQW2hzixmofnLtUMbMehjgoqgUvqgUWC9s32XqeZGFg2kV0ZRcR+3Y6HIDzJqfs4wuYkCPRsh1gVa4PPrBx8h3dB0Bxs35dEaC+y8nwOUHHX75qPEk5Acfm67hHKCRiWhaNpKOlFOYEuHWIYi56uX0FOxyoDIutAIfFT2VTMAh+IRW X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: <linux-mm.kvack.org> List-Subscribe: <mailto:majordomo@kvack.org> List-Unsubscribe: <mailto:majordomo@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 ce33d306c2cb..0fb472a5a058 100644 --- a/tools/testing/selftests/kvm/include/ucall_common.h +++ b/tools/testing/selftests/kvm/include/ucall_common.h @@ -52,6 +52,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(+)