From nobody Thu Jan 13 15:29:21 2022 X-Original-To: xen@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 D5D4B194C29C for ; Thu, 13 Jan 2022 15:29:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (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 "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JZSyr5hQTz3MCP; Thu, 13 Jan 2022 15:29:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642087764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a0gzO7x3nqGofMlKRhNGAiO7/BJRngkdh+rUwqQ41MY=; b=vcB6QwwGcuv9cIGrcfr0F+t2EEjpd5yiCcCIo799GBqKipzn/wGnPm35DFyduYr8YIeIQg 7K6+6qoRTrqQY1FwAIBdVny6U2wic0D73QIT5zcgN5TSl0MmNlb4S9FgswwbFXGu+R0Yvh xlBNkSallkEl/fjNkY0GDauPPd2+SJoca5SEqFxgiGLq1qZPHCMJf10ADxffiFXg0Fa3kV aUvWAWTFPo1Tj5fB5tLMFo6SjTjWAZIsh0TLvgCQJxWXcx1jMvuu0HR9WZs0gX/rFwSi9I 58NcqPSRyJnHtDzOPqa46SZ7JijyTIGqIxOlMOl1bbBNaw53bzf11EjX6b144w== Received: from [192.168.0.88] (unknown [195.64.148.76]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 46F262D6C8; Thu, 13 Jan 2022 15:29:24 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: <7fb3c0fe-0145-7474-aa5e-0ad2dbb17e9e@FreeBSD.org> Date: Thu, 13 Jan 2022 17:29:21 +0200 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-xen List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-xen@freebsd.org X-BeenThere: freebsd-xen@freebsd.org MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:91.0) Gecko/20100101 Firefox/91.0 Thunderbird/91.4.1 From: Andriy Gapon Subject: Re: VCPUOP_send_nmi returns -38 Content-Language: en-US To: =?UTF-8?Q?Roger_Pau_Monn=c3=a9?= Cc: xen@freebsd.org References: <3f9f173b-40b9-0180-404d-52fa56dde45f@FreeBSD.org> <787faaf6-c639-0f6a-1a16-c4fb7a5506e5@FreeBSD.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642087764; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=a0gzO7x3nqGofMlKRhNGAiO7/BJRngkdh+rUwqQ41MY=; b=rVLPQ7pVXGU8mCdyrJN1UJPATKBmHgCSSYSKgELipDi+2k3XAoYBvgwL6H368AwuOYqfDK 7KxTB3SYgK2oq1CuRS4Dd6nbHXDxZF7s62G/FSlDtlCZ/Ut+P8ldlLaa0qBHJAarmPT8g/ j3Q/HXjY0M7YfzGaVROcRgLmWJSMUKsjjgPbkNKyYHe9V7a41rL2IWyJ//z/E+b6bDOJZd Lv6kBvadk+noJ0i+9PUrxssUcRnuO30LRT8HVkdFXMSqZx0G5iQdI56hfBstYq3aD13pvk yoCFuf1zp3XQvnJGGO7RYAxFWmpmfNuHku0s8uCIx/TGtQp4i8XR9lMzzTMb3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642087764; a=rsa-sha256; cv=none; b=PRYS2pchZFvWoq/FhNR9HNDCW7m1dqwimBPPztkeArm3iNggCC9r0/H6uPLFwunZZUONMH GwfFHJvJyaVNjQHZJBAl7ltcQy05VHMyDOM984T+cYAb9AWwBfipOsg4d6aEAOfc3cHPmj gdutJdWgqkwYat7eZ9e8LLoIXudg0lKtO3k+X2olOp6M5s8jmwN8fOrKIl4pHOqYo0iYyl EVUsH7mvmqUCUfO6P3sLlmNWrKFXfq7BspxvE+byETq2PQnJYgSM0p8tvDnK6tSpV3ZXlB a+nx/VegnWm1BzjDofdIJDftsXkZ+UpLkhlaHcEczGtd4goiWhPE9ToBrPigjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N On 13/01/2022 16:57, Roger Pau Monné wrote: > I've got two patches for you to try, the first one is 'mni-fix.patch' > and should fix the NMI sending issue. > > I'm also attaching a second patch, that should allow your guest to use > x2APIC. FreeBSD has previously prevented Xen guests from using x2APIC > because of a bug in old Xen versions, but I think this should be > solved now, so if FreeBSD can successfully boot on your VM with the > patch applied I think we are safe to enable x2APIC. That one is called > 'x2apic.patch'. > > Let me know how the testing goes. Tested both patches, both jointly and independently. x2APIC mode gets successfully enabled: # sysctl hw.apic hw.apic.timer_tsc_deadline: 0 hw.apic.eoi_suppression: 0 hw.apic.x2apic_mode: 1 hw.apic.enable_extint: 0 Not seeing any obvious regressions when running with it. NMIs are successfully sent and delivered now as well. Thank you very much! -- Andriy Gapon