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

Re: [Xen-devel] ANNOUNCE: Xen 3.1.1 First Release Candidate

To: Alex Williamson <alex.williamson@xxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] ANNOUNCE: Xen 3.1.1 First Release Candidate
From: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
Date: Fri, 21 Sep 2007 14:32:49 +0900
Cc: xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxx>, xen-ia64-devel <xen-ia64-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 21 Sep 2007 00:13:57 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <1190308202.4188.151.camel@bling>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <C317FDDD.15BCA%keir@xxxxxxxxxxxxx> <1190308202.4188.151.camel@bling>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Hi Alex,

Sorry for inconvenience.
I made a wrong backport (xen-3.1-testing.hg 15204). 
Attached patch fixes it.

Keir, 15655 needs additional backports.
please include attached patches too.
These are modified for 3.1.1.

I confirmed it can be built and boot on IA64.

Thanks,
Kouya

Alex Williamson writes:
 > On Thu, 2007-09-20 at 10:37 +0100, Keir Fraser wrote:
 > > Folks,
 > > 
 > > The patch queue for 3.1.1 has been pushed into
 > > http://xenbits.xensource.com/xen-3.1-testing.hg, and tagged as -rc1. Please
 > > try it out and let us know of any problems (patches gladly accepted!).
 > > 
 > >  -- Keir
 > > 
 > > PS. The patch queue (xen-3.1-testing.pq.hg) is no longer being used.
 > 
 >    Kouya, there seems to be some build breakages around the changesets
 > you submitted.  15311 includes a chunk from the windows optimization
 > patch and doesn't build ('ret' undefined - adding a declaration for it
 > doesn't seem like the proper solution since the function returns void in
 > 3.1.1).  15655 adds calls to acpi_table_disable(), but
 > acpi_table_disable() doesn't exist.  Reverting those and adding the
 > patch below I can make it build and boot.  Do you already have patches
 > to fill these holes?
 > 
 >    Keir, the patch below is a trivial build warning fix, please include
 > it in the tree.  Thanks,
 > 
 >      Alex
 > 
 > -- 
 > Alex Williamson                             HP Open Source & Linux Org.
 > # HG changeset patch
 > # User Alex Williamson <alex.williamson@xxxxxx>
 > # Date 1179337039 21600
 > # Node ID 2d26b66901d20f3a945b7fa5687d8926b0e7a417
 > # Parent  7caa6c1cabc8362e137da3415c78918a22f8eb6c
 > [IA64] Fix trivial compiler warning
 > 
 > Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
 > xen-unstable changeset: 15124:2d26b66901d20f3a945b7fa5687d8926b0e7a417
 > xen-unstable date: Wed May 16 11:37:19 2007 -0600
 > 
 > diff -r 7caa6c1cabc8 -r 2d26b66901d2 xen/arch/ia64/vmx/vmmu.c
 > --- a/xen/arch/ia64/vmx/vmmu.c       Wed May 16 10:59:01 2007 -0600
 > +++ b/xen/arch/ia64/vmx/vmmu.c       Wed May 16 11:37:19 2007 -0600
 > @@ -562,8 +562,9 @@ static void ptc_ga_remote_func (void *va
 >      u64 oldrid, moldrid, mpta, oldpsbits, vadr, flags;
 >      struct ptc_ga_args *args = (struct ptc_ga_args *)varg;
 >      VCPU *v = args->vcpu;
 > +    int cpu = v->processor;
 > +
 >      vadr = args->vadr;
 > -    int cpu = v->processor;
 >  
 >      /* Try again if VCPU has migrated. */
 >      if (cpu != current->processor)
 > _______________________________________________
 > Xen-devel mailing list
 > Xen-devel@xxxxxxxxxxxxxxxxxxx
 > http://lists.xensource.com/xen-devel

# HG changeset patch
# User Kouya Shimura <kouya@xxxxxxxxxxxxxx>
# Date 1190350719 -32400
# Node ID da7784dd34f5e85b62023d35c8c9d618b78647ac
# Parent  ae030e33166c9305e445029f31ba8079b9ed3f3d
[IA64] Fix backport (xen-3.1-testing changeset 15204)

Signed-off-by: Kouya Shimura <kouya@xxxxxxxxxxxxxx>
xen-unstable changeset: 15311:466f71b1e8319927dca16bd16b05faa09fad0cdd
xen-unstable date: Thu May 24 14:16:28 2007 -0600

diff -r ae030e33166c -r da7784dd34f5 xen/arch/ia64/vmx/vtlb.c
--- a/xen/arch/ia64/vmx/vtlb.c  Wed May 16 11:37:19 2007 -0600
+++ b/xen/arch/ia64/vmx/vtlb.c  Fri Sep 21 13:58:39 2007 +0900
@@ -536,9 +536,6 @@ void thash_purge_and_insert(VCPU *v, u64
     mrr.rrval = ia64_get_rr(ifa);
     if(VMX_DOMAIN(v)){
         phy_pte = translate_phy_pte(v, &pte, itir, ifa);
-
-        if (pte & VTLB_PTE_IO)
-            ret = 1;
         vtlb_purge(v, ifa, ps);
         vhpt_purge(v, ifa, ps);
         if (ps == mrr.ps) {
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1185789567 -3600
# Node ID d9c3836e068409ddb7620f7bd5b4c09f16a55f86
# Parent  f42ca20a1bb31942a5ea25d704be4025bfbe6d44
Move generate_acpi_checksum() from ia64 code to common.
Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
xen-unstable changeset: 15653:d9c3836e068409ddb7620f7bd5b4c09f16a55f86
xen-unstable date: Mon Jul 30 10:59:27 2007 +0100

diff -r 853ddd757ef2 -r 081537b26736 xen/arch/ia64/xen/dom_fw.c
--- a/xen/arch/ia64/xen/dom_fw.c        Fri Sep 21 11:04:25 2007 +0900
+++ b/xen/arch/ia64/xen/dom_fw.c        Fri Sep 21 11:15:03 2007 +0900
@@ -256,17 +256,6 @@ acpi_patch_plat_int_src (
                plintsrc->type = -1;
        }
        return 0;
-}
-
-static u8
-generate_acpi_checksum(void *tbl, unsigned long len)
-{
-       u8 *ptr, sum = 0;
-
-       for (ptr = tbl; len > 0 ; len--, ptr++)
-               sum += *ptr;
-
-       return 0 - sum;
 }
 
 static int
diff -r 853ddd757ef2 -r 081537b26736 xen/drivers/acpi/tables.c
--- a/xen/drivers/acpi/tables.c Fri Sep 21 11:04:25 2007 +0900
+++ b/xen/drivers/acpi/tables.c Fri Sep 21 11:15:03 2007 +0900
@@ -226,6 +226,17 @@ void acpi_table_print_madt_entry(acpi_ta
        }
 }
 
+uint8_t
+generate_acpi_checksum(void *tbl, unsigned long len)
+{
+       uint8_t *ptr, sum = 0;
+
+       for (ptr = tbl; len > 0 ; len--, ptr++)
+               sum += *ptr;
+
+       return 0 - sum;
+}
+
 static int
 acpi_table_compute_checksum(void *table_pointer, unsigned long length)
 {
diff -r 853ddd757ef2 -r 081537b26736 xen/include/xen/acpi.h
--- a/xen/include/xen/acpi.h    Fri Sep 21 11:04:25 2007 +0900
+++ b/xen/include/xen/acpi.h    Fri Sep 21 11:15:03 2007 +0900
@@ -390,6 +390,7 @@ void acpi_table_print (struct acpi_table
 void acpi_table_print (struct acpi_table_header *header, unsigned long 
phys_addr);
 void acpi_table_print_madt_entry (acpi_table_entry_header *madt);
 void acpi_table_print_srat_entry (acpi_table_entry_header *srat);
+uint8_t generate_acpi_checksum(void *tbl, unsigned long len);
 
 /* the following four functions are architecture-dependent */
 void acpi_numa_slit_init (struct acpi_table_slit *slit);
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1185791268 -3600
# Node ID c0fbee66aff63978addc5f8b263947553f606d08
# Parent  d9c3836e068409ddb7620f7bd5b4c09f16a55f86
Add acpi_table_disable() into xen/drivers/acpi/tables.c
This function can disable a ACPI table by updating the table header.

Signed-off-by: Akio Takebe <takebe_akio@xxxxxxxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
xen-unstable changeset: 15654:c0fbee66aff63978addc5f8b263947553f606d08
xen-unstable date: Mon Jul 30 11:27:48 2007 +0100

diff -r 081537b26736 -r ad80d0bb0048 xen/drivers/acpi/tables.c
--- a/xen/drivers/acpi/tables.c Fri Sep 21 11:15:03 2007 +0900
+++ b/xen/drivers/acpi/tables.c Fri Sep 21 11:20:06 2007 +0900
@@ -631,3 +631,143 @@ int __init acpi_table_init(void)
 
        return 0;
 }
+
+int __init
+acpi_table_disable(enum acpi_table_id table_id)
+{
+       struct acpi_table_header *header = NULL;
+       struct acpi_table_rsdp *rsdp;
+       unsigned long rsdp_phys;
+       char *table_name;
+       int id;
+
+       rsdp_phys = acpi_find_rsdp();
+       if (!rsdp_phys)
+               return -ENODEV;
+
+       rsdp = (struct acpi_table_rsdp *)__acpi_map_table(rsdp_phys,
+               sizeof(struct acpi_table_rsdp));
+       if (!rsdp)
+               return -ENODEV;
+
+       for (id = 0; id < sdt_count; id++)
+               if (sdt_entry[id].id == table_id)
+                       break;
+
+       if (id == sdt_count)
+               return -ENOENT;
+
+       table_name = acpi_table_signatures[table_id];
+
+       /* First check XSDT (but only on ACPI 2.0-compatible systems) */
+
+       if ((rsdp->revision >= 2) &&
+           (((struct acpi20_table_rsdp *)rsdp)->xsdt_address)) {
+
+               struct acpi_table_xsdt *mapped_xsdt = NULL;
+
+               sdt_pa = ((struct acpi20_table_rsdp *)rsdp)->xsdt_address;
+
+               /* map in just the header */
+               header = (struct acpi_table_header *)
+                   __acpi_map_table(sdt_pa, sizeof(struct acpi_table_header));
+
+               if (!header) {
+                       printk(KERN_WARNING PREFIX
+                              "Unable to map XSDT header\n");
+                       return -ENODEV;
+               }
+
+               /* remap in the entire table before processing */
+               mapped_xsdt = (struct acpi_table_xsdt *)
+                   __acpi_map_table(sdt_pa, header->length);
+               if (!mapped_xsdt) {
+                       printk(KERN_WARNING PREFIX "Unable to map XSDT\n");
+                       return -ENODEV;
+               }
+               header = &mapped_xsdt->header;
+
+               if (strncmp(header->signature, "XSDT", 4)) {
+                       printk(KERN_WARNING PREFIX
+                              "XSDT signature incorrect\n");
+                       return -ENODEV;
+               }
+
+               if (acpi_table_compute_checksum(header, header->length)) {
+                       printk(KERN_WARNING PREFIX "Invalid XSDT checksum\n");
+                       return -ENODEV;
+               }
+
+               if (id < sdt_count) {
+                       header = (struct acpi_table_header *)
+                          __acpi_map_table(mapped_xsdt->entry[id], 
sizeof(struct acpi_table_header));
+               } else {
+                       printk(KERN_WARNING PREFIX
+                              "Unable to disable entry %d\n",
+                              id);
+                       return -ENODEV;
+               }
+       }
+
+       /* Then check RSDT */
+
+       else if (rsdp->rsdt_address) {
+
+               struct acpi_table_rsdt *mapped_rsdt = NULL;
+
+               sdt_pa = rsdp->rsdt_address;
+
+               /* map in just the header */
+               header = (struct acpi_table_header *)
+                   __acpi_map_table(sdt_pa, sizeof(struct acpi_table_header));
+               if (!header) {
+                       printk(KERN_WARNING PREFIX
+                              "Unable to map RSDT header\n");
+                       return -ENODEV;
+               }
+
+               /* remap in the entire table before processing */
+               mapped_rsdt = (struct acpi_table_rsdt *)
+                   __acpi_map_table(sdt_pa, header->length);
+               if (!mapped_rsdt) {
+                       printk(KERN_WARNING PREFIX "Unable to map RSDT\n");
+                       return -ENODEV;
+               }
+               header = &mapped_rsdt->header;
+
+               if (strncmp(header->signature, "RSDT", 4)) {
+                       printk(KERN_WARNING PREFIX
+                              "RSDT signature incorrect\n");
+                       return -ENODEV;
+               }
+
+               if (acpi_table_compute_checksum(header, header->length)) {
+                       printk(KERN_WARNING PREFIX "Invalid RSDT checksum\n");
+                       return -ENODEV;
+               }
+               if (id < sdt_count) {
+                       header = (struct acpi_table_header *)
+                          __acpi_map_table(mapped_rsdt->entry[id], 
sizeof(struct acpi_table_header));
+               } else {
+                       printk(KERN_WARNING PREFIX
+                              "Unable to disable entry %d\n",
+                              id);
+                       return -ENODEV;
+               }
+       }
+
+       else {
+               printk(KERN_WARNING PREFIX
+                      "No System Description Table (RSDT/XSDT) specified in 
RSDP\n");
+               return -ENODEV;
+       }
+
+       memcpy(header->signature, "OEMx", 4);
+       memcpy(header->oem_id, "xxxxxx", 6);
+       memcpy(header->oem_id+1, table_name, 4);
+       memcpy(header->oem_table_id, "Xen     ", 8);
+       header->checksum = 0;
+       header->checksum = generate_acpi_checksum(header, header->length);
+
+       return 0;
+}
diff -r 081537b26736 -r ad80d0bb0048 xen/include/xen/acpi.h
--- a/xen/include/xen/acpi.h    Fri Sep 21 11:15:03 2007 +0900
+++ b/xen/include/xen/acpi.h    Fri Sep 21 11:20:06 2007 +0900
@@ -383,6 +383,7 @@ int acpi_numa_init (void);
 int acpi_numa_init (void);
 
 int acpi_table_init (void);
+int acpi_table_disable(enum acpi_table_id table_id);
 int acpi_table_parse (enum acpi_table_id id, acpi_table_handler handler);
 int acpi_get_table_header_early (enum acpi_table_id id, struct 
acpi_table_header **header);
 int acpi_table_parse_madt (enum acpi_madt_entry_id id, acpi_madt_entry_handler 
handler, unsigned int max_entries);
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel