Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp1419403rdh; Fri, 27 Oct 2023 13:49:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFfSdTSlIpoajvSJMxIFfSujo0VWsaIPb3+9keYNm6ptStK3wh967dbfW71Ha6Nqr/dOYNL X-Received: by 2002:a05:690c:6:b0:59b:ce0b:7829 with SMTP id bc6-20020a05690c000600b0059bce0b7829mr4363582ywb.35.1698439787815; Fri, 27 Oct 2023 13:49:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698439787; cv=none; d=google.com; s=arc-20160816; b=KUQPBw4KEJ68iv9F77JLItL8GyrLdyEfTTGGjw7W+oyVp21qFnA94I7n3PimdMu5NV Y82Zuo6MIDVWohwFMBakpbhzwFgRmkReIUdTs5LOmCPjYq/+wlHttjs8Z2qEc5ZH3oH/ 8azFOE2KdE/EoUuRaNB43frnhv159IABT4KlTEsyZlE0XSNciCYDd8edKkQjc1TxTSt8 e5JEjDp8suHpHuzreDF/dc/ceTNb4TWoaqqEXGaipOVbViuo+1tUgmuA1c5jrY+MSMEb vMIMaw0hzkw65QYBrq4/i3bd3DUqCjrafscuy5vM5AD9Mzbunt78Vi8j5PXNbXZWLge4 YoLA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:from:subject:message-id:references :mime-version:in-reply-to:date:reply-to:dkim-signature; bh=F0GgFwBHDaTkhQsg7B4id3Q1Dy4NRZ9lf/HDP2O5wKQ=; fh=dogxdQWc7Q2U5Ekp9F18wEHwMgE3kRwQ/60KgTj3654=; b=HKnu+OcG7ykWBlMhw8Qj9OJ+2vZdb8g41d1Xx4ccpWFpmyRdBeBR6AF5hSg7u2om0X 1yevRPwmeEaijLvOyv3rfRfJmvdnKwV1KwBH9J7eTtqwaubau4etePJ1MkC+9UdRGeJM Nceny+VvLL3pqDjTJ1lp0mrFQ0ny6N0ksV8iDgPyVDEA/n1WQAh7DYHXkZN4yEoN7t18 FDkU1JsGTGMQsZAufC3rJMx8UYAnWssv7xua4b0E+E44/egfhXa9DXVnHpL6sW/8r/eR QonlXSKmg72o/lJt9GolTUs7jTCGNosyKD9D3HBwNf1+USWcvNioukZsotDsHnNJjgsF o2lA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4UU0kYxJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 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 snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id p126-20020a0dff84000000b0059be1747e85si3709275ywf.369.2023.10.27.13.49.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 13:49:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=4UU0kYxJ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 48DAF80AB1D0; Fri, 27 Oct 2023 13:49:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346513AbjJ0Utm (ORCPT + 99 others); Fri, 27 Oct 2023 16:49:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229712AbjJ0Utk (ORCPT ); Fri, 27 Oct 2023 16:49:40 -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 AEECE1B5 for ; Fri, 27 Oct 2023 13:49:38 -0700 (PDT) Received: by mail-pj1-x104a.google.com with SMTP id 98e67ed59e1d1-28014ce75d5so639230a91.2 for ; Fri, 27 Oct 2023 13:49:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1698439778; x=1699044578; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:from:to:cc:subject:date:message-id:reply-to; bh=F0GgFwBHDaTkhQsg7B4id3Q1Dy4NRZ9lf/HDP2O5wKQ=; b=4UU0kYxJU/gcwcZtgIEeV4omjd28k7PIOCuOzCahFGPL7LFmNPf2v6+VeFoEpICQZZ SrugI0r2PvFe5ZkukvzebzWezH4u1X1plKCgnbjTunQi0KWqAqqTYJ1EH7a8V4vb+4oU w3SqS0J0++Vx0bZZIerqluwl+I145Ae/behAj8hDnDv2uIk7NKCFxEReZg3JZvf5JXlj 4peW3aaAwqlRHCAm5XBMwxhST0P4ingyCJia9blXWI7HtTVtH4cOUgHiV4ryrPr4kXPT voGLGSjNFpCYmidj1xWyCQL+wv3w4tX4btyVPtetuOweyQNdGuY5vPwo227X2H1mJM+k apOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698439778; x=1699044578; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:reply-to:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=F0GgFwBHDaTkhQsg7B4id3Q1Dy4NRZ9lf/HDP2O5wKQ=; b=Pyk4srsiP5H9MPQlE/pkYLpSkhHTUf4zQu0BJIgiJUgHxs7husn34V90LrBZXdZDEJ nCruL7upIKQZpfFsdt4lLCjlMML+xDadHWksquG4F/bYhm6oSl9WoTPzx+eCJ9thqc6d 3ZAtoQ2BfuP4KUpzN37tS9tOIo1i6FplpcLWUKLoWntzJKlzNvavFXBPOFr7AWyBZZU0 3/ElVL4eOqso4EaYpUoOat7P8Rm0G2XYSaYRmHV/J6F0lPmo1M4X9Whz7VWg724q1YTN YO4KS1Z7tvDeI3ugL52j6NZKEBYapIa7rFL222+61qeBWALZtOsa2+R3YgZNNo/PeFDW kBDA== X-Gm-Message-State: AOJu0Yyhz9OhPI/6h8sbwxC0hXRsfJRJ0+imvxEe23yhQBC5B3RGFF3x wudVJf6SZi1rIUfFOXSz45zGnpN1NZ4= X-Received: from zagreus.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:5c37]) (user=seanjc job=sendgmr) by 2002:a17:90a:fb81:b0:27d:a0b:bff with SMTP id cp1-20020a17090afb8100b0027d0a0b0bffmr74124pjb.2.1698439778215; Fri, 27 Oct 2023 13:49:38 -0700 (PDT) Reply-To: Sean Christopherson Date: Fri, 27 Oct 2023 13:49:25 -0700 In-Reply-To: <20231027204933.3651381-1-seanjc@google.com> Mime-Version: 1.0 References: <20231027204933.3651381-1-seanjc@google.com> X-Mailer: git-send-email 2.42.0.820.g83a721a137-goog Message-ID: <20231027204933.3651381-2-seanjc@google.com> Subject: [GIT PULL] KVM: x86: APIC changes for 6.7 From: Sean Christopherson To: Paolo Bonzini Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Christopherson Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS,USER_IN_DEF_DKIM_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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 13:49:46 -0700 (PDT) Two small APIC changes for 6.7, both specific to Intel's APICv. The following changes since commit 5804c19b80bf625c6a9925317f845e497434d6d3: Merge tag 'kvm-riscv-fixes-6.6-1' of https://github.com/kvm-riscv/linux into HEAD (2023-09-23 05:35:55 -0400) are available in the Git repository at: https://github.com/kvm-x86/linux.git tags/kvm-x86-apic-6.7 for you to fetch changes up to 629d3698f6958ee6f8131ea324af794f973b12ac: KVM: x86: Clear bit12 of ICR after APIC-write VM-exit (2023-09-28 10:42:16 -0700) ---------------------------------------------------------------- KVM x86 APIC changes for 6.7: - Purge VMX's posted interrupt descriptor *before* loading APIC state when handling KVM_SET_LAPIC. Purging the PID after loading APIC state results in lost APIC timer IRQs as the APIC timer can be armed as part of loading APIC state, i.e. can immediately pend an IRQ if the expiry is in the past. - Clear the ICR.BUSY bit when handling trap-like x2APIC writes to suppress a WARN due to KVM expecting the BUSY bit to be cleared when sending IPIs. ---------------------------------------------------------------- Haitao Shan (1): KVM: x86: Fix lapic timer interrupt lost after loading a snapshot. Tao Su (1): KVM: x86: Clear bit12 of ICR after APIC-write VM-exit arch/x86/include/asm/kvm-x86-ops.h | 1 + arch/x86/include/asm/kvm_host.h | 1 + arch/x86/kvm/lapic.c | 30 +++++++++++++++++------------- arch/x86/kvm/vmx/vmx.c | 4 ++-- 4 files changed, 21 insertions(+), 15 deletions(-)