Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1043112ybl; Fri, 24 Jan 2020 14:23:51 -0800 (PST) X-Google-Smtp-Source: APXvYqxLxqac1UBO1urqkOKpoPGWTpgrycXWPl5HzoK7hlE6rnS7QgDJ/h62dLsJBO1AtiAnAc1F X-Received: by 2002:aca:b60a:: with SMTP id g10mr733752oif.102.1579904631319; Fri, 24 Jan 2020 14:23:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579904631; cv=none; d=google.com; s=arc-20160816; b=rMkSiThua1d+V3xG3rI+rcpvkMCGzeGRtoHYC9KnyXPyGbuWwb8zhM6aBtmKNyGOm+ lbAsSoonDgSzyH1hkQbJ6OaoN/LqC/XUgmiee7JdzJhLTpBgF+gtRQnO/9K3PFmPlzVP 2l8KLlWJTZ57K63TvwU3G+0jCGvZhL9/kfrDd2Dmf4YcLtnI3i5j2GdfCJKb+kqOcL2m sBf/KfDrIRsWDJ6ep9bfkCu/LOsooJeMAWe+H19WXFfC9xDt9nMcuIAp0lgR4Xyqzw6Y 6wF6vlqdyWCwNR08+pPuJ4R9HnLFOmz2WZ2cxUkI7xXI2X0+GQJa0jNI97D9TR0mLj0u AsdA== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=lWjeNKCMKXFiQQof2kigPMzPkH6OfYtBiDUSIQ7t5dk=; b=s9dc4Tpk67mxHGCj4QnMtAY9v6VlvaeZk3xUYjePeNDUaEsH/PCpvk793q+nRbDONM L8Nekz21T10Pz2mmPq2vC1MnMDTA/Nh780RATIblkJfSz284YNO7WsrxAyt4Yq/YPnTH 5WPRyiKLrux/tumlhUb3IBRkVbsbz73jgBwp0lxsgqOspPeAKfbTlT4Mbin2DMH/w6dp DBqbCfQ0X18WB7/VEw8OP/4vsJ9kKc1hm6Dkd9AMDUMbO1xaUZfjVlTgZIVDTSiRF/lz uvyOu1uzDKucgCtZ54YcqIiMuSD4TyGVtBJkGO1Wl8RvkfpEV8wv6lyedQaQ5XhVzseO +myA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g18si3444714otp.61.2020.01.24.14.23.39; Fri, 24 Jan 2020 14:23:51 -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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729140AbgAXWWo (ORCPT + 99 others); Fri, 24 Jan 2020 17:22:44 -0500 Received: from mga07.intel.com ([134.134.136.100]:50330 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727590AbgAXWWo (ORCPT ); Fri, 24 Jan 2020 17:22:44 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Jan 2020 14:22:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.70,359,1574150400"; d="scan'208";a="426755932" Received: from sjchrist-coffee.jf.intel.com (HELO linux.intel.com) ([10.54.74.202]) by fmsmga005.fm.intel.com with ESMTP; 24 Jan 2020 14:22:12 -0800 Date: Fri, 24 Jan 2020 14:22:12 -0800 From: Sean Christopherson To: Jim Mattson Cc: Randy Dunlap , Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , Paolo Bonzini , Vitaly Kuznetsov , Wanpeng Li , Joerg Roedel , KVM Subject: Re: linux-next: Tree for Jan 24 (kvm) Message-ID: <20200124222212.GS2109@linux.intel.com> References: <20200124173302.2c3228b2@canb.auug.org.au> <38d53302-b700-b162-e766-2e2a461fc569@infradead.org> <20200124213027.GP2109@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 24, 2020 at 01:48:07PM -0800, Jim Mattson wrote: > On Fri, Jan 24, 2020 at 1:30 PM Sean Christopherson > wrote: > > > > On Fri, Jan 24, 2020 at 12:51:31PM -0800, Randy Dunlap wrote: > > > On 1/23/20 10:33 PM, Stephen Rothwell wrote: > > > > Hi all, > > > > > > > > Changes since 20200123: > > > > > > > > The kvm tree gained a conflict against Linus' tree. > > > > > > > > > > on i386: > > > > > > ../arch/x86/kvm/x86.h:363:16: warning: right shift count >= width of type [-Wshift-count-overflow] > > > > Jim, > > > > This is due to using "unsigned long data" for kvm_dr7_valid() along with > > "return !(data >> 32);" to check for bits being set in 63:32. Any > > objection to fixing the issue by making @data a u64? Part of me thinks > > that's the proper behavior anyways, i.e. the helper is purely a reflection > > of the architectural requirements, the caller is responsible for dropping > > bits appropriately based on the current mode. > > Why not just change that bad return statement to one of the > alternatives you had suggested previously? Because it's not consistent with e.g. is_noncanonical_address() and I don't like dropping bits 63:32 of vmcs12->guest_dr7 when kvm_dr7_valid() is called from nested_vmx_check_guest_state(). KVM will eventually drop the bits anyways when propagating vmcs12->guest_dr7 to vmcs02, but I'd prefer the consistency check to not rely on that behavior. > I think "return !(data >> 32)" was the only suggested alternative that > doesn't work. :-)