Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5829901ybl; Tue, 27 Aug 2019 10:12:36 -0700 (PDT) X-Google-Smtp-Source: APXvYqy2IMikkTQw3nkC8tB9fcJf6rCoLAcRIpi3knk9SjiWR+1U/raWGwoLTtRs6s5Jl3Cedrji X-Received: by 2002:a17:902:e406:: with SMTP id ci6mr12847331plb.207.1566925956355; Tue, 27 Aug 2019 10:12:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566925956; cv=none; d=google.com; s=arc-20160816; b=LJ6k5h/VC6XhP0lR5kRp7RW8Agh+UPTR89axJ7sxWMQZAawtva/Evp+dksZVPdjWyb BKAG5JbdZe5KC1ftb6dN8cUdk/2Z/mpjcsVkGBAQc6lGPf6L7BXuu6plNPTHZzrXNmSF vz1unmJuisLSx3yVTdZSA74C47PROJcfXFWDLy5aWKtkmgiHPsoFAvPkQLu8Hi6kMyb8 rbDF4bZjU0+pEmqyBU5RY1ywCUnfWoI2BA/IlkLRbWltYax/dqF+eny2I/slAmBpDnFA WXuWwLIfhSO2J0deyG/GlMdIjd1J0ledftX0gYVIMeF1kHdHDiNscvJn0gxOUIIocvOc 1R8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VWy+77tTGQ3qconEzAmoj4+uuLcoy/9TvX983Ina+rM=; b=AHv2xKgsqVx78wBtVeBize1EtrxIBAPZ3GoPRSZQQpXzLaO+e8zXK9kwWE5jcyEVEc pZPieW3YQGxxCqSG+/V07aUPFCWI7CIuZolJYRVxTTUkfHz1eF9TQve+N8aTmo8e+ay1 RGHKT6aEjbAQI932FFZYwEFh3BLZfO4qlUCv1nuhQLwl43bx6JTsCyqY4Dtq6yk0C5ew rz1pYt8AbYPdBTEONs+PqMZymf5pdCUZUwv0fxtzec/24ZDYGbQJJx1ARX2e3ilT/zju NcNX2U0rkzC6xYfV8EIs3kozky08spRaxpQzb4JvxIaU4JHut4SIUGLPPlOGWuKpmlLm 0n7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Zl1FErqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j1si12252057pgk.187.2019.08.27.10.12.19; Tue, 27 Aug 2019 10:12:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=Zl1FErqa; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1730260AbfH0RKE (ORCPT + 99 others); Tue, 27 Aug 2019 13:10:04 -0400 Received: from mail-io1-f66.google.com ([209.85.166.66]:33500 "EHLO mail-io1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727064AbfH0RKE (ORCPT ); Tue, 27 Aug 2019 13:10:04 -0400 Received: by mail-io1-f66.google.com with SMTP id z3so48094949iog.0 for ; Tue, 27 Aug 2019 10:10:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VWy+77tTGQ3qconEzAmoj4+uuLcoy/9TvX983Ina+rM=; b=Zl1FErqaB3jbNeSprrVrlyXSV9r4KFM/wpcMJC6G1gl5QI6t5aoeAksIxoZk/ST/8w M2xQ3pxE+5XYp1mBX1jbV8kSZNyHMXB0mEta7Q9nWQFIrKOKvJYyIHJxjUd046259E/4 96hZ1PaX2+Alx3QnrtGdBZc5c/yfKpnz/xlLvsBvzwRkJRJ+0YqkV8BwyEBYWQjzrbCp V/83rU8KkEdR5Gox/X7YL6LTLFeO9UE3/WBcbUB20DpX+bVL7wzz/TqYlKa9NeJxShhj P5F9Y+EakX8iDxGvmsJxf2o4td/H68DCjEnZblMjP/DFF+Ef0sGper6B0LcxEhvrYrI/ f9iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VWy+77tTGQ3qconEzAmoj4+uuLcoy/9TvX983Ina+rM=; b=tYo/cWjR+abh88aSEUYbs8KwzfwCgNn3okysvxRQ904nHrTgVmfm03I5pZBuyM3jtO EOKJHyuEDIn4qKScDJB8zahBSmdiYMhLKS3b8Lp9kqsslzbD2SCWNmz8Cn9Eg9IWcwUM OSCS3Ki2xWJTxpThkcz+yhBsyj8c76OJN5HdOKgu/yOrTU1a2K6qtpJxNLsQ3i5+NRDE EkWC2x7TwX/mFB3+cgo4cUqTwBtPLQ0kNER3IhVOSs1XgZW0kv4FQIEfRNrQCSL0HAXC m4RQ4H/GTXcQOtRSZT0eR3qTJKGLYiobWI1mX84ZDfoy09gDigzOYImSgBDgo6HJ7cih FIbg== X-Gm-Message-State: APjAAAXsYxu3IxQWVUFlRErytaZ4AS+Q1R7GdkuN6zeQC0yaPPat66t0 XYMxsO2SkXllxd4f56q194D5njuH7ywBP1H9c/L38g== X-Received: by 2002:a6b:4e14:: with SMTP id c20mr1664014iob.26.1566925803258; Tue, 27 Aug 2019 10:10:03 -0700 (PDT) MIME-Version: 1.0 References: <20190827160404.14098-1-vkuznets@redhat.com> <20190827160404.14098-2-vkuznets@redhat.com> In-Reply-To: <20190827160404.14098-2-vkuznets@redhat.com> From: Jim Mattson Date: Tue, 27 Aug 2019 10:09:52 -0700 Message-ID: Subject: Re: [PATCH 1/3] KVM: x86: hyper-v: don't crash on KVM_GET_SUPPORTED_HV_CPUID when kvm_intel.nested is disabled To: Vitaly Kuznetsov Cc: kvm list , LKML , Paolo Bonzini , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Joerg Roedel , Sean Christopherson , Roman Kagan Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 27, 2019 at 9:04 AM Vitaly Kuznetsov wrote: > > If kvm_intel is loaded with nested=0 parameter an attempt to perform > KVM_GET_SUPPORTED_HV_CPUID results in OOPS as nested_get_evmcs_version hook > in kvm_x86_ops is NULL (we assign it in nested_vmx_hardware_setup() and > this only happens in case nested is enabled). > > Check that kvm_x86_ops->nested_get_evmcs_version is not NULL before > calling it. With this, we can remove the stub from svm as it is no > longer needed. > > Fixes: e2e871ab2f02 ("x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper") > Signed-off-by: Vitaly Kuznetsov Reviewed-by: Jim Mattson