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=ham 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 9E7C8C2B9F7 for ; Wed, 26 May 2021 09:54:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 73DF361443 for ; Wed, 26 May 2021 09:54:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233692AbhEZJ4Q (ORCPT ); Wed, 26 May 2021 05:56:16 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:30527 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233633AbhEZJ4L (ORCPT ); Wed, 26 May 2021 05:56:11 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1622022880; 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=Je3rYCWKpxnMq5kbnyKTwS1wEZr0Sa6J/l5c5NVM4Zo=; b=fZ1A/dxL6B9aQel0BKpkGC8L5rlctteTUz6BaqL2JHBVnFo26OmVUM4CBqx0ANfRNcMT0K grQjHqgaQGaKsLnbaQ7R/+qHtpKebIPwhGxrmK/WoN8t5lxQ7h63+yov1IDI21oNqzryEP PLp2ceL9WrkehJFpMKSaYn9lrkbdO8U= 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-235-b5fk2i9dOuuox-Z-FbOlyw-1; Wed, 26 May 2021 05:54:38 -0400 X-MC-Unique: b5fk2i9dOuuox-Z-FbOlyw-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 641CB501E3; Wed, 26 May 2021 09:54:37 +0000 (UTC) Received: from starship (unknown [10.40.192.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC53C19718; Wed, 26 May 2021 09:54:34 +0000 (UTC) Message-ID: <7ee401dab650422712e0dda78107e5d9acf6f1d4.camel@redhat.com> Subject: Re: [PATCH v2 1/5] KVM: SVM: Drop unneeded CONFIG_X86_LOCAL_APIC check for AVIC 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:33 +0300 In-Reply-To: <20210518144339.1987982-2-vkuznets@redhat.com> References: <20210518144339.1987982-1-vkuznets@redhat.com> <20210518144339.1987982-2-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.84 on 10.5.11.23 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2021-05-18 at 16:43 +0200, Vitaly Kuznetsov wrote: > AVIC dependency on CONFIG_X86_LOCAL_APIC is dead code since > commit e42eef4ba388 ("KVM: add X86_LOCAL_APIC dependency"). Indeed! Reviewed-by: Maxim Levitsky Best regards, Maxim Levitsky > > Suggested-by: Sean Christopherson > Signed-off-by: Vitaly Kuznetsov > --- > arch/x86/kvm/svm/avic.c | 2 -- > arch/x86/kvm/svm/svm.c | 4 +--- > 2 files changed, 1 insertion(+), 5 deletions(-) > > diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c > index 712b4e0de481..1c1bf911e02b 100644 > --- a/arch/x86/kvm/svm/avic.c > +++ b/arch/x86/kvm/svm/avic.c > @@ -29,9 +29,7 @@ > > /* enable / disable AVIC */ > int avic; > -#ifdef CONFIG_X86_LOCAL_APIC > module_param(avic, int, S_IRUGO); > -#endif > > #define SVM_AVIC_DOORBELL 0xc001011b > > diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c > index dfa351e605de..8c3918a11826 100644 > --- a/arch/x86/kvm/svm/svm.c > +++ b/arch/x86/kvm/svm/svm.c > @@ -1010,9 +1010,7 @@ static __init int svm_hardware_setup(void) > } > > if (avic) { > - if (!npt_enabled || > - !boot_cpu_has(X86_FEATURE_AVIC) || > - !IS_ENABLED(CONFIG_X86_LOCAL_APIC)) { > + if (!npt_enabled || !boot_cpu_has(X86_FEATURE_AVIC)) { > avic = false; > } else { > pr_info("AVIC enabled\n");