[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CALMp9eRjy=-PGy7SOW6TinfZOUfuSDev4ymhf5SmA=QA-u_vVg@mail.gmail.com>
Date: Fri, 24 Jan 2020 14:33:25 -0800
From: Jim Mattson <jmattson@...gle.com>
To: Sean Christopherson <sean.j.christopherson@...el.com>
Cc: Randy Dunlap <rdunlap@...radead.org>,
Stephen Rothwell <sfr@...b.auug.org.au>,
Linux Next Mailing List <linux-next@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Paolo Bonzini <pbonzini@...hat.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Joerg Roedel <joro@...tes.org>, KVM <kvm@...r.kernel.org>
Subject: Re: linux-next: Tree for Jan 24 (kvm)
On Fri, Jan 24, 2020 at 2:22 PM Sean Christopherson
<sean.j.christopherson@...el.com> wrote:
>
> 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@...el.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.
That makes sense. I keep forgetting that "natural_width" in kvm is duplicitous.
Powered by blists - more mailing lists