All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Philip Wernersbach <philip.wernersbach@gmail.com>,
	xen-devel@lists.xen.org
Subject: Re: [PATCH][v3] Pass the location of the ACPI RSDP to DOM0.
Date: Tue, 21 Jan 2014 23:33:36 +0000	[thread overview]
Message-ID: <52DF03D0.1060105@citrix.com> (raw)
In-Reply-To: <CAO5Rg11C4CT4Wd6yxAr+e-SUifW-otUmbyQtUVKcP2rh-HmQBQ@mail.gmail.com>

On 21/01/2014 20:55, Philip Wernersbach wrote:
> xen: [v3] Pass the location of the ACPI RSDP to DOM0.
>
> Some machines, such as recent IBM servers, only allow the OS to get the
> ACPI RSDP from EFI. Since Xen nukes DOM0's ability to access EFI, DOM0
> cannot get the RSDP on these machines, leading to all sorts of
> functionality reductions.
>
> Signed-off-by: Philip Wernersbach <philip.wernersbach@gmail.com>
>
> ---
> Changed since v2:
>     * Fix coding style
>     * Get rid of extra define
>     * Use correct typedef'd type for the ACPI RSDP pointer
>     * Better error checking conditional
>     * Simplify error message
>
> diff --git a/xen/arch/x86/setup.c b/xen/arch/x86/setup.c
> index b49256d..fdeb9f2 100644
> --- a/xen/arch/x86/setup.c
> +++ b/xen/arch/x86/setup.c
> @@ -1378,6 +1378,25 @@ void __init __start_xen(unsigned long mbi_p)
>              safe_strcat(dom0_cmdline, " acpi=");
>              safe_strcat(dom0_cmdline, acpi_param);
>          }

You have still got incorrect coding style at this point, as indicated in
my previous email.

> +        if ( !strstr(dom0_cmdline, "acpi_rsdp=") )
> +        {
> +            acpi_physical_address rp = acpi_os_get_root_pointer();
> +            char rp_str[sizeof(acpi_physical_address)*2 + 1];
> +
> +            if ( rp )
> +            {
> +                snprintf(rp_str, sizeof(acpi_physical_address)*2 + 1,

sizeof(rp_str)

> +                         "%08lX", rp);

Personally, I prefer lowercase hexidecimal numbers, as they are easier
to read, particularly when 64bit.  What happens if the root pointer is
above the 4GB boundary? I dont see any reason at all for the leading 0s.

> +
> +                safe_strcat(dom0_cmdline, " acpi_rsdp=0x");
> +                safe_strcat(dom0_cmdline, rp_str);
> +            }
> +            else
> +            {

And coding style here.

> +                printk(XENLOG_WARNING
> +                       "Failed to get acpi_rsdp to pass to dom0\n");
> +            }
> +        }

And finally, you have yet to address Jan's concerns about this patch. 
Being an x86 maintainer, it is him you will have to convince to accept
the patch, even after I have run out of basic review points to cover.

~Andrew

  reply	other threads:[~2014-01-21 23:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-21 20:55 [PATCH][v3] Pass the location of the ACPI RSDP to DOM0 Philip Wernersbach
2014-01-21 23:33 ` Andrew Cooper [this message]
2014-01-22  9:27 ` Jan Beulich

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=52DF03D0.1060105@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=philip.wernersbach@gmail.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.