Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp540719iol; Thu, 9 Jun 2022 08:42:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxgL+Y4CA+HuG+FnKCVFDCqzRdYv4u94FKoxSiu5j6We/sns0ccDFwYybolAv0kluyQ7JZr X-Received: by 2002:a63:3c3:0:b0:3fc:5864:7412 with SMTP id 186-20020a6303c3000000b003fc58647412mr34458363pgd.138.1654789372255; Thu, 09 Jun 2022 08:42:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654789372; cv=none; d=google.com; s=arc-20160816; b=0Ee8J6TlTBJpBI/cQlvv0lCeiK3NcvTXufglaAa0Zu/AEiEr8zoMwPMEKSKJMJs8RX Oog9kbS4Xs5dGEc4HxgGr043wYB6ILQtCKtd1arELbUb3p16rick4YlLsakO5QER1bKN Kyp27nnJDUOcuIXKxaRu1N9L/R1tR6hBvEU2EBXEQXrL78pmbgTFEgGqRyBXv/EGPpJM G5/p3Va+Lx0sZkum4DdnK/gXrZ85OgMceH/dzS3C9PDxGGUeNHtPJ74mCSUTZxUzeVSx SeSYqYSnH39juCmkXZWxg3epAK4kQZFJAJCpaLLwyotnsKkFDuF3/rFwQ32PHQ8SfFyf SewA== 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=wTdq1MpfqeaEs3uTSCeLsZfhQfEFbVtUVDZA72dHYVY=; b=e65JYqHEaLYSlPCtbQrDm5QLb3EhxD2k3LrXyC9kr2Z0sTR7ydoL2UWusfTKHpV+SU YrgLrcbTqbjOid6eyngveIyVR8dKhTTuGEizWmgbDr3tWQ36MYTazV8zYg8Rh/fhK20s l84SzJSdhrVrsGhEgIRm1331yKbrrVH4E2aEg+7ketcmXt/14bdMFPfbsDt8ZgfQxX1i om7xc3ZbEeryv2AanDYSDSV7DXx/6J0aET/NRODbhl3irYKS4AwJ+axgGb2Zd+X8VrmO CLbp9pcNXOIvNX++1eRwZncXO2thakTCObp/ewEu5fufLKqRX9G96YhObBn34HEWvLv7 DDHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b="qBsY/I3/"; 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 u5-20020a170902e5c500b00163a6be1210si35692956plf.228.2022.06.09.08.42.36; Thu, 09 Jun 2022 08:42:52 -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="qBsY/I3/"; 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 S1344234AbiFIPTR (ORCPT + 99 others); Thu, 9 Jun 2022 11:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52068 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344377AbiFIPTF (ORCPT ); Thu, 9 Jun 2022 11:19:05 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BD1B4B1F9 for ; Thu, 9 Jun 2022 08:19:02 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id s14so20484538plk.8 for ; Thu, 09 Jun 2022 08:19:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=wTdq1MpfqeaEs3uTSCeLsZfhQfEFbVtUVDZA72dHYVY=; b=qBsY/I3/F82alD68P8X+OLRta8tAqIZbD1PCcX2tcAHtC3jCOyy0UfxSsf9epYhhdO F2ESHgHk2msF/0p4riD46L6O3zNymLh7bJddNlnBmQCd78c+xt/c+pzf4nvan/0vU4EB KH1xU82N0zSToqT7ISm8kZAaEkGRHiJ1Lu/8t/VunfBydMdsIcoJDJ//BUJWo5bLN8vj HmglcwoCP9yQMGBGti0ev9w1xhEECNuVMNMU1htcVv0yF8pcth7PImv/vIKsnZNItKjy maKejGzGx9HL9JGnnFZ00NTidiOiMVap8kPLvUMy5YOyonFHPVSfZlomoDItQutHOxKa ej0Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=wTdq1MpfqeaEs3uTSCeLsZfhQfEFbVtUVDZA72dHYVY=; b=HTdAW19BYpmAWrnvEsTLQyprweerf7yJ+2Vo4A3g9SjTkdKxm35lVP4F/ymqNasAgY oYGgB4Up236DKjYCmzgeV5jj4ypqyuJNmLcKQbz6oCiKGPsYRH6l6A+KQ67alF2rSskM MM6jlBp51VMSyxlEYW32nMcGyhLrWhzm4EfqjJ2M9PIaeB4gZjPzMXMDvPcJXud8Utnl 1RLGKGDAmToENjvI2YUndV7sCBjeQBqYokarr2Ik1EpnPxInctqq5v41LOFZGuveDx0t 1gnBj5D6KY7Px2mj1xlk3MZRS0I5WvsaxmWHrRfusxZcgYfAsl8DSdCXKevA6B7RCUfN OcNg== X-Gm-Message-State: AOAM533ywkOufSf2UIksBX4+unPWxLDkAARh0gRV2gNgb5Bzlk708r+M ARQ3DTQ0drtbuhJNIkeZbbgFKQ== X-Received: by 2002:a17:902:f68b:b0:163:f358:d4ad with SMTP id l11-20020a170902f68b00b00163f358d4admr40639075plg.23.1654787941366; Thu, 09 Jun 2022 08:19:01 -0700 (PDT) Received: from google.com (157.214.185.35.bc.googleusercontent.com. [35.185.214.157]) by smtp.gmail.com with ESMTPSA id q17-20020a656851000000b003f5d7f0ad6asm17975915pgt.48.2022.06.09.08.18.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 09 Jun 2022 08:18:59 -0700 (PDT) Date: Thu, 9 Jun 2022 15:18:56 +0000 From: Sean Christopherson To: Andrew Jones Cc: Marc Zyngier , Paolo Bonzini , kvm@vger.kernel.org, Vitaly Kuznetsov , David Matlack , Ben Gardon , Oliver Upton , linux-kernel@vger.kernel.org, anup@brainfault.org, Raghavendra Rao Ananta , eric.auger@redhat.com Subject: Re: [PATCH v2 000/144] KVM: selftests: Overhaul APIs, purge VCPU_ID Message-ID: References: <20220603004331.1523888-1-seanjc@google.com> <21570ac1-e684-7983-be00-ba8b3f43a9ee@redhat.com> <93b87b7b5a599c1dfa47ee025f0ae9c4@kernel.org> <20220609074027.fntbvcgac4nroy35@gator> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220609074027.fntbvcgac4nroy35@gator> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,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=ham 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 Thu, Jun 09, 2022, Andrew Jones wrote: > On Wed, Jun 08, 2022 at 11:20:06PM +0000, Sean Christopherson wrote: > > diff --git a/tools/testing/selftests/kvm/aarch64/get-reg-list.c b/tools/testing/selftests/kvm/aarch64/get-reg-list.c > > index b3116c151d1c..17f7ef975d5c 100644 > > --- a/tools/testing/selftests/kvm/aarch64/get-reg-list.c > > +++ b/tools/testing/selftests/kvm/aarch64/get-reg-list.c > > @@ -419,7 +419,7 @@ static void run_test(struct vcpu_config *c) > > > > check_supported(c); > > > > - vm = vm_create_barebones(); > > + vm = vm_create(1); > > Hmm, looks like something, somewhere for AArch64 needs improving to avoid > strangeness like this. I'll look into it after we get this series merged. Huh, you're right, that is odd. Ah, duh, aarch64_vcpu_add() allocates a stack for the vCPU, and that will fail if there's no memslot from which to allocate guest memory. So, this is my goof in KVM: selftests: Rename vm_create() => vm_create_barebones(), drop param get-reg-list should first be converted to vm_create_without_vcpus(). I'll also add a comment explaining that vm_create_barebones() can be used with __vm_vcpu_add(), but not the "full" vm_vcpu_add() or vm_arch_vcpu_add() variants. > > prepare_vcpu_init(c, &init); > > vcpu = aarch64_vcpu_add(vm, 0, &init, NULL); > > finalize_vcpu(vcpu, c); > > > > Thanks, > drew >