Received: by 2002:a05:6358:111d:b0:dc:6189:e246 with SMTP id f29csp1785391rwi; Thu, 3 Nov 2022 09:03:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Dj3ku+dZynlT+FVKDazzpoJJqUVhnW290/5m7NkJw1Fi/gAgq8+LKqfJz4BO7j7638xuL X-Received: by 2002:a05:6402:46:b0:45c:bd68:6ab0 with SMTP id f6-20020a056402004600b0045cbd686ab0mr30927489edu.16.1667491410325; Thu, 03 Nov 2022 09:03:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667491410; cv=none; d=google.com; s=arc-20160816; b=ACcX3ZR+7kXKGxt5TlFQ8bkX9AQTpDxz7fG7ZiBcBCcvix9bbOtCgw9Uof6X0Z7RWD HwwY5BfChBWSLh74evNVCZB3LQ2ZkWiLWKap69hcUc61zS7PdYqhy4DlTeZzNHA2e1xP Z6w4ROQyF0MyfWQW09MLRE3kcvLY4kPXireSulApTlIOVG5Qxqf8v0GbIz7+4bW2pUqn ciYCVKzZXaTyMByfFLrHm8yJm+reTgp5rElpX50fTHV1c4soRL9hNxuzPAoiBS/WvNt/ 99KmDN4X+a5a+Dbs6VlD+Iq1Q9C8qLmJOR3Wn9mH7HHmRvUYY3erCapU88EpiB40vJeH Mrvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=MLzJVyRQvNMkBYTyqF+CAZ1OHQes3dhnjH8NkXHBEKk=; b=CAXzbF3ZNIhWNgm7IRPwRef/6ZuGilFI2aDFgs4GAja+LDNbXyO/riJyVs3/IIABFj 4FktJMkNVMpjyurltjWJktBF0V1jGIy/qqIZTbEsJweKQriojeJ5+kQ8BopvyJxi5yN0 mBHNkT1gDAu8ytSRXRCh9Ie73SoWzM1MOfIu//Dj8btH+WDc7b/166t1sEZQaTGK4b1L BhV9WmJ3oU4F6fG+2HYCYUyoo7lbqpeWwJrFO98DvYhwZLoVCPasBqE79Pw+NoMwsXh1 K3Wh/V8X2i1LrCFZS3oeN4rAdLIZDzBjcq/Khf5wg9zG98+ID7Qc1GloPZ0jifl7fYbN XjPw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b="FrT37/qL"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sc6-20020a1709078a0600b0077ea290986fsi1718769ejc.584.2022.11.03.09.02.50; Thu, 03 Nov 2022 09:03:30 -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=@redhat.com header.s=mimecast20190719 header.b="FrT37/qL"; 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=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232006AbiKCPKp (ORCPT + 97 others); Thu, 3 Nov 2022 11:10:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbiKCPKT (ORCPT ); Thu, 3 Nov 2022 11:10:19 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2AC621C91D for ; Thu, 3 Nov 2022 08:08:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667488098; 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=MLzJVyRQvNMkBYTyqF+CAZ1OHQes3dhnjH8NkXHBEKk=; b=FrT37/qLSZklV8qCdqtQsv9474p7GTCJhbbybK9bc+vrslLQCAQK/k/u/bsdbFk105jplt UBjAVWSBgEHOpseZeSoeYMzPjyT20BNcH+UKBwOiCT45q2Xy2iXNeKoV0/AZfWIRMcf1aF n+oNKLgnKTIk7iXNQwZgHgXgLi+wetk= Received: from mail-ed1-f72.google.com (mail-ed1-f72.google.com [209.85.208.72]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-342-tCysd6cGOlWq9lY8z3IViA-1; Thu, 03 Nov 2022 11:08:17 -0400 X-MC-Unique: tCysd6cGOlWq9lY8z3IViA-1 Received: by mail-ed1-f72.google.com with SMTP id y20-20020a056402271400b004630f3a32c3so1587313edd.15 for ; Thu, 03 Nov 2022 08:08:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=MLzJVyRQvNMkBYTyqF+CAZ1OHQes3dhnjH8NkXHBEKk=; b=S3W3pcFTdHGsENPZwj6rqzUdoKZO8JwQmKoAUi3QsNgd4jow7w6pLAg/YIy04rjLN2 svf5i91soauuy/YqNGlc+L87TFSAq1M5wJ5TWT/M+dwsn8Tpt5C5fMcz6A4LTAoDqj6/ HbA9lSIeNLComAwTsKbUGFd/4gTlRWcq40hBCSBFiolnCf8MifLXvqp0P93ma1qBDHeQ N3b/1CRuQja1cGo260p0XzpiPjJ4sq9ds99nvSQBDB4cPIs03JmbPaflM7kPjeNKPCjl QC52RT1cPhLg9QdXBfSlwQPgYXNLOxF0pZSXO2O9BMXBb5J3JsGtOO/cnwecMW0Gc8Hg 3nvQ== X-Gm-Message-State: ACrzQf0vNiASIOm7r/lAFu+5KTctz+k3Wcks75zRDBeSol6dsX3rd4Sw 0l0sBDZG2pGNXkUbDYcNjR+9PO5SBsQALWjNi0hI9ql41dESUdnp88w9p5GcII+uSD2XyzIZdOr qYlyW+8u+uBVH0e0sFfc5CULg X-Received: by 2002:a05:6402:550e:b0:456:f79f:2bed with SMTP id fi14-20020a056402550e00b00456f79f2bedmr31117697edb.106.1667488092994; Thu, 03 Nov 2022 08:08:12 -0700 (PDT) X-Received: by 2002:a05:6402:550e:b0:456:f79f:2bed with SMTP id fi14-20020a056402550e00b00456f79f2bedmr31117664edb.106.1667488092781; Thu, 03 Nov 2022 08:08:12 -0700 (PDT) Received: from ?IPV6:2001:b07:6468:f312:1c09:f536:3de6:228c? ([2001:b07:6468:f312:1c09:f536:3de6:228c]) by smtp.googlemail.com with ESMTPSA id s28-20020a056402037c00b0045bccd8ab83sm646641edw.1.2022.11.03.08.08.10 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 08:08:11 -0700 (PDT) Message-ID: Date: Thu, 3 Nov 2022 16:08:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.0 Subject: Re: [PATCH 33/44] KVM: x86: Do VMX/SVM support checks directly in vendor code Content-Language: en-US To: Sean Christopherson , Marc Zyngier , Huacai Chen , Aleksandar Markovic , Anup Patel , Paul Walmsley , Palmer Dabbelt , Albert Ou , Christian Borntraeger , Janosch Frank , Claudio Imbrenda , Matthew Rosato , Eric Farman , Vitaly Kuznetsov Cc: James Morse , Alexandru Elisei , Suzuki K Poulose , Oliver Upton , Atish Patra , David Hildenbrand , kvm@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.linux.dev, kvmarm@lists.cs.columbia.edu, linux-mips@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, kvm-riscv@lists.infradead.org, linux-riscv@lists.infradead.org, linux-s390@vger.kernel.org, linux-kernel@vger.kernel.org, Isaku Yamahata , Fabiano Rosas , Michael Ellerman , Chao Gao , Thomas Gleixner , Yuan Yao References: <20221102231911.3107438-1-seanjc@google.com> <20221102231911.3107438-34-seanjc@google.com> From: Paolo Bonzini In-Reply-To: <20221102231911.3107438-34-seanjc@google.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=unavailable 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 11/3/22 00:19, Sean Christopherson wrote: > + if (!boot_cpu_has(X86_FEATURE_MSR_IA32_FEAT_CTL) || > + !boot_cpu_has(X86_FEATURE_VMX)) { > + pr_err("VMX not enabled in MSR_IA32_FEAT_CTL\n"); > + return false; I think the reference to the BIOS should remain in these messages and in svm.c (even though these days it's much less common for vendors to default to disabled virtualization in the system setup). The check for X86_FEATURE_MSR_IA32_FEAT_CTL is not needed because init_ia32_feat_ctl() will clear X86_FEATURE_VMX if the rdmsr fail (and not set X86_FEATURE_MSR_IA32_FEAT_CTL). Paolo