Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/xen/include/xen-public Welcome to Xen 4.1.2 headers.



details:   https://anonhg.NetBSD.org/src/rev/5535bcf52158
branches:  trunk
changeset: 771899:5535bcf52158
user:      cegger <cegger%NetBSD.org@localhost>
date:      Wed Dec 07 14:41:15 2011 +0000

description:
Welcome to Xen 4.1.2 headers.

New interfaces for PV drivers:
- Xen transcedent memory
- USB IO
- SCSI IO

PCI IO improvements:
- PCI MSI support
- PCI Express AER support

New features:
- xen honors flags to be placed into guest kernel available pte bits
  if enabled (for grant table)
- support for 128 vcpus
  (old interface is still present and supports up to 32 vcpus)
- PCI passthrough: new hypercalls to support SR-IOV
- new hypercall for physical cpu hotplugging
- new hypercall for physical page offlining
- fixes to compile with clang
- machine check recovery mechanism

diffstat:

 sys/arch/xen/include/xen-public/COPYING                |    2 +-
 sys/arch/xen/include/xen-public/arch-ia64.h            |   22 +-
 sys/arch/xen/include/xen-public/arch-ia64/debug_op.h   |   27 +-
 sys/arch/xen/include/xen-public/arch-ia64/hvm/memmap.h |   27 +-
 sys/arch/xen/include/xen-public/arch-ia64/hvm/save.h   |   41 +-
 sys/arch/xen/include/xen-public/arch-ia64/sioemu.h     |   27 +-
 sys/arch/xen/include/xen-public/arch-x86/cpuid.h       |    2 +-
 sys/arch/xen/include/xen-public/arch-x86/hvm/save.h    |  175 ++++++-
 sys/arch/xen/include/xen-public/arch-x86/xen-mca.h     |  205 +++++++-
 sys/arch/xen/include/xen-public/arch-x86/xen-x86_32.h  |   13 +-
 sys/arch/xen/include/xen-public/arch-x86/xen-x86_64.h  |    2 +-
 sys/arch/xen/include/xen-public/arch-x86/xen.h         |   13 +-
 sys/arch/xen/include/xen-public/callback.h             |    2 +-
 sys/arch/xen/include/xen-public/domctl.h               |  434 ++++++++++++++--
 sys/arch/xen/include/xen-public/elfnote.h              |   21 +-
 sys/arch/xen/include/xen-public/features.h             |   20 +-
 sys/arch/xen/include/xen-public/hvm/e820.h             |    2 +-
 sys/arch/xen/include/xen-public/hvm/hvm_info_table.h   |   36 +-
 sys/arch/xen/include/xen-public/hvm/hvm_op.h           |  130 ++++-
 sys/arch/xen/include/xen-public/hvm/ioreq.h            |   65 +-
 sys/arch/xen/include/xen-public/hvm/params.h           |   49 +-
 sys/arch/xen/include/xen-public/hvm/save.h             |   28 +-
 sys/arch/xen/include/xen-public/io/console.h           |    2 +-
 sys/arch/xen/include/xen-public/io/fbif.h              |    2 +-
 sys/arch/xen/include/xen-public/io/fsif.h              |    5 +-
 sys/arch/xen/include/xen-public/io/kbdif.h             |    2 +-
 sys/arch/xen/include/xen-public/io/pciif.h             |   37 +-
 sys/arch/xen/include/xen-public/io/protocols.h         |    2 +-
 sys/arch/xen/include/xen-public/io/ring.h              |   32 +-
 sys/arch/xen/include/xen-public/io/tpmif.h             |    2 +-
 sys/arch/xen/include/xen-public/io/usbif.h             |  151 +++++
 sys/arch/xen/include/xen-public/io/vscsiif.h           |  105 ++++
 sys/arch/xen/include/xen-public/io/xenbus.h            |    2 +-
 sys/arch/xen/include/xen-public/io/xs_wire.h           |   11 +-
 sys/arch/xen/include/xen-public/kexec.h                |   23 +-
 sys/arch/xen/include/xen-public/mem_event.h            |   87 +++
 sys/arch/xen/include/xen-public/memory.h               |   57 +-
 sys/arch/xen/include/xen-public/nmi.h                  |    4 +-
 sys/arch/xen/include/xen-public/platform.h             |   55 +-
 sys/arch/xen/include/xen-public/sched.h                |   26 +-
 sys/arch/xen/include/xen-public/sysctl.h               |  405 ++++++++++++++-
 sys/arch/xen/include/xen-public/tmem.h                 |  148 +++++
 sys/arch/xen/include/xen-public/vcpu.h                 |   41 +-
 sys/arch/xen/include/xen-public/version.h              |    5 +-
 sys/arch/xen/include/xen-public/xen-compat.h           |    4 +-
 sys/arch/xen/include/xen-public/xencomm.h              |    2 +-
 sys/arch/xen/include/xen-public/xenoprof.h             |   18 +-
 sys/arch/xen/include/xen-public/xsm/acm.h              |   12 -
 sys/arch/xen/include/xen-public/xsm/flask_op.h         |   24 +-
 49 files changed, 2240 insertions(+), 367 deletions(-)

diffs (truncated from 4060 to 300 lines):

diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/COPYING
--- a/sys/arch/xen/include/xen-public/COPYING   Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/COPYING   Wed Dec 07 14:41:15 2011 +0000
@@ -1,4 +1,4 @@
-$NetBSD: COPYING,v 1.1.1.1 2011/12/07 13:15:44 cegger Exp $
+$NetBSD: COPYING,v 1.1.1.2 2011/12/07 14:41:15 cegger Exp $
 XEN NOTICE
 ==========
 
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-ia64.h
--- a/sys/arch/xen/include/xen-public/arch-ia64.h       Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-ia64.h       Wed Dec 07 14:41:15 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: arch-ia64.h,v 1.1.1.1 2011/12/07 13:15:44 cegger Exp $ */
+/* $NetBSD: arch-ia64.h,v 1.1.1.2 2011/12/07 14:41:16 cegger Exp $ */
 /******************************************************************************
  * arch-ia64/hypervisor-if.h
  * 
@@ -50,10 +50,11 @@
 #define XEN_GUEST_HANDLE(name)          __guest_handle_ ## name
 #define XEN_GUEST_HANDLE_64(name)       XEN_GUEST_HANDLE(name)
 #define uint64_aligned_t                uint64_t
-#define set_xen_guest_handle(hnd, val)  do { (hnd).p = val; } while (0)
+#define set_xen_guest_handle_raw(hnd, val)  do { (hnd).p = val; } while (0)
 #ifdef __XEN_TOOLS__
 #define get_xen_guest_handle(val, hnd)  do { val = (hnd).p; } while (0)
 #endif
+#define set_xen_guest_handle(hnd, val) set_xen_guest_handle_raw(hnd, val)
 
 #ifndef __ASSEMBLY__
 typedef unsigned long xen_pfn_t;
@@ -67,7 +68,7 @@
 
 /* Maximum number of virtual CPUs in multi-processor guests. */
 /* WARNING: before changing this, check that shared_info fits on a page */
-#define MAX_VIRT_CPUS 64
+#define XEN_LEGACY_MAX_VCPUS 64
 
 /* IO ports location for PV.  */
 #define IO_PORTS_PADDR          0x00000ffffc000000UL
@@ -199,6 +200,15 @@
             unsigned long rrs[8]; // region registers
             unsigned long krs[8]; // kernel registers
             unsigned long tmp[16]; // temp registers (e.g. for hyperprivops)
+
+            /* itc paravirtualization
+             * vAR.ITC = mAR.ITC + itc_offset
+             * itc_last is one which was lastly passed to
+             * the guest OS in order to prevent it from
+             * going backwords.
+             */
+            unsigned long itc_offset;
+            unsigned long itc_last;
         };
     };
 };
@@ -393,6 +403,7 @@
 #define VGCF_EXTRA_REGS (1UL << 1)     /* Set extra regs.  */
 #define VGCF_SET_CR_IRR (1UL << 2)     /* Set cr_irr[0:3]. */
 #define VGCF_online     (1UL << 3)  /* make this vcpu online */
+#define VGCF_SET_AR_ITC (1UL << 4)  /* set pv ar.itc. itc_offset, itc_last */
     unsigned long flags;       /* VGCF_* flags */
 
     struct vcpu_guest_context_regs regs;
@@ -454,6 +465,11 @@
 /* unexpose the foreign domain's p2m table into privileged domain */
 #define IA64_DOM0VP_unexpose_foreign_p2m        13
 
+/* get memmap_info and memmap. It is possible to map the page directly
+   by foreign page mapping, but there is a race between writer.
+   This hypercall avoids such race. */
+#define IA64_DOM0VP_get_memmap          14
+
 // flags for page assignement to pseudo physical address space
 #define _ASSIGN_readonly                0
 #define ASSIGN_readonly                 (1UL << _ASSIGN_readonly)
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-ia64/debug_op.h
--- a/sys/arch/xen/include/xen-public/arch-ia64/debug_op.h      Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-ia64/debug_op.h      Wed Dec 07 14:41:15 2011 +0000
@@ -3,20 +3,23 @@
  *
  * Copyright (c) 2007 Tristan Gingold <tgingold%free.fr@localhost>
  *
- * 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.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
  *
- * 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.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  *
- * 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
- *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_IA64_DEBUG_OP_H__
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-ia64/hvm/memmap.h
--- a/sys/arch/xen/include/xen-public/arch-ia64/hvm/memmap.h    Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-ia64/hvm/memmap.h    Wed Dec 07 14:41:15 2011 +0000
@@ -3,20 +3,23 @@
  *
  * Copyright (c) 2008 Tristan Gingold <tgingold AT free fr>
  *
- * 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.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
  *
- * 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.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  *
- * 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
- *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_HVM_MEMMAP_IA64_H__
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-ia64/hvm/save.h
--- a/sys/arch/xen/include/xen-public/arch-ia64/hvm/save.h      Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-ia64/hvm/save.h      Wed Dec 07 14:41:15 2011 +0000
@@ -4,27 +4,30 @@
  * 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.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
  *
- * 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.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  *
- * 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
- *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_HVM_SAVE_IA64_H__
 #define __XEN_PUBLIC_HVM_SAVE_IA64_H__
 
-#include <public/hvm/save.h>
-#include <public/arch-ia64.h>
+#include "../../hvm/save.h"
+#include "../../arch-ia64.h"
 
 /* 
  * Save/restore header: general info about the save file. 
@@ -106,7 +109,11 @@
  */
 #define VIOSAPIC_NUM_PINS     48
 
-union viosapic_rte
+/* To share VT-d code which uses vioapic_redir_entry.
+ * Although on ia64 this is for vsapic, but we have to vioapic_redir_entry
+ * instead of viosapic_redir_entry.
+ */
+union vioapic_redir_entry
 {
     uint64_t bits;
     struct {
@@ -124,7 +131,7 @@
 
         uint8_t reserved[3];
         uint16_t dest_id;
-    }; 
+    } fields;
 };
 
 struct hvm_hw_ia64_viosapic {
@@ -134,7 +141,7 @@
     uint32_t    pad;
     uint64_t    lowest_vcpu_id;
     uint64_t    base_address;
-    union viosapic_rte  redirtbl[VIOSAPIC_NUM_PINS];
+    union vioapic_redir_entry  redirtbl[VIOSAPIC_NUM_PINS];
 };
 DECLARE_HVM_SAVE_TYPE(VIOSAPIC, 6, struct hvm_hw_ia64_viosapic);
   
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-ia64/sioemu.h
--- a/sys/arch/xen/include/xen-public/arch-ia64/sioemu.h        Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-ia64/sioemu.h        Wed Dec 07 14:41:15 2011 +0000
@@ -3,20 +3,23 @@
  *
  * Copyright (c) 2008 Tristan Gingold <tgingold%free.fr@localhost>
  *
- * 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.
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
  *
- * 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.
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
  *
- * 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
- *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
  */
 
 #ifndef __XEN_PUBLIC_IA64_SIOEMU_H__
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-x86/cpuid.h
--- a/sys/arch/xen/include/xen-public/arch-x86/cpuid.h  Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-x86/cpuid.h  Wed Dec 07 14:41:15 2011 +0000
@@ -24,7 +24,7 @@
  * Copyright (c) 2007 Citrix Systems, Inc.
  * 
  * Authors:
- *    Keir Fraser <keir.fraser%citrix.com@localhost>
+ *    Keir Fraser <keir%xen.org@localhost>
  */
 
 #ifndef __XEN_PUBLIC_ARCH_X86_CPUID_H__
diff -r 449b9e64e19d -r 5535bcf52158 sys/arch/xen/include/xen-public/arch-x86/hvm/save.h
--- a/sys/arch/xen/include/xen-public/arch-x86/hvm/save.h       Wed Dec 07 13:49:04 2011 +0000
+++ b/sys/arch/xen/include/xen-public/arch-x86/hvm/save.h       Wed Dec 07 14:41:15 2011 +0000
@@ -38,7 +38,7 @@
     uint32_t version;           /* File format version */
     uint64_t changeset;         /* Version of Xen that saved this file */
     uint32_t cpuid;             /* CPUID[0x01][%eax] on the saving machine */
-    uint32_t pad0;
+    uint32_t gtsc_khz;        /* Guest's TSC frequency in kHz */
 };
 
 DECLARE_HVM_SAVE_TYPE(HEADER, 1, struct hvm_save_header);
@@ -46,6 +46,8 @@
 
 /*
  * Processor



Home | Main Index | Thread Index | Old Index