xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT
@ 2017-11-09 15:37 Boris Ostrovsky
  2017-11-09 15:47 ` Jan Beulich
  2017-11-09 17:00 ` Roger Pau Monné
  0 siblings, 2 replies; 4+ messages in thread
From: Boris Ostrovsky @ 2017-11-09 15:37 UTC (permalink / raw)
  To: xen-devel; +Cc: andrew.cooper3, Boris Ostrovsky, jbeulich, roger.pau

These tables are pointed to from FADT. Adding them will
result in duplicate entries in the guest's tables.

Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
---
Changes in v2:
* Merge (pvh_acpi_table_allowed(sig) && pvh_acpi_table_in_xsdt(sig)) into
  a single call
* Make this call return a boolean expression as opposed to explicit true/false

 xen/arch/x86/hvm/dom0_build.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/hvm/dom0_build.c b/xen/arch/x86/hvm/dom0_build.c
index a67071c..cfcf461 100644
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -818,6 +818,17 @@ static bool __init pvh_acpi_table_allowed(const char *sig)
     return true;
 }
 
+static bool __init pvh_acpi_xsdt_table_allowed(const char *sig)
+{
+    /*
+     * DSDT and FACS are pointed to from FADT and thus don't belong
+     * in XSDT.
+     */
+    return pvh_acpi_table_allowed(sig) &&
+           strncmp(sig, ACPI_SIG_DSDT, ACPI_NAME_SIZE) &&
+           strncmp(sig, ACPI_SIG_FACS, ACPI_NAME_SIZE);
+}
+
 static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
                                       paddr_t *addr)
 {
@@ -841,7 +852,7 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
     {
         const char *sig = acpi_gbl_root_table_list.tables[i].signature.ascii;
 
-        if ( pvh_acpi_table_allowed(sig) )
+        if ( pvh_acpi_xsdt_table_allowed(sig) )
             num_tables++;
     }
 
@@ -888,7 +899,7 @@ static int __init pvh_setup_acpi_xsdt(struct domain *d, paddr_t madt_addr,
     {
         const char *sig = acpi_gbl_root_table_list.tables[i].signature.ascii;
 
-        if ( pvh_acpi_table_allowed(sig) )
+        if ( pvh_acpi_xsdt_table_allowed(sig) )
             xsdt->table_offset_entry[j++] =
                 acpi_gbl_root_table_list.tables[i].address;
     }
-- 
1.8.3.1


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT
  2017-11-09 15:37 [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT Boris Ostrovsky
@ 2017-11-09 15:47 ` Jan Beulich
  2017-11-09 15:51   ` Andrew Cooper
  2017-11-09 17:00 ` Roger Pau Monné
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Beulich @ 2017-11-09 15:47 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: andrew.cooper3, xen-devel, roger.pau

>>> On 09.11.17 at 16:37, <boris.ostrovsky@oracle.com> wrote:
> These tables are pointed to from FADT. Adding them will
> result in duplicate entries in the guest's tables.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT
  2017-11-09 15:47 ` Jan Beulich
@ 2017-11-09 15:51   ` Andrew Cooper
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Cooper @ 2017-11-09 15:51 UTC (permalink / raw)
  To: Jan Beulich, Boris Ostrovsky; +Cc: xen-devel, roger.pau

On 09/11/17 15:47, Jan Beulich wrote:
>>>> On 09.11.17 at 16:37, <boris.ostrovsky@oracle.com> wrote:
>> These tables are pointed to from FADT. Adding them will
>> result in duplicate entries in the guest's tables.
>>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Reviewed-by: Jan Beulich <jbeulich@suse.com>
>
>

Pulled into x86-next, thanks.

~Andrew

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT
  2017-11-09 15:37 [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT Boris Ostrovsky
  2017-11-09 15:47 ` Jan Beulich
@ 2017-11-09 17:00 ` Roger Pau Monné
  1 sibling, 0 replies; 4+ messages in thread
From: Roger Pau Monné @ 2017-11-09 17:00 UTC (permalink / raw)
  To: Boris Ostrovsky; +Cc: andrew.cooper3, jbeulich, xen-devel

On Thu, Nov 09, 2017 at 10:37:53AM -0500, Boris Ostrovsky wrote:
> These tables are pointed to from FADT. Adding them will
> result in duplicate entries in the guest's tables.
> 
> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>

Reviewed-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks, roger.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-11-09 17:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-09 15:37 [PATCH v2] x86/pvh: Do not add DSDT and FACS to PVH dom0 XSDT Boris Ostrovsky
2017-11-09 15:47 ` Jan Beulich
2017-11-09 15:51   ` Andrew Cooper
2017-11-09 17:00 ` Roger Pau Monné

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).