aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/templates/intel/virtual_environment/noha/vms/controller.xml
blob: d0d0ef14cc5d9b3b7adb9b9a1bff174cb139103e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
<domain type='kvm'>
  <name>controller</name>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <vcpu placement='static'>2</vcpu>
  <os>
    <type arch='x86_64' machine='pc'>hvm</type>
    <boot dev='network'/>
    <boot dev='hd'/>
    <bios rebootTimeout='30000'/>
  </os>
  <features>
    <acpi/>
    <apic/>
    <pae/>
  </features>
  <cpu mode='custom' match='exact'>
    <model fallback='allow'>SandyBridge</model>
    <vendor>Intel</vendor>
    <feature policy='require' name='vme'/>
    <feature policy='require' name='dtes64'/>
    <feature policy='require' name='vmx'/>
    <feature policy='require' name='erms'/>
    <feature policy='require' name='xtpr'/>
    <feature policy='require' name='smep'/>
    <feature policy='require' name='pcid'/>
    <feature policy='require' name='est'/>
    <feature policy='require' name='monitor'/>
    <feature policy='require' name='smx'/>
    <feature policy='require' name='tm'/>
    <feature policy='require' name='acpi'/>
    <feature policy='require' name='osxsave'/>
    <feature policy='require' name='ht'/>
    <feature policy='require' name='pdcm'/>
    <feature policy='require' name='fsgsbase'/>
    <feature policy='require' name='f16c'/>
    <feature policy='require' name='ds'/>
    <feature policy='require' name='tm2'/>
    <feature policy='require' name='ss'/>
    <feature policy='require' name='pbe'/>
    <feature policy='require' name='ds_cpl'/>
    <feature policy='require' name='rdrand'/>
  </cpu>
  <clock offset='utc'/>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/kvm</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='disk.raw'/>
      <target dev='vda' bus='virtio'/>
    </disk>
    <controller type='usb' index='0'>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='network'>
      <source network='fuel1'/>
      <model type='e1000'/>
    </interface>
    <interface type='network'>
      <source network='fuel2'/>
      <model type='e1000'/>
    </interface>
    <interface type='network'>
      <source network='fuel3'/>
      <model type='e1000'/>
    </interface>
    <interface type='network'>
      <source network='fuel4'/>
      <model type='e1000'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <graphics type='vnc' port='-1' autoport='yes' keymap='en-us'/>
    <sound model='ich6'>
    </sound>
    <video>
      <model type='cirrus' vram='9216' heads='1'/>
    </video>
    <memballoon model='virtio'>
    </memballoon>
  </devices>
</domain>
pan class="p">) & 0x80) | ((a >> 52) & 0x7f); mant_sig = ((a >> 32) & 0x80000000) | ((a >> 29) & 0x007fffff); if (unlikely(!exp && mant_sig)) { /* Reserved operands / Dirty zero */ dynamic_excp(env, retaddr, EXCP_OPCDEC, 0); } if (exp < 3) { /* Underflow */ r.l = 0; } else { r.l = ((exp - 2) << 23) | mant_sig; } return r.f; } uint32_t helper_f_to_memory(uint64_t a) { uint32_t r; r = (a & 0x00001fffe0000000ull) >> 13; r |= (a & 0x07ffe00000000000ull) >> 45; r |= (a & 0xc000000000000000ull) >> 48; return r; } uint64_t helper_memory_to_f(uint32_t a) { uint64_t r; r = ((uint64_t)(a & 0x0000c000)) << 48; r |= ((uint64_t)(a & 0x003fffff)) << 45; r |= ((uint64_t)(a & 0xffff0000)) << 13; if (!(a & 0x00004000)) { r |= 0x7ll << 59; } return r; } /* ??? Emulating VAX arithmetic with IEEE arithmetic is wrong. We should either implement VAX arithmetic properly or just signal invalid opcode. */ uint64_t helper_addf(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; fa = f_to_float32(env, GETPC(), a); fb = f_to_float32(env, GETPC(), b); fr = float32_add(fa, fb, &FP_STATUS); return float32_to_f(fr); } uint64_t helper_subf(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; fa = f_to_float32(env, GETPC(), a); fb = f_to_float32(env, GETPC(), b); fr = float32_sub(fa, fb, &FP_STATUS); return float32_to_f(fr); } uint64_t helper_mulf(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; fa = f_to_float32(env, GETPC(), a); fb = f_to_float32(env, GETPC(), b); fr = float32_mul(fa, fb, &FP_STATUS); return float32_to_f(fr); } uint64_t helper_divf(CPUAlphaState *env, uint64_t a, uint64_t b) { float32 fa, fb, fr; fa = f_to_float32(env, GETPC(), a); fb = f_to_float32(env, GETPC(), b); fr = float32_div(fa, fb, &FP_STATUS); return float32_to_f(fr); } uint64_t helper_sqrtf(CPUAlphaState *env, uint64_t t) { float32 ft, fr; ft = f_to_float32(env, GETPC(), t); fr = float32_sqrt(ft, &FP_STATUS); return float32_to_f(fr); } /* G floating (VAX) */ static uint64_t float64_to_g(float64 fa) { uint64_t r, exp, mant, sig; CPU_DoubleU a; a.d = fa; sig = a.ll & 0x8000000000000000ull; exp = (a.ll >> 52) & 0x7ff; mant = a.ll & 0x000fffffffffffffull; if (exp == 2047) { /* NaN or infinity */ r = 1; /* VAX dirty zero */ } else if (exp == 0) { if (mant == 0) { /* Zero */ r = 0; } else { /* Denormalized */ r = sig | ((exp + 1) << 52) | mant; } } else { if (exp >= 2045) { /* Overflow */ r = 1; /* VAX dirty zero */ } else { r = sig | ((exp + 2) << 52); } } return r; } static float64 g_to_float64(CPUAlphaState *env, uintptr_t retaddr, uint64_t a) { uint64_t exp, mant_sig; CPU_DoubleU r; exp = (a >> 52) & 0x7ff; mant_sig = a & 0x800fffffffffffffull; if (!exp && mant_sig) { /* Reserved operands / Dirty zero */ dynamic_excp(env, retaddr, EXCP_OPCDEC, 0); } if (exp < 3) { /* Underflow */ r.ll = 0; } else { r.ll = ((exp - 2) << 52) | mant_sig; } return r.d; } uint64_t helper_g_to_memory(uint64_t a) { uint64_t r; r = (a & 0x000000000000ffffull) << 48; r |= (a & 0x00000000ffff0000ull) << 16; r |= (a & 0x0000ffff00000000ull) >> 16; r |= (a & 0xffff000000000000ull) >> 48; return r; } uint64_t helper_memory_to_g(uint64_t a) { uint64_t r; r = (a & 0x000000000000ffffull) << 48; r |= (a & 0x00000000ffff0000ull) << 16; r |= (a & 0x0000ffff00000000ull) >> 16; r |= (a & 0xffff000000000000ull) >> 48; return r; } uint64_t helper_addg(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); fr = float64_add(fa, fb, &FP_STATUS); return float64_to_g(fr); } uint64_t helper_subg(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); fr = float64_sub(fa, fb, &FP_STATUS); return float64_to_g(fr); } uint64_t helper_mulg(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); fr = float64_mul(fa, fb, &FP_STATUS); return float64_to_g(fr); } uint64_t helper_divg(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb, fr; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); fr = float64_div(fa, fb, &FP_STATUS); return float64_to_g(fr); } uint64_t helper_sqrtg(CPUAlphaState *env, uint64_t a) { float64 fa, fr; fa = g_to_float64(env, GETPC(), a); fr = float64_sqrt(fa, &FP_STATUS); return float64_to_g(fr); } uint64_t helper_cmpgeq(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); if (float64_eq_quiet(fa, fb, &FP_STATUS)) { return 0x4000000000000000ULL; } else { return 0; } } uint64_t helper_cmpgle(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); if (float64_le(fa, fb, &FP_STATUS)) { return 0x4000000000000000ULL; } else { return 0; } } uint64_t helper_cmpglt(CPUAlphaState *env, uint64_t a, uint64_t b) { float64 fa, fb; fa = g_to_float64(env, GETPC(), a); fb = g_to_float64(env, GETPC(), b); if (float64_lt(fa, fb, &FP_STATUS)) { return 0x4000000000000000ULL; } else { return 0; } } uint64_t helper_cvtqf(CPUAlphaState *env, uint64_t a) { float32 fr = int64_to_float32(a, &FP_STATUS); return float32_to_f(fr); } uint64_t helper_cvtgf(CPUAlphaState *env, uint64_t a) { float64 fa; float32 fr; fa = g_to_float64(env, GETPC(), a); fr = float64_to_float32(fa, &FP_STATUS); return float32_to_f(fr); } uint64_t helper_cvtgq(CPUAlphaState *env, uint64_t a) { float64 fa = g_to_float64(env, GETPC(), a); return float64_to_int64_round_to_zero(fa, &FP_STATUS); } uint64_t helper_cvtqg(CPUAlphaState *env, uint64_t a) { float64 fr; fr = int64_to_float64(a, &FP_STATUS); return float64_to_g(fr); }