All of lore.kernel.org
 help / color / mirror / Atom feed
From: Adrian Pop <apop@bitdefender.com>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Petre Pircalabu" <ppircalabu@bitdefender.com>,
	"Tamas K Lengyel" <tamas@tklengyel.com>, "Wei Liu" <wl@xen.org>,
	"Razvan Cojocaru" <rcojocaru@bitdefender.com>,
	"Jan Beulich" <JBeulich@suse.com>,
	"Alexandru Isaila" <aisaila@bitdefender.com>,
	Xen-devel <xen-devel@lists.xenproject.org>,
	"Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [Xen-devel] [PATCH for-next] x86/svm: Correct vm_event API for descriptor accesses
Date: Thu, 28 Nov 2019 17:06:30 +0200	[thread overview]
Message-ID: <87r21s2g7d.fsf@bitdefender.com> (raw)
In-Reply-To: <20191128114414.21716-1-andrew.cooper3@citrix.com>


Hello,

Andrew Cooper <andrew.cooper3@citrix.com> writes:

> c/s d0a699a389f1 "x86/monitor: add support for descriptor access events"
> introduced logic looking for what appeared to be exitinfo (not that this
> exists in SVM - exitinfo1 or 2 do), but actually passed the exit IDT vectoring
> information.  There is never any IDT vectoring involved in these intercepts so
> the value passed is always zero.
>
> In fact, SVM doesn't provide any information, even in exitinfo1 and 2.  Note
> the error in the public API and state that this field is always 0, and drop
> the SVM logic in hvm_monitor_descriptor_access().
>
> In the SVM vmexit handler itself, optimise the switch statement by observing
> that there is a linear transformation between the SVM exit_reason and
> VM_EVENT_DESC_* values.  (Bloat-o-meter reports 6028 => 5877 for a saving of
> 151 bytes).
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
> ---
> CC: Jan Beulich <JBeulich@suse.com>
> CC: Wei Liu <wl@xen.org>
> CC: Roger Pau Monné <roger.pau@citrix.com>
> CC: Razvan Cojocaru <rcojocaru@bitdefender.com>
> CC: Tamas K Lengyel <tamas@tklengyel.com>
> CC: Alexandru Isaila <aisaila@bitdefender.com>
> CC: Petre Pircalabu <ppircalabu@bitdefender.com>
> CC: Adrian Pop <apop@bitdefender.com>
>
> Adrian: Do you recall what information you were attempting to forward from the
> VMCB?  I can't locate anything which would plausibly be interesting.

The SVM part was most likely meant to mirror the logic from VMX.  But,
as I recall, monitoring hadn't been implemented with SVM so this
couldn't really be used on AMD.  Unfortunately I'm not sure what
information was supposed to be forwarded.

The cleanup looks good to me.

Acked-by: Adrian Pop <apop@bitdefender.com>

> This is part of a longer cleanup series I gathered in the wake of the task
> switch issues, but it is pulled out ahead due to its interaction with the
> public interface.

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

  parent reply	other threads:[~2019-11-28 15:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-28 11:44 [Xen-devel] [PATCH for-next] x86/svm: Correct vm_event API for descriptor accesses Andrew Cooper
2019-11-28 13:47 ` Tamas K Lengyel
2019-11-28 14:06 ` Razvan COJOCARU
2019-11-28 14:46 ` Alexandru Stefan ISAILA
2019-11-28 15:06 ` Adrian Pop [this message]
2019-11-28 16:39 ` Jan Beulich
2019-11-29 17:20 ` [Xen-devel] [PATCH for-next v2] " Andrew Cooper

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=87r21s2g7d.fsf@bitdefender.com \
    --to=apop@bitdefender.com \
    --cc=JBeulich@suse.com \
    --cc=aisaila@bitdefender.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=ppircalabu@bitdefender.com \
    --cc=rcojocaru@bitdefender.com \
    --cc=roger.pau@citrix.com \
    --cc=tamas@tklengyel.com \
    --cc=wl@xen.org \
    --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 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.