public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Jim Mattson <jmattson@google.com>
Cc: Randy Dunlap <rdunlap@infradead.org>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Wanpeng Li <wanpengli@tencent.com>,
	Joerg Roedel <joro@8bytes.org>, KVM <kvm@vger.kernel.org>
Subject: Re: linux-next: Tree for Jan 24 (kvm)
Date: Fri, 24 Jan 2020 14:22:12 -0800	[thread overview]
Message-ID: <20200124222212.GS2109@linux.intel.com> (raw)
In-Reply-To: <CALMp9eRvoZZ=7P3uCg3oqXzvV1WZc9mkzTJh8+=vmEh7xs5BTw@mail.gmail.com>

On Fri, Jan 24, 2020 at 01:48:07PM -0800, Jim Mattson wrote:
> On Fri, Jan 24, 2020 at 1:30 PM Sean Christopherson
> <sean.j.christopherson@intel.com> 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. :-)

  reply	other threads:[~2020-01-24 22:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-24  6:33 linux-next: Tree for Jan 24 Stephen Rothwell
2020-01-24 20:51 ` linux-next: Tree for Jan 24 (kvm) Randy Dunlap
2020-01-24 20:59   ` Randy Dunlap
2020-01-24 21:33     ` Sean Christopherson
2020-01-24 21:30   ` Sean Christopherson
2020-01-24 21:48     ` Jim Mattson
2020-01-24 22:22       ` Sean Christopherson [this message]
2020-01-24 22:33         ` Jim Mattson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200124222212.GS2109@linux.intel.com \
    --to=sean.j.christopherson@intel.com \
    --cc=jmattson@google.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=rdunlap@infradead.org \
    --cc=sfr@canb.auug.org.au \
    --cc=vkuznets@redhat.com \
    --cc=wanpengli@tencent.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox