From: Pengfei Xu <pengfei.xu@intel.com>
To: Li Wang <liwang@redhat.com>
Cc: Ricardo Neri <ricardo.neri-calderon@linux.intel.com>,
Paolo Bonzini <pbonzini@redhat.com>,
tglx@linutronix.de, kernellwp@gmail.com, ricardo.neri@intel.com,
LTP List <ltp@lists.linux.it>,
linux-kernel <linux-kernel@vger.kernel.org>,
Ping Fang <pifang@redhat.com>
Subject: Re: [Kernel BUG?] SMSW operation get success on UMIP KVM guest
Date: Tue, 2 Jul 2019 16:40:18 +0800 [thread overview]
Message-ID: <20190702084018.tnwefzqzar3xiaww@xpf-desktop> (raw)
In-Reply-To: <CAEemH2fR98TBHaOM37aGmzbgdZ_XPokJeUNN6dU1r=1WhOSmEw@mail.gmail.com>
Seems no issue now.
Thanks all.
On 2019-07-02 at 09:52:39 +0800, Li Wang wrote:
> On Tue, Jul 2, 2019 at 12:04 AM Ricardo Neri <
> ricardo.neri-calderon@linux.intel.com> wrote:
>
> > On Mon, Jul 01, 2019 at 08:57:28PM +0800, Li Wang wrote:
> > > On Mon, Jul 1, 2019 at 8:02 PM Paolo Bonzini <pbonzini@redhat.com>
> > wrote:
> > >
> > > > On 01/07/19 09:50, Li Wang wrote:
> > > > > Hello there,
> > > > >
> > > > > LTP/umip_basic_test get failed on KVM UMIP
> > > > > system(kernel-v5.2-rc4.x86_64). The test is only trying to do
> > > > > asm volatile("smsw %0\n" : "=m" (val));
> > > > > and expect to get SIGSEGV in this SMSW operation, but it exits with 0
> > > > > unexpectedly.
> > > >
> > > > In addition to what Thomas said, perhaps you are using a host that does
> > > > *not* have UMIP, and configuring KVM to emulate it(*). In that case,
> > it
> > > > is not possible to intercept SMSW, and therefore it will incorrectly
> > > > succeed.
> > > >
> > >
> > > Right, I checked the host system, and confirmed that CPU doesn't support
> > > UMIP.
> > >
> > > >
> > > > Paolo
> > > >
> > > > (*) before the x86 people jump at me, this won't happen unless you
> > > > explicitly pass an option to QEMU, such as "-cpu host,+umip". :) The
> > > > incorrect emulation of SMSW when CR4.UMIP=1 is why.
> > > >
> > > Good to know this, is there any document for that declaration? It seems
> > > neither LTP issue nor kernel bug here. But anyway we'd better do
> > something
> > > to avoid the error in the test.
> >
> > The test case already checks for umip in /proc/cpuinfo, right? And in
> > long mode it always expects a SIGSEGV signal. If you did not add -cpu
> > host,+umip,
> > how come umip was present in /proc/cpuinfo?
> >
>
> Yes, right.
>
> But the KVM guest is not customized in manual, I reserved that system for
> automation test and did not aware of the '-cpu host,+umip,' parameter until
> Paolo points it out. In the last email, I was hoping to find a way to
> recognize this situation for the LTP test intelligently.
>
> Thank you all for a reply to this.
>
> --
> Regards,
> Li Wang
prev parent reply other threads:[~2019-07-02 8:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAEemH2cg01cdz=amrCWU00Xof9+cxmfR_DqCBaQe36QoGsakmA@mail.gmail.com>
2019-07-01 8:03 ` Thomas Gleixner
2019-07-01 12:02 ` Paolo Bonzini
2019-07-01 14:53 ` Ricardo Neri
2019-07-01 17:30 ` Paolo Bonzini
[not found] ` <CAEemH2fqMpoiBo+asyawHsOWgdXy-ggV0mwQs9A9EJ1kh=uhAA@mail.gmail.com>
2019-07-01 16:03 ` Ricardo Neri
[not found] ` <CAEemH2fR98TBHaOM37aGmzbgdZ_XPokJeUNN6dU1r=1WhOSmEw@mail.gmail.com>
2019-07-02 8:40 ` Pengfei Xu [this message]
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=20190702084018.tnwefzqzar3xiaww@xpf-desktop \
--to=pengfei.xu@intel.com \
--cc=kernellwp@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=liwang@redhat.com \
--cc=ltp@lists.linux.it \
--cc=pbonzini@redhat.com \
--cc=pifang@redhat.com \
--cc=ricardo.neri-calderon@linux.intel.com \
--cc=ricardo.neri@intel.com \
--cc=tglx@linutronix.de \
/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
all inboxes | Powered by JetHome®