<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 1, 2019 at 8:02 PM Paolo Bonzini <<a href="mailto:pbonzini@redhat.com">pbonzini@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 01/07/19 09:50, Li Wang wrote:<br>
> Hello there,<br>
> <br>
> LTP/umip_basic_test get failed on KVM UMIP<br>
> system(kernel-v5.2-rc4.x86_64). The test is only trying to do<br>
>      asm volatile("smsw %0\n" : "=m" (val));<br>
> and expect to get SIGSEGV in this SMSW operation, but it exits with 0<br>
> unexpectedly.<br>
<br>
In addition to what Thomas said, perhaps you are using a host that does<br>
*not* have UMIP, and configuring KVM to emulate it(*).  In that case, it<br>
is not possible to intercept SMSW, and therefore it will incorrectly<br>
succeed.<br></blockquote><div><br></div><div class="gmail_default" style="font-size:small">Right, I checked the host system, and confirmed that CPU doesn't support UMIP.</div><div class="gmail_default" style="font-size:small"></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<br>
Paolo<br>
<br>
(*) before the x86 people jump at me, this won't happen unless you<br>
explicitly pass an option to QEMU, such as "-cpu host,+umip". :)  The<br>
incorrect emulation of SMSW when CR4.UMIP=1 is why.<br>
</blockquote></div><div class="gmail_default" style="font-size:small"></div><div class="gmail_default" style="font-size:small">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.</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>