File tree Expand file tree Collapse file tree 5 files changed +18
-46
lines changed Expand file tree Collapse file tree 5 files changed +18
-46
lines changed Original file line number Diff line number Diff line change @@ -270,9 +270,10 @@ int external_interrupt_handler(struct vcpu *vcpu)
270
270
struct intr_ctx ctx ;
271
271
272
272
ctx .vector = vector ;
273
- /* do not RETAIN RIP for spurious interrupt */
274
- if (dispatch_interrupt (& ctx ) == 0 )
275
- VCPU_RETAIN_RIP (vcpu );
273
+
274
+ dispatch_interrupt (& ctx );
275
+
276
+ VCPU_RETAIN_RIP (vcpu );
276
277
277
278
TRACE_2L (TRC_VMEXIT_EXTERNAL_INTERRUPT , vector , 0 );
278
279
Original file line number Diff line number Diff line change @@ -443,7 +443,7 @@ void dispatch_exception(struct intr_ctx *ctx)
443
443
cpu_halt (cpu_id );
444
444
}
445
445
446
- int handle_spurious_interrupt (int vector )
446
+ void handle_spurious_interrupt (int vector )
447
447
{
448
448
send_lapic_eoi ();
449
449
@@ -452,13 +452,11 @@ int handle_spurious_interrupt(int vector)
452
452
pr_warn ("Spurious vector: 0x%x." , vector );
453
453
454
454
if (spurious_handler )
455
- return spurious_handler (vector );
456
- else
457
- return 0 ;
455
+ spurious_handler (vector );
458
456
}
459
457
460
458
/* do_IRQ() */
461
- int dispatch_interrupt (struct intr_ctx * ctx )
459
+ void dispatch_interrupt (struct intr_ctx * ctx )
462
460
{
463
461
int vr = ctx -> vector ;
464
462
int irq = vector_to_irq [vr ];
@@ -479,9 +477,10 @@ int dispatch_interrupt(struct intr_ctx *ctx)
479
477
}
480
478
481
479
desc -> irq_handler (desc , desc -> handler_data );
482
- return 0 ;
480
+ return ;
483
481
ERR :
484
- return handle_spurious_interrupt (vr );
482
+ handle_spurious_interrupt (vr );
483
+ return ;
485
484
}
486
485
487
486
int handle_level_interrupt_common (struct irq_desc * desc ,
Original file line number Diff line number Diff line change 36
36
#ifdef CONFIG_EFI_STUB
37
37
#include <acrn_efi.h>
38
38
extern struct efi_ctx * efi_ctx ;
39
- extern int efi_launch_vector ;
40
39
#endif
41
40
42
41
#define PAT_POWER_ON_VALUE (PAT_MEM_TYPE_WB + \
@@ -1282,16 +1281,10 @@ static void override_uefi_vmcs(struct vcpu *vcpu)
1282
1281
}
1283
1282
1284
1283
/* Interrupt */
1285
- if (efi_launch_vector > 0 ) {
1286
- field = VMX_GUEST_RFLAGS ;
1287
- cur_context -> rflags = 0x2 ;
1288
- cur_context -> rflags |= 1 << 9 ; /* enable intr for efi stub */
1289
- exec_vmwrite (field , cur_context -> rflags );
1290
- exec_vmwrite (VMX_ENTRY_INT_INFO_FIELD ,
1291
- VMX_INT_INFO_VALID |
1292
- (efi_launch_vector & 0xFF ));
1293
- efi_launch_vector = -1 ;
1294
- }
1284
+ field = VMX_GUEST_RFLAGS ;
1285
+ cur_context -> rflags = 0x2 ;
1286
+ cur_context -> rflags |= 1 << 9 ; /* enable intr for efi stub */
1287
+ exec_vmwrite (field , cur_context -> rflags );
1295
1288
}
1296
1289
#endif
1297
1290
Original file line number Diff line number Diff line change 56
56
uint32_t efi_physical_available_ap_bitmap = 0 ;
57
57
uint32_t efi_wake_up_ap_bitmap = 0 ;
58
58
struct efi_ctx * efi_ctx = NULL ;
59
- int efi_launch_vector ;
60
59
extern uint32_t up_count ;
61
60
extern unsigned long pcpu_sync ;
62
61
63
- bool in_efi_boot_svc ( void )
62
+ void efi_spurious_handler ( int vector )
64
63
{
65
- return (efi_wake_up_ap_bitmap != efi_physical_available_ap_bitmap );
66
- }
67
-
68
- int efi_spurious_handler (int vector )
69
- {
70
- struct vcpu * vcpu ;
71
-
72
- if (get_cpu_id () != 0 )
73
- return 0 ;
74
-
75
- vcpu = per_cpu (vcpu , 0 );
76
- if (vcpu && vcpu -> launched ) {
77
- int ret = vlapic_set_intr (vcpu , vector , 0 );
78
- if (ret && in_efi_boot_svc ())
79
- exec_vmwrite (VMX_ENTRY_INT_INFO_FIELD ,
80
- VMX_INT_INFO_VALID | vector );
81
- } else
82
- efi_launch_vector = vector ;
83
-
84
- return 1 ;
64
+ return ;
85
65
}
86
66
87
67
int sipi_from_efi_boot_service_exit (uint32_t dest , uint32_t mode , uint32_t vec )
@@ -155,6 +135,5 @@ void init_bsp(void)
155
135
vm_sw_loader = uefi_sw_loader ;
156
136
157
137
spurious_handler = efi_spurious_handler ;
158
- efi_launch_vector = -1 ;
159
138
#endif
160
139
}
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ void update_irq_handler(int irq, irq_handler_t func);
111
111
112
112
int init_default_irqs (unsigned int cpu );
113
113
114
- int dispatch_interrupt (struct intr_ctx * ctx );
114
+ void dispatch_interrupt (struct intr_ctx * ctx );
115
115
116
116
struct dev_handler_node *
117
117
pri_register_handler (int irq ,
@@ -133,7 +133,7 @@ int get_cpu_interrupt_info(char *str, int str_max);
133
133
134
134
void setup_notification (void );
135
135
136
- typedef int (* spurious_handler_t )(int );
136
+ typedef void (* spurious_handler_t )(int );
137
137
extern spurious_handler_t spurious_handler ;
138
138
139
139
/*
You can’t perform that action at this time.
0 commit comments