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 D984AC6FD1F for ; Wed, 22 Mar 2023 10:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229871AbjCVKHg (ORCPT ); Wed, 22 Mar 2023 06:07:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34458 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229865AbjCVKHb (ORCPT ); Wed, 22 Mar 2023 06:07:31 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0E7285A91A for ; Wed, 22 Mar 2023 03:07:28 -0700 (PDT) From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1679479646; 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: in-reply-to:in-reply-to:references:references; bh=lG0bDjgsBnv7wqrnYudcN24YDMczaF2W6JJRutRlr3M=; b=boTMti1+35NZXfd4LHzsrdUrgFOz98zqpOFkO92G7So56LRIfgTQIkaIw8DZaHpbNYG4Q7 fJxL9rPk7xzMmLdLE3cclShwSEfNYbwJn/oSC6tfdwTVulilYQ0ma9yXWO4mIURRMHil5W 1l27WBZlblMVFODjeF0nkg0AaH3Rrlogp1xLlE1fK22YIj7tI5Fqoc/PWhfdR49bXqU6D1 MnfYU06DHBjCgd244x3534y61y3azmUm+8rIBIH5WtXQNUZKi9s9XsRRmGAmlfNrgZQBJF tX83ThXTCYxkyNTWckctYG5W50dBjtL9wL3Vc9jW/yWLQEc4Uq2Q81EakHDVbw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1679479646; 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: in-reply-to:in-reply-to:references:references; bh=lG0bDjgsBnv7wqrnYudcN24YDMczaF2W6JJRutRlr3M=; b=UrrQagkOOm6X4CG3bwpnpBrMbmaocZZKEKZ8C8wM9O+izc/FBp96O71P4vIyEwz40wBaG4 Pf9r2Hb31MCkc8CA== To: Jeremi Piotrowski , linux-kernel@vger.kernel.org Cc: Brijesh Singh , Tom Lendacky , "Kalra, Ashish" , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org Subject: Re: [PATCH v3 4/8] x86/psp: Add IRQ support In-Reply-To: <89c227a5-0db6-7cbe-6beb-4035f58f036b@linux.microsoft.com> References: <20230320191956.1354602-1-jpiotrowski@linux.microsoft.com> <20230320191956.1354602-5-jpiotrowski@linux.microsoft.com> <87h6ue9z0p.ffs@tglx> <89c227a5-0db6-7cbe-6beb-4035f58f036b@linux.microsoft.com> Date: Wed, 22 Mar 2023 11:07:25 +0100 Message-ID: <877cv99k0y.ffs@tglx> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Mar 21 2023 at 20:16, Jeremi Piotrowski wrote: > On 21/03/2023 11:31, Thomas Gleixner wrote: > >> 1) What's so special about this PSP device that it requires a vector >> directly from the vector domain and evades interrupt remapping? > > The PSP interrupt configuration requires passing an APIC id and interrupt > vector that it will assert. The closest thing I found that provides me with > those was the x86_vector_domain. Here's the link to the ACPI interface, the > relevant info is on pages 13-15 (it's not very detailed, but that's all I > had when implementing this): > https://www.amd.com/system/files/TechDocs/58028_1.00-PUB.pdf That seriously expects an (extended) APIC-ID so that firmware can fiddle with X2APIC ICR directly. Why can't firmware people just use something which is properly manageable by the OS, e.g. a MSI message or something like the ACPI interrupt? Because that would just be too useful and not require horrible hacks. So my initial suggestion to piggy pack that on device MSI is moot. Let me think about it. Thanks, tglx