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

Re: [Xen-devel] [V10 PATCH 19/23] PVH xen: vmcs related changes



On Fri, 9 Aug 2013 11:25:36 +0100
George Dunlap <dunlapg@xxxxxxxxx> wrote:

> On Wed, Jul 24, 2013 at 2:59 AM, Mukesh Rathor
> <mukesh.rathor@xxxxxxxxxx> wrote:
> > This patch contains vmcs changes related for PVH, mainly creating a
> > VMCS for PVH guest.
.....
> > +     v->arch.hvm_vmx.vmx_realmode = 0;
> > +
> > +    ept->asr  = pagetable_get_pfn(p2m_get_pagetable(p2m));
> > +    __vmwrite(EPT_POINTER, ept_get_eptp(ept));
> > +
> > +    rdmsrl(MSR_IA32_CR_PAT, host_pat);
> > +    __vmwrite(HOST_PAT, host_pat);
> > +    __vmwrite(GUEST_PAT, MSR_IA32_CR_PAT_RESET);
> > +
> > +    /* The paging mode is updated for PVH by
> > arch_set_info_guest(). */ +
> > +    return 0;
> > +}
> 
> The majority of this function seems to be duplicating code in
> construct_vmcs(), but in a different order so that it's very difficult
> to tell which is which.  Wouldn't it be better to just sprinkle
> if(is_pvh_domain()) around consrtuct_vmcs?


Nah, just makes the function extremely messy! Other maintainers I
consulted with were OK with making it a separate function. The function
is mostly orderded by vmx sections in the intel SDM.

mukesh


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.