Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp3480854pxj; Tue, 11 May 2021 05:36:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyONXlQ8BW3pcvZgpJZoatdvQCkOznB/SuoSIs2MnuB1w8iANwCq0Hqp4967xcuJwf+e6gd X-Received: by 2002:a05:6402:430e:: with SMTP id m14mr36615123edc.308.1620736567136; Tue, 11 May 2021 05:36:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1620736567; cv=none; d=google.com; s=arc-20160816; b=EwIjUFlnTHsCRxmsRGYHAZBPFDQ6TWFIbahqa00Stvw/PnNio275wglHNPObZkc3Yc 0j/FOQASdFhFkfRm3w5Q2Rxw9A4SI4/8WsOEx1ZLpILcnInHmS5Q2+oUpS+mlE9zCaOR LQdvI4LI7CQelemG5tbkJL8FFP01MfIpy3Q2wu04Vv5ElicrWOvO990rkYnvws8N4UU7 0ABIXKB8n7BMZVn8g4NmcKA75+vQIkx34gjhP8q9R78SHANwvjF2aXbI/cOtxFRK+C/M e8irR2QmThmNaahkSPIvcqbHZQ2FLIYlduz7VR1+YKWPaRd9Xu0uHrQvutXc34ov6S+n Gj8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id:dkim-signature; bh=CdLrGHhIPM4nsembm8QauLGNO+t0YsVKKFuZaXvjFQ8=; b=Sop8erXSi7dNre7syOeSMLHZK3Zf9RPcDx1V0a1VMqRiSKXRcGXL5UcDaDaSb3XrmH FEL6wJ1MReBkTiw3rRYVtWAeVOvse+M+Tiq6tsKpfIheEJrtayf6H0eQEiCpfc9tXxbq 1lg6wtQtef1NYBYI97/L2DCrYHneMzv5r2aFeFuRyc3Dyc1rtyaBpN/xSinDokwQY0ll RuJKLxJJsJIBqAqK+YloOJq5a/HKfzxhy3VZ6UwuUIzidmCe6tb5h0Rs+S3XspDVuNU0 25rwG9v//6bq2buBUApNTJyn+TucY/W8pEjfhd1vo5L3iGHl9VtChEJp+M0UAlqxRfN0 VMvg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fjR4GBvR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p25si20527789ejc.571.2021.05.11.05.35.42; Tue, 11 May 2021 05:36:07 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=fjR4GBvR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231490AbhEKMfe (ORCPT + 99 others); Tue, 11 May 2021 08:35:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:28535 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230475AbhEKMfd (ORCPT ); Tue, 11 May 2021 08:35:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1620736466; h=from:from: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:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CdLrGHhIPM4nsembm8QauLGNO+t0YsVKKFuZaXvjFQ8=; b=fjR4GBvRkxACG01/lUdYx+Mj7v37lGXkLE80AOO24EJBq1ajsqIvvajFHjS/A1jnOgQtvW QVDrsbmxDF9dWyzh8eRFhdhn/ATjG1WB/ak2IUnDdCsh0ZA5L/P9CD8XTZLUoDKWdA5cHi 4jIjQVpACWZTWecV1T9RSHQ+a7497o8= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-408-iPJ1v-aHO5eTsw_g5NpbAA-1; Tue, 11 May 2021 08:34:25 -0400 X-MC-Unique: iPJ1v-aHO5eTsw_g5NpbAA-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E6321CC622; Tue, 11 May 2021 12:34:23 +0000 (UTC) Received: from starship (unknown [10.40.194.86]) by smtp.corp.redhat.com (Postfix) with ESMTP id 083B919809; Tue, 11 May 2021 12:34:20 +0000 (UTC) Message-ID: <9cf65a1d7b96c69077779d7a11777004d0bce6c9.camel@redhat.com> Subject: Re: [PATCH 08/15] KVM: VMX: Configure list of user return MSRs at module init From: Maxim Levitsky To: Sean Christopherson Cc: Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Xiaoyao Li , Reiji Watanabe Date: Tue, 11 May 2021 15:34:19 +0300 In-Reply-To: References: <20210504171734.1434054-1-seanjc@google.com> <20210504171734.1434054-9-seanjc@google.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.36.5 (3.36.5-2.fc32) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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! Best regards, Maxim Levitsky