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] [linux-2.6.18-xen] [IA64] Sync headers with Xen

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] [IA64] Sync headers with Xen
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 Oct 2007 15:00:16 -0700
Delivery-date: Wed, 31 Oct 2007 15:01:04 -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 Alex Williamson <alex.williamson@xxxxxx>
# Date 1193000891 21600
# Node ID 3b7be86c0eb1414a86ec6cfe404f8cc47fc9d62c
# Parent  2791b054f1a991dec2d41f88ecd33a9b6f78e629
[IA64] Sync headers with Xen

Signed-off-by: Alex Williamson <alex.williamson@xxxxxx>
---
 include/xen/interface/arch-ia64.h          |    2 
 include/xen/interface/arch-ia64/hvm/save.h |  195 +++++++++++++++++++++++++++++
 include/xen/interface/hvm/save.h           |    2 
 3 files changed, 198 insertions(+), 1 deletion(-)

diff -r 2791b054f1a9 -r 3b7be86c0eb1 include/xen/interface/arch-ia64.h
--- a/include/xen/interface/arch-ia64.h Sun Oct 21 13:40:48 2007 -0600
+++ b/include/xen/interface/arch-ia64.h Sun Oct 21 15:08:11 2007 -0600
@@ -421,7 +421,7 @@ struct vcpu_guest_context_regs {
 };
 
 struct vcpu_guest_context {
-#define VGCF_EXTRA_REGS (1<<1) /* Get/Set extra regs.  */
+#define VGCF_EXTRA_REGS (1UL << 1)     /* Get/Set extra regs.  */
     unsigned long flags;       /* VGCF_* flags */
 
     struct vcpu_guest_context_regs regs;
diff -r 2791b054f1a9 -r 3b7be86c0eb1 include/xen/interface/arch-ia64/hvm/save.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/include/xen/interface/arch-ia64/hvm/save.h        Sun Oct 21 15:08:11 
2007 -0600
@@ -0,0 +1,195 @@
+/******************************************************************************
+ * save_types.h
+ *
+ * Copyright (c) 2007 Isaku Yamahata <yamahata at valinux co jp>
+ *                    VA Linux Systems Japan K.K.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ */
+
+#ifndef __XEN_PUBLIC_HVM_SAVE_IA64_H__
+#define __XEN_PUBLIC_HVM_SAVE_IA64_H__
+
+#include <public/hvm/save.h>
+#include <public/arch-ia64.h>
+
+/* 
+ * Save/restore header: general info about the save file. 
+ */
+
+/* x86 uses 0x54381286 */
+#define HVM_FILE_MAGIC   0x343641492f6e6558UL   /* "Xen/IA64" */
+#define HVM_FILE_VERSION 0x0000000000000001UL
+
+struct hvm_save_header {
+    uint64_t magic;             /* Must be HVM_FILE_MAGIC */
+    uint64_t version;           /* File format version */
+    uint64_t changeset;         /* Version of Xen that saved this file */
+    uint64_t cpuid[5];          /* CPUID[0x01][%eax] on the saving machine */
+};
+
+DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
+
+/*
+ * CPU
+ */
+struct hvm_hw_ia64_cpu {
+    uint64_t    ipsr;
+};
+DECLARE_HVM_SAVE_TYPE(CPU, 2, struct hvm_hw_ia64_cpu);
+
+/*
+ * CPU
+ */
+struct hvm_hw_ia64_vpd {
+    struct vpd      vpd;
+};
+DECLARE_HVM_SAVE_TYPE(VPD, 3, struct hvm_hw_ia64_vpd);
+
+/*
+ * device dependency
+ * vacpi => viosapic => vlsapic
+ */
+/*
+ * vlsapic
+ */
+struct hvm_hw_ia64_vlsapic {
+    uint64_t insvc[4];
+    uint64_t vhpi; // ??? should this be saved in vpd
+    uint8_t xtp;
+    uint8_t pal_init_pending;
+    uint8_t pad[2];
+};
+DECLARE_HVM_SAVE_TYPE(VLSAPIC, 4, struct hvm_hw_ia64_vlsapic);
+// unconditionaly set v->arch.irq_new_peding = 1 
+// unconditionaly set v->arch.irq_new_condition = 0
+
+/*
+ * vtime
+ */
+// itc, itm, itv are saved by arch vcpu context
+struct hvm_hw_ia64_vtime {
+    uint64_t itc;
+    uint64_t itm;
+
+    uint64_t last_itc;
+    uint64_t pending;
+};
+DECLARE_HVM_SAVE_TYPE(VTIME, 5, struct hvm_hw_ia64_vtime);
+// calculate v->vtm.vtm_offset
+// ??? Or should vtm_offset be set by leave_hypervisor_tail()?
+// start vtm_timer if necessary by vtm_set_itm().
+// ??? Or should vtm_timer be set by leave_hypervisor_tail()?
+//
+// ??? or should be done by schedule_tail()
+//        => schedule_tail() should do.
+
+/*
+ * viosapic
+ */
+#define VIOSAPIC_NUM_PINS     48
+
+union viosapic_rte
+{
+    uint64_t bits;
+    struct {
+        uint8_t vector;
+
+        uint8_t delivery_mode  : 3;
+        uint8_t reserve1       : 1;
+        uint8_t delivery_status: 1;
+        uint8_t polarity       : 1;
+        uint8_t reserve2       : 1;
+        uint8_t trig_mode      : 1;
+
+        uint8_t mask           : 1;
+        uint8_t reserve3       : 7;
+
+        uint8_t reserved[3];
+        uint16_t dest_id;
+    }; 
+};
+
+struct hvm_hw_ia64_viosapic {
+    uint64_t    irr;
+    uint64_t    isr;
+    uint32_t    ioregsel;
+    uint32_t    pad;
+    uint64_t    lowest_vcpu_id;
+    uint64_t    base_address;
+    union viosapic_rte  redirtbl[VIOSAPIC_NUM_PINS];
+};
+DECLARE_HVM_SAVE_TYPE(VIOSAPIC, 6, struct hvm_hw_ia64_viosapic);
+  
+/*
+ * vacpi
+ * PM timer
+ */
+#if 0
+struct hvm_hw_ia64_pmtimer {
+    uint32_t tmr_val;   /* PM_TMR_BLK.TMR_VAL: 32bit free-running counter */
+    uint16_t pm1a_sts;  /* PM1a_EVT_BLK.PM1a_STS: status register */
+    uint16_t pm1a_en;   /* PM1a_EVT_BLK.PM1a_EN: enable register */
+};
+DECLARE_HVM_SAVE_TYPE(PMTIMER, 7, struct hvm_hw_ia64_pmtimer);
+#else
+struct vacpi_regs {
+       union {
+               struct {
+                       uint32_t pm1a_sts:16;
+                       uint32_t pm1a_en:16;
+               };
+               uint32_t evt_blk;
+       };
+       uint32_t tmr_val;
+};
+
+struct hvm_hw_ia64_vacpi {
+    struct vacpi_regs   regs;
+};
+DECLARE_HVM_SAVE_TYPE(VACPI, 7, struct hvm_hw_ia64_vacpi);
+// update last_gtime and setup timer of struct vacpi
+#endif
+
+#if 0
+/*
+ * guest os type
+ * XXX Xen guest os specific optimization
+ *     This isn't hvm specific so this should be addressed genericly
+ *     including paravirtualized domain.
+ */
+struct hvm_hw_ia64_gos {
+    uint64_t   gos_type;
+};
+DECLARE_HVM_SAVE_TYPE(GOS_TYPE, 8, struct hvm_hw_ia64_gos);
+#endif
+
+/* 
+ * Largest type-code in use
+ */
+#define HVM_SAVE_CODE_MAX       7
+
+#endif /* __XEN_PUBLIC_HVM_SAVE_IA64_H__ */
+
+/*
+ * Local variables:
+ * mode: C
+ * c-set-style: "BSD"
+ * c-basic-offset: 4
+ * tab-width: 4
+ * indent-tabs-mode: nil
+ * End:
+ */
diff -r 2791b054f1a9 -r 3b7be86c0eb1 include/xen/interface/hvm/save.h
--- a/include/xen/interface/hvm/save.h  Sun Oct 21 13:40:48 2007 -0600
+++ b/include/xen/interface/hvm/save.h  Sun Oct 21 15:08:11 2007 -0600
@@ -75,6 +75,8 @@ DECLARE_HVM_SAVE_TYPE(END, 0, struct hvm
 
 #if defined(__i386__) || defined(__x86_64__)
 #include "../arch-x86/hvm/save.h"
+#elif defined(__ia64__)
+#include "../arch-ia64/hvm/save.h"
 #else
 #error "unsupported architecture"
 #endif

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] [IA64] Sync headers with Xen, Xen patchbot-linux-2.6.18-xen <=