qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [RFC qboot 2/3] pvh: use x86/HVM direct boot ABI


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [RFC qboot 2/3] pvh: use x86/HVM direct boot ABI
Date: Thu, 6 Dec 2018 21:12:42 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 05/12/18 23:31, Liam Merwick wrote:
> -static inline uint32_t ldl_p(void *p)
> +inline uint32_t ldl_p(void *p)
>  {
>       uint32_t val;
>       memcpy(&val, p, 4);
> diff --git a/main.c b/main.c

Can you make instead a header (memaccess.h?) with all of lduw_p, ldl_p,
stw_p, stl_p?

> 
> +
> +struct hvm_start_info start_info = {0};

Please put this declaration in linuxboot.c instead.

> 
> +#define RSDP_FILE "etc/acpi/rsdp"
> +
>  void extract_acpi(void)
>  {
>       int id = fw_cfg_file_id("etc/table-loader");
> @@ -138,6 +143,10 @@ void extract_acpi(void)
>               struct loader_cmd *s = &script[i];
>               switch(script[i].cmd) {
>               case CMD_ALLOC:
> +                     if (strcmp(s->alloc.file, RSDP_FILE) == 0) {
> +                             start_info.rsdp_paddr =
> +                                 (uintptr_t)id_to_addr(id);
> +                     }


Please instead do a memcmp with "RSD PTR" in do_alloc, and also only do
it if zone is ALLOC_FSEG.

Thanks,

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]