Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp2060240rdf; Mon, 6 Nov 2023 03:46:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IEdl0KotOfkQ+E/YSkg9uX4oXF6V8wr/rGfU/77ICTu4vcJclZDC3TYycKLOAaGy+nftNvW X-Received: by 2002:aa7:845b:0:b0:68f:cbd3:5b01 with SMTP id r27-20020aa7845b000000b0068fcbd35b01mr13887004pfn.13.1699271165620; Mon, 06 Nov 2023 03:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1699271165; cv=none; d=google.com; s=arc-20160816; b=DjUJxcO7mBPaoUnrcUvy2FKMAn85Q/F34ewpM5Rv2VK8Fo0SNSMXAMJgMMmLNGFfPD Iel/sOXjhWlYwFnhmgPd77Ac8d3YAGLothlZExp2JNnw+HwmC68wEoKDyvSwZjADSTd9 8pEONz1GMVBWjDNuuvKoUI+SdygIEX4BzhdGQiJKcT9QObSJ01qS6L2K7qTrgr0NYkce PJuJ1M8sfZltZ/K2w+0sDuil3shasOiw+BegzNYVzaci1TeMejGi6YI5D1LdVg0HuKSU Un1oCI3T+7/8fLdUvy3bFA4YS9UWfH5tQjlpklRLf+aMiHWXTa0OpaBYOFD2yaurPPVu ogEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=A3+w7KiTzzQhCpJeg/0ek2R61CW1ssLM/7mTLxlOjqg=; fh=6NDLbPegWN39ihzRI+XD38qv7OUBTPlYZUUvtWMZU2Q=; b=A9OBnFTcfclcQ92iaNEk2ol3VkZiinhRMOnsj04duC1V+ETJ8sE/aI8mPyEB1vuh6V wc61PypRaO/Y6QyzfHpNONg5kKnpK0j/2WgkjqKRLfZs5R0MPr5uNU0F1fUD2AfsBvdZ KtMA84Zf97IqdqB3SBp6HhYwgH2ZXjwCc7MKb5H79iLqFNMMYWbl4y15/hiagXNK7144 9waavUE4bKS4KhHDpEVAFGnWYcPg5WejvKAgQREIIgQoBSGR8WLUKbKXRDSQHN7yZGe4 FZCa0HSjVlH1RbiCtvqItdPTdSoTf8x27yAQwK+33b+dJCPgr4BPxsWbmFuPZhvFwIHc hcwg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4IwvNUR5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id r38-20020a634426000000b005ac50a019b2si7649606pga.766.2023.11.06.03.46.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Nov 2023 03:46:05 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4IwvNUR5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 39F5A805B9F8; Mon, 6 Nov 2023 03:45:42 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231461AbjKFLp3 (ORCPT + 99 others); Mon, 6 Nov 2023 06:45:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229799AbjKFLp1 (ORCPT ); Mon, 6 Nov 2023 06:45:27 -0500 Received: from mail-qv1-xf29.google.com (mail-qv1-xf29.google.com [IPv6:2607:f8b0:4864:20::f29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56638EA for ; Mon, 6 Nov 2023 03:45:24 -0800 (PST) Received: by mail-qv1-xf29.google.com with SMTP id 6a1803df08f44-66d0760cd20so36241226d6.0 for ; Mon, 06 Nov 2023 03:45:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1699271123; x=1699875923; darn=vger.kernel.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=A3+w7KiTzzQhCpJeg/0ek2R61CW1ssLM/7mTLxlOjqg=; b=4IwvNUR5qOPvn1KUD3+tl3uxvbjObIJMmG7O40nSKxNFcgMPoKK4MylCFywjpLnL6D CmFllknfWqjSUUI24y0/vVnrW23F0TciCzyTQ6EC74Sy2kgi8ZRg9ith8W2cAvMT/VtC DGwrVxqW2FT8pumfrCbLfJha50h5gSVuv+3ndrtxkKKSOv4H22ypNPsA8Fvr+bDMD6VA VrjsakR+SrzRRDUh/Tx/3hHz1viVqHAL4eNfrgVC3N1vAJ4bAYh+u95Cy6FOpuniWoP1 9npXtgTaqaYJiaM8m4XVOZAS6IE6y2tLReV89otrKduKzHF8ThDRw+tUJhXsxM1+kQqh k0ZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699271123; x=1699875923; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A3+w7KiTzzQhCpJeg/0ek2R61CW1ssLM/7mTLxlOjqg=; b=UEHUQg/fyCs9Ww0PNF/ceCpSbw66T0xnSI4EaiEdABGdJo8GruZ7KVBslJeMME8vvg MShagWCA725nmmYYNuevpB8zsZu7LVaS/ZpVOgt+Mc58gQjKZX0zD1nUTYLUnSJDGyK6 ylZIQwrh1JZ/aPref3ScEtgCkNdO18cBcudYB5DksA7Dz0/JdzHXiFH7MGlaGXlALaOt Mtum2/955XhL1XbJVQnzwiLcTxfWi2jA8jzDja8kXHews2mhOhIGg1/79mMcQc0XC7EZ zAXW9iSU/JkChNLsIWjQsr99ZQVWum3QWrqKEgXmNzF2nauokGM6rSE7DXY2oRMEFimZ umAQ== X-Gm-Message-State: AOJu0YyYeVZnbbA0RwBZ6/MluoldUSo3GUkFKII4HB57/SL8hXaTGUna N+HAYlQG0hVHPFgrnavAexc67mkoNbHsKeisAt9hqQ== X-Received: by 2002:a05:6214:252f:b0:66d:13c2:1c31 with SMTP id gg15-20020a056214252f00b0066d13c21c31mr13196146qvb.24.1699271123298; Mon, 06 Nov 2023 03:45:23 -0800 (PST) MIME-Version: 1.0 References: <20231105163040.14904-1-pbonzini@redhat.com> <20231105163040.14904-29-pbonzini@redhat.com> In-Reply-To: <20231105163040.14904-29-pbonzini@redhat.com> From: Fuad Tabba Date: Mon, 6 Nov 2023 11:44:47 +0000 Message-ID: Subject: Re: [PATCH 28/34] KVM: selftests: Add GUEST_SYNC[1-6] macros for synchronizing more data To: Paolo Bonzini Cc: Marc Zyngier , Oliver Upton , Huacai Chen , Michael Ellerman , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Sean Christopherson , Alexander Viro , Christian Brauner , "Matthew Wilcox (Oracle)" , Andrew Morton , 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 , Xu Yilun , Chao Peng , Jarkko Sakkinen , Anish Moorthy , David Matlack , Yu Zhang , Isaku Yamahata , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , Vlastimil Babka , Vishal Annapurve , Ackerley Tng , Maciej Szmigiero , David Hildenbrand , Quentin Perret , Michael Roth , Wang , Liam Merwick , Isaku Yamahata , "Kirill A. Shutemov" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-8.4 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE, USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Mon, 06 Nov 2023 03:45:42 -0800 (PST) On Sun, Nov 5, 2023 at 4:34=E2=80=AFPM Paolo Bonzini = wrote: > > From: Sean Christopherson > > 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 > Message-Id: <20231027182217.3615211-31-seanjc@google.com> > Signed-off-by: Paolo Bonzini > --- Reviewed-by: Fuad Tabba Tested-by: Fuad Tabba Cheers, /fuad > tools/testing/selftests/kvm/include/ucall_common.h | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/tools/testing/selftests/kvm/include/ucall_common.h b/tools/t= esting/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, ar= g3) > +#define GUEST_SYNC5(arg0, arg1, arg2, arg3, arg4) \ > + ucall(UCALL_SYNC, 5, arg0, arg1, arg2, ar= g3, arg4) > +#define GUEST_SYNC6(arg0, arg1, arg2, arg3, arg4, arg5) \ > + ucall(UCALL_SYNC, 6, arg0, arg1, arg2, ar= g3, arg4, arg5) > + > #define GUEST_PRINTF(_fmt, _args...) ucall_fmt(UCALL_PRINTF, _fmt, ##_ar= gs) > #define GUEST_DONE() ucall(UCALL_DONE, 0) > > -- > 2.39.1 > >