From patchwork Mon May 11 10:35:53 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gleb Natapov X-Patchwork-Id: 22927 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n4BAaE3C021153 for ; Mon, 11 May 2009 10:36:15 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752385AbZEKKgL (ORCPT ); Mon, 11 May 2009 06:36:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752120AbZEKKgK (ORCPT ); Mon, 11 May 2009 06:36:10 -0400 Received: from mx2.redhat.com ([66.187.237.31]:53783 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751987AbZEKKf7 (ORCPT ); Mon, 11 May 2009 06:35:59 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n4BAa0Dj019331 for ; Mon, 11 May 2009 06:36:00 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx2.corp.redhat.com (8.13.1/8.13.1) with ESMTP id n4BAZw4k030303; Mon, 11 May 2009 06:35:59 -0400 Received: from dhcp-1-237.tlv.redhat.com (dhcp-1-237.tlv.redhat.com [10.35.1.237]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id n4BAZvsE018191; Mon, 11 May 2009 06:35:58 -0400 Received: by dhcp-1-237.tlv.redhat.com (Postfix, from userid 13519) id 39B4018D467; Mon, 11 May 2009 13:35:56 +0300 (IDT) From: Gleb Natapov To: avi@redhat.com Cc: kvm@vger.kernel.org, Gleb Natapov Subject: [PATCH 08/10] Do not migrate pending software interrupts. Date: Mon, 11 May 2009 13:35:53 +0300 Message-Id: <1242038155-8759-8-git-send-email-gleb@redhat.com> In-Reply-To: <1242038155-8759-1-git-send-email-gleb@redhat.com> References: <1242038155-8759-1-git-send-email-gleb@redhat.com> X-Scanned-By: MIMEDefang 2.58 on 172.16.27.26 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org INTn will be re-executed after migration. If we wanted to migrate pending software interrupt we would need to migrate interrupt type and instruction length too, but we do not have all required info on SVM, so SVM->VMX migration would need to re-execute INTn anyway. To make it simple never migrate pending soft interrupt. Signed-off-by: Gleb Natapov --- arch/x86/kvm/x86.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index f0655ef..2729c4b 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c @@ -3567,7 +3567,7 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, memset(sregs->interrupt_bitmap, 0, sizeof sregs->interrupt_bitmap); - if (vcpu->arch.interrupt.pending) + if (vcpu->arch.interrupt.pending && !vcpu->arch.interrupt.soft) set_bit(vcpu->arch.interrupt.nr, (unsigned long *)sregs->interrupt_bitmap);