[PATCH] KVM: svm: merge incomplete IPI emulation handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Invalid int type emulation and target not running emulation have
same codes, which update APIC ICR high/low registers, and emulate
sending the IPI.

so fall through this switch cases to reduce duplicate codes

Signed-off-by: Li RongQing <lirongqing@xxxxxxxxx>
Signed-off-by: Zhang Yu <zhangyu31@xxxxxxxxx>
---
 arch/x86/kvm/svm.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index 276ab8ab6c95..2e0c9cb349d2 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -4508,12 +4508,7 @@ static int avic_incomplete_ipi_interception(struct vcpu_svm *svm)
 		 * formats are supported. All other IPI types cause
 		 * a #VMEXIT, which needs to emulated.
 		 */
-		kvm_lapic_reg_write(apic, APIC_ICR2, icrh);
-		kvm_lapic_reg_write(apic, APIC_ICR, icrl);
-		break;
 	case AVIC_IPI_FAILURE_TARGET_NOT_RUNNING: {
-		struct kvm_lapic *apic = svm->vcpu.arch.apic;
-
 		/*
 		 * Update ICR high and low, then emulate sending IPI,
 		 * which is handled when writing APIC_ICR.
-- 
2.16.2




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux