Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp797806rwb; Fri, 18 Nov 2022 08:21:30 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ZTX+SnNmmoQBhC3F6g4Kv3cu8r18S7mesxl09BzaGaDnA72Wmx8lSE0sVUh6DTJfx82Vx X-Received: by 2002:a17:90b:1214:b0:213:43bc:92aa with SMTP id gl20-20020a17090b121400b0021343bc92aamr8540855pjb.119.1668788490676; Fri, 18 Nov 2022 08:21:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668788490; cv=none; d=google.com; s=arc-20160816; b=Onv5EBvfIZCJ6F180bt6YRdOK11pJ0dEfSwZQkCoUW2CC+w37chjnEDahnwv5ZBbWL MawpukR735gkP1E56sNBiVH8+9yYVbUBPkLmpVN9yoOd2f9lUe2c+FvNsXivikaozo6s l3BBg6t1PFxf+TErDexU6W1FaQg8/vRJiWlVD6Vt3OowZLmLYm6OCOTlDtfdTBZ4W3Mt dK4/YjHL4R1NL3+H4M0EfNrNyrYe0B3LxigZhaaJGle9xJe3jfB1pdTAePe+Lrl8ZdbD aEs5hYHSISiKYiK4cDeDX0XlRiVnNKEWjqQ53hrxpe9NVnLJQNLwPjwYJhXUDJwjxfj1 palw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SlFVrej9bt4YEUqyZWryuI8fTcVVTeK+6ZolSLExKOo=; b=G9ofVdYvV/yh+9gwJ9DYZzAEyW55O+TjmMqDRXbtNiXyMRipjDuedilGRs7F+45cNY wwPmmW1uLti7j4w8nTeiw86VE2TzHFi0udXMRoOTNXbXR1y87O3eBES0/nPV+my6Xj7Q HVnIuff/WCm6YCahuAfM6exXNhj6+kDxvoZSdkpWeP6F+C5VucDSTiJ5NuoSzWFwG9xW n9xLKVWcG5KrbMwRSQRi074fCaBVzrFaeNwy+nCTZPisB8bLqdqMfrWEiZHE157E84Zp Rt9rEZWPQEcBP7h//NZIlrgxRIxjkDHD6GgJ/1HAT0Nk7HbIrmvBZ+iVbbZHxguolaEj ggqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=HvcoXdH7; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w200-20020a627bd1000000b0056bb75c96d6si3828494pfc.227.2022.11.18.08.21.18; Fri, 18 Nov 2022 08:21:30 -0800 (PST) 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=@google.com header.s=20210112 header.b=HvcoXdH7; 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=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241750AbiKRQEW (ORCPT + 91 others); Fri, 18 Nov 2022 11:04:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241597AbiKRQEU (ORCPT ); Fri, 18 Nov 2022 11:04:20 -0500 Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31D26716E2 for ; Fri, 18 Nov 2022 08:04:20 -0800 (PST) Received: by mail-pg1-x52f.google.com with SMTP id b62so5419958pgc.0 for ; Fri, 18 Nov 2022 08:04:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=SlFVrej9bt4YEUqyZWryuI8fTcVVTeK+6ZolSLExKOo=; b=HvcoXdH7ttv9Bf+uw0Ns4EN0hYL9WLK3zx1ep4D98FrWoNLmOjfRcYrS8wv95bHTU0 dUZoP3H+9NjYegMqMpD30OiZgQjjM/tWjdAbToHWmRqO5pdKdDINR4EXe2F/bS3lmbcA w7BxwfcPHZE6gd4PPAHBfEgcexn55aFwgnLHAnXwR0rlvie0Jlp13SX3MvdWKcLS9TF8 U41ADoXkBU7BcUovJlp0QvwHja0S9Yhra7rn/nJCZeoXgTsr+lx4F12wYd62moC6FLX1 KXNDigpp/8AAm2cekP7Xm8gP2KXiWH7ABMOzM38IF7dIZvHFaDbli8kWQf3QfTnJGSHJ rpOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=SlFVrej9bt4YEUqyZWryuI8fTcVVTeK+6ZolSLExKOo=; b=uWZsl8VSINMEOwiZwdYXClndaa/d2irHNBQyMfd88pNJIQP+zGbocEbqBpvz0JJQzC zJjgUw9Yl4IT9t7rbAmJWqytH1DaENF3VbQkjAhZoxelhALLwh57LazMCaI2u+15NEcq trVMuBoe0MNk6JOwEpFAT7pbr31eWdf+Bxt0KM2d8aFRQ+ezGVZjQ4cIUAHXKWnabGiB +tH8k9o8D9d4Y3gF0BH4hewdPbkdr3Gbixv6FwxmApRUvmo736u8e8F2Y5H9AzIPAHR9 x0qJJ2hbkfkVfORXgclduNXPahm1lRXHLouXTsPeOlrlvlAe4EkBmPxtZvqZKEqPgYP9 u7nw== X-Gm-Message-State: ANoB5pkQmtamoh77mtJqnGW518MXj/oND9FjnjEa8rFrV74XIYRCGvCH GyFaf/O53cK0F8fM1K/Gu728Jw== X-Received: by 2002:a63:d117:0:b0:476:c781:d3ae with SMTP id k23-20020a63d117000000b00476c781d3aemr7072807pgg.183.1668787459569; Fri, 18 Nov 2022 08:04:19 -0800 (PST) Received: from google.com (7.104.168.34.bc.googleusercontent.com. [34.168.104.7]) by smtp.gmail.com with ESMTPSA id r2-20020a170902c60200b001766a3b2a26sm3820057plr.105.2022.11.18.08.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Nov 2022 08:04:19 -0800 (PST) Date: Fri, 18 Nov 2022 16:04:15 +0000 From: Sean Christopherson To: Greg Edwards Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Paolo Bonzini , Maxim Levitsky Subject: Re: [PATCH v3] KVM: x86: Allow APICv APIC ID inhibit to be cleared Message-ID: References: <20221114202037.254176-1-gedwards@ddn.com> <20221117183247.94314-1-gedwards@ddn.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221117183247.94314-1-gedwards@ddn.com> X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham 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 Thu, Nov 17, 2022, Greg Edwards wrote: > Legacy kernels prior to commit 4399c03c6780 ("x86/apic: Remove > verify_local_APIC()") write the APIC ID of the boot CPU twice to verify > a functioning local APIC. This results in APIC acceleration inhibited > on these kernels for reason APICV_INHIBIT_REASON_APIC_ID_MODIFIED. > > Allow the APICV_INHIBIT_REASON_APIC_ID_MODIFIED inhibit reason to be > cleared if/when all APICs in xAPIC mode set their APIC ID back to the > expected vcpu_id value. > > Fold the functionality previously in kvm_lapic_xapic_id_updated() into > kvm_recalculate_apic_map(), as this allows examining all APICs in one > pass. > > Fixes: 3743c2f02517 ("KVM: x86: inhibit APICv/AVIC on changes to APIC ID or APIC base") > Signed-off-by: Greg Edwards > --- Reviewed-by: Sean Christopherson