[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 18/18] PVH xen: introduce vmx_pvh.c
>>> On 09.07.13 at 02:01, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote: > On Mon, 8 Jul 2013 16:09:55 -0700 > Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> wrote: > >> On Mon, 08 Jul 2013 09:31:17 +0100 >> "Jan Beulich" <JBeulich@xxxxxxxx> wrote: >> >> > >>> On 06.07.13 at 03:31, Mukesh Rathor <mukesh.rathor@xxxxxxxxxx> >> > >>> wrote: >> > > Ok, lmk if you are ok with following: >> > >> > Fundamentally yes. But ... >> > >> > > --- a/xen/arch/x86/Makefile >> > > +++ b/xen/arch/x86/Makefile >> > > @@ -41,6 +41,7 @@ obj-y += numa.o >> > > obj-y += pci.o >> > > obj-y += percpu.o >> > > obj-y += physdev.o >> > > +obj-y += pvh.o >> > >> > Does this indeed warrant a separate file? >> >> yeah, i wasn't sure about that, but was not sure where to put it. I >> think we could just have hvm_kernel_mode() next to >> hvm_get_segment_register in hvm.h. It can then also be used in HVM >> code in various places where it currently checks for dpl/cpl. > > Actually, not feasible to put anything in any header since regs.h is a > pretty > early-on header include, and can't include any other headers. So: Fine with me, except (as said before) ... > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -4642,6 +4642,14 @@ enum hvm_intblk nhvm_interrupt_blocked(struct vcpu *v) > return hvm_funcs.nhvm_intr_blocked(v); > } > > +bool_t hvm_kernel_mode(const struct vcpu *v) > +{ > + struct segment_register seg; > + > + hvm_get_segment_register((struct vcpu *)v, x86_seg_ss, &seg); .. for this cast. Jan > + return (seg.attr.fields.dpl == 0); > +} > + _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |