From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.3 required=3.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_WL autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 12FE7C433B4 for ; Tue, 11 May 2021 20:10:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D57E161363 for ; Tue, 11 May 2021 20:10:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229973AbhEKULS (ORCPT ); Tue, 11 May 2021 16:11:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229716AbhEKULQ (ORCPT ); Tue, 11 May 2021 16:11:16 -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 ED42CC06174A for ; Tue, 11 May 2021 13:10:09 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id z18so7780074plg.8 for ; Tue, 11 May 2021 13:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=9hsJp/8M+c794Pqj/BGqU0TDUiLA1/EXUU62NU+MuI8=; b=QWxVvsHJmxi2i0/v0yvXGA/rYmebcRITSfU78PEVWzxzZQj5NH4W2zx4Ow2aldvIOZ RF+Pp01gjiTBsL4GN8iYTGXpT6Tk8/q5bZuVXfvEMLhACIa26lseUWufR0uXgI5csmYZ qPaYTvBEgra7SDs/9ygersTwFvS7PngkczxI2jgG8p5lKZFWvqGWB5EBUmZ7KdIZywut 7YKlRIiPop3urGUH1d28rki8FOxWFo1xJl/93w/+LUlRj7ZnFAX/x6i1e8t8bFnPZg9V sinN/l4I+RBvPQvUwtxvn/l4MRno77sXlDk/dibPowkeifpBrMli9ad0UZzE7+2l8L5s PjTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=9hsJp/8M+c794Pqj/BGqU0TDUiLA1/EXUU62NU+MuI8=; b=Z7FvAKs2eF4fW62XFAuVoJP+dWOh2UioMIY8t5xDfoEzsyfqoajqZ1mqGCimNJed+U D/ae0mLnTY64nN8uAWst2z5lZRhqNTOhzyXkx4iZRM3CLKABfTLiN47fmF1igC9SBxVi p/AFtV+hbh6ez+sxwANH3gAk3Kw4U5aj4CqUJc19jZsY1W7re1Rmg9A+A628TjS4lPFR Koz/QEpY0BNOceMsvGI+sW3P0CAFyJTo4V+92PZ5Ld7A6Rxalku3nVSDEFnOVtRelvpI vPbf9+2HCKPgPmFAEyhQs8KeTilBxsdJBnQ2UqB/PP+ntBVcGbtqfFZfSwHyVVIVA8cq aokg== X-Gm-Message-State: AOAM5309elMyUS/nHV9RTs7Cb/jlLebwjIHzTdM2wz3VEkVyD1l/bFPf w/X8jwDTenTxzq475AHNGuSUKg== X-Google-Smtp-Source: ABdhPJwy09jfy7yLVMouNyu5hwQFqzdeaXW6xbEDwmbX67gFS2cIgwJGT3bwVeejCDmtI2vaIRbYFA== X-Received: by 2002:a17:902:70c5:b029:ec:9a57:9cc8 with SMTP id l5-20020a17090270c5b02900ec9a579cc8mr31856628plt.73.1620763809212; Tue, 11 May 2021 13:10:09 -0700 (PDT) Received: from google.com (240.111.247.35.bc.googleusercontent.com. [35.247.111.240]) by smtp.gmail.com with ESMTPSA id s14sm1396567pjp.16.2021.05.11.13.10.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 May 2021 13:10:08 -0700 (PDT) Date: Tue, 11 May 2021 20:10:05 +0000 From: Sean Christopherson To: Maxim Levitsky Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Xiaoyao Li , Reiji Watanabe Subject: Re: [PATCH 08/15] KVM: VMX: Configure list of user return MSRs at module init Message-ID: References: <20210504171734.1434054-1-seanjc@google.com> <20210504171734.1434054-9-seanjc@google.com> <9cf65a1d7b96c69077779d7a11777004d0bce6c9.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9cf65a1d7b96c69077779d7a11777004d0bce6c9.camel@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 11, 2021, Maxim Levitsky wrote: > On Mon, 2021-05-10 at 15:13 +0000, Sean Christopherson wrote: > > On Mon, May 10, 2021, Maxim Levitsky wrote: > > > On Tue, 2021-05-04 at 10:17 -0700, Sean Christopherson wrote: > > > > @@ -6929,18 +6942,10 @@ static int vmx_create_vcpu(struct kvm_vcpu *vcpu) > > > > goto free_vpid; > > > > } > > > > > > > > - BUILD_BUG_ON(ARRAY_SIZE(vmx_uret_msrs_list) != MAX_NR_USER_RETURN_MSRS); > > > > + for (i = 0; i < vmx_nr_uret_msrs; ++i) { > > > > + vmx->guest_uret_msrs[i].data = 0; > > > > > > > > - for (i = 0; i < ARRAY_SIZE(vmx_uret_msrs_list); ++i) { > > > > - u32 index = vmx_uret_msrs_list[i]; > > > > - int j = vmx->nr_uret_msrs; > > > > - > > > > - if (kvm_probe_user_return_msr(index)) > > > > - continue; > > > > - > > > > - vmx->guest_uret_msrs[j].slot = i; > > > I don't see anything initalizing the .slot after this patch. > > > Now this code is removed later which masks this bug, > > > but for the bisect sake, I think that this patch > > > should still be fixed. > > > > Egad, indeed it's broken. I'll retest the whole series to verify the other > > patches will bisect cleanly. > > > > Nice catch! > > > Thanks! Unfortunately this made it's way to Linus before I could fix my goof. Fingers crossed no one is unfortunate enough to land on this while bisecting...