# 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
|