|
[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 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?
> --- /dev/null
> +++ b/xen/arch/x86/pvh.c
> @@ -0,0 +1,11 @@
> +#include <xen/sched.h>
> +#include <asm/hvm/hvm.h>
> +
> +bool_t pvh_kernel_mode(const struct vcpu *v)
> +{
> + struct segment_register seg;
> +
> + hvm_get_segment_register((struct vcpu *)v, x86_seg_ss, &seg);
Ugly cast, calling for hvm_get_segment_register()'s declaration
to be changed to include "const" instead.
> + return (seg.attr.fields.dpl != 3);
It's not really clear what we want to call "kernel mode"; I'd think
though that only ring 0 should be considered such (albeit I can see
reasons to treat all but ring 3 this way, yet it's really an attribute
of the guest OS what rings 1 and 2 are used for).
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |