From: Juergen Gross <jgross@suse.com>
To: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: roger.pau@citrix.com, xen-devel@lists.xenproject.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/9] xen/pvh: Bootstrap PVH guest
Date: Fri, 3 Feb 2017 17:40:11 +0100 [thread overview]
Message-ID: <4c700f8d-4188-7b5b-2eff-865fb96789f4@suse.com> (raw)
In-Reply-To: <0ca64861-0695-df0b-6b86-a41f3e170722@oracle.com>
On 03/02/17 17:20, Boris Ostrovsky wrote:
>
>>> +
>>> + __HEAD
>>> +
>>> +/* Entry point for PVH guests. */
>> Could you add some comments about register conetnts at entry?
>
> Reference to Xen's docs/misc/hvmlite.markdown would be sifficient?
I think the corresponding lines should be copied to this source
file. It is inconvenient to have to get the Xen repostory for
this information.
>>> +gdt:
>>> + .word gdt_end - gdt
>>> + .long _pa(gdt)
>> This is a rather strange construct: the NULL descriptor of the
>> GDT being used as space for lgdt operand.
>>
>>> + .word 0
>>> + .quad 0x0000000000000000 /* NULL descriptor */
>> And this comment is wrong: the NULL descriptor is at "gdt:".
>
> I'll change it to:
>
> gdt:
> .word gdt_end - gdt_start
> .long _pa(gdt_start)
> .word 0
> gdt_start:
> .quad 0x0000000000000000 /* NULL descriptor */
> .quad 0x0000000000000000 /* reserved */
Much better. :-)
> #ifdef CONFIG_X86_64
> .quad 0x00af9a000000ffff /* __KERNEL_CS */
> #else
> .quad 0x00cf9a000000ffff /* __KERNEL_CS */
> #endif
> .quad 0x00cf92000000ffff /* __KERNEL_DS */
> gdt_end:
>
>
>>
>>> +#ifdef CONFIG_X86_64
>>> + .quad 0x00af9a000000ffff /* __KERNEL_CS */
>> Mind adding comments about the semantics of those constants?
>> Or use GDT_ENTRY() macro?
>>
>>> +#else
>>> + .quad 0x00cf9a000000ffff /* __KERNEL_CS */
>>> +#endif
>>> + .quad 0x00cf92000000ffff /* __KERNEL_DS */
>>> +gdt_end:
>>> +
>>> + .bss
>>> + .balign 4
>>> +early_stack:
>>> + .fill 16, 1, 0
>> Is the stack size large enough? With a hypercall being executed in
>> xen_prepare_pvh() I doubt this will be okay.
>
> What do you think it should be then?
I didn't check the disassembly, but even if it is okay right now
the needed stack size will depend on the compiler used. I'd rather
use a larger size (e.g. 256 bytes).
Maybe its even possible to reuse initial_stack, but I haven't
verified that.
Juergen
next prev parent reply other threads:[~2017-02-03 16:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-26 19:41 [PATCH v2 0/9] PVH v2 support (domU) Boris Ostrovsky
2017-01-26 19:41 ` [PATCH v2 1/9] x86/boot/32: Convert the 32-bit pgtable setup code from assembly to C Boris Ostrovsky
2017-01-26 19:41 ` [PATCH v2 2/9] xen/x86: Remove PVH support Boris Ostrovsky
2017-01-26 19:41 ` [PATCH v2 3/9] xen/pvh: Import PVH-related Xen public interfaces Boris Ostrovsky
2017-01-26 19:41 ` [PATCH v2 4/9] xen/pvh: Bootstrap PVH guest Boris Ostrovsky
2017-02-03 7:24 ` Juergen Gross
2017-02-03 16:20 ` Boris Ostrovsky
2017-02-03 16:40 ` Juergen Gross [this message]
2017-02-03 18:05 ` [Xen-devel] " Andrew Cooper
2017-01-26 19:41 ` [PATCH v2 5/9] xen/pvh: Prevent PVH guests from using PIC, RTC and IOAPIC Boris Ostrovsky
2017-02-02 15:23 ` Juergen Gross
2017-02-02 15:35 ` Roger Pau Monné
2017-02-02 16:30 ` Boris Ostrovsky
2017-02-02 16:40 ` Roger Pau Monné
2017-02-02 17:47 ` Boris Ostrovsky
2017-01-26 19:41 ` [PATCH v2 6/9] xen/pvh: Initialize grant table for PVH guests Boris Ostrovsky
2017-01-27 15:38 ` Juergen Gross
2017-01-26 19:41 ` [PATCH v2 7/9] xen/pvh: PVH guests always have PV devices Boris Ostrovsky
2017-01-26 19:41 ` [PATCH v2 8/9] xen/pvh: Enable CPU hotplug Boris Ostrovsky
2017-01-27 15:36 ` Juergen Gross
2017-01-26 19:41 ` [PATCH v2 9/9] xen/pvh: Use Xen's emergency_restart op for PVH guests Boris Ostrovsky
2017-01-27 15:37 ` Juergen Gross
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4c700f8d-4188-7b5b-2eff-865fb96789f4@suse.com \
--to=jgross@suse.com \
--cc=boris.ostrovsky@oracle.com \
--cc=linux-kernel@vger.kernel.org \
--cc=roger.pau@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®