mirror of
https://git.hardenedbsd.org/hardenedbsd/HardenedBSD.git
synced 2024-12-30 15:38:06 +01:00
Make ipi_cpu() function as intended.
IPI's in Xen are implemented through hypervisor event channels. The MP code creates a pair of IRQs for each base IPI per CPU (one for IPI function dispatch calls, one for IPI bitmap dispatch calls.) Using PCPU_GET() was returning the IRQ of the IPI handler for the current CPU; thus calls to ipi_cpu() were sending itself a message. Instead, looking up the IPI in the target CPU ipi-to-irq map is needed. Note: This doesn't fix Xen SMP (far from it!) but it at least sends IPI's to the right places. Next - sending IPIs.. PR: 135069
This commit is contained in:
parent
67feef6e5d
commit
946a48449b
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=193085
@ -225,12 +225,15 @@ evtchn_do_upcall(struct trapframe *frame)
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Send an IPI from the current CPU to the destination CPU.
|
||||
*/
|
||||
void
|
||||
ipi_pcpu(unsigned int cpu, int vector)
|
||||
{
|
||||
int irq;
|
||||
|
||||
irq = PCPU_GET(ipi_to_irq[vector]);
|
||||
irq = pcpu_find(cpu)->pc_ipi_to_irq[vector];
|
||||
|
||||
notify_remote_via_irq(irq);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user