From: Dario Faggioli <raistlin@linux.it>
To: Sergey Dyasli <sergey.dyasli@citrix.com>,
"JBeulich@suse.com" <JBeulich@suse.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: Igor Druzhinin <igor.druzhinin@citrix.com>,
Kevin Tian <kevin.tian@intel.com>,
"julien.grall@arm.com" <julien.grall@arm.com>,
"jun.nakajima@intel.com" <jun.nakajima@intel.com>,
Andrew Cooper <Andrew.Cooper3@citrix.com>
Subject: Re: [PATCH] VMX: sync CPU state upon vCPU destruction
Date: Fri, 10 Nov 2017 10:50:20 +0100 [thread overview]
Message-ID: <1510307420.4517.232.camel@linux.it> (raw)
In-Reply-To: <1510303282.3400.1.camel@citrix.com>
[-- Attachment #1.1: Type: text/plain, Size: 1495 bytes --]
On Fri, 2017-11-10 at 08:41 +0000, Sergey Dyasli wrote:
> On Thu, 2017-11-09 at 07:49 -0700, Jan Beulich wrote:
> >
> This patch fixes only one particular issue and not the general
> problem.
> What if vmcs is cleared, possibly in some future code, at another
> place?
>
Yes, that's what we were saying yesterday. Asynchronous code fiddling
with context, will have to make sure it syncs things properly. And we
need to keep an eye out for that.
> The original intent of vmx_vmcs_reload() is correct: it lazily loads
> the vmcs when it's needed. It's just the logic which checks for
> v->is_running inside vmx_ctxt_switch_from() is flawed: v might be
> "running" on another pCPU.
>
> IMHO there are 2 possible solutions:
>
> 1. Add additional pCPU check into vmx_ctxt_switch_from()
>
How? Checking v->processor is not an option as, AFAICS, this runs
without owning the scheduling lock, and hence processor can change
under your feet.
> 2. Drop v->is_running check inside vmx_ctxt_switch_from() making
> vmx_vmcs_reload() unconditional.
>
Well, that looks plausible to me. Although, I guess it will have, at
least potentially, an impact on performance (as other solutions
envisioned in the thread). Any idea how big the hit could be?
Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 127 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-11-10 9:50 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-09 14:49 [PATCH] VMX: sync CPU state upon vCPU destruction Jan Beulich
2017-11-09 15:02 ` Dario Faggioli
2017-11-10 8:41 ` Sergey Dyasli
2017-11-10 9:50 ` Dario Faggioli [this message]
2017-11-10 10:30 ` Jan Beulich
2017-11-10 14:46 ` Igor Druzhinin
2017-11-13 9:51 ` Jan Beulich
2017-11-21 13:22 ` Ping: " Jan Beulich
2017-11-21 14:07 ` Igor Druzhinin
2017-11-21 15:29 ` Jan Beulich
2017-11-21 16:00 ` Igor Druzhinin
2017-11-21 16:42 ` Dario Faggioli
2017-11-21 16:58 ` George Dunlap
2017-11-21 17:00 ` Sergey Dyasli
2017-11-21 17:26 ` Jan Beulich
2017-11-21 16:08 ` George Dunlap
2017-11-21 16:26 ` Igor Druzhinin
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=1510307420.4517.232.camel@linux.it \
--to=raistlin@linux.it \
--cc=Andrew.Cooper3@citrix.com \
--cc=JBeulich@suse.com \
--cc=igor.druzhinin@citrix.com \
--cc=julien.grall@arm.com \
--cc=jun.nakajima@intel.com \
--cc=kevin.tian@intel.com \
--cc=sergey.dyasli@citrix.com \
--cc=xen-devel@lists.xenproject.org \
/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;
as well as URLs for NNTP newsgroup(s).