I presume your processors are Nios, then you can easily do it with PIOs.
One processor drives a PIO output which is connected to a PIO input (and possibly an IRQ) on the other processor. Same for signaling in the opposite direction.
This requires you connect PIOs externally to your sopc/Qsys module.
I think you could also make everything inside the module, if your cpu1 directly asserts the irq signal for irq2 and viceversa, but I don't know if this is easy to implement: probably you need to define a custom component which is capable to assert irqs.