From: Quan Xu <quan.xu0@gmail.com>
To: Rik van Riel <riel@redhat.com>,
"quan.xu04@gmail.com" <quan.xu04@gmail.com>,
pbonzini@redhat.com
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
david@redhat.com, borntraeger@de.ibm.com, tglx@linutronix.de,
rkrcmar@redhat.com
Subject: Re: [PATCH 1/2] x86,kvm: move qemu/guest FPU switching out to vcpu_run
Date: Thu, 16 Nov 2017 10:50:32 +0800 [thread overview]
Message-ID: <c331a215-2b7c-3c79-91ce-2b10b1882d36@gmail.com> (raw)
In-Reply-To: <1510756981.21121.291.camel@redhat.com>
On 2017-11-15 22:43, Rik van Riel wrote:
> Can you explain why you believe that?
for example, a vcpu thread is running in kvm mode under cretical
condition to stop. QEMU send an IPI to cause a VM-exit to happen
immediately, and this IPI doesn't make vcpu return to QEMU. IIUC
this vcpu thread will still continue to run in kvm mode when is
waked up at targer machine. with your patch, I don't see a chance
to load guest FPU or XSTATE, until return to QEMU and run kvm mode again.
then the FPU or XSTATE status is inconsistent for a small window, what's
even
worse is that the vcpu is running.
Did I misunderstand?
Quan
Alibaba Cloud
> Getting the guest FPU or XSTATE is done under the vcpu->mutex.
>
> This patch switches out guest and userspace FPU/XSTATE under the
> vcpu->mutex, and switches it back before releasing the vcpu->mutex.
>
> By the time a KVM_GET_FPU has obtained the vcpu->mutex, the guest
> FPU state will be in vcpu->arch.guest_fpu.state, where you expect
> it to be.
>
> What am I missing?
>
next prev parent reply other threads:[~2017-11-16 2:50 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-14 21:54 [PATCH v2 0/2] x86,kvm: move qemu/guest FPU switching out to kvm_arch_vcpu_ioctl_run riel
2017-11-14 21:54 ` [PATCH 1/2] x86,kvm: move qemu/guest FPU switching out to vcpu_run riel
2017-11-15 0:47 ` Wanpeng Li
2017-11-15 3:03 ` Rik van Riel
2017-11-15 4:33 ` Wanpeng Li
2017-11-15 14:40 ` Rik van Riel
2017-11-16 5:54 ` Wanpeng Li
2017-11-15 6:53 ` quan.xu04
2017-11-15 14:43 ` Rik van Riel
2017-11-15 15:09 ` Paolo Bonzini
2017-11-16 2:50 ` Quan Xu [this message]
2017-11-16 4:21 ` Rik van Riel
2017-11-16 5:06 ` Quan Xu
2017-11-16 10:21 ` Paolo Bonzini
2017-11-16 12:12 ` Quan Xu
2017-11-16 12:18 ` Paolo Bonzini
2017-11-16 13:35 ` Quan Xu
2017-11-16 13:39 ` Paolo Bonzini
[not found] ` <d67cef62-3165-50cd-36e8-be7c555dc79e@gmail.com>
2017-11-16 17:50 ` Paolo Bonzini
2017-11-17 2:54 ` Quan Xu
2017-11-14 21:54 ` [PATCH 2/2] x86,kvm: remove KVM emulator get_fpu / put_fpu riel
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=c331a215-2b7c-3c79-91ce-2b10b1882d36@gmail.com \
--to=quan.xu0@gmail.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=quan.xu04@gmail.com \
--cc=riel@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=tglx@linutronix.de \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox