From: Ian Campbell <ian.campbell@citrix.com>
To: Anthony PERARD <anthony.perard@citrix.com>, xen-devel@lists.xen.org
Subject: Re: [RFC PATCH v2 07/16] hvmloader: Grab the hvmlite info page and parse the cmdline
Date: Wed, 4 Nov 2015 11:02:11 +0000 [thread overview]
Message-ID: <1446634931.6461.52.camel@citrix.com> (raw)
In-Reply-To: <1445875397-2846-8-git-send-email-anthony.perard@citrix.com>
On Mon, 2015-10-26 at 16:03 +0000, Anthony PERARD wrote:
> Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
> ---
> tools/firmware/hvmloader/hvmloader.c | 69
> +++++++++++++++++++++++++++++++++++-
> 1 file changed, 68 insertions(+), 1 deletion(-)
>
> diff --git a/tools/firmware/hvmloader/hvmloader.c
> b/tools/firmware/hvmloader/hvmloader.c
> index 716d03c..9df12ac 100644
> --- a/tools/firmware/hvmloader/hvmloader.c
> +++ b/tools/firmware/hvmloader/hvmloader.c
> @@ -62,7 +62,7 @@ asm (
> " mov %ax,%ss \n"
> /* Initialise all 32-bit GPRs to zero. */
> " xor %eax,%eax \n"
> - " xor %ebx,%ebx \n"
> + /* Keep ebx, for HVMLite start info */
Isn't this now an ABI between the tools and HVM loader, which is embedded
in the more formal PVH/HVMLite startup protocol? In which case hopefully
there is somewhere it can be documented. Is a HVMlite/PVH guest allowed to
assume anything about %ebx, those sorts of questions need to be considered.
> " xor %ecx,%ecx \n"
> " xor %edx,%edx \n"
> " xor %esp,%esp \n"
> @@ -249,15 +249,82 @@ static void acpi_enable_sci(void)
> BUG_ON(!(pm1a_cnt_val & ACPI_PM1C_SCI_EN));
> }
>
> +static const char *module_list_order = NULL;
> +void cmdline_parser(const char *the_cmdline)
I'll leave this until we've decided if this approach is the one we want.
> int main(void)
> {
> const struct bios_config *bios;
> int acpi_enabled;
> + const struct hvm_start_info *hvmlite_start_info;
> +
> + /* Load hvmlite start info pointer from ebx. */
> + asm volatile ( "mov %%ebx,%0" : "=r" (hvmlite_start_info) );
The stub which calls main should perhaps arrange for this to be in a
register which ends up being a parameter to this struct. I think otherwise
nothing ensures that the function prolog hasn't clobbered %ebx already.
>
> /* Initialise hypercall stubs with RET, rendering them no-ops. */
> memset((void *)HYPERCALL_PHYSICAL_ADDRESS, 0xc3 /* RET */,
> PAGE_SIZE);
>
> printf("HVM Loader\n");
> + BUG_ON(hvmlite_start_info->magic != HVM_START_MAGIC_VALUE);
> + printf("cmdline: %s\n", (char*)hvmlite_start_info->cmdline_paddr);
> + cmdline_parser((char*)hvmlite_start_info->cmdline_paddr);
>
> init_hypercalls();
>
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2015-11-04 11:02 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-26 16:03 [RFC PATCH v2 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 01/16] hvmloader: Fix scratch_alloc to avoid overlaps Anthony PERARD
2015-11-03 17:38 ` Ian Campbell
2015-11-10 16:29 ` Jan Beulich
2015-10-26 16:03 ` [RFC PATCH v2 02/16] libxc: Load BIOS and ACPI table into guest memory Anthony PERARD
2015-11-03 17:45 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 03/16] configure: #define SEABIOS_PATH and OVMF_PATH Anthony PERARD
2015-11-04 10:24 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 04/16] firmware/makefile: install BIOS and ACPI blob Anthony PERARD
2015-11-04 10:35 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 05/16] libxl: Load guest BIOS from file Anthony PERARD
2015-11-04 10:51 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 06/16] libxl: Load guest ACPI table " Anthony PERARD
2015-11-04 10:57 ` Ian Campbell
2015-12-18 14:43 ` Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 07/16] hvmloader: Grab the hvmlite info page and parse the cmdline Anthony PERARD
2015-11-04 10:39 ` Andrew Cooper
2015-11-04 11:02 ` Ian Campbell [this message]
2015-10-26 16:03 ` [RFC PATCH v2 08/16] hvmloader: Locate the BIOS blob Anthony PERARD
2015-11-04 11:05 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 09/16] hvmloader: Load SeaBIOS from hvm_start_info modules Anthony PERARD
2015-11-04 11:11 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 10/16] hvmloader: Load OVMF from modules Anthony PERARD
2015-11-04 11:15 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 11/16] hvmloader: No BIOS ROM image allowed to be compiled in Anthony PERARD
2015-11-04 11:17 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 12/16] hvmloader: Load ACPI tables from hvm_start_info module Anthony PERARD
2015-11-04 11:20 ` Ian Campbell
2015-10-26 16:03 ` [RFC PATCH v2 13/16] hvmloader/makefile: Compile out SeaBIOS and OVMF ROM blob Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 14/16] hvmloader: Always build-in SeaBIOS and OVMF loader Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 15/16] hvmloader: Compile out the qemu-xen ACPI tables Anthony PERARD
2015-10-26 16:03 ` [RFC PATCH v2 16/16] hvmloader: do not depend on SEABIOS_PATH or OVMF_PATH Anthony PERARD
2015-11-03 17:30 ` [RFC PATCH v2 00/16] Load BIOS via toolstack instead of been embedded in hvmloader Ian Campbell
2015-11-03 17:50 ` Anthony PERARD
2015-11-04 10:18 ` Ian Campbell
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=1446634931.6461.52.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=anthony.perard@citrix.com \
--cc=xen-devel@lists.xen.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 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.