WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] [IA64] avoid spurious XENBUS error

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] [IA64] avoid spurious XENBUS error
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 09 Aug 2006 22:20:27 +0000
Delivery-date: Wed, 09 Aug 2006 15:24:16 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User awilliam@xxxxxxxxxxx
# Node ID b13ea287f9c02e3a3977d299a014a77e27dc1c0e
# Parent  b76e86966e7ee5e8bcdab787701a733cfc78b279
[IA64] avoid spurious XENBUS error

Create just as many LSAPIC entries in MADT as the number of cpus.
This avoids spurious XENBUS errors when kernel try to read xenstore entries
for cpus unknown by xend/xenstore.

Signed-off-by: Tristan Gingold <tristan.gingold@xxxxxxxx>
---
 xen/arch/ia64/xen/dom_fw.c |   14 +++++++++-----
 1 files changed, 9 insertions(+), 5 deletions(-)

diff -r b76e86966e7e -r b13ea287f9c0 xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c        Wed Aug 02 13:39:47 2006 -0600
+++ b/xen/arch/ia64/xen/dom_fw.c        Wed Aug 02 15:04:03 2006 -0600
@@ -342,6 +342,7 @@ dom_fw_fake_acpi(struct domain *d, struc
        struct acpi_table_lsapic *lsapic = tables->lsapic;
        int i;
        int aml_len;
+       int nbr_cpus;
 
        memset(tables, 0, sizeof(struct fake_acpi_tables));
 
@@ -452,8 +453,6 @@ dom_fw_fake_acpi(struct domain *d, struc
        /* setup MADT */
        strncpy(madt->header.signature, APIC_SIG, 4);
        madt->header.revision = 2;
-       madt->header.length = sizeof(struct acpi_table_madt) +
-               MAX_VIRT_CPUS * sizeof(struct acpi_table_lsapic);
        strcpy(madt->header.oem_id, "XEN");
        strcpy(madt->header.oem_table_id, "Xen/ia64");
        strcpy(madt->header.asl_compiler_id, "XEN");
@@ -461,15 +460,20 @@ dom_fw_fake_acpi(struct domain *d, struc
                xen_minor_version();
 
        /* An LSAPIC entry describes a CPU.  */
+       nbr_cpus = 0;
        for (i = 0; i < MAX_VIRT_CPUS; i++) {
                lsapic[i].header.type = ACPI_MADT_LSAPIC;
                lsapic[i].header.length = sizeof(struct acpi_table_lsapic);
                lsapic[i].acpi_id = i;
                lsapic[i].id = i;
                lsapic[i].eid = 0;
-               lsapic[i].flags.enabled = (d->vcpu[i] != NULL);
-       }
-
+               if (d->vcpu[i] != NULL) {
+                       lsapic[i].flags.enabled = 1;
+                       nbr_cpus++;
+               }
+       }
+       madt->header.length = sizeof(struct acpi_table_madt) +
+                             nbr_cpus * sizeof(struct acpi_table_lsapic);
        madt->header.checksum = generate_acpi_checksum(madt,
                                                       madt->header.length);
        return;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] [IA64] avoid spurious XENBUS error, Xen patchbot-unstable <=