From nobody Mon Apr 27 16:11:58 2026 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3BDA8C43334 for ; Fri, 10 Jun 2022 19:18:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347488AbiFJTSW (ORCPT ); Fri, 10 Jun 2022 15:18:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229571AbiFJTSR (ORCPT ); Fri, 10 Jun 2022 15:18:17 -0400 Received: from mail-pj1-x104a.google.com (mail-pj1-x104a.google.com [IPv6:2607:f8b0:4864:20::104a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 813A4167DF for ; Fri, 10 Jun 2022 12:18:16 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id ob5-20020a17090b390500b001e2f03294a7so1862301pjb.8 for ; Fri, 10 Jun 2022 12:18:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=reply-to:date:message-id:mime-version:subject:from:to:cc :content-transfer-encoding; bh=y1EZXvSmEPvb6mcUcqNnwAea2ZEKw13g9a15hObG/5M=; b=j5Ol8gvjwBqhz1FCGnzOa9I7myBdajprl0eYTZ+G6kUBS6rutkN9NY3k/9rtRye1bq 5rhky7E5n4gcRy8RojPyZxnwIQ8q1ptSi1dzy3Y/i20I4s/b+JMGnT55rvp16jPNuo1J qpI7gjpVmiB7Ra9W4owVS05GYZ+Xj7IdUvRKyoCHKD9hnkdaCv4MVdzDNyCy5KqTphQU 1W9At+Oo2woTSGCE0NLVNGMlxiGBNcz6geY1r0gg1MKxg+YJyWY+xr7QC5G3KYaPkQN1 dtb9K90++nmjmu7WdBfIRuoK745VE4EENDEXbSpZTZ/RlSLnEJNrjx6O2PqMrqBhRJtR GPPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:reply-to:date:message-id:mime-version:subject :from:to:cc:content-transfer-encoding; bh=y1EZXvSmEPvb6mcUcqNnwAea2ZEKw13g9a15hObG/5M=; b=l7/AKWf8ZZB1JYVjUxCxvi55CMakQ6mtJPycLftQR6sZ9V3/Ro+SD1ZqQBGxSKci1A p3BphzQGG6x5v4SGActpBW5yHBlXg9kklDfZUu4hSjd6fnggpJTi/EAlHb7LyEJOOQIm o8J6aeT8suDZy5MpoBQEEli8NMzJlyzc3j5BWBCR2CQvrnetODmhZLgvoYYwTfyYsMJ9 zpULD/0QLXsyz56eR/1mvfiIMkAg8ApSoMQ5CJEH0dACcWCI6kGW8s4Kd/rHW6l1Hu5V MMGz1VN8+wc1wluZ1Yfx2TKkpT735mGh++RoE+VMxhsPlkRfld3zo6ugfYLyIo4wC7+Z RB9g== X-Gm-Message-State: AOAM533hbMRiMVXnCZ1I7xn+UyxYrqXmvGmPY+reJZs3KSFzumjy0yoT +1O7DnBPYd9Qy0Alt6FM52sEBENUXdg= X-Google-Smtp-Source: ABdhPJyMSmx7IVBsg90eGIeP4sJzAfrDgpQtiK6YO/BOyTkm6qK/b/c2N1oKuSC58vea5TL9kCTYgM2xFis= X-Received: from seanjc.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:3e5]) (user=seanjc job=sendgmr) by 2002:a17:90a:249:b0:1e0:a8a3:3c6c with SMTP id t9-20020a17090a024900b001e0a8a33c6cmr2350pje.0.1654888695567; Fri, 10 Jun 2022 12:18:15 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 10 Jun 2022 19:18:13 +0000 Message-Id: <20220610191813.371682-1-seanjc@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.36.1.476.g0c4daa206d-goog Subject: [PATCH] KVM: SVM: Fix a misplaced paranthesis in APICV inhibit mask generation From: Sean Christopherson To: Paolo Bonzini Cc: Sean Christopherson , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Maxim Levitsky Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Type: text/plain; charset="utf-8" Relocate a ")" to its proper place at the end of a BIT usage, the intent is most definitely not to have a feedback loop of BITs in the mask. arch/x86/kvm/svm/avic.c: In function =E2=80=98avic_check_apicv_inhibit_reas= ons=E2=80=99: include/vdso/bits.h:7:40: error: left shift count >=3D width of type [-Werr= or=3Dshift-count-overflow] 7 | #define BIT(nr) (UL(1) << (nr)) | ^~ arch/x86/kvm/svm/avic.c:911:27: note: in expansion of macro =E2=80=98BIT=E2= =80=99 911 | BIT(APICV_INHIBIT_REASON_SEV | | ^~~ Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or= APIC base") Cc: Maxim Levitsky Signed-off-by: Sean Christopherson --- arch/x86/kvm/svm/avic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c index 5542d8959e11..d1bc5820ea46 100644 --- a/arch/x86/kvm/svm/avic.c +++ b/arch/x86/kvm/svm/avic.c @@ -908,9 +908,9 @@ bool avic_check_apicv_inhibit_reasons(enum kvm_apicv_in= hibit reason) BIT(APICV_INHIBIT_REASON_PIT_REINJ) | BIT(APICV_INHIBIT_REASON_X2APIC) | BIT(APICV_INHIBIT_REASON_BLOCKIRQ) | - BIT(APICV_INHIBIT_REASON_SEV | + BIT(APICV_INHIBIT_REASON_SEV) | BIT(APICV_INHIBIT_REASON_APIC_ID_MODIFIED) | - BIT(APICV_INHIBIT_REASON_APIC_BASE_MODIFIED)); + BIT(APICV_INHIBIT_REASON_APIC_BASE_MODIFIED); =20 return supported & BIT(reason); } base-commit: b23f8810c46978bc05252db03055a61fcadc07d5 --=20 2.36.1.476.g0c4daa206d-goog