9 .pushsection .fixup, "a"
10 .long 777b + \delta - vapic_base
22 .long vapic_base ; fixup
23 .long fixup_start ; fixup
24 .long fixup_end ; fixup
32 .long up_set_tpr ; fixup
33 .long up_set_tpr_eax ; fixup
34 .long up_get_tpr_eax ; fixup
35 .long up_get_tpr_ecx ; fixup
36 .long up_get_tpr_edx ; fixup
37 .long up_get_tpr_ebx ; fixup
38 .long 0 /* esp. won't work. */
39 .long up_get_tpr_ebp ; fixup
40 .long up_get_tpr_esi ; fixup
41 .long up_get_tpr_edi ; fixup
42 .long up_get_tpr_stack ; fixup
43 .long mp_set_tpr ; fixup
44 .long mp_set_tpr_eax ; fixup
45 .long mp_get_tpr_eax ; fixup
46 .long mp_get_tpr_ecx ; fixup
47 .long mp_get_tpr_edx ; fixup
48 .long mp_get_tpr_ebx ; fixup
49 .long 0 /* esp. won't work. */
50 .long mp_get_tpr_ebp ; fixup
51 .long mp_get_tpr_esi ; fixup
52 .long mp_get_tpr_edi ; fixup
53 .long mp_get_tpr_stack ; fixup
56 .byte 0x0f, 0x01, 0xc1
59 kvm_hypercall_vapic_poll_irq = 1
71 fs/movzbl pcr_cpu, %eax
73 mov vcpu_shift, %ecx ; fixup
75 testb $1, vapic+4(%eax) ; fixup delta=-5
77 movzbl vapic(%eax), %eax ; fixup
85 mov real_tpr, %eax ; fixup
145 fs/movzbl pcr_cpu, %edx
147 mov vcpu_shift, %ecx ; fixup
150 testb $1, vapic+4(%edx) ; fixup delta=-5
153 mov vapic(%edx), %eax ; fixup
158 /* %ebx = new vapic (%bl = tpr, %bh = isr, %b3 = irr) */
160 lock cmpxchg %ebx, vapic(%edx) ; fixup
161 jnz mp_set_tpr_failed
170 mov %bl, %ch /* ch = ppr */
172 /* now: %bl = irr, %bh = ppr */
174 ja mp_set_tpr_poll_irq
185 mov $kvm_hypercall_vapic_poll_irq, %eax
191 mov real_tpr, %eax ; fixup
197 movzbl vapic, %eax ; fixup
202 movzbl vapic, %ebx ; fixup
207 movzbl vapic, %ecx ; fixup
212 movzbl vapic, %edx ; fixup
217 movzbl vapic, %esi ; fixup
222 movzbl vapic, %edi ; fixup
227 movzbl vapic, %ebp ; fixup
232 movzbl vapic, %eax ; fixup
249 mov vapic, %eax ; fixup
254 /* %ebx = new vapic (%bl = tpr, %bh = isr, %b3 = irr) */
256 lock cmpxchg %ebx, vapic ; fixup
257 jnz up_set_tpr_failed
266 mov %bl, %ch /* ch = ppr */
268 /* now: %bl = irr, %bh = ppr */
270 ja up_set_tpr_poll_irq
280 mov $kvm_hypercall_vapic_poll_irq, %eax
287 * per-vcpu records of size 2^vcpu shift.
289 * byte 1: highest in-service interrupt (isr) (r/o); bits 3:0 are zero
291 * byte 3: highest pending interrupt (irr) (r/o)