6 .byte (_end - _start) / 512
17 .long 777b + \delta - vapic_base
33 .long vapic_base ; fixup
34 .long fixup_start ; fixup
35 .long fixup_end ; fixup
43 .long up_set_tpr ; fixup
44 .long up_set_tpr_eax ; fixup
45 .long up_get_tpr_eax ; fixup
46 .long up_get_tpr_ecx ; fixup
47 .long up_get_tpr_edx ; fixup
48 .long up_get_tpr_ebx ; fixup
49 .long 0 /* esp. won't work. */
50 .long up_get_tpr_ebp ; fixup
51 .long up_get_tpr_esi ; fixup
52 .long up_get_tpr_edi ; fixup
53 .long up_get_tpr_stack ; fixup
54 .long mp_set_tpr ; fixup
55 .long mp_set_tpr_eax ; fixup
56 .long mp_get_tpr_eax ; fixup
57 .long mp_get_tpr_ecx ; fixup
58 .long mp_get_tpr_edx ; fixup
59 .long mp_get_tpr_ebx ; fixup
60 .long 0 /* esp. won't work. */
61 .long mp_get_tpr_ebp ; fixup
62 .long mp_get_tpr_esi ; fixup
63 .long mp_get_tpr_edi ; fixup
64 .long mp_get_tpr_stack ; fixup
67 .byte 0x0f, 0x01, 0xc1
70 kvm_hypercall_vapic_poll_irq = 1
82 fs/movzbl pcr_cpu, %eax
84 mov vcpu_shift, %ecx ; fixup
86 testb $1, vapic+4(%eax) ; fixup delta=-5
88 movzbl vapic(%eax), %eax ; fixup
96 mov real_tpr, %eax ; fixup
156 fs/movzbl pcr_cpu, %edx
158 mov vcpu_shift, %ecx ; fixup
161 testb $1, vapic+4(%edx) ; fixup delta=-5
164 mov vapic(%edx), %eax ; fixup
169 /* %ebx = new vapic (%bl = tpr, %bh = isr, %b3 = irr) */
171 lock cmpxchg %ebx, vapic(%edx) ; fixup
172 jnz mp_set_tpr_failed
181 mov %bl, %ch /* ch = ppr */
183 /* now: %bl = irr, %bh = ppr */
185 ja mp_set_tpr_poll_irq
196 mov $kvm_hypercall_vapic_poll_irq, %eax
202 mov real_tpr, %eax ; fixup
208 movzbl vapic, %eax ; fixup
213 movzbl vapic, %ebx ; fixup
218 movzbl vapic, %ecx ; fixup
223 movzbl vapic, %edx ; fixup
228 movzbl vapic, %esi ; fixup
233 movzbl vapic, %edi ; fixup
238 movzbl vapic, %ebp ; fixup
243 movzbl vapic, %eax ; fixup
260 mov vapic, %eax ; fixup
265 /* %ebx = new vapic (%bl = tpr, %bh = isr, %b3 = irr) */
267 lock cmpxchg %ebx, vapic ; fixup
268 jnz up_set_tpr_failed
277 mov %bl, %ch /* ch = ppr */
279 /* now: %bl = irr, %bh = ppr */
281 ja up_set_tpr_poll_irq
291 mov $kvm_hypercall_vapic_poll_irq, %eax
302 * per-vcpu records of size 2^vcpu shift.
304 * byte 1: highest in-service interrupt (isr) (r/o); bits 3:0 are zero
306 * byte 3: highest pending interrupt (irr) (r/o)