[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [V2 PATCH 7/9] x86/hvm: pkeys, add pkeys support for guest_walk_tables
On Tue, 2015-12-01 at 20:30 +0000, Andrew Cooper wrote: > > +#include <asm/i387.h> > > I can see why you need xstate.h, but I why do you need i387.h ? Use vcpu_save_fpu functions. > > + > > if ( pse2M ) > > { > > /* Special case: this guest VA is in a PSE superpage, so > > there's > > @@ -330,6 +390,11 @@ guest_walk_tables(struct vcpu *v, struct > > p2m_domain *p2m, > > goto out; > > } > > rc |= ((gflags & mflags) ^ mflags); > > +#if GUEST_PAGING_LEVELS >= 4 > > + pkeys = guest_l1e_get_pkeys(gw->l1e); > > + if (leaf_pte_pkeys_check(v, pfec, gflags, pkeys)) > > + rc |= _PAGE_PKEY_BIT; > > +#endif > > As I identified in v1, the fact that you do not modify the callers of > guest_walk_tables() proves that this change is buggy. You must > modify > the callers to cope with the new error of _PAGE_PKEY_BIT. _PAGE_PKEY_BIT just a flag to tell hap_p2m_ga_to_gfn(GUEST_PAGING_LEVELS) there is a page fault, PK is real physical fault which is included in pfec, the funtion of _PAGE_PKEY_BIT is that hap_p2m_ga_to_gfn returns INVALID_GFN, you can find the pfec modification on PATCH 9/9. > > ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |