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

Re: [Xen-devel] [PATCH RFC v12 15/21] pvh: Set up more PV stuff in set_info_guest

On 20/09/13 15:58, Jan Beulich wrote:
On 20.09.13 at 16:50, George Dunlap <george.dunlap@xxxxxxxxxxxxx> wrote:
On 18/09/13 16:17, Jan Beulich wrote:
On 13.09.13 at 18:25, George Dunlap <george.dunlap@xxxxxxxxxxxxx> wrote:
+int vmx_pvh_vcpu_boot_set_info(struct vcpu *v,
+                               struct vcpu_guest_context *ctxtp)
+    if ( ctxtp->ldt_base || ctxtp->ldt_ents ||
+         ctxtp->user_regs.cs || ctxtp->user_regs.ss || ctxtp->user_regs.es ||
+         ctxtp->user_regs.ds || ctxtp->user_regs.fs || ctxtp->user_regs.gs ||
+         *ctxtp->gdt_frames || ctxtp->gdt_ents ||
Don't know why I didn't spot this earlier, but the gdt_frames check
is pointless when gdt_ents is verified to be zero.
You know, looking at this again -- is there a reason we can't just put
this in hvm_set_info_guest()?  It's already only called from that one
place, only a few lines before.  There doesn't really seem to be a need
to have yet another function for just a few lines.
Indeed - only the VMX specific piece belongs here; everything
else should be in the generic wrapper (which perhaps then
won't be a simple wrapper anymore).

Or, we could do like is done for pv, and put the validity checks at the top of arch_set_info_guest(). I think I like that option the best.


Xen-devel mailing list



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