Linux Documentation
 help / color / mirror / Atom feed
From: Borislav Petkov <bp@alien8.de>
To: Zack Rusin <zack.rusin@broadcom.com>
Cc: Kiryl Shutsemau <kas@kernel.org>,
	x86@kernel.org, Dennis Zhou <dennis@kernel.org>,
	Tejun Heo <tj@kernel.org>, Arnd Bergmann <arnd@arndb.de>,
	Rick Edgecombe <rick.p.edgecombe@intel.com>,
	Tom Lendacky <thomas.lendacky@amd.com>,
	Wei Liu <wei.liu@kernel.org>, Dexuan Cui <decui@microsoft.com>,
	Paolo Bonzini <pbonzini@redhat.com>,
	Vitaly Kuznetsov <vkuznets@redhat.com>,
	Ajay Kaher <ajay.kaher@broadcom.com>,
	Alexey Makhalov <alexey.makhalov@broadcom.com>,
	Thomas Gleixner <tglx@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Dave Hansen <dave.hansen@linux.intel.com>,
	"H. Peter Anvin" <hpa@zytor.com>,
	virtualization@lists.linux.dev,
	bcm-kernel-feedback-list@broadcom.com,
	linux-kernel@vger.kernel.org, Christoph Lameter <cl@gentwo.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Bo Gan <bo.gan@broadcom.com>,
	linux-mm@kvack.org, linux-arch@vger.kernel.org,
	linux-coco@lists.linux.dev, kvm@vger.kernel.org,
	Jonathan Corbet <corbet@lwn.net>,
	"K. Y. Srinivasan" <kys@microsoft.com>,
	Haiyang Zhang <haiyangz@microsoft.com>,
	Long Li <longli@microsoft.com>, Andy Lutomirski <luto@kernel.org>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-doc@vger.kernel.org, linux-hyperv@vger.kernel.org,
	Nathan Chancellor <nathan@kernel.org>,
	Kees Cook <kees@kernel.org>, Ashish Kalra <ashish.kalra@amd.com>
Subject: Re: [PATCH v2 0/6] x86/percpu: Share decrypted storage before guest setup
Date: Mon, 28 Sep 2026 22:39:30 -0700	[thread overview]
Message-ID: <20260929053930.GEartPEjbZMpBVSvSk@fat_crate.local> (raw)
In-Reply-To: <20260929040256.543767-1-zack.rusin@broadcom.com>

On Tue, Sep 29, 2026 at 12:02:49AM -0400, Zack Rusin wrote:
> VMware publishes its per-CPU steal-time GPA without first sharing the
> storage in encrypted guests.

So this one liner is the only explanation why this patchset exists, AFAICT. So
I asked AI. I'm pasting what it said below, at the end.

Is any of it true?

If so, how much and is that the reason this patchset exists?

I.e., you want for vmware monitoring tools to work with CoCo guests.

Yes, no? Anything else?

And looking at your commit messages, they don't really talk about why the
patches exist.

And I don't think you know your audience - you're sending a bunch of patches
touching arch/x86/ and you throw all that virt gibberish around like it ain't
no tomorrow and you're thinking that tip people can follow. And I think we can
follow only bits and pieces but all of us will be mostly head-scratching here
and probably ignore the whole set.

So perhaps you should lay off your virt hat for a minute and try to explain in
an approachable way what you're trying to do so that even non-virt people can
follow.

Right now concepts are flying around left and right in that text and I have no
clue what's going on here.

Thx.

P.S., here's the AI gunk:

"In this context, “VMware per‑CPU steal‑time GPA” is referring to **Guest
Physical Address (GPA)**–based accounting of **CPU steal time per vCPU**
inside a VMware virtual machine.

Let’s break the components down:

- **Steal time**  

  In virtualization, “steal time” is the amount of time a guest CPU *wanted*
  to run but **was not scheduled by the hypervisor** because the physical CPU
  was busy running other VMs or host tasks.  

  Per‑CPU steal time means this is measured **for each vCPU** separately.

- **GPA (Guest Physical Address)**  
  GPA is the CPU’s view of “physical” memory inside the guest. It’s:
  - The address space the guest OS uses for RAM, MMIO, etc.
  - Translated by the hypervisor to real host physical memory (or nested translations with EPT/NPT).

- **Why GPA for steal time?**  
  VMware (and other hypervisors) can expose performance statistics (like steal time, idle time, run time) via:
  - Per‑vCPU counters/timers
  - Memory‑mapped (GPA‑mapped) structures that the guest can read
  - Paravirtual interfaces (e.g., hypercalls, PV drivers) which are often described or backed by GPA regions

So when someone says “VMware per‑CPU steal-time GPA,” they usually mean:

A VMware mechanism where **per‑vCPU steal‑time metrics** are exposed to the
guest via data structures located in **guest physical address space**, so the
guest OS or monitoring tools can read those counters and attribute lost CPU
time per vCPU."

-- 
Regards/Gruss,
    Boris.

https://people.kernel.org/tglx/notes-about-netiquette

  parent reply	other threads:[~2026-09-29  5:40 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-29  4:02 [PATCH v2 0/6] x86/percpu: Share decrypted storage before guest setup Zack Rusin
2026-09-29  4:02 ` [PATCH v2 1/6] percpu: Page-align decrypted data in UP kernels Zack Rusin
2026-09-29  4:02 ` [PATCH v2 2/6] percpu: Bound decrypted storage for all x86 encrypted guests Zack Rusin
2026-09-29  7:54   ` Peter Zijlstra
2026-09-29 17:12     ` Zack Rusin
2026-09-30  8:54       ` Peter Zijlstra
2026-09-29  4:02 ` [PATCH v2 3/6] x86/percpu: Require embedded allocation in " Zack Rusin
2026-09-29  4:02 ` [PATCH v2 4/6] x86/mm: Provide common early memory decryption Zack Rusin
2026-09-29  4:02 ` [PATCH v2 5/6] x86/tdx: Support early sharing of kernel data Zack Rusin
2026-09-29  4:02 ` [PATCH v2 6/6] x86/percpu: Share decrypted storage before guest CPU setup Zack Rusin
2026-09-29  5:39 ` Borislav Petkov [this message]
2026-09-29 17:25   ` [PATCH v2 0/6] x86/percpu: Share decrypted storage before guest setup Zack Rusin
2026-10-01 23:59     ` Borislav Petkov
2026-10-02  6:06       ` Zack Rusin

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=20260929053930.GEartPEjbZMpBVSvSk@fat_crate.local \
    --to=bp@alien8.de \
    --cc=ajay.kaher@broadcom.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexey.makhalov@broadcom.com \
    --cc=arnd@arndb.de \
    --cc=ashish.kalra@amd.com \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=bo.gan@broadcom.com \
    --cc=cl@gentwo.org \
    --cc=corbet@lwn.net \
    --cc=dave.hansen@linux.intel.com \
    --cc=decui@microsoft.com \
    --cc=dennis@kernel.org \
    --cc=haiyangz@microsoft.com \
    --cc=hpa@zytor.com \
    --cc=kas@kernel.org \
    --cc=kees@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=kys@microsoft.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-coco@lists.linux.dev \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-hyperv@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=longli@microsoft.com \
    --cc=luto@kernel.org \
    --cc=mingo@redhat.com \
    --cc=nathan@kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=rick.p.edgecombe@intel.com \
    --cc=tglx@kernel.org \
    --cc=thomas.lendacky@amd.com \
    --cc=tj@kernel.org \
    --cc=virtualization@lists.linux.dev \
    --cc=vkuznets@redhat.com \
    --cc=wei.liu@kernel.org \
    --cc=x86@kernel.org \
    --cc=zack.rusin@broadcom.com \
    /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