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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D38A2C4332F for ; Thu, 3 Nov 2022 18:47:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=AivW3ttQsB8UKdPZj50MF6ttBXktti/2wArobMJZ7DU=; b=PjKXQwTd/H4Uzu hV354GK4fIYEjz69iPFm1Ne1RRSN3gZm/vNYvRjPQyIdO+S2hTXJaT6+QFogxamlzs87yz+D5t0jG ArXu5F1F7YauNoZ9zjKS5e+u8EltVUAR6Pm7AyQegITHOWjiXkxYqUU2CJZgUoT2aZ6ehPmk6dzfp L5KoMswkTIaclAObGtdesN3jPm8h8ecFzO+HSypVp3kGBPI+e/hKh43PGfusbMYOAKtuAEk2RiCiz vBthS3lVg0tmI9kzt3vRz+DmoOeOgN1SlFEjKV8vC5CnbLnOxg8qpmXGnymFp1QwuxxJkHRJRo2hn mg+f/b69+2e4NLIVwfHw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqfEe-001KeV-Qy; Thu, 03 Nov 2022 18:46:40 +0000 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oqfEV-001Kd1-8T for linux-arm-kernel@lists.infradead.org; Thu, 03 Nov 2022 18:46:36 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667501190; 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=KUvqpmismHtbPDi1RWOVBVQOlTCkIOX4rr6fY8m3qi8=; b=Gu2TIWOqU7YBTn6BAXRN/ngaTHBBo/HbdK/Ge77jJIRU0R62O6KQpKFqpwRtyCdfQ7C1Fq cugc9OXd6+0OPAuiyCMsT/LqqI6ViYus7vop6+vzII86ruF0cZqZ9mgow/GY28VTprbEK4 fMSpfQqEw27+b6joglecN2b6fpHyDrU= Received: from mail-ej1-f69.google.com (mail-ej1-f69.google.com [209.85.218.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-246-IJIrJhxZMiC4pFMKKsbxjQ-1; Thu, 03 Nov 2022 14:46:27 -0400 X-MC-Unique: IJIrJhxZMiC4pFMKKsbxjQ-1 Received: by mail-ej1-f69.google.com with SMTP id qf25-20020a1709077f1900b0078c02a23da3so1833779ejc.0 for ; Thu, 03 Nov 2022 11:46:27 -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=KUvqpmismHtbPDi1RWOVBVQOlTCkIOX4rr6fY8m3qi8=; b=C+HKisSGsvTi2bmC9s/Mxai4TyaVATfroY9bg0NK5IyZHr4hvRV2acho/g51lQatRv Onop/qwdvNRl7SCx4oMPuCOD/w4PnubBwjcbakRRXDlAFB8m2OxlcNcteW7UJnJnYkVe Zd+vC7JO/ypV6AQzBE0B7HZp3O05AAx4Ii24CdpodD84jjv28TjVAsZzKoyL79vQaejf NjtiHrz9iB9FULpwrP/BicN7+GW3z1T75/I9HBzoXoVACkfcMPyKQa/5Rrx429gEByzx xC7fTHiwe73ria/Ycufc1XgH1r48RxecP9cp5CiFQ2IqM5bs4FUoFUjqTvZn51L08uVV Mp9Q== X-Gm-Message-State: ACrzQf15aeWGNT4i1NIDyUPBO99LLh6yDAbmWCHZYBKaaLaqmC4z+/If Hjvx7LBET3lH8iYzvZYNFs6w6IK1ojicXhip7mY7bwpZcNRdNJSMSKTsmMhg0l0XMUUtQ8s51E9 p/rr2oDKo5WqyC5/wAOW5lkSkMaXiXApCshc= X-Received: by 2002:a17:907:31c9:b0:740:ef93:2ffd with SMTP id xf9-20020a17090731c900b00740ef932ffdmr30301714ejb.584.1667501186294; Thu, 03 Nov 2022 11:46:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6jngiF1WMeYDLzQRcIfcwEai0RoBStUb1QJ9IQKOY38atIN4TLSIas8P4CJc6XubwxUck1WA== X-Received: by 2002:a17:907:31c9:b0:740:ef93:2ffd with SMTP id xf9-20020a17090731c900b00740ef932ffdmr30301665ejb.584.1667501186012; Thu, 03 Nov 2022 11:46:26 -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 2-20020a170906218200b0078246b1360fsm799044eju.131.2022.11.03.11.46.24 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Nov 2022 11:46:25 -0700 (PDT) Message-ID: Date: Thu, 3 Nov 2022 19:46:22 +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 To: Sean Christopherson Cc: 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 , 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: X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221103_114633_518111_EDCC8B82 X-CRM114-Status: GOOD ( 13.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 11/3/22 19:35, Sean Christopherson wrote: > It's technically required. IA32_FEAT_CTL and thus KVM_INTEL depends on any of > CPU_SUP_{INTEL,CENATUR,ZHAOXIN}, but init_ia32_feat_ctl() is invoked if and only > if the actual CPU type matches one of the aforementioned CPU_SUP_*. > > E.g. running a kernel built with > > CONFIG_CPU_SUP_INTEL=y > CONFIG_CPU_SUP_AMD=y > # CONFIG_CPU_SUP_HYGON is not set > # CONFIG_CPU_SUP_CENTAUR is not set > # CONFIG_CPU_SUP_ZHAOXIN is not set > > on a Cenatur or Zhaoxin CPU will leave X86_FEATURE_VMX set but not set > X86_FEATURE_MSR_IA32_FEAT_CTL. If VMX isn't enabled in MSR_IA32_FEAT_CTL, KVM > will get unexpected #UDs when trying to enable VMX. Oh, I see. Perhaps X86_FEATURE_VMX and X86_FEATURE_SGX should be moved to one of the software words instead of using cpuid. Nothing that you should care about for this series though. Paolo _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel