Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp5074633imu; Tue, 8 Jan 2019 11:02:38 -0800 (PST) X-Google-Smtp-Source: ALg8bN6PkiGOkxGBuMBgoWTH5yVrFn/nqd9s1kH4w+tIOxn5P9vWLsY7CWN7zxGPNNVrQU0QQQmW X-Received: by 2002:a17:902:2dc3:: with SMTP id p61mr2895096plb.166.1546974158009; Tue, 08 Jan 2019 11:02:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1546974157; cv=none; d=google.com; s=arc-20160816; b=I6zYAJcLue9FsVoHL+w5MUwo6etn0HMZkkgt7LQzU6d9n2nwFHSfo75+lqqn/Ju6/Y DKbIPxVubWedU8hHpufJl8chFiAib2XLze32tvQQLWTdZOz02HpzCYXhrCiuOZk7qFiw yP2NEoOwiVAgUM7mfpiFieNBr8SHk3w+QoydH/eVj/j7i2PsP8sT0spPzQSnPgul5fiE VwSgPc5+MDVmNP6cQ0EMU1YKGtea2ooDuERWgwkjFPuPzbdLElHrTAC48Cqvzxbo1uyN KsMUxloQMPy2jMBLYjAZQG9u+s9X9Yr0dqB6GZu8ZpDlXLVJRMJf80J4Hy8987DHOhMW XVNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=Kg2ZOj3oRtfmirfVDZJAz6uTlws91sqS1srR4JV9AYU=; b=iDJpdXKfa9+wgD1pe128KbsSNnT6+0UiMgpSh3JSRUraFOWoAvY7xcFTvoQtt+O+xq T00P9DfnIAKGAEzpSqvb1PfIWFYALvI1lN8fBEeWbhBy0ELF8lonO7ubUtoOtKg1RCf1 +I9VeuMNeuI93XFya5PqCNJFj/++BRZ05HYf7WAJ/8mDVYvVftRKKbVD8lalXfVjYmeo PAb16Gw1LoBKrva5A5zDfQI5Ws+GT7nrJaifbSxRs/RM9uK9XNeXMzXzObpS1GhNObP5 hAlSBcNXTIJC7Ld0NG7tac8QHQynDx74WDn2GRRMUTiKpKUvRkuNoOXzdIO/SIU9f4qA ZmqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JBCXTWF3; 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 g31si50113287pld.358.2019.01.08.11.02.20; Tue, 08 Jan 2019 11:02:37 -0800 (PST) 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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=JBCXTWF3; 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 S1728651AbfAHTBO (ORCPT + 99 others); Tue, 8 Jan 2019 14:01:14 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:53774 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727947AbfAHTBO (ORCPT ); Tue, 8 Jan 2019 14:01:14 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Transfer-Encoding :Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To:From:Date: Sender:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Kg2ZOj3oRtfmirfVDZJAz6uTlws91sqS1srR4JV9AYU=; b=JBCXTWF3YwF5hqGK9OkYPzmLPe k39t1i/HG9XMpJiNJj8Hgda4LWkzjkmKMurXFM2Tx83nmdRzmULzx/d+3fEpde8A0a5a/vF+zjo9H spkppwI7V55wNk+NezY5DOTvoUF4pXcbjD2mXwOBIX+QFzwe2BhBrV650hA0stfUfSHxtD8tkqeCe FlrDSR5xU/6tsS+Kq9yzoFrAB1ZeoaLolzpjHVz2kEDUnb8WKMgJj31biMCyoMDJq93aJkOVykRnh G6Yf3TaSXX0bsvXoxN+TVuTMjQhpw8gHu/xwvl2BSkxB9J2hj5c9aJihTpdvgM3zsDKNkA+UCN8qG 3uAdbVTQ==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=hirez.programming.kicks-ass.net) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1ggwcc-0006JM-0n; Tue, 08 Jan 2019 19:01:06 +0000 Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id 8579420280451; Tue, 8 Jan 2019 20:01:04 +0100 (CET) Date: Tue, 8 Jan 2019 20:01:04 +0100 From: Peter Zijlstra To: Nadav Amit Cc: Andi Kleen , Adrian Hunter , Ingo Molnar , Andy Lutomirski , Josh Poimboeuf , Edward Cree , "H . Peter Anvin" , Thomas Gleixner , LKML , X86 ML , Paolo Abeni , Borislav Petkov , David Woodhouse , Alexander Shishkin , songliubraving@fb.com Subject: Re: [RFC v2 0/6] x86: dynamic indirect branch promotion Message-ID: <20190108190104.GC1900@hirez.programming.kicks-ass.net> References: <20181231072112.21051-1-namit@vmware.com> <87zhshe66w.fsf@linux.intel.com> <20190107163227.GH14122@hirez.programming.kicks-ass.net> <20190108092559.GA6808@hirez.programming.kicks-ass.net> <306d38fb-7ce6-a3ec-a351-6c117559ebaa@intel.com> <20190108101058.GB6808@hirez.programming.kicks-ass.net> <20190108172721.GN6118@tassilo.jf.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jan 08, 2019 at 10:28:02AM -0800, Nadav Amit wrote: > Is it really that important for debugging to get the instructions at the > time of execution? Wouldn’t it be easier to annotate the instructions that > might change? After all, it is not as if any instruction can change to any > other instruction. I think PT has a bitstream encoding of branch-taken; to decode and follow the actual code-flow you then need to have the actual and accurate branch target from the code. If we go muck about with the code and change that, decoding gets somewhat 'tricky'. Or something along those lines..