RE: [PATCH v4 0/4] KVM: enable Intel SMAP for KVM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> -----Original Message-----
> From: kvm-owner@xxxxxxxxxxxxxxx [mailto:kvm-owner@xxxxxxxxxxxxxxx] On
> Behalf Of Paolo Bonzini
> Sent: Friday, April 04, 2014 3:28 PM
> To: Wu, Feng; gleb@xxxxxxxxxx; hpa@xxxxxxxxx; kvm@xxxxxxxxxxxxxxx
> Subject: Re: [PATCH v4 0/4] KVM: enable Intel SMAP for KVM
> 
> Il 04/04/2014 04:22, Wu, Feng ha scritto:
> > Thank you for providing these test cases. I tested it in related hardware
> > (both 32- and 64-bits) with both ept=1 and ept=0, they all pass.
> >
> > I also did some similar testing before posting the patch set. Since SMAP
> > has been already supported in Linux kernel, in which, stac() and clac() are
> > added in functions like copy_from_user(), copy_to_user(), etc.. From my
> > previous test, Linux guest can run well on top of KVM with SMAP enabled.
> > I think this covers the AC bit logic for testing. I also tested whether it can
> > induce an SMAP violation when accessing user pages in kernel mode with
> > AC bit cleared, I successfully got the SMAP violation fault in guest in that case.
> 
> Thanks, that is useful to know.  Knowing that you tried the failure path
> is good (next time point it out when submitting the patch).

Sure, will do this next time!:)
> 
> I made unit tests because I'm not sure how much the new code is
> stimulated in normal runs of Linux with ept=1.  After the EPT tables are
> built on the first access, the processor will take care of doing SMAP
> checks.  With ept=0, more page faults should happen on the first access
> to a page.  Still, it seemed safer to have unit tests and have them try
> both without and with invlpg.

Yes, Having the unit test code is really helpful for the code stability. Really
appreciate the effort you put on these test cases!

> 
> Even though the tests do not cover the CPL=3/implicit access case, the
> logic to compute PFERR_RSVD_MASK dynamically is already covered by AC=1.
>   So I'm quite happy with the coverage.  Series is
> 
> Reviewed-by: Paolo Bonzini <pbonzini@xxxxxxxxxx>]

Thanks very much for your review on this.
BTW: Since 3.15 merge window is still open, I am wondering whether there is
any possibility to make SMAP into 3.15 with another pull request.

> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@xxxxxxxxxxxxxxx
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Thanks,
Feng
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux