All of lore.kernel.org
 help / color / mirror / Atom feed
From: herongguang <herongguang.he@huawei.com>
To: <herongguang.he@huawei.com>, <pbonzini@redhat.com>,
	<quintela@redhat.com>, <amit.shah@redhat.com>,
	<rkrcmar@redhat.com>, <kvm@vger.kernel.org>
Cc: <qemu-devel@nongnu.org>, <arei.gonglei@huawei.com>,
	<weidong.huang@huawei.com>
Subject: [PATCH] KVM: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly
Date: Fri, 23 Sep 2016 12:59:11 +0800	[thread overview]
Message-ID: <1474606751-17100-1-git-send-email-herongguang.he@huawei.com> (raw)

From: He Rongguang <herongguang.he@huawei.com>

handle KVM_VCPUEVENT_VALID_SMM properly, or kvm-kmod/kernel will crash
in migration destination in gfn_to_rmap() since kvm_memslots_for_spte_role
is false, whilst (vcpu->arch.hflags & HF_SMM_MASK) is true

Signed-off-by: herongguang <herongguang.he@huawei.com>
---
 arch/x86/kvm/x86.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 699f872..7ebcb59 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3028,6 +3028,7 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
 			else
 				clear_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
 		}
+		kvm_mmu_reset_context(vcpu);
 	}
 
 	kvm_make_request(KVM_REQ_EVENT, vcpu);
-- 
1.8.3.4



WARNING: multiple messages have this Message-ID (diff)
From: herongguang <herongguang.he@huawei.com>
To: herongguang.he@huawei.com, pbonzini@redhat.com,
	quintela@redhat.com, amit.shah@redhat.com, rkrcmar@redhat.com,
	kvm@vger.kernel.org
Cc: qemu-devel@nongnu.org, arei.gonglei@huawei.com, weidong.huang@huawei.com
Subject: [Qemu-devel] [PATCH] KVM: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly
Date: Fri, 23 Sep 2016 12:59:11 +0800	[thread overview]
Message-ID: <1474606751-17100-1-git-send-email-herongguang.he@huawei.com> (raw)

From: He Rongguang <herongguang.he@huawei.com>

handle KVM_VCPUEVENT_VALID_SMM properly, or kvm-kmod/kernel will crash
in migration destination in gfn_to_rmap() since kvm_memslots_for_spte_role
is false, whilst (vcpu->arch.hflags & HF_SMM_MASK) is true

Signed-off-by: herongguang <herongguang.he@huawei.com>
---
 arch/x86/kvm/x86.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 699f872..7ebcb59 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -3028,6 +3028,7 @@ static int kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
 			else
 				clear_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
 		}
+		kvm_mmu_reset_context(vcpu);
 	}
 
 	kvm_make_request(KVM_REQ_EVENT, vcpu);
-- 
1.8.3.4

             reply	other threads:[~2016-09-23  5:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-23  4:59 herongguang [this message]
2016-09-23  4:59 ` [Qemu-devel] [PATCH] KVM: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly herongguang
2016-10-08  3:31 ` Herongguang (Stephen)
2016-10-08  3:31   ` [Qemu-devel] " Herongguang (Stephen)
2016-10-10 12:48   ` Radim Krčmář
2016-10-10 12:48     ` [Qemu-devel] " Radim Krčmář

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1474606751-17100-1-git-send-email-herongguang.he@huawei.com \
    --to=herongguang.he@huawei.com \
    --cc=amit.shah@redhat.com \
    --cc=arei.gonglei@huawei.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=quintela@redhat.com \
    --cc=rkrcmar@redhat.com \
    --cc=weidong.huang@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.