Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3821081rwe; Mon, 29 Aug 2022 22:00:49 -0700 (PDT) X-Google-Smtp-Source: AA6agR58OKzcwgg9gpldCrtVPCXTKitZU68qdZIPvNuWvdPaSkUl3kvVqKgplR+Md1yixqT/gF4Y X-Received: by 2002:a63:6909:0:b0:41c:9f4f:a63c with SMTP id e9-20020a636909000000b0041c9f4fa63cmr17297948pgc.76.1661835648782; Mon, 29 Aug 2022 22:00:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661835648; cv=none; d=google.com; s=arc-20160816; b=YVsWfMlbNi8+2IK2YbP46elbpIZx3057lO9TeyBQnKgrX68aNG4lsFPXjZgatLDqNl oLc4iqH4MwSQl/p+pIMStTpk7KU9S3PWhM+4D+R9DdF2u0e3YzY+WMCpwSivIfQ4o7T8 oS0fre3IhfFWllAA62KXO/Bouq8+uzc51/arw9FwNCsNC2Vk46w0EuD4lfyXMaKwEt6m rq493GQzZF1ennAe4CmWaMvC8gEOCLajYM81W/lL5u5oPfYcQL36F5/xvhctwh603O10 mrr0ixDVlZnRUjtOIbdFAIjO2HJEym27iQHFQ0HGhUWtM3jIeNnerk8XbyFWOhgoA3UT 4oow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=tveQCNdrcl8zzZ90FYJSAQp/xoPHwNHO3f5B145IGDY=; b=Tqg3Bc+KLz16OK3jXRZfqO7phxhH1u04vfKGgACbmZZHXym8q5dXkRHDauX0c3JPeY Upp5AIzWUDOqqPLzL/Oy3y27sM9B0/eVjKKig0dlPoWElswYP4pvex6ScQNalNSWhzj9 Sm9UR+THlmpeW0NVC0r3B7Ceg+m0Lx2ft0ZA0YfOKbqDCNfpP3EV6kkvlYDHNdCgzypy mR+BAWuqFhvV9rUPv0pXNUPR65BEmNRRljPlIku2rTU+YE7L9rXfq4r1rce3daU2jLSI R0ccIukXoXBnxpxxhAghmhE9OLwR2yudAy7CRn9Neqe5R9sFeTSKWQ5e3w1GssNkYGJ8 oeOg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jz5ryMUn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bu9-20020a056a00410900b00537da3fad3bsi544345pfb.216.2022.08.29.22.00.37; Mon, 29 Aug 2022 22:00:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=jz5ryMUn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229822AbiH3E1R (ORCPT + 99 others); Tue, 30 Aug 2022 00:27:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229629AbiH3E1N (ORCPT ); Tue, 30 Aug 2022 00:27:13 -0400 Received: from mail-pl1-x62e.google.com (mail-pl1-x62e.google.com [IPv6:2607:f8b0:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7174A9E0F5 for ; Mon, 29 Aug 2022 21:27:09 -0700 (PDT) Received: by mail-pl1-x62e.google.com with SMTP id f24so7201618plr.1 for ; Mon, 29 Aug 2022 21:27:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc; bh=tveQCNdrcl8zzZ90FYJSAQp/xoPHwNHO3f5B145IGDY=; b=jz5ryMUneNPtN7GgAbdob+y42sDrVxRuBlqA3QA9oeD1pieZtFXjP021CLo/r+B8bv MYbJ7ecSXA82j8N0LGSRSWGBEUhc3gl753fZP/eq9G6cgLilZiGUBe9U0WkOOEPuzjZF 1K3HPtO4P5guX5tEHivGDwt+5tsoSrBpSv2YMAohOLencXK9GT5KAEjxZPzgLhtXs8hu gQg912iU7/NlDTQXrg/CEmP/aR5c+40JbNsB0FzAY+4nR+pg565IYviyzm5c/PrLrHLt 42P316IO38WW173exoDa9F/uBYTC0uVc+zDhMVmIYiRyS2CFUFzmi4Iwz9ul83sq02Yi qJsQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc; bh=tveQCNdrcl8zzZ90FYJSAQp/xoPHwNHO3f5B145IGDY=; b=P1otVBKD8HkV8ZXtVPPGLv9Uz9+fiXQGfISbqwQVJW2FVOXq+iHlmPAeBeRESfM0Bg k7cNrnkLAvfPiGhYj8q5V2mRhLs5yMZnp6VGV15LkiBtIdktwhRGlnJDEo1wjQ0OE9mI 7s1nhuS8x1/zEybRE6HVtUfDlnVGUiSUyIavmXMX4wTSFsHbd944mQKf5j4BGc/bxWhf 7e2QEZGMvPAisGMFYfIgUIe1vXYx2vn1ceL+U56v/oF99tHooYs6f6sCkj/YubDhhGq5 y0rfvBbgUVR276VK3LITXf4WYAk4iIwvQzRhip2q4PXW3RideK9n8IDGweKkVOv8oE0X AdIQ== X-Gm-Message-State: ACgBeo3xUm1xhfy4aF/HfLPZZIlic/5X6awaoV9RIPdz3QxPHmFUEh/B ajgJZ/+gmSu/hAyVT8d/Q8c3yg== X-Received: by 2002:a17:902:efca:b0:174:c901:aa8d with SMTP id ja10-20020a170902efca00b00174c901aa8dmr7736459plb.164.1661833628777; Mon, 29 Aug 2022 21:27:08 -0700 (PDT) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id nm21-20020a17090b19d500b001eee8998f2esm7541792pjb.17.2022.08.29.21.27.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 Aug 2022 21:27:08 -0700 (PDT) Date: Tue, 30 Aug 2022 04:27:04 +0000 From: Sean Christopherson To: Andrew Jones Cc: Paolo Bonzini , Marc Zyngier , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Nathan Chancellor , Nick Desaulniers , James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , Tom Rix , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, llvm@lists.linux.dev, linux-kernel@vger.kernel.org, Colton Lewis , Peter Gonda Subject: Re: [PATCH v5 7/7] KVM: selftests: Add ucall pool based implementation Message-ID: References: <20220825232522.3997340-1-seanjc@google.com> <20220825232522.3997340-8-seanjc@google.com> <20220829163627.qbafyl4qz5cxxue5@kamzik> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220829163627.qbafyl4qz5cxxue5@kamzik> X-Spam-Status: No, score=-14.9 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,FSL_HELO_FAKE,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 29, 2022, Andrew Jones wrote: > On Thu, Aug 25, 2022 at 11:25:22PM +0000, Sean Christopherson wrote: > > +static struct ucall *ucall_alloc(void) > > +{ > > + struct ucall *uc; > > + int i; > > + > > + GUEST_ASSERT(ucall_pool && ucall_pool->in_use); > > ucall_pool->in_use will never be null. > > > + > > + for (i = 0; i < KVM_MAX_VCPUS; ++i) { > > + if (!atomic_test_and_set_bit(i, ucall_pool->in_use)) { > > + uc = &ucall_pool->ucalls[i]; > > + memset(uc->args, 0, sizeof(uc->args)); > > + return uc; > > + } > > + } > > nit: blank line Got 'em. Thanks for the reviews, much appreciated!