[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC/PATCH 2] kvm: x86: handle KVM_SET_VCPU_EVENTS/KVM_
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [RFC/PATCH 2] kvm: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly |
Date: |
Thu, 22 Sep 2016 11:29:16 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0 |
On 22/09/2016 09:51, Herongguang (Stephen) wrote:
> After making memory consistent between source and destination
> (https://lists.gnu.org/archive/html/qemu-devel/2016-09/msg03069.html),
> there can
> still reproduce instruction emulation failure in destination side if
> migration when VM’s in grub stage:
Hi! Did you follow up on that patch, by the way?
> So I think there is some lacking in kvm-kmod’s
> kvm_vcpu_ioctl_x86_set_vcpu_events that handles KVM_VCPUEVENT_VALID_SMM.
> I tried following patch,
> it seems works fine.
>
> Do you think this patch is appropriate or not enough? Thanks.
Yes. I would just call kvm_mmu_reset_context unconditionally at the end
of kvm_vcpu_iocyl_x86_set_x86_vcpu_events. Please send this patch as
non-RFC.
Patch 3 is also okay, please send it separately.
Thanks,
Paolo
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 19f9f9e..f39e839 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3013,8 +3013,10 @@ static int
> kvm_vcpu_ioctl_x86_set_vcpu_events(struct kvm_vcpu *vcpu,
> vcpu->arch.apic->sipi_vector = events->sipi_vector;
>
> if (events->flags & KVM_VCPUEVENT_VALID_SMM) {
> - if (events->smi.smm)
> + if (events->smi.smm) {
> vcpu->arch.hflags |= HF_SMM_MASK;
> + kvm_mmu_reset_context(vcpu);
> + }
> else
> vcpu->arch.hflags &= ~HF_SMM_MASK;
> vcpu->arch.smi_pending = events->smi.pending;
>
>
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, (continued)
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Paolo Bonzini, 2016/09/14
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Herongguang (Stephen), 2016/09/22
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Herongguang (Stephen), 2016/09/22
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Paolo Bonzini, 2016/09/23
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Herongguang (Stephen), 2016/09/23
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Paolo Bonzini, 2016/09/23
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Herongguang (Stephen), 2016/09/23
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Herongguang (Stephen), 2016/09/25
- Re: [Qemu-devel] [RFC/PATCH] migration: SMRAM dirty bitmap not fetched from kvm-kmod and not send to destination, Paolo Bonzini, 2016/09/26
[Qemu-devel] [RFC/PATCH 2] kvm: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly, Herongguang (Stephen), 2016/09/22
- Re: [Qemu-devel] [RFC/PATCH 2] kvm: x86: handle KVM_SET_VCPU_EVENTS/KVM_VCPUEVENT_VALID_SMM properly,
Paolo Bonzini <=
[Qemu-devel] [RFC/PATCH 3] kvm: fix events.flags (KVM_VCPUEVENT_VALID_SMM) overwritten by 0, Herongguang (Stephen), 2016/09/22