Re: [RFC PATCH V6 04/14] x86/sev: optimize system vector processing invoked from #HV exception

From: Tianyu Lan
Date: Wed May 17 2023 - 09:29:15 EST


On 5/16/2023 6:23 PM, Peter Zijlstra wrote:
- panic("Unexpected vector %d\n", vector);
- unreachable();
+ if (!(sysvec_table[pending_events.vector - FIRST_SYSTEM_VECTOR])) {
+ WARN(1, "system vector entry 0x%x is NULL\n",
+ pending_events.vector);
+ } else {
+ (*sysvec_table[pending_events.vector - FIRST_SYSTEM_VECTOR])(regs);
}
} else {
common_interrupt(regs, pending_events.vector);
But your code replace direct calls with an indirect call. Now AFAIK,
this SNP shit came with Zen3, and Zen3 still uses retpolines for
indirect calls.

Can you connect the dots?


The title is no exact and will update in the next version. Thanks.