~ubuntu-branches/ubuntu/trusty/qemu/trusty

« back to all changes in this revision

Viewing changes to .pc/ubuntu/arm64/0009-target-arm-Don-t-hardcode-KVM-target-CPU-to-be-A15.patch/target-arm/kvm-consts.h

  • Committer: Package Import Robot
  • Author(s): Serge Hallyn
  • Date: 2014-02-04 12:13:08 UTC
  • mfrom: (10.1.45 sid)
  • Revision ID: package-import@ubuntu.com-20140204121308-1xq92lrfs75agw2g
Tags: 1.7.0+dfsg-3ubuntu1~ppa1
* Merge 1.7.0+dfsg-3 from debian.  Remaining changes:
  - debian/patches/ubuntu:
    * expose-vmx_qemu64cpu.patch
    * linaro (omap3) and arm64 patches
    * ubuntu/target-ppc-add-stubs-for-kvm-breakpoints: fix FTBFS
      on ppc
    * ubuntu/CVE-2013-4377.patch: fix denial of service via virtio
  - debian/qemu-system-x86.modprobe: set kvm_intel nested=1 options
  - debian/control:
    * add arm64 to Architectures
    * add qemu-common and qemu-system-aarch64 packages
  - debian/qemu-system-common.install: add debian/tmp/usr/lib
  - debian/qemu-system-common.preinst: add kvm group
  - debian/qemu-system-common.postinst: remove acl placed by udev,
    and add udevadm trigger.
  - qemu-system-x86.links: add eepro100.rom, remove pxe-virtio,
    pxe-e1000 and pxe-rtl8139.
  - add qemu-system-x86.qemu-kvm.upstart and .default
  - qemu-user-static.postinst-in: remove arm64 binfmt
  - debian/rules:
    * allow parallel build
    * add aarch64 to system_targets and sys_systems
    * add qemu-kvm-spice links
    * install qemu-system-x86.modprobe
  - add debian/qemu-system-common.links for OVMF.fd link
* Remove kvm-img, kvm-nbd, kvm-ifup and kvm-ifdown symlinks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * KVM ARM ABI constant definitions
 
3
 *
 
4
 * Copyright (c) 2013 Linaro Limited
 
5
 *
 
6
 * Provide versions of KVM constant defines that can be used even
 
7
 * when CONFIG_KVM is not set and we don't have access to the
 
8
 * KVM headers. If CONFIG_KVM is set, we do a compile-time check
 
9
 * that we haven't got out of sync somehow.
 
10
 *
 
11
 * This work is licensed under the terms of the GNU GPL, version 2 or later.
 
12
 * See the COPYING file in the top-level directory.
 
13
 */
 
14
#ifndef ARM_KVM_CONSTS_H
 
15
#define ARM_KVM_CONSTS_H
 
16
 
 
17
#ifdef CONFIG_KVM
 
18
#include "qemu/compiler.h"
 
19
#include <linux/kvm.h>
 
20
 
 
21
#define MISMATCH_CHECK(X, Y) QEMU_BUILD_BUG_ON(X != Y)
 
22
 
 
23
#else
 
24
#define MISMATCH_CHECK(X, Y)
 
25
#endif
 
26
 
 
27
#define CP_REG_SIZE_SHIFT 52
 
28
#define CP_REG_SIZE_MASK       0x00f0000000000000ULL
 
29
#define CP_REG_SIZE_U32        0x0020000000000000ULL
 
30
#define CP_REG_SIZE_U64        0x0030000000000000ULL
 
31
#define CP_REG_ARM             0x4000000000000000ULL
 
32
 
 
33
MISMATCH_CHECK(CP_REG_SIZE_SHIFT, KVM_REG_SIZE_SHIFT)
 
34
MISMATCH_CHECK(CP_REG_SIZE_MASK, KVM_REG_SIZE_MASK)
 
35
MISMATCH_CHECK(CP_REG_SIZE_U32, KVM_REG_SIZE_U32)
 
36
MISMATCH_CHECK(CP_REG_SIZE_U64, KVM_REG_SIZE_U64)
 
37
MISMATCH_CHECK(CP_REG_ARM, KVM_REG_ARM)
 
38
 
 
39
#define PSCI_FN_BASE 0x95c1ba5e
 
40
#define PSCI_FN(n) (PSCI_FN_BASE + (n))
 
41
#define PSCI_FN_CPU_SUSPEND PSCI_FN(0)
 
42
#define PSCI_FN_CPU_OFF PSCI_FN(1)
 
43
#define PSCI_FN_CPU_ON PSCI_FN(2)
 
44
#define PSCI_FN_MIGRATE PSCI_FN(3)
 
45
 
 
46
MISMATCH_CHECK(PSCI_FN_CPU_SUSPEND, KVM_PSCI_FN_CPU_SUSPEND)
 
47
MISMATCH_CHECK(PSCI_FN_CPU_OFF, KVM_PSCI_FN_CPU_OFF)
 
48
MISMATCH_CHECK(PSCI_FN_CPU_ON, KVM_PSCI_FN_CPU_ON)
 
49
MISMATCH_CHECK(PSCI_FN_MIGRATE, KVM_PSCI_FN_MIGRATE)
 
50
 
 
51
#undef MISMATCH_CHECK
 
52
 
 
53
#endif