Received: by 2002:ac0:98c7:0:0:0:0:0 with SMTP id g7-v6csp355217imd; Fri, 26 Oct 2018 09:31:19 -0700 (PDT) X-Google-Smtp-Source: AJdET5fXUNr9ETLZpaKOdO0U/Gr7PFNeAewQ18mCSPxLyW0dfiS1FrcWMkkPNhJyubOODTzZBwm2 X-Received: by 2002:a63:2903:: with SMTP id p3-v6mr4164403pgp.188.1540571479565; Fri, 26 Oct 2018 09:31:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1540571479; cv=none; d=google.com; s=arc-20160816; b=ofan/ms+vTvApVTPkQOLbHobZlzIdS5YjxqBxtLaxLQJXjpj3ekTfw+LReM4Oc4Hqa AOlKN7AdfdqN00ou+URSm3C1XBTwxgTVPbAUAFrxFP4DJ3fWUU7M0iV7GRM8GwfFTjSE SDWFBLcZ5YIQ0fx6qsln1XuvGR4v4YfBJEzvn47cVmyAkyEvucw4sO5rfyXbrnn1JoiL 3El88CgqlpebmjltQAkGQ/YmrzeBb6V7+O06T9cr34M8LkasHmtlX0M5CcjgTdjAiO+O +2CW9Q2lNe/1ahWQChBK/Q2t4Vnkgi1/S2XPuRaOsbUsy6+pXF94Bg1Ebi8ijpAmFyOS wfIA== 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 :references:in-reply-to:mime-version:dkim-signature; bh=WCQSbmDiSp2TikX+81KkfW5KaWUZgpU/q4zGiCgAHT8=; b=e2OV/qy9V0jITEPFAkHkl7WWN2wi2MkCvxe8fAAGVdD85u14sSg6475dlWQatxlJkx kASMor5g64VrcxC7m6Uw07BjuUTxiwVDGrZ4MN8Xg8+ZGW75VpqD2pUTVIEbEdgyXMmA w5zv6WZrz6dSpigE+Xij6W7GcOtjhwrrVHLukYsB79LEyn5XtKQEmKzuCqqYuj4fSLUK Afn0QuYSw4sZfKXxe9zPzmGth9wAq3IlN7OTe6m3LFiC3ylVanjHAQ+3D9hnOOObspdL S6MQIWv1BNNIlN7/3uVHHKIEnU4PExkJXZ0RlwOzqIbFNd9v0x6PbD6L916T7l+TsHTl XQCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b="RRG/Sp75"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u63-v6si12252166pfb.172.2018.10.26.09.31.02; Fri, 26 Oct 2018 09:31:19 -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=@google.com header.s=20161025 header.b="RRG/Sp75"; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727743AbeJ0BIG (ORCPT + 99 others); Fri, 26 Oct 2018 21:08:06 -0400 Received: from mail-ot1-f66.google.com ([209.85.210.66]:40812 "EHLO mail-ot1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726531AbeJ0BIA (ORCPT ); Fri, 26 Oct 2018 21:08:00 -0400 Received: by mail-ot1-f66.google.com with SMTP id m15so1617882otl.7 for ; Fri, 26 Oct 2018 09:30:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=WCQSbmDiSp2TikX+81KkfW5KaWUZgpU/q4zGiCgAHT8=; b=RRG/Sp751Ll7tAfqk3x0Fkc3eipuA4hbh81CcXiAjA/3ZP6DiIGOZMmbpsYne4POYA R/xbi+M+NBIXr4LVhg+UgbeYLAb3XTTwViu5RFkkOY0HkHDRc98ftKVimq8Btf5T3j23 KCoHWzmBxJeLGLb5S/SaNwLfKhRPNnJ3EqiDOSonDVj/JPcfW8sOt8S6XU2Etz7kqqLE 6q4Uju9mu2vz6u617VN5Ji5gPtd5i0eO9wqhIKDVRCc7xjWB/ZEW9lgkuiud8BLVfqNA STckfhqw4mEHVEOdmgNBbbOQ7gQSH/XkiFIE0X+xe3s2wkfYQf6Iq6gu+Ve6W/tScGKW CjzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=WCQSbmDiSp2TikX+81KkfW5KaWUZgpU/q4zGiCgAHT8=; b=BaF+iFcRWPcnASHjgRlCtUJAxQtgQnD2MjMTCHTEokYOLSy+Xs1fUh9DOX6BMXaXtD TCTyIzG+QZ8Q7iIxwaAkZiDyO957HxuBp1bI/wxg9Ty19FS0DX/ZZUMxXhZ4/MvsrrMi d8G52HlHZYph/bqILBAKbjq5d9VVEYA5VIzUP8u2IXgfRwjm/IO1qvU2byRPflNaJGVH OynPQbNRLa16Inlf8V2dFQFBN4G9x7ZFGd5Y97FYw3mUyIZioqylL6o/nhIF+B1pwkkA 1QVmlRw2cD321ueRzN45eHziCqb+eoppCS7h2xYvwZLn/8q7xo0Y04RS6lw+hOcHn+mr lbHw== X-Gm-Message-State: AGRZ1gJMU0JQ9+8YwEQbQttcr3w9Yl3+IhlnY5+mdvwrqun9e9+0tSVP ooFX/Z5GY4D4PKlGh31YVj86JOaBX3dLNqL9XoCwcA== X-Received: by 2002:a9d:4a5c:: with SMTP id d28mr1813095otj.38.1540571417587; Fri, 26 Oct 2018 09:30:17 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ac9:2ac9:0:0:0:0:0 with HTTP; Fri, 26 Oct 2018 09:30:17 -0700 (PDT) In-Reply-To: <20181026154617.GA23663@linux.intel.com> References: <09986c98c9655f1542768ecfda644ac821e67a57.1540369608.git.jsteckli@amazon.de> <558fea0b4df498eefcaea5ae07a089ad9706c1a2.1540369608.git.jsteckli@amazon.de> <20181026154617.GA23663@linux.intel.com> From: Jim Mattson Date: Fri, 26 Oct 2018 09:30:17 -0700 Message-ID: Subject: Re: [PATCH 2/4] kvm, vmx: move register clearing out of assembly path To: Sean Christopherson Cc: Julian Stecklina , kvm list , Paolo Bonzini , js@alien8.de, LKML 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 On Fri, Oct 26, 2018 at 8:46 AM, Sean Christopherson wrote: > Since clearing the GPRs exists to mitigate speculation junk, I think > we should keep the explicit XOR zeroing instead of deferring to the > compiler. Explicit XORs will ensure the resulting assembly is the > same regardless of compiler, version, target arch, etc..., whereas the > compiler could theoretically use different zeroing methods[1], e.g. on > my system it generates "mov r32,r32" for EBX, ESI and EDI (loading > from EAX after EAX is zeroed). > > And FWIW, I find the original code to be more readable since all GRPs > are zeroed with the same method. I concur. I really do prefer the explicit xors to the input arguments.