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

[BUG] PVH ACPI XSDT table construction


  • To: "xen-devel" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Daniel Smith <dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Date: Tue, 26 May 2020 13:13:19 -0400
  • Arc-authentication-results: i=1; mx.zohomail.com; dkim=pass header.i=apertussolutions.com; spf=pass smtp.mailfrom=dpsmith@xxxxxxxxxxxxxxxxxxxx; dmarc=pass header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx> header.from=<dpsmith@xxxxxxxxxxxxxxxxxxxx>
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1590513205; h=Content-Type:Date:From:MIME-Version:Message-ID:Subject:To; bh=FVTrQ7tdhD4ExqOEnrw+beAro04cuJgyxbyvs+1v9Tw=; b=bh6vbVXbaFSGjqt3Z+vuj7xjsU4n3zVGSCTfX8MD7FplpwHAAWnrX+04BVUK8D8/Mvvz5o/X/l/Ow73gdUspCgUWxjVjDRKQvhDeplUUpvvIrDxnLVaIXjhZ+76WLVQP5LcS6tZY7SqB6P0gFFxUZnhyDR68EoArhdRb4EFX06g=
  • Arc-seal: i=1; a=rsa-sha256; t=1590513205; cv=none; d=zohomail.com; s=zohoarc; b=ccXqLQcH5jzsedUplzrBXFOK4mUKY54J4IyDkw1wKYOr40qP1AntXrIOit/sv3J92No1B07P9TX9b+f4k6Ar8Cx2rkuum3PBAmSoq4DmNX5vq4ZEZC3nukGtHJUd3RumnZeFCBx+nomW85TfegXYMoZlEjqvORRzZFnVyVC1vtc=
  • Delivery-date: Tue, 26 May 2020 17:13:47 +0000
  • Importance: Medium
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Greetings,

I was reviewing the ACPI construction for PVH and discovered what I believe is a flaw in the logic for selecting the XSDT tables. The current logic is,

static bool __init pvh_acpi_xsdt_table_allowed(const char *sig,
                                               unsigned long address,
                                               unsigned long size)
{
    /*
     * DSDT and FACS are pointed to from FADT and thus don't belong
     * in XSDT.
     */
    return (pvh_acpi_table_allowed(sig, address, size) &&
            strncmp(sig, ACPI_SIG_DSDT, ACPI_NAME_SIZE) &&
            strncmp(sig, ACPI_SIG_FACS, ACPI_NAME_SIZE));
}

Unless I am mistaken, the boolean logic in the return statement will always return false resulting in an empty XSDT table. I believe based on the comment what was intended here was,

    return (pvh_acpi_table_allowed(sig, address, size) &&
            !(strncmp(sig, ACPI_SIG_DSDT, ACPI_NAME_SIZE) ||
              strncmp(sig, ACPI_SIG_FACS, ACPI_NAME_SIZE)));

Thanks!

V/r,
Daniel P. Smith
Apertus Solutions, LLC




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.