All of lore.kernel.org
 help / color / mirror / Atom feed
From: Razvan Cojocaru <rcojocaru@bitdefender.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>,
	Alexandru Isaila <aisaila@bitdefender.com>,
	xen-devel@lists.xen.org
Cc: boris.ostrovsky@oracle.com, tamas@tklengyel.com,
	jbeulich@suse.com, suravee.suthikulpanit@amd.com
Subject: Re: [PATCH v4 0/4] hvm/svm: Enable vm events for SVM
Date: Thu, 15 Feb 2018 15:05:48 +0200	[thread overview]
Message-ID: <d4c7059a-349d-fa8c-f7eb-047fedf2842a@bitdefender.com> (raw)
In-Reply-To: <4ac41b55-8a8a-6f59-a640-9b2b9b20b2e6@citrix.com>

On 02/15/2018 02:36 PM, Andrew Cooper wrote:
> One thing I note however is that patch 2 and 3 both turn on intercepts
> and have no way of turning them back off.  This appears to be consistent
> with the Intel side of things, but it is suboptimal for the guest when
> an introspection agent detaches.

That's very true (I've also pointed this out to Bitweasil when we've
discussed the CR3 intercept crash after the noflush bit started to get
used).

I've also considered this when I've added the MSR write subscription
code, however it didn't feel safe to just disable those exits when the
introspection agent unplugs.

For one, we'd have to store the previous state somewhere (we might be
interested in a MSR, for example, for which exits were already enabled
before we subscribed to it - we shouldn't disable exits for it then).

And even if we did keep the previous state somewhere (with the assorted
problems - where do we allocate space for it? etc.) - it's theoretically
possible that some other Xen subsystem fiddles with the exits in the
meantime, so the state we remember may not be the current state of
affairs wrt exits.

Am I overthinking this?

> For the CPUID/MSR policy side of things, Jan has talked me in to
> changing how cpuid_policy_updated() works, and implementing it as a
> recalculation of the intercepts on the return-to-guest path.  It occurs
> to me that this usefully extends to changes requested by the
> introspection agent.

Thanks, we'll look that up.


Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-02-15 13:05 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 10:22 [PATCH v4 0/4] hvm/svm: Enable vm events for SVM Alexandru Isaila
2018-02-15 10:22 ` [PATCH v4 1/3] hvm/svm: Enable Breakpoint events Alexandru Isaila
2018-02-15 10:22 ` [PATCH v4 2/3] hvm/svm: Enable MSR events Alexandru Isaila
2018-02-15 10:22 ` [PATCH v4 3/3] hvm/svm: Enable CR events Alexandru Isaila
2018-02-15 12:36 ` [PATCH v4 0/4] hvm/svm: Enable vm events for SVM Andrew Cooper
2018-02-15 13:05   ` Razvan Cojocaru [this message]
2018-02-15 13:29     ` Andrew Cooper
2018-02-15 13:17 ` Boris Ostrovsky

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=d4c7059a-349d-fa8c-f7eb-047fedf2842a@bitdefender.com \
    --to=rcojocaru@bitdefender.com \
    --cc=aisaila@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=jbeulich@suse.com \
    --cc=suravee.suthikulpanit@amd.com \
    --cc=tamas@tklengyel.com \
    --cc=xen-devel@lists.xen.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 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.