Re: [Xen-devel] [PATCH v3] xen/shim: stash RSDP address for ACPI driver

2018-01-22 Thread Jan Beulich
>>> On 22.01.18 at 17:33,  wrote:
> On Mon, Jan 22, 2018 at 04:28:30PM +, Wei Liu wrote:
>> It used to the case that we placed RSDP under 1MB and let Xen search
>> for it. We moved the placement to under 4GB in 4a5733771, so the
>> search wouldn't work.
>> 
>> Introduce rsdp_hint to ACPI code and set that variable in
>> convert_pvh_info.
>> 
>> Signed-off-by: Wei Liu 
> 
> LGTM:
> 
> Reviewed-by: Roger Pau Monné 

Acked-by: Jan Beulich 


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH v3] xen/shim: stash RSDP address for ACPI driver

2018-01-22 Thread Roger Pau Monné
On Mon, Jan 22, 2018 at 04:28:30PM +, Wei Liu wrote:
> It used to the case that we placed RSDP under 1MB and let Xen search
> for it. We moved the placement to under 4GB in 4a5733771, so the
> search wouldn't work.
> 
> Introduce rsdp_hint to ACPI code and set that variable in
> convert_pvh_info.
> 
> Signed-off-by: Wei Liu 

LGTM:

Reviewed-by: Roger Pau Monné 

Thanks, Roger.

___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH v3] xen/shim: stash RSDP address for ACPI driver

2018-01-22 Thread Wei Liu
It used to the case that we placed RSDP under 1MB and let Xen search
for it. We moved the placement to under 4GB in 4a5733771, so the
search wouldn't work.

Introduce rsdp_hint to ACPI code and set that variable in
convert_pvh_info.

Signed-off-by: Wei Liu 
---
Cc: Jan Beulich 
Cc: Andrew Cooper 
Cc: Roger Pau Monné 

v3: Add BUG_ON. Use __initdata. Move declaration within CONFIG_ACPI.
---
 xen/arch/x86/guest/pvh-boot.c | 3 +++
 xen/drivers/acpi/osl.c| 5 +
 xen/include/xen/acpi.h| 2 ++
 3 files changed, 10 insertions(+)

diff --git a/xen/arch/x86/guest/pvh-boot.c b/xen/arch/x86/guest/pvh-boot.c
index be3122b16c..0e9e5bfdf6 100644
--- a/xen/arch/x86/guest/pvh-boot.c
+++ b/xen/arch/x86/guest/pvh-boot.c
@@ -69,6 +69,9 @@ static void __init convert_pvh_info(void)
 mod[i].mod_end   = entry[i].paddr + entry[i].size;
 mod[i].string= entry[i].cmdline_paddr;
 }
+
+BUG_ON(!pvh_info->rsdp_paddr);
+rsdp_hint = pvh_info->rsdp_paddr;
 }
 
 static void __init get_memory_map(void)
diff --git a/xen/drivers/acpi/osl.c b/xen/drivers/acpi/osl.c
index 52c9b4ba9a..4c8bb7839e 100644
--- a/xen/drivers/acpi/osl.c
+++ b/xen/drivers/acpi/osl.c
@@ -62,8 +62,13 @@ void __init acpi_os_vprintf(const char *fmt, va_list args)
printk("%s", buffer);
 }
 
+acpi_physical_address __initdata rsdp_hint;
+
 acpi_physical_address __init acpi_os_get_root_pointer(void)
 {
+   if (rsdp_hint)
+   return rsdp_hint;
+
if (efi_enabled(EFI_BOOT)) {
if (efi.acpi20 != EFI_INVALID_TABLE_ADDR)
return efi.acpi20;
diff --git a/xen/include/xen/acpi.h b/xen/include/xen/acpi.h
index 9409350f05..fd5b5fb919 100644
--- a/xen/include/xen/acpi.h
+++ b/xen/include/xen/acpi.h
@@ -51,6 +51,8 @@
 
 #ifdef CONFIG_ACPI
 
+extern acpi_physical_address rsdp_hint;
+
 enum acpi_interrupt_id {
ACPI_INTERRUPT_PMI  = 1,
ACPI_INTERRUPT_INIT,
-- 
2.11.0


___
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel