Received: by 2002:a25:6193:0:0:0:0:0 with SMTP id v141csp4626510ybb; Tue, 7 Apr 2020 11:08:26 -0700 (PDT) X-Google-Smtp-Source: APiQypJIw7ExaS/rb9w/P3evKtBM+AkCbPQz6+myu6+oVEfBYHLGfDkU9jA1u/pZthpzfFsslwvd X-Received: by 2002:a9d:468:: with SMTP id 95mr2546215otc.125.1586282906681; Tue, 07 Apr 2020 11:08:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1586282906; cv=none; d=google.com; s=arc-20160816; b=uIR0qto5b9QxRWQKY/t21yfJ9TnLNodN82ws4CksH6xy0PZd7BdQiZhLOTz7VezM9t 8INYECY2Dcf8SlwZp1cdalYdDUkVVNNHEfuB2N2dbJP5XZN1aw/r2y3Av0P3RZlapLSO hJ2JLy1vpAtkwR6giXvZvPFA8jdQKaCrfshUumuLZV0oU+kMacKhpIQv+l4WoZWsxjJ8 rWQp73Fnz0P6rOiUJZOPetgWScxihYTiDRGSyY1Q2Sor8veRGMcvmMyQUmWnUFwhZFPj qYEMYFLAxI7b5P/NKbpcZtoCq2AMaqNUMf0liN3yD3fwxhWp8/Kfs3kinv3OrYgkZ2+2 FDQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=VFURkkgEI28LmHfSrGJJBsN6aispJEyV6widBHxa9UY=; b=mfwivnCpUUXZD45rw250HM9HR3Fcj9N70N1GDlRXawYBCzkJAVjpFcbXZ28svDAaEs ISsNcx+JT3j8LsRP1tGzcEU4Lxyv6hBdAbUce1G1PL1EgCA7MUOuuzlaAzZMCGjwkEZZ 8Y9ijD7NC5uP9x5p2tF0jpB0VlTSHVqG4htb7508K4rL1wpvOE7bbDZ7Zjm+T8Fhl9iw p2QiuAltIdyDIS4uCbRPjp1ERL/E4//O+srpbAUpE3uwpS50/rUxzJEE8pSZo3+HnbnB goNrWbi32vbaO9DhB7/pqw0LQ1XbkGkt0X2Cln+VKKkYYZo/SeGB/hG60UGh44Lc9+LX d3/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@juliacomputing-com.20150623.gappssmtp.com header.s=20150623 header.b=kCB4Ds65; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c19si1524967otr.276.2020.04.07.11.08.09; Tue, 07 Apr 2020 11:08:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@juliacomputing-com.20150623.gappssmtp.com header.s=20150623 header.b=kCB4Ds65; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgDGSGu (ORCPT + 99 others); Tue, 7 Apr 2020 14:06:50 -0400 Received: from mail-io1-f68.google.com ([209.85.166.68]:36133 "EHLO mail-io1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726339AbgDGSGu (ORCPT ); Tue, 7 Apr 2020 14:06:50 -0400 Received: by mail-io1-f68.google.com with SMTP id n10so4381913iom.3 for ; Tue, 07 Apr 2020 11:06:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juliacomputing-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VFURkkgEI28LmHfSrGJJBsN6aispJEyV6widBHxa9UY=; b=kCB4Ds65lhJ0e+rTx+VtREwnxiOpVxi+97SRFICJ3k3FErV61ZIBlP3DxUwrD0rVtc vG/IkazIdBCiwAQyUF4KGSheGOIJNoKBRMgO2DGzgOZu4RqvDQTM0ZXE/9bqeN/y/JgI vDN8H0yY5BZ8VaO+l0kv1faoKQOnBb9aQpHod2Xe1UYjBYo3zA2htfflCyx+3H8zOlx9 w0nzGHAhetJmUH3cr61InWFZtwg/dBawi7O9QqYclurYlqCwuMQ+3go/35KvUkCTEpj+ zUlOhqvJRQJuzsRLw2GlwyfHrjbyadzN6T1NOdMM2kPgsxNJmTJQgdORsAvNt2BxVN6D mF8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VFURkkgEI28LmHfSrGJJBsN6aispJEyV6widBHxa9UY=; b=WIQ2HJu2SEjauZ5hZpnrONEgyu6aRwP/RI4E7iTg+IbTTqe33Ben08I0Df5Q+8Il4M dxVK7mggTIltbO/zF9Nspysg3KA2Wtu5FIRT6RGxPLNwtClo2jWKquO8sKjClgQMtq+t 3Zmh/A7wy6xpTTmFihLUgAgSxpgxU5U+UC8l+FkotDw9NcNGb3NbExAdA+ZbA4KbDNnu XWAyw3hPu2tT2/gftOtA6k2ieKehYXrCf+ayPe02RFvJwxUclbLM0a714vYatIm5MG1I esVHPgMV/rPPdC41OrFadJ3DBBGz+CnSpHVmC4CVXuayrTlJA+yHhPFyCS59VPX17Ivz 2xvw== X-Gm-Message-State: AGi0PuZQ+KO/DQUA0vbKfc5fnCAwtDv1QnwUu8G8dKxmQJXaXNOUnSde JP+UY7/BCYieSvsFJhSw8AxAaHhna4XU8nhWS+2Qvw== X-Received: by 2002:a05:6602:22c3:: with SMTP id e3mr3282683ioe.75.1586282808916; Tue, 07 Apr 2020 11:06:48 -0700 (PDT) MIME-Version: 1.0 References: <20200407011259.GA72735@juliacomputing.com> <20200407142002.jxzc3xcuyoznjgkh@two.firstfloor.org> In-Reply-To: <20200407142002.jxzc3xcuyoznjgkh@two.firstfloor.org> From: Keno Fischer Date: Tue, 7 Apr 2020 14:06:11 -0400 Message-ID: Subject: Re: [RFC PATCH v2] x86/arch_prctl: Add ARCH_SET_XCR0 to set XCR0 per-thread To: Andi Kleen Cc: Linux Kernel Mailing List , Thomas Gleixner , Ingo Molnar , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , Borislav Petkov , Dave Hansen , Kyle Huey , "Robert O'Callahan" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Andi, > The rationale from that post should have been in this description. Yes, sorry. > You can already do what you want using the clearcpuid= boot flags using the > infrastructure in [1], which is in newer kernels. Yes, that it useful, but doesn't solve the problem where we're trying to jointly replay traces with differing XCR0 values (as mentioned before, this is useful for recordings from multiple nodes of a distributed system). Even for the single trace case, having to reboot the system or boot a virtual machine manually for every bug report I get would be operationally annoying. A potential solution to the operational problem would be using the raw kvm API to get a very lightweight VM with modified XCR0 but that has performance and complexity concerns.