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 D66FFC433EF for ; Sun, 29 May 2022 04:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230342AbiE2EsQ (ORCPT ); Sun, 29 May 2022 00:48:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230262AbiE2EsP (ORCPT ); Sun, 29 May 2022 00:48:15 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB37B590B3 for ; Sat, 28 May 2022 21:48:14 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2781F60DBB for ; Sun, 29 May 2022 04:48:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 7BF92C3411D for ; Sun, 29 May 2022 04:48:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653799693; bh=e/5YqpuBMe5NLk6haQT5183V1/0M+ZMtFBNrGEvyV48=; h=From:To:Subject:Date:In-Reply-To:References:From; b=TmhOJp3xHBy/Z6+jeMbNoj/GXrLBBqoWajg+6Nz/S/H43LGteOviQO4ZTAC7mECdp +QbEhyyU3x9hQrHrffsTjypCxQMN1/CzMXXDYRoZ/5xeo1MfoLaf/xLSJ0AaqAT0dn F/lO7aQGOuzGWMNWJ6QNFVROIQCcl+bdotKl27xaFuHKK5UzE4l2Sjy/PJ1UsePj+U HIKDbRN+A0FzVMCJHaFuUfbHgwfc1wzmEH1eoKWBttpJwZSK1mu2qN8fYI7HNAQLX5 VuAta7Oi86/2W6j6ZNqK/t7eenb5OWRc7SECNWkl6h9movOBm/kh/ZVZIaJ40cSF6v rdVksup/ltHjA== Received: by aws-us-west-2-korg-bugzilla-1.web.codeaurora.org (Postfix, from userid 48) id 6609BCC13AD; Sun, 29 May 2022 04:48:13 +0000 (UTC) From: bugzilla-daemon@kernel.org To: kvm@vger.kernel.org Subject: [Bug 216045] KVM x2APIC virtualization causes EOI to be ignored Date: Sun, 29 May 2022 04:48:13 +0000 X-Bugzilla-Reason: None X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: AssignedTo virtualization_kvm@kernel-bugs.osdl.org X-Bugzilla-Product: Virtualization X-Bugzilla-Component: kvm X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: ercli@ucdavis.edu X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P1 X-Bugzilla-Assigned-To: virtualization_kvm@kernel-bugs.osdl.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugzilla.kernel.org/ Auto-Submitted: auto-generated MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org https://bugzilla.kernel.org/show_bug.cgi?id=3D216045 --- Comment #1 from Eric Li (ercli@ucdavis.edu) --- Explanation of guest behavior 1. BIOS boots XMHF 2. XMHF starts GRUB as a nested guest 3. GRUB by default boots Debian (5 seconds timeout) 4. Debian executes 0xffffffff81062179 (can set a hardware breakpoint using GDB). At this instruction is a WRMSR to 0x80b (IA32_X2APIC_EOI) 5. The WRMSR instruction above will VMEXIT to hypervisor mode (XMHF). The VMEXIT entry point is 0x10206411 (xmhf_parteventhub_arch_x86vmx_entry) 6. At 0x10206434, the hypervisor calls 0x10207eb9 xmhf_parteventhub_arch_x86vmx_intercept_handler() 7. At 0x10208390, the hypervisor calls 0x10206d9f _vmx_handle_intercept_wrm= sr() 8. At 0x102070c6, the hypervisor performs WRMSR to 0x80b. The intention is = to forward EOI from the guest (Debian) to KVM. Before WRMSR, "info lapic" in Q= EMU gives ... ISR 48 IRR 48 9. After WRMSR, RIP lands at 0x102070c8. "info lapic" in QEMU gives ... ISR 48 IRR 48 However, I am expecting it to give ... ISR (none) IRR 48 10. After a lot of instructions, the nested Debian guest halts. "info lapic= " is ... ISR 236 IRR 48 236 253 --=20 You may reply to this email to add a comment. You are receiving this mail because: You are watching the assignee of the bug.=