[PATCH v4 06/38] x86/irq: Factor out common code for installing kvm irq handler