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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E2A7CC25B6F for ; Fri, 27 Oct 2023 20:49:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346524AbjJ0Utn (ORCPT ); Fri, 27 Oct 2023 16:49:43 -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-Google-Smtp-Source: AGHT+IHvGAQmtaofLW4fDTeQIJezLNbav66mMWrYOSqZpO65GYDrU2z5z+HQvsLGFfVloL3gqz7a5wuX1RI= 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" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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(-)