From nobody Tue Mar 12 05:14:25 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Tv1z62FxJz5DJZ3; Tue, 12 Mar 2024 05:14:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Tv1z56PhBz4ngB; Tue, 12 Mar 2024 05:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710220465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5cPFzEl0lTbf3YTFnDJ5STsHasTtKLwwbx+IK1TjWo=; b=T9T1EnuJ8rUpjSiHnz9Y8Kb2gJxi5zEjzWY/bvcLjsIMNmO+yTJwfb26nTLrYCu0FxsJzr mW7bm/jb2S6hkGoc5tqDSQ7wWQ8ZMDV+74NLP56ypiPqSFRnw+r3mywtXXGT/lxibz8mzJ 1k3e8+GGSx2DoyHzVuZSC2EOKxGyB7POhzanLT4qxjqxnZ6UIrnC7JBo7J32U4j7T0eM61 U41PFsw4vc1Cv7VMTMtUATmuxDtvmQ5tw9utVTFvFv5oaRV2RMotoP/R4DF/gTbzVT2joM f/iVWdD/O1k3SbjQKAOh+zlmg/PeUTzKc9481RB2VX6cyygoCxBE0KPaMXjoCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1710220465; a=rsa-sha256; cv=none; b=Osvw4laIUnlHvnCGe6gD7v3Ga94Q/ZIR9R2cIKWzxcZolhvEqGsApzIGJ2G8fcCSE9Nqsy 4iShhix8406ISt5ZWQpUToVuHARAVYlr2RZmQupNoY4vMFp5ESQt9P9w1MQbKyZpNv0IHU 0eC3yJgQk7wlVnt4bNMhqBt2wU4RRKDRy40CixPVS6oCWPwrAxOyfVSd5IQu9Fii8IkyN+ djeJizLGwp0rS8OagS6Y/JA5PwRdeG5dVvXNUvZiIsnzLZDi2Zc7fArLALyYrmPi/cWRFd +azzBmmjlJo9pXkDZEFcfZwGpYMGntcTtZSY5ntV7TwfGzPM5bcffVbRde7e/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1710220465; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=E5cPFzEl0lTbf3YTFnDJ5STsHasTtKLwwbx+IK1TjWo=; b=JpJ1vlaT9DAWY5jGStk4X+0alrzB8lFlr8XdmUF4+LAQCO1NmuPph16PNRkrgaQhpOsvWB DKZyeMx0v5peVEW2WNwKfQT8sZ5yZ0e2JJKqux35NpDLhe7MLVgqWOoherBi5an5/eVALs /5NsBSrrFfezFgPML5A54nTEEqsedwAqxmbujpl0Vd/F1YMsHsZPQTOFWxvNHZ2/gwCklk pvo1Hy6Eb7mkUoWqMqUL05Kexy4lHS/YMGndAFrTfFGJQd4qCfTE6JhxacL9gpJeJ7/+3D xdPXNAiDYdR82FajJMYh8wqMZhqQIw4N6TeLpQDG3GgtRCfiXq1VFisZf2LRZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Tv1z561qnz11M9; Tue, 12 Mar 2024 05:14:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42C5EPcg022298; Tue, 12 Mar 2024 05:14:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42C5EPls022295; Tue, 12 Mar 2024 05:14:25 GMT (envelope-from git) Date: Tue, 12 Mar 2024 05:14:25 GMT Message-Id: <202403120514.42C5EPls022295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: e4b8828947b1 - stable/13 - Hyper-V: vPCI: limit 64 cpus for msi/msix interrupt handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e4b8828947b1135fba411f58cac123c85bb24093 Auto-Submitted: auto-generated The branch stable/13 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=e4b8828947b1135fba411f58cac123c85bb24093 commit e4b8828947b1135fba411f58cac123c85bb24093 Author: Wei Hu AuthorDate: 2024-03-11 10:15:09 +0000 Commit: Wei Hu CommitDate: 2024-03-12 05:04:59 +0000 Hyper-V: vPCI: limit 64 cpus for msi/msix interrupt handling On older Hyper-V vPCI protocol version 1.1, only the first 64 cpus are able to handle msi/msix. This is true on FreeBSD 13.x and earlier releases. If MSI IRQ is assigned to cpu id greater than 63, it would lead to missing interrupts. Add check in set_interrupt_apic_ids() to only add first 64 cpus into the interrupt cpu set. Reported by: NetApp Tested by: NetApp Reviewed by: kib Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D44297 --- sys/x86/x86/mp_x86.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/x86/x86/mp_x86.c b/sys/x86/x86/mp_x86.c index 1f4caf07f979..56cf7e426076 100644 --- a/sys/x86/x86/mp_x86.c +++ b/sys/x86/x86/mp_x86.c @@ -1184,6 +1184,13 @@ set_interrupt_apic_ids(void) !hyperthreading_intr_allowed) continue; + /* + * Currently Hyper-V only supports intr on first + * 64 cpus. + */ + if (vm_guest == VM_GUEST_HV && i > 63) + continue; + intr_add_cpu(i); } }