Message ID | 20230718234512.1690985-25-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 DEB2AEB64DC for <linux-mm@archiver.kernel.org>; Tue, 18 Jul 2023 23:49:35 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 51DFA280017; Tue, 18 Jul 2023 19:49:21 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 4CE658D0012; Tue, 18 Jul 2023 19:49:21 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 36E3C280017; Tue, 18 Jul 2023 19:49:21 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 1EE7F8D0012 for <linux-mm@kvack.org>; Tue, 18 Jul 2023 19:49:21 -0400 (EDT) Received: from smtpin25.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id F127CB0DFC for <linux-mm@kvack.org>; Tue, 18 Jul 2023 23:49:20 +0000 (UTC) X-FDA: 81026376480.25.BF3FAB0 Received: from mail-pl1-f202.google.com (mail-pl1-f202.google.com [209.85.214.202]) by imf06.hostedemail.com (Postfix) with ESMTP id EAF0A180011 for <linux-mm@kvack.org>; Tue, 18 Jul 2023 23:49:18 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=m1E5CQsR; spf=pass (imf06.hostedemail.com: domain of 3_SS3ZAYKCFAAws51uy66y3w.u64305CF-442Dsu2.69y@flex--seanjc.bounces.google.com designates 209.85.214.202 as permitted sender) smtp.mailfrom=3_SS3ZAYKCFAAws51uy66y3w.u64305CF-442Dsu2.69y@flex--seanjc.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689724159; a=rsa-sha256; cv=none; b=z94rOK+5EQWgj/sx6zaNmmvMYc6M0by1I1DSf74ZGcFolt/GkSw1nmQEG9JPuK/pjg8wop yOPBjesVLbTQjnNPzqV3k+tLjdMXEXEyfFLEn2fcV2DxuNczteFkgI2yjCoUplEWBt2cLN Fp9ddJCiRiMI+gq0UczAn89WUAp7aWU= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=pass header.d=google.com header.s=20221208 header.b=m1E5CQsR; spf=pass (imf06.hostedemail.com: domain of 3_SS3ZAYKCFAAws51uy66y3w.u64305CF-442Dsu2.69y@flex--seanjc.bounces.google.com designates 209.85.214.202 as permitted sender) smtp.mailfrom=3_SS3ZAYKCFAAws51uy66y3w.u64305CF-442Dsu2.69y@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=1689724159; 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=AUBNLiIlxTx1F6mRQya+iPZZUvsAoMeHoSeivXTBAJs=; b=TB93ZvBbtS0OFjX7DUGoOBTu9HP6Q43mqA3Cd5C8g0UTUg019NxsVHfMilbGVcgpR6GKj3 VlY0w+eLDNHDMXq4kXTAHVw6BO5Swo7NhurYbfAghZL6P6jhdLY069tdmuZODb7QgxFQxm Ub04bBBertg0wOdQGf0a2t8IqKyqqdc= Received: by mail-pl1-f202.google.com with SMTP id d9443c01a7336-1b9de7951easo32357675ad.0 for <linux-mm@kvack.org>; Tue, 18 Jul 2023 16:49:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20221208; t=1689724158; x=1692316158; 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=AUBNLiIlxTx1F6mRQya+iPZZUvsAoMeHoSeivXTBAJs=; b=m1E5CQsRhxPohHIaVjXNzAfw9sKja8GxErI8tb88+m9ohtM/2UTUV4KI0EStxpO4aq e3MZZP48Hes3EH+ziFJ16ESLBaMphjB9wBUbLKvQFLpYn2bcEMb9Uv2TfKXvMSlsG4ax +5bc2E2M24iRgByLib+vhoObgGZN9pfMuLHGBIbrmouSiZYtP7I+o1+DUjs0jJquORQM WZA9ZhPgQfZ0ViRdW+5zM3kLeIAxBI958QaGMn+cpDeKcYSO3MEZRWesl52iNilZN/Ay f7w1zt9jHHbnKZaxjQB9PYpmQD1oIBOzEUWtcHD4Ui+04jNinOeJzuhQDL4PbgsMw1sC a+1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689724158; x=1692316158; 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=AUBNLiIlxTx1F6mRQya+iPZZUvsAoMeHoSeivXTBAJs=; b=a77TBqAe5iUSY+I5qGYz73plV6XfqUg5SHMyo4oXYLY5Dn6a0b8LPsfO6AyEGcAU5j TDehEz3eBAGx44R2JzfyAdso3S1E0PeGe/CBSOmAlq3uvwiviytN4pJJMghIz1PLLPOp CUwKJmWL3VorzeLjGLHoauy4Qpx3N4p1ZKr1lcbD8ZswMmTz+DmIDY01NqzBGmdlC2FW EQVGrr2B64JT+/mW7Orqxit/AHb5DY/4khN1UDGfPY0OR0JP5qPfi+xgVQXvjkgu4cv8 amNrqVbqPTABO6UUticP6nCnLH/ObxLYD6Y1vRTNQjR8kNAObsN5Sbo83RIDjIwSTfpZ dzbA== X-Gm-Message-State: ABy/qLZT6jPi7wNyAIwr1UX3xSk7NBGL1ZNK8P3++eZkqsL/2NweYE7u Fq8JRO3y3/RU98eiAZkT254pCYseChA= X-Google-Smtp-Source: APBJJlGZj18kUtv2DZbfIQmZu2TXCF9UTMkYGVm3bO/BF1sxl/m3e0941s7v3QsOSVZsOvdKY/T33+qfBEc= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:902:d4c6:b0:1b1:7336:2637 with SMTP id o6-20020a170902d4c600b001b173362637mr16836plg.11.1689724157723; Tue, 18 Jul 2023 16:49:17 -0700 (PDT) Reply-To: Sean Christopherson <seanjc@google.com> Date: Tue, 18 Jul 2023 16:45:07 -0700 In-Reply-To: <20230718234512.1690985-1-seanjc@google.com> Mime-Version: 1.0 References: <20230718234512.1690985-1-seanjc@google.com> X-Mailer: git-send-email 2.41.0.255.g8b1d071c50-goog Message-ID: <20230718234512.1690985-25-seanjc@google.com> Subject: [RFC PATCH v11 24/29] 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>, Yu Zhang <yu.c.zhang@linux.intel.com>, Vishal Annapurve <vannapurve@google.com>, Ackerley Tng <ackerleytng@google.com>, Maciej Szmigiero <mail@maciej.szmigiero.name>, Vlastimil Babka <vbabka@suse.cz>, 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-Server: rspam08 X-Rspamd-Queue-Id: EAF0A180011 X-Stat-Signature: sohypofjsktr1dshzjrcjumxrt98g7rb X-Rspam-User: X-HE-Tag: 1689724158-680300 X-HE-Meta: U2FsdGVkX1/4hY5sZtQZLD87Qul8KViCDUOr/lzOQ0XW0UFFZdaaNp90uPkgSbfN02z4PzP/3Lj8morsvKRmi3Dii/RWapcikamM+0541tKtIz/HHWvtOQFDGmqa8XDElOeZ4HPu2KsXOypp57Os0c8kJaydhDo3YSB34LQ3Ix7q+ltkNidN2nPZ2cywwOCpZIi3Cw5UDeH7ECZ+KJtD5kZnmACyt+61I4Sb9hTtQ5TRkk31E5002dwCTl22rDoWKW8/PAvkDm6okvve5ZxL/eoRsmM57+SHYBWkZ9YlOYS0VeeCC+f+fuwkLWBjmlnS4z/p3SU6vsnZm0CZHnDvKMl7U+2Ifwd5GcGsfm0zQSPPcEckxNfBrwLHSgVSRPfvBk5b1HjOIhDVF5kfqA+913htPbZcdYab3M7sCWpw8uM+YIPNHthd+aC1mOIdSA2ir9F2L6hYItHrau5BEKLq6nmBreaH/QmfIB3Wwm5FLhUx0FO7M2qgT+I/3D41xXj8n319+lBLmAAyDN7lTUkFFR4JCtrBpJ6RB95grdvI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Rmn1L+LE5CI+sXu1Iwt12gIqZ8Ac25yYwjcYlszUpH7LBT7Khg//b7Xj9DjXCURa1CNMEkIQyMyjAjn+QqVWvGrzqJTrAD+GcsMuehBunUTVdmQvc6XTVNFdHOllCEg020PYO/3DuGHPUbZZPfreljY+Qcr8KrwpcKs6upchkZ8Q+rFHOEN08Dtm/+Hvz6jP45gw== 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 1a6aaef5ccae..8087c877fd58 100644 --- a/tools/testing/selftests/kvm/include/ucall_common.h +++ b/tools/testing/selftests/kvm/include/ucall_common.h @@ -46,6 +46,18 @@ void ucall_init(struct kvm_vm *vm, vm_paddr_t mmio_gpa); #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_DONE() ucall(UCALL_DONE, 0) enum guest_assert_builtin_args {
Signed-off-by: Sean Christopherson <seanjc@google.com> --- tools/testing/selftests/kvm/include/ucall_common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)