Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp5939901ybl; Tue, 27 Aug 2019 11:55:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKPUgXgWMVqMX612zZdI9UcyiZNz2JFlGJidGkAgHJVYyZfjuz5PW+K1TBHN9kVWpUe6ll X-Received: by 2002:a17:90a:2021:: with SMTP id n30mr162896pjc.3.1566932121826; Tue, 27 Aug 2019 11:55:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566932121; cv=none; d=google.com; s=arc-20160816; b=eg8W3g+7erKq9MAPkmur/KGEADOWFeYQmR+aC5fPJi84U21jbwam97urOw3RgGVl91 UF3jBsO9Lh7Rmy/udtiYJZQnFXHu7xPL7NJIk7WRzMeYcMRKIhAmlHv2jtQajiaGv7m5 J+/JBPq3Cdu0o/QD34Wk9xztdTktTU5x9jdN/lO+uqzYWcBw0Ver9XZB3soSg1CgMFKt Cz+6RU78M0ZLm9EV6C3LO/X6An1v+VpFKNchHZN370E/a9UrSy7mV9Fbn4YjEK+1j02Y jeUQ9x7zG1UdFhE6f8qwUcl0EDk1lncb6kV1SVI5fkohPvBrDQI7g67MbcTHoSQe+Qy6 1XDg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=cXo7UBKs3ERShN208i+jKuqg0QZdhovBuep7VTeu6rs=; b=ufdx5AX87ljJon+Bu7T/6cxMWei/5G7PpG15tY2EvSyq4YBqmCHo5L9UpJ1b3uZbhr N7u0kI36NQzasovuztqRzjIOxXVgD7II5VZP1tasDsqtvv23yNQx7dk9shk7XL9FWT8P R7EsMPFblNQy2/5d9HMImlJlluy9hgQbsxnoyRcBaS3Xw+zOlYyreW4+0LwBH/BgLI2n WYERGILwDGGvMPnDRZHGeQsSWWx9QklbKXceBy17n0fzEuct+xLVl1Ryq1x6Np+0fCoK /atsleYwW4+XRs4X0yfNb3DO8f+QImHLRL5iyfdAyOIkIbbZ0sO8slLfb+Mktmv4w58r zwCw== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id n9si122235pgj.171.2019.08.27.11.55.05; Tue, 27 Aug 2019 11:55:21 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730685AbfH0Swl (ORCPT + 99 others); Tue, 27 Aug 2019 14:52:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53594 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729696AbfH0Swl (ORCPT ); Tue, 27 Aug 2019 14:52:41 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5DF7A10C6354; Tue, 27 Aug 2019 18:52:41 +0000 (UTC) Received: from flask (unknown [10.43.2.55]) by smtp.corp.redhat.com (Postfix) with SMTP id 543355D6B0; Tue, 27 Aug 2019 18:52:38 +0000 (UTC) Received: by flask (sSMTP sendmail emulation); Tue, 27 Aug 2019 20:52:37 +0200 Date: Tue, 27 Aug 2019 20:52:37 +0200 From: Radim =?utf-8?B?S3LEjW3DocWZ?= To: Vitaly Kuznetsov Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Joerg Roedel , Jim Mattson , Sean Christopherson , Roman Kagan , stable@vger.kernel.org Subject: Re: [PATCH 1/3] KVM: x86: hyper-v: don't crash on KVM_GET_SUPPORTED_HV_CPUID when kvm_intel.nested is disabled Message-ID: <20190827185237.GD65641@flask> References: <20190827160404.14098-1-vkuznets@redhat.com> <20190827160404.14098-2-vkuznets@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190827160404.14098-2-vkuznets@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.64]); Tue, 27 Aug 2019 18:52:41 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2019-08-27 18:04+0200, Vitaly Kuznetsov: > 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. > Added Cc: > Fixes: e2e871ab2f02 ("x86/kvm/hyper-v: Introduce nested_get_evmcs_version() helper") > Signed-off-by: Vitaly Kuznetsov and applied, thanks.