* Domain0/Domain 1 and ring1 (x86) - tracing question
@ 2005-08-16 10:59 John Que
0 siblings, 0 replies; 6+ messages in thread
From: John Que @ 2005-08-16 10:59 UTC (permalink / raw)
To: xen-devel
Hello,
As I understand the Hypervisor should run in Ring 0 of the x86 , and
the domains (Domain0 and DomainU) should work in Ring 1.
I was a bit curious where in the code this assiging of Ring 0 to Xen
and Ring 1 to dom0/domU is done ?
I had tried to look under arch/xen/i386 and didn't find.
Is it in the assembler *.S files ?
Regards,
John
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Domain0/Domain 1 and ring1 (x86) - tracing question
@ 2005-08-16 11:14 Petersson, Mats
2005-08-16 14:30 ` John Que
0 siblings, 1 reply; 6+ messages in thread
From: Petersson, Mats @ 2005-08-16 11:14 UTC (permalink / raw)
To: John Que, xen-devel
There's a #define in arch-x86_32.h that defines FLAT_KERNEL_[CDS]S to
FLAT_RING1_[CDS]S. FLAT_RING1_[CDS]S is the entry in GDT for a CPL=1
(ring 1) code/data/stack[1] segment selector.
It is then used in various places to set up the registers used by the
actual kernel, for example the file
linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h is using the
KERNEL_CS to give the BOOT_CS to the Linux kernel.
[1] Stack segment is actually using the same selector as the data
segment.
--
Mats
> -----Original Message-----
> From: xen-devel-bounces@lists.xensource.com
> [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of John Que
> Sent: 16 August 2005 11:59
> To: xen-devel@lists.xensource.com
> Subject: [Xen-devel] Domain0/Domain 1 and ring1 (x86) -
> tracing question
>
> Hello,
> As I understand the Hypervisor should run in Ring 0 of the
> x86 , and the domains (Domain0 and DomainU) should work in Ring 1.
>
> I was a bit curious where in the code this assiging of Ring 0
> to Xen and Ring 1 to dom0/domU is done ?
> I had tried to look under arch/xen/i386 and didn't find.
>
> Is it in the assembler *.S files ?
>
> Regards,
> John
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Domain0/Domain 1 and ring1 (x86) - tracing question
2005-08-16 11:14 Petersson, Mats
@ 2005-08-16 14:30 ` John Que
2005-08-18 10:27 ` John Que
0 siblings, 1 reply; 6+ messages in thread
From: John Que @ 2005-08-16 14:30 UTC (permalink / raw)
To: Petersson, Mats; +Cc: xen-devel
Hello,
Thanks !
This makes clear things a bit.
However, I had grepped under the linux-2.6-xen-sparse tree and
saw only one occurrence of BOOT_CS , in that
linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h.
I had also grepped under the "xen" (hypervisor) subtree and did not
find and also under linux-2.6.12-xen0/arch/xen and did not find any
occurrence of BOOT_CS.
(There is of course in linux-2.6.12-xen0/arch/xen/i386/boot/setup.S ,
but this seems unrelevant in our case).
I am probably missing something;
Any ideas ?
Regards,
John
On 8/16/05, Petersson, Mats <mats.petersson@amd.com> wrote:
> There's a #define in arch-x86_32.h that defines FLAT_KERNEL_[CDS]S to
> FLAT_RING1_[CDS]S. FLAT_RING1_[CDS]S is the entry in GDT for a CPL=1
> (ring 1) code/data/stack[1] segment selector.
> It is then used in various places to set up the registers used by the
> actual kernel, for example the file
> linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h is using the
> KERNEL_CS to give the BOOT_CS to the Linux kernel.
>
> [1] Stack segment is actually using the same selector as the data
> segment.
>
> --
> Mats
>
> > -----Original Message-----
> > From: xen-devel-bounces@lists.xensource.com
> > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of John Que
> > Sent: 16 August 2005 11:59
> > To: xen-devel@lists.xensource.com
> > Subject: [Xen-devel] Domain0/Domain 1 and ring1 (x86) -
> > tracing question
> >
> > Hello,
> > As I understand the Hypervisor should run in Ring 0 of the
> > x86 , and the domains (Domain0 and DomainU) should work in Ring 1.
> >
> > I was a bit curious where in the code this assiging of Ring 0
> > to Xen and Ring 1 to dom0/domU is done ?
> > I had tried to look under arch/xen/i386 and didn't find.
> >
> > Is it in the assembler *.S files ?
> >
> > Regards,
> > John
> >
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
> >
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Domain0/Domain 1 and ring1 (x86) - tracing question
2005-08-16 14:30 ` John Que
@ 2005-08-18 10:27 ` John Que
0 siblings, 0 replies; 6+ messages in thread
From: John Que @ 2005-08-18 10:27 UTC (permalink / raw)
To: Petersson, Mats; +Cc: xen-devel
Hello ,
Does anybody knows the answer/any hint to my question ?
Any ideas , someone?
Regards,
John
On 8/16/05, John Que <qwejohn@gmail.com> wrote:
> Hello,
>
> Thanks !
>
> This makes clear things a bit.
>
> However, I had grepped under the linux-2.6-xen-sparse tree and
> saw only one occurrence of BOOT_CS , in that
> linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h.
>
> I had also grepped under the "xen" (hypervisor) subtree and did not
> find and also under linux-2.6.12-xen0/arch/xen and did not find any
> occurrence of BOOT_CS.
>
> (There is of course in linux-2.6.12-xen0/arch/xen/i386/boot/setup.S ,
> but this seems unrelevant in our case).
>
> I am probably missing something;
> Any ideas ?
>
> Regards,
> John
>
> On 8/16/05, Petersson, Mats <mats.petersson@amd.com> wrote:
> > There's a #define in arch-x86_32.h that defines FLAT_KERNEL_[CDS]S to
> > FLAT_RING1_[CDS]S. FLAT_RING1_[CDS]S is the entry in GDT for a CPL=1
> > (ring 1) code/data/stack[1] segment selector.
> > It is then used in various places to set up the registers used by the
> > actual kernel, for example the file
> > linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h is using the
> > KERNEL_CS to give the BOOT_CS to the Linux kernel.
> >
> > [1] Stack segment is actually using the same selector as the data
> > segment.
> >
> > --
> > Mats
> >
> > > -----Original Message-----
> > > From: xen-devel-bounces@lists.xensource.com
> > > [mailto:xen-devel-bounces@lists.xensource.com] On Behalf Of John Que
> > > Sent: 16 August 2005 11:59
> > > To: xen-devel@lists.xensource.com
> > > Subject: [Xen-devel] Domain0/Domain 1 and ring1 (x86) -
> > > tracing question
> > >
> > > Hello,
> > > As I understand the Hypervisor should run in Ring 0 of the
> > > x86 , and the domains (Domain0 and DomainU) should work in Ring 1.
> > >
> > > I was a bit curious where in the code this assiging of Ring 0
> > > to Xen and Ring 1 to dom0/domU is done ?
> > > I had tried to look under arch/xen/i386 and didn't find.
> > >
> > > Is it in the assembler *.S files ?
> > >
> > > Regards,
> > > John
> > >
> > > _______________________________________________
> > > Xen-devel mailing list
> > > Xen-devel@lists.xensource.com
> > > http://lists.xensource.com/xen-devel
> > >
> >
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* RE: Domain0/Domain 1 and ring1 (x86) - tracing question
@ 2005-08-18 10:39 Petersson, Mats
2005-08-18 11:54 ` John Que
0 siblings, 1 reply; 6+ messages in thread
From: Petersson, Mats @ 2005-08-18 10:39 UTC (permalink / raw)
To: John Que; +Cc: xen-devel
How about:
Arch/x86/domain.c: new_thread().
That function is called from arch/x86/domain_build.c when building dom0,
I can't help you with tracing the domU build at the moment (I've got a
job to do... ;-). Myabe someone else can pipe in with some more info.
--
Mats
> -----Original Message-----
> From: John Que [mailto:qwejohn@gmail.com]
> Sent: 18 August 2005 11:28
> To: Petersson, Mats
> Cc: xen-devel@lists.xensource.com
> Subject: Re: [Xen-devel] Domain0/Domain 1 and ring1 (x86) -
> tracing question
>
> Hello ,
> Does anybody knows the answer/any hint to my question ?
> Any ideas , someone?
>
> Regards,
> John
>
> On 8/16/05, John Que <qwejohn@gmail.com> wrote:
> > Hello,
> >
> > Thanks !
> >
> > This makes clear things a bit.
> >
> > However, I had grepped under the linux-2.6-xen-sparse tree and saw
> > only one occurrence of BOOT_CS , in that
> > linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h.
> >
> > I had also grepped under the "xen" (hypervisor) subtree and did not
> > find and also under linux-2.6.12-xen0/arch/xen and did not find any
> > occurrence of BOOT_CS.
> >
> > (There is of course in
> linux-2.6.12-xen0/arch/xen/i386/boot/setup.S ,
> > but this seems unrelevant in our case).
> >
> > I am probably missing something;
> > Any ideas ?
> >
> > Regards,
> > John
> >
> > On 8/16/05, Petersson, Mats <mats.petersson@amd.com> wrote:
> > > There's a #define in arch-x86_32.h that defines
> FLAT_KERNEL_[CDS]S
> > > to FLAT_RING1_[CDS]S. FLAT_RING1_[CDS]S is the entry in GDT for a
> > > CPL=1 (ring 1) code/data/stack[1] segment selector.
> > > It is then used in various places to set up the registers used by
> > > the actual kernel, for example the file
> > > linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h
> is using the
> > > KERNEL_CS to give the BOOT_CS to the Linux kernel.
> > >
> > > [1] Stack segment is actually using the same selector as the data
> > > segment.
> > >
> > > --
> > > Mats
> > >
> > > > -----Original Message-----
> > > > From: xen-devel-bounces@lists.xensource.com
> > > > [mailto:xen-devel-bounces@lists.xensource.com] On
> Behalf Of John
> > > > Que
> > > > Sent: 16 August 2005 11:59
> > > > To: xen-devel@lists.xensource.com
> > > > Subject: [Xen-devel] Domain0/Domain 1 and ring1 (x86) - tracing
> > > > question
> > > >
> > > > Hello,
> > > > As I understand the Hypervisor should run in Ring 0 of the
> > > > x86 , and the domains (Domain0 and DomainU) should work
> in Ring 1.
> > > >
> > > > I was a bit curious where in the code this assiging of
> Ring 0 to
> > > > Xen and Ring 1 to dom0/domU is done ?
> > > > I had tried to look under arch/xen/i386 and didn't find.
> > > >
> > > > Is it in the assembler *.S files ?
> > > >
> > > > Regards,
> > > > John
> > > >
> > > > _______________________________________________
> > > > Xen-devel mailing list
> > > > Xen-devel@lists.xensource.com
> > > > http://lists.xensource.com/xen-devel
> > > >
> > >
> > >
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Domain0/Domain 1 and ring1 (x86) - tracing question
2005-08-18 10:39 Domain0/Domain 1 and ring1 (x86) - tracing question Petersson, Mats
@ 2005-08-18 11:54 ` John Que
0 siblings, 0 replies; 6+ messages in thread
From: John Que @ 2005-08-18 11:54 UTC (permalink / raw)
To: Petersson, Mats; +Cc: xen-devel
Hello,
Thanks;
This uses FLAT_KERNEL_CS (and not BOOT_CS).
(It could be that BOOT_CS is not needed at all. As I said, I had grepped
for BOOT_CS and not for other defintions like FLAT_KERNEL_CS).
However,this satisfies me and it gives answer to my question.
Regarding build - I have no problem with build. It went OK.
Regads,
John
On 8/18/05, Petersson, Mats <mats.petersson@amd.com> wrote:
> How about:
>
> Arch/x86/domain.c: new_thread().
>
> That function is called from arch/x86/domain_build.c when building dom0,
>
>
> I can't help you with tracing the domU build at the moment (I've got a
> job to do... ;-). Myabe someone else can pipe in with some more info.
>
> --
> Mats
>
> > -----Original Message-----
> > From: John Que [mailto:qwejohn@gmail.com]
> > Sent: 18 August 2005 11:28
> > To: Petersson, Mats
> > Cc: xen-devel@lists.xensource.com
> > Subject: Re: [Xen-devel] Domain0/Domain 1 and ring1 (x86) -
> > tracing question
> >
> > Hello ,
> > Does anybody knows the answer/any hint to my question ?
> > Any ideas , someone?
> >
> > Regards,
> > John
> >
> > On 8/16/05, John Que <qwejohn@gmail.com> wrote:
> > > Hello,
> > >
> > > Thanks !
> > >
> > > This makes clear things a bit.
> > >
> > > However, I had grepped under the linux-2.6-xen-sparse tree and saw
> > > only one occurrence of BOOT_CS , in that
> > > linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h.
> > >
> > > I had also grepped under the "xen" (hypervisor) subtree and did not
> > > find and also under linux-2.6.12-xen0/arch/xen and did not find any
> > > occurrence of BOOT_CS.
> > >
> > > (There is of course in
> > linux-2.6.12-xen0/arch/xen/i386/boot/setup.S ,
> > > but this seems unrelevant in our case).
> > >
> > > I am probably missing something;
> > > Any ideas ?
> > >
> > > Regards,
> > > John
> > >
> > > On 8/16/05, Petersson, Mats <mats.petersson@amd.com> wrote:
> > > > There's a #define in arch-x86_32.h that defines
> > FLAT_KERNEL_[CDS]S
> > > > to FLAT_RING1_[CDS]S. FLAT_RING1_[CDS]S is the entry in GDT for a
> > > > CPL=1 (ring 1) code/data/stack[1] segment selector.
> > > > It is then used in various places to set up the registers used by
> > > > the actual kernel, for example the file
> > > > linux-2.6-xen-sparse/include/asm-xen/asm-i386/segment.h
> > is using the
> > > > KERNEL_CS to give the BOOT_CS to the Linux kernel.
> > > >
> > > > [1] Stack segment is actually using the same selector as the data
> > > > segment.
> > > >
> > > > --
> > > > Mats
> > > >
> > > > > -----Original Message-----
> > > > > From: xen-devel-bounces@lists.xensource.com
> > > > > [mailto:xen-devel-bounces@lists.xensource.com] On
> > Behalf Of John
> > > > > Que
> > > > > Sent: 16 August 2005 11:59
> > > > > To: xen-devel@lists.xensource.com
> > > > > Subject: [Xen-devel] Domain0/Domain 1 and ring1 (x86) - tracing
> > > > > question
> > > > >
> > > > > Hello,
> > > > > As I understand the Hypervisor should run in Ring 0 of the
> > > > > x86 , and the domains (Domain0 and DomainU) should work
> > in Ring 1.
> > > > >
> > > > > I was a bit curious where in the code this assiging of
> > Ring 0 to
> > > > > Xen and Ring 1 to dom0/domU is done ?
> > > > > I had tried to look under arch/xen/i386 and didn't find.
> > > > >
> > > > > Is it in the assembler *.S files ?
> > > > >
> > > > > Regards,
> > > > > John
> > > > >
> > > > > _______________________________________________
> > > > > Xen-devel mailing list
> > > > > Xen-devel@lists.xensource.com
> > > > > http://lists.xensource.com/xen-devel
> > > > >
> > > >
> > > >
> > >
> >
>
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-08-18 11:54 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-18 10:39 Domain0/Domain 1 and ring1 (x86) - tracing question Petersson, Mats
2005-08-18 11:54 ` John Que
-- strict thread matches above, loose matches on Subject: below --
2005-08-16 11:14 Petersson, Mats
2005-08-16 14:30 ` John Que
2005-08-18 10:27 ` John Que
2005-08-16 10:59 John Que
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.