~ubuntu-branches/ubuntu/utopic/xen/utopic

« back to all changes in this revision

Viewing changes to xen/include/asm-ia64/vmx_platform.h

  • Committer: Bazaar Package Importer
  • Author(s): Bastian Blank
  • Date: 2010-05-06 15:47:38 UTC
  • mto: (1.3.1) (15.1.1 sid) (4.1.1 experimental)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20100506154738-agoz0rlafrh1fnq7
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * vmx_platform.h: VMX platform support
 
3
 * Copyright (c) 2004, Intel Corporation.
 
4
 *
 
5
 * This program is free software; you can redistribute it and/or modify it
 
6
 * under the terms and conditions of the GNU General Public License,
 
7
 * version 2, as published by the Free Software Foundation.
 
8
 *
 
9
 * This program is distributed in the hope it will be useful, but WITHOUT
 
10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 
11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
 
12
 * more details.
 
13
 *
 
14
 * You should have received a copy of the GNU General Public License along with
 
15
 * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
 
16
 * Place - Suite 330, Boston, MA 02111-1307 USA.
 
17
 *
 
18
 */
 
19
#ifndef __ASM_IA64_VMX_PLATFORM_H__
 
20
#define __ASM_IA64_VMX_PLATFORM_H__
 
21
 
 
22
#include <public/xen.h>
 
23
#include <public/hvm/params.h>
 
24
#include <asm/hvm/irq.h>
 
25
#include <asm/viosapic.h>
 
26
#include <asm/hvm/vacpi.h>
 
27
#include <xen/hvm/iommu.h>
 
28
 
 
29
struct vmx_ioreq_page {
 
30
    spinlock_t          lock;
 
31
    struct page_info   *page;
 
32
    void               *va;
 
33
};
 
34
int vmx_set_ioreq_page(struct domain *d,
 
35
                       struct vmx_ioreq_page *iorp, unsigned long gmfn);
 
36
 
 
37
typedef struct virtual_platform_def {
 
38
    struct vmx_ioreq_page       ioreq;
 
39
    struct vmx_ioreq_page       buf_ioreq;
 
40
    struct vmx_ioreq_page       buf_pioreq;
 
41
    unsigned long               pib_base;
 
42
    unsigned long               params[HVM_NR_PARAMS];
 
43
    /* One IOSAPIC now... */
 
44
    struct viosapic             viosapic;
 
45
    struct vacpi                vacpi;
 
46
    /* Pass-throgh VT-d */
 
47
    struct hvm_irq              irq;
 
48
    struct hvm_iommu            hvm_iommu;
 
49
} vir_plat_t;
 
50
 
 
51
static inline int __fls(uint32_t word)
 
52
{
 
53
    long double d = word;
 
54
    long exp;
 
55
 
 
56
    __asm__ __volatile__ ("getf.exp %0=%1" : "=r"(exp) : "f"(d));
 
57
    return word ? (exp - 0xffff) : -1;
 
58
}
 
59
#endif