Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp316733pxa; Wed, 26 Aug 2020 11:23:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9n+MiVmLlg2B7r31JjgZvjdukzHCjYDHodTcTeVnKeyDxEl2LuO9ufCweSpIQDl4JsfgI X-Received: by 2002:a17:906:f9cf:: with SMTP id lj15mr17567275ejb.520.1598466207531; Wed, 26 Aug 2020 11:23:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598466207; cv=none; d=google.com; s=arc-20160816; b=fmVJuh6gUgXn9PrtIq78CIqaNVn+V5mOghfC02Q0atvABchK8xV+HD1e/WTHUJ15qI PFPYlNCQL00rbE+q+VuFfmKOnLO+9vTTtQSt7MTHb9my/T54Z6QtdMVIomn/d+c9gDGY 8yPx5Ga0nRHYrGg1Ot5eWfs27NIoKyhlKqGURKi5W2xmJU0COLu/euYF7WNSPshnAb/3 mCsjFFWu2sViD9sjC6QADKSKLdJe3wHj7HcYNdzbVZwsMHoN6Pe32jL9/RHtA/wHEk00 deKhjWx1zlBkRbMW1lDggM8j2xIJZdXtwhBez0yaWZPxwN+p3DdVt2u36eYwo5J1cSnd 3bdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from:dkim-signature; bh=4u2E+0R69kRraLKpaxVrEycUDCu2mmKu3H7Kl7FDJbw=; b=RrCnsKAbS0Gp/kvSQL8ILFriJSJaEyStocpcSYeWYak14bzaUVc+taWNuPSq0Yme3+ 25I2weEU6W1gc27T8p637jajTnwdDo5mJzVh0YRldu7goDDqykFuklQvTGG0j6gQfXoL l4dFm4uIorNfXlrOAbmZhjHR4DQ3+CKWjeVMCy4PWZHaEec06DOB+ifQcmjYT/3lIA0f XKbWEbxUxcSm8Q73SMDx9uzUBMiI7BHVnAzMNmMExiv051B+X7Oet4/zoyvIz+a54xZC J322WHFmYT4SI2aP+RUxVR3k8W1zz9uG8DlRGnWb/KP//H5gFVvbKGb04/U1Aenc9/dk W4iw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=Cq+RfC+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c12si2152306eja.513.2020.08.26.11.23.04; Wed, 26 Aug 2020 11:23:27 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@amazon.de header.s=amazon201209 header.b=Cq+RfC+O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=amazon.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726798AbgHZSWZ (ORCPT + 99 others); Wed, 26 Aug 2020 14:22:25 -0400 Received: from smtp-fw-6001.amazon.com ([52.95.48.154]:5846 "EHLO smtp-fw-6001.amazon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726241AbgHZSWV (ORCPT ); Wed, 26 Aug 2020 14:22:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.de; i=@amazon.de; q=dns/txt; s=amazon201209; t=1598466140; x=1630002140; h=from:to:cc:subject:date:message-id:references: in-reply-to:mime-version:content-transfer-encoding; bh=4u2E+0R69kRraLKpaxVrEycUDCu2mmKu3H7Kl7FDJbw=; b=Cq+RfC+OJu17N24QRpIepqNIuvpY6xukI+8H4pNkIHJRzs8i0LigJ8wd GAqGwBjcv9fty3wNGOwfTN4293rpLJj++th5eDqXI3PSSkeJDI6PkB8EN haf8Qp9wBhIt6RwyF5h0ZS50YHkepJmBGqtiWZwYkmbconL33YN6+3e3g Y=; X-IronPort-AV: E=Sophos;i="5.76,356,1592870400"; d="scan'208";a="51617283" Received: from iad12-co-svc-p1-lb1-vlan3.amazon.com (HELO email-inbound-relay-2b-859fe132.us-west-2.amazon.com) ([10.43.8.6]) by smtp-border-fw-out-6001.iad6.amazon.com with ESMTP; 26 Aug 2020 18:22:12 +0000 Received: from EX13MTAUWC001.ant.amazon.com (pdx4-ws-svc-p6-lb7-vlan2.pdx.amazon.com [10.170.41.162]) by email-inbound-relay-2b-859fe132.us-west-2.amazon.com (Postfix) with ESMTPS id B4572222269; Wed, 26 Aug 2020 18:22:10 +0000 (UTC) Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13MTAUWC001.ant.amazon.com (10.43.162.135) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 Aug 2020 18:22:10 +0000 Received: from EX13D20UWC001.ant.amazon.com (10.43.162.244) by EX13D20UWC001.ant.amazon.com (10.43.162.244) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 26 Aug 2020 18:22:09 +0000 Received: from EX13D20UWC001.ant.amazon.com ([10.43.162.244]) by EX13D20UWC001.ant.amazon.com ([10.43.162.244]) with mapi id 15.00.1497.006; Wed, 26 Aug 2020 18:22:09 +0000 From: "Graf (AWS), Alexander" To: Andy Lutomirski CC: Thomas Gleixner , X86 ML , LKML , Andrew Cooper , "Paul E. McKenney" , Alexandre Chartre , Frederic Weisbecker , Paolo Bonzini , Sean Christopherson , Masami Hiramatsu , Petr Mladek , Steven Rostedt , "Joel Fernandes" , Boris Ostrovsky , Juergen Gross , "Mathieu Desnoyers" , Josh Poimboeuf , Will Deacon , Tom Lendacky , Wei Liu , Michael Kelley , Jason Chen CJ , Zhao Yakui , "Peter Zijlstra (Intel)" , "Avi Kivity" , "Herrenschmidt, Benjamin" , "robketr@amazon.de" , Amos Kong , "Brian Gerst" , stable Subject: Re: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code Thread-Topic: [PATCH] x86/irq: Preserve vector in orig_ax for APIC code Thread-Index: AQHWe9XPb47wB6d5z0uF8BBPksZN1Q== Date: Wed, 26 Aug 2020 18:22:09 +0000 Message-ID: References: <20200826115357.3049-1-graf@amazon.com> <87k0xlv5w5.fsf@nanos.tec.linutronix.de> <87eentuwn8.fsf@nanos.tec.linutronix.de>, In-Reply-To: Accept-Language: en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Am 26.08.2020 um 20:03 schrieb Andy Lutomirski : > = >> On Wed, Aug 26, 2020 at 10:47 AM Thomas Gleixner wr= ote: >> = >> Andy, >> = >>> On Wed, Aug 26 2020 at 09:13, Andy Lutomirski wrote: >>> On Wed, Aug 26, 2020 at 7:27 AM Thomas Gleixner wr= ote: >>>> The below nasty hack cures it, but I hate it with a passion. I'll look >>>> deeper for a sane variant. >>>> = >>> Fundamentally, the way we overload orig_ax is problematic. I have a >>> half-written series to improve it, but my series is broken. I think >>> it's fixable, though. >>> = >>> First is this patch to use some __csh bits to indicate the entry type. >>> As far as I know, this patch is correct: >>> = >>> https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?= h=3Dx86/entry&id=3Ddfff54208072a27909ae97ebce644c251a233ff2 >> = >> Yes, that looks about right. >> = >>> Then I wrote this incorrect patch: >>> = >>> https://git.kernel.org/pub/scm/linux/kernel/git/luto/linux.git/commit/?= h=3Dx86/entry&id=3D3a5087acb8a2cc1e88b1a55fa36c2f8bef370572 >>> = >>> That one is wrong because the orig_ax wreckage seems to have leaked >>> into user ABI -- user programs think that orig_ax has certain >>> semantics on user-visible entries. >> = >> Yes, orig_ax is pretty much user ABI for a very long time. >> = >>> But I think that the problem in this thread could be fixed quite >>> nicely by the first patch, plus a new CS_ENTRY_IRQ and allocating >>> eight bits of __csh to store the vector. Then we could read out the >>> vector. >> = >> That works. Alternatively I can just store the vector in the irq >> descriptor itself. That's trivial enough and can be done completely in C >> independent of the stuff above. > = > The latter sounds quite sensible to me. It does seem vaguely > ridiculous to be trying to fish the vector out of pt_regs in the APIC > code. I like that option much better than the orig_ax hacks. Is this going to be = something useable enough for stable? Also, Thomas, will you have a look at moving the vector info? If so, I'd ho= ld still on this patch for a bit. Alex Amazon Development Center Germany GmbH Krausenstr. 38 10117 Berlin Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B Sitz: Berlin Ust-ID: DE 289 237 879