All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <amc96@srcf.net>
To: Jan Beulich <jbeulich@suse.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "Andrew Cooper" <andrew.cooper3@citrix.com>,
	"George Dunlap" <george.dunlap@citrix.com>,
	"Wei Liu" <wl@xen.org>, "Roger Pau Monné" <roger.pau@citrix.com>
Subject: Re: [PATCH 4/5] SVM: sync VM-exit perf counters with known VM-exit reasons
Date: Fri, 17 Dec 2021 15:02:57 +0000	[thread overview]
Message-ID: <60deae51-6ccd-dd90-869a-db6099e21002@srcf.net> (raw)
In-Reply-To: <c94bc336-fdee-43af-540e-06e0904d8db7@suse.com>

On 03/12/2021 12:06, Jan Beulich wrote:
> This has gone out of sync over time, resulting in NPF and XSETBV exits
> incrementing the same counter. Introduce a simplistic mechanism to
> hopefully keep things in better sync going forward.
>
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
> ---
> Given their large (and growing) number, I wonder whether we shouldn't
> fold "SVMexits" and "vmexits". They can't both be active at the same
> time.

Oh yeah - that's just silly having them split like this, especially as
there's no associated element name.

> --- a/xen/include/asm-x86/perfc_defn.h
> +++ b/xen/include/asm-x86/perfc_defn.h
> @@ -11,8 +11,8 @@ PERFCOUNTER_ARRAY(exceptions,
>  PERFCOUNTER_ARRAY(vmexits,              "vmexits", VMX_PERF_EXIT_REASON_SIZE)
>  PERFCOUNTER_ARRAY(cause_vector,         "cause vector", VMX_PERF_VECTOR_SIZE)
>  
> -#define VMEXIT_NPF_PERFC 141
> -#define SVM_PERF_EXIT_REASON_SIZE (1+141)
> +#define VMEXIT_NPF_PERFC 143
> +#define SVM_PERF_EXIT_REASON_SIZE (VMEXIT_NPF_PERFC + 1)

How does this work in the first place?  perfc_incra() is still passed 1024.

Furthermore, it's already worse than this.

401/402 are AVIC exits, and 403 is an SEV exit.  We've also gained -2 as
"busy" for transient SEV events too.

~Andrew


  reply	other threads:[~2021-12-17 15:03 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-03 12:02 [PATCH 0/5] perfc: assorted adjustments Jan Beulich
2021-12-03 12:03 ` [PATCH 1/5] perfc: conditionalize credit/credit2 counters Jan Beulich
2021-12-03 16:30   ` Luca Fancellu
2021-12-03 12:04 ` [PATCH 2/5] x86/perfc: conditionalize HVM and shadow counters Jan Beulich
2021-12-17 14:35   ` Andrew Cooper
2021-12-03 12:05 ` [PATCH 3/5] VMX: sync VM-exit perf counters with known VM-exit reasons Jan Beulich
2021-12-17 15:00   ` Andrew Cooper
2021-12-21 10:27     ` Jan Beulich
2021-12-03 12:06 ` [PATCH 4/5] SVM: " Jan Beulich
2021-12-17 15:02   ` Andrew Cooper [this message]
2021-12-21  7:52     ` Jan Beulich
2021-12-03 12:07 ` [PATCH 5/5] xenperf: name "newer" hypercalls Jan Beulich
2021-12-17 15:07   ` 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=60deae51-6ccd-dd90-869a-db6099e21002@srcf.net \
    --to=amc96@srcf.net \
    --cc=andrew.cooper3@citrix.com \
    --cc=george.dunlap@citrix.com \
    --cc=jbeulich@suse.com \
    --cc=roger.pau@citrix.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.