[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c3ac5f4c9e3a412cb57ea02df19dd2d2@AcuMS.aculab.com>
Date: Wed, 29 Apr 2020 08:50:21 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Jim Mattson' <jmattson@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>
CC: LKML <linux-kernel@...r.kernel.org>,
kvm list <kvm@...r.kernel.org>,
"Sean Christopherson" <sean.j.christopherson@...el.com>,
Joerg Roedel <joro@...tes.org>,
"everdox@...il.com" <everdox@...il.com>
Subject: RE: [PATCH] KVM: x86: handle wrap around 32-bit address space
From: Jim Mattson
> Sent: 28 April 2020 01:29
> On Mon, Apr 27, 2020 at 9:59 AM Paolo Bonzini <pbonzini@...hat.com> wrote:
> >
> > KVM is not handling the case where EIP wraps around the 32-bit address
> > space (that is, outside long mode). This is needed both in vmx.c
> > and in emulate.c. SVM with NRIPS is okay, but it can still print
> > an error to dmesg due to integer overflow.
...
> > + if (unlikely(((rip ^ orig_rip) >> 31) == 3) && !is_64_bit_mode(vcpu))
Isn't the more obvious:
if (((rip ^ orig_rip) & 1ull << 32) ...
equivalent?
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists