From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mukesh Rathor Subject: Re: [PATCH 18/18] PVH xen: introduce vmx_pvh.c Date: Fri, 28 Jun 2013 20:04:10 -0700 Message-ID: <20130628200410.1c2ee08c@mantra.us.oracle.com> References: <1372118507-16864-1-git-send-email-mukesh.rathor@oracle.com> <1372118507-16864-19-git-send-email-mukesh.rathor@oracle.com> <51C991F502000078000E04E5@nat28.tlf.novell.com> <20130627192818.2ba03853@mantra.us.oracle.com> <51CD770802000078000E1806@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <51CD770802000078000E1806@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel List-Id: xen-devel@lists.xenproject.org On Fri, 28 Jun 2013 10:44:08 +0100 "Jan Beulich" wrote: > >>> On 28.06.13 at 04:28, Mukesh Rathor > >>> wrote: > > On Tue, 25 Jun 2013 11:49:57 +0100 "Jan Beulich" > > wrote: > >> > +int vmx_pvh_set_vcpu_info(struct vcpu *v, struct > >> > vcpu_guest_context *ctxtp) +{ > >> > + if ( v->vcpu_id == 0 ) > >> > + return 0; > >> > + > >> > + vmx_vmcs_enter(v); > >> > + __vmwrite(GUEST_GDTR_BASE, ctxtp->gdt.pvh.addr); > >> > + __vmwrite(GUEST_GDTR_LIMIT, ctxtp->gdt.pvh.limit); > >> > + __vmwrite(GUEST_GS_BASE, ctxtp->gs_base_user); > >> > + > >> > + __vmwrite(GUEST_CS_SELECTOR, ctxtp->user_regs.cs); > >> > + __vmwrite(GUEST_DS_SELECTOR, ctxtp->user_regs.ds); > >> > + __vmwrite(GUEST_ES_SELECTOR, ctxtp->user_regs.es); > >> > + __vmwrite(GUEST_SS_SELECTOR, ctxtp->user_regs.ss); > >> > + __vmwrite(GUEST_GS_SELECTOR, ctxtp->user_regs.gs); > >> > >> How does this work without also writing the "hidden" register > >> fields? > > > > This is for bringing up SMP CPUs by the guest, which already has > > set GDT up so it just needs selectors to be loaded to start the > > target vcpu. > > That makes no sense to me: Once you VMLAUNCH that vCPU, it'll > get the hidden register fields loaded from the VMCS, without > accessing the GDT. If that understanding of mine is wrong, please > explain how you see things working in more detail. I see things same as you do, that it'll get hidden fields from vmcs. The dilemma here is what to do about the VCPUOP_initialise hcall. I am currently checking to see if the new vcpu can just set the context itself first thing, without the VCPUOP_initialise hcall completely. Correct, the guest I am dealing with is Linux. And correct again, that these are linux focussed. I believe it was someone working on BSD who had inquired about PVH, and looking at my patches, and probably would be working with us when they are ready. These patches are to allow a 64bit Linux PV domU to boot in PVH mode on xen. Since no new hypercalls are created, nor are there any major changes to any, it doesn't seem to me a huge deal that they are linux focussed right now. To me, it's a step in the direction of someday having PVH support for all OSs. Mukesh