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 X-Spam-Level: X-Spam-Status: No, score=-16.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0FBDDC2B9F7 for ; Wed, 26 May 2021 09:55:01 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E45676128D for ; Wed, 26 May 2021 09:55:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233701AbhEZJ42 (ORCPT ); Wed, 26 May 2021 05:56:28 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:60124 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233633AbhEZJ40 (ORCPT ); Wed, 26 May 2021 05:56:26 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622022895; 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=w1/fuk2aokiDTAmW7L8XmGlDE/rQN3ihSYviCoSIncE=; b=N2bPQA2mTFP+FIl7Ax8w01Agyz9fioHQLjJ9izIC7g/wjdGaDuQH/Qw0qFlTiK7hGpUeKt csyIrNwuqSwqmv5BpGQP5iyo0CaqVUbs8p7ysbrMLPQ8pRpOc42GukxFi2IAziZgiuaFxP 3ytRRA8lepLJsEbIaqs1m16x9KxdXZc= 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-80-2nUplXY2NYeozPrjTG3kGg-1; Wed, 26 May 2021 05:54:54 -0400 X-MC-Unique: 2nUplXY2NYeozPrjTG3kGg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 17408501E5; Wed, 26 May 2021 09:54:53 +0000 (UTC) Received: from starship (unknown [10.40.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id AFE795D9D7; Wed, 26 May 2021 09:54:50 +0000 (UTC) Message-ID: Subject: Re: [PATCH v2 2/5] KVM: VMX: Drop unneeded CONFIG_X86_LOCAL_APIC check from cpu_has_vmx_posted_intr() From: Maxim Levitsky To: Vitaly Kuznetsov , kvm@vger.kernel.org, Paolo Bonzini Cc: Sean Christopherson , Wanpeng Li , Jim Mattson , Kechen Lu , linux-kernel@vger.kernel.org Date: Wed, 26 May 2021 12:54:49 +0300 In-Reply-To: <20210518144339.1987982-3-vkuznets@redhat.com> References: <20210518144339.1987982-1-vkuznets@redhat.com> <20210518144339.1987982-3-vkuznets@redhat.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.14 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-05-18 at 16:43 +0200, Vitaly Kuznetsov wrote: > CONFIG_X86_LOCAL_APIC is always on when CONFIG_KVM (on x86) since > commit e42eef4ba388 ("KVM: add X86_LOCAL_APIC dependency"). > > Suggested-by: Sean Christopherson > Signed-off-by: Vitaly Kuznetsov > --- > arch/x86/kvm/vmx/capabilities.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/arch/x86/kvm/vmx/capabilities.h b/arch/x86/kvm/vmx/capabilities.h > index 8dee8a5fbc17..aa0e7872fcc9 100644 > --- a/arch/x86/kvm/vmx/capabilities.h > +++ b/arch/x86/kvm/vmx/capabilities.h > @@ -90,8 +90,7 @@ static inline bool cpu_has_vmx_preemption_timer(void) > > static inline bool cpu_has_vmx_posted_intr(void) > { > - return IS_ENABLED(CONFIG_X86_LOCAL_APIC) && > - vmcs_config.pin_based_exec_ctrl & PIN_BASED_POSTED_INTR; > + return vmcs_config.pin_based_exec_ctrl & PIN_BASED_POSTED_INTR; > } > > static inline bool cpu_has_load_ia32_efer(void) Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky