Navigation Menu

Skip to content

Commit

Permalink
Welcome to Xen 4.1.2 headers.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
cegger committed Dec 7, 2011
1 parent c278ae3 commit 32aba8b
Show file tree
Hide file tree
Showing 59 changed files with 2,719 additions and 466 deletions.
2 changes: 1 addition & 1 deletion sys/arch/xen/include/xen-public/COPYING
@@ -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
==========

Expand Down
22 changes: 19 additions & 3 deletions sys/arch/xen/include/xen-public/arch-ia64.h
@@ -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
*
Expand Down Expand Up @@ -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;
Expand All @@ -67,7 +68,7 @@ typedef unsigned long xen_pfn_t;

/* 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
Expand Down Expand Up @@ -199,6 +200,15 @@ struct mapped_regs {
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;
};
};
};
Expand Down Expand Up @@ -393,6 +403,7 @@ struct vcpu_guest_context {
#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;
Expand Down Expand Up @@ -454,6 +465,11 @@ DEFINE_XEN_GUEST_HANDLE(vcpu_guest_context_t);
/* 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)
Expand Down
27 changes: 15 additions & 12 deletions sys/arch/xen/include/xen-public/arch-ia64/debug_op.h
Expand Up @@ -3,20 +3,23 @@
*
* Copyright (c) 2007 Tristan Gingold <tgingold@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.
*
* 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 above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 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__
Expand Down
27 changes: 15 additions & 12 deletions sys/arch/xen/include/xen-public/arch-ia64/hvm/memmap.h
Expand Up @@ -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.
*
* 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 above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 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__
Expand Down
41 changes: 24 additions & 17 deletions sys/arch/xen/include/xen-public/arch-ia64/hvm/save.h
Expand Up @@ -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.
*
* 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 above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 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.
Expand Down Expand Up @@ -106,7 +109,11 @@ DECLARE_HVM_SAVE_TYPE(VTIME, 5, struct hvm_hw_ia64_vtime);
*/
#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 {
Expand All @@ -124,7 +131,7 @@ union viosapic_rte

uint8_t reserved[3];
uint16_t dest_id;
};
} fields;
};

struct hvm_hw_ia64_viosapic {
Expand All @@ -134,7 +141,7 @@ struct hvm_hw_ia64_viosapic {
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);

Expand Down
27 changes: 15 additions & 12 deletions sys/arch/xen/include/xen-public/arch-ia64/sioemu.h
Expand Up @@ -3,20 +3,23 @@
*
* Copyright (c) 2008 Tristan Gingold <tgingold@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.
*
* 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 above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* 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__
Expand Down
2 changes: 1 addition & 1 deletion sys/arch/xen/include/xen-public/arch-x86/cpuid.h
Expand Up @@ -24,7 +24,7 @@
* Copyright (c) 2007 Citrix Systems, Inc.
*
* Authors:
* Keir Fraser <keir.fraser@citrix.com>
* Keir Fraser <keir@xen.org>
*/

#ifndef __XEN_PUBLIC_ARCH_X86_CPUID_H__
Expand Down

0 comments on commit 32aba8b

Please sign in to comment.