public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Graf <graf@amazon.com>
To: Priscilla Lam <prl@amazon.com>, <maz@kernel.org>,
	<oliver.upton@linux.dev>
Cc: <christoffer.dall@arm.com>, <dwmw@amazon.co.uk>,
	<gurugubs@amazon.com>, <jgrall@amazon.co.uk>,
	<joey.gouly@arm.com>, <kvmarm@lists.linux.dev>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>, <suzuki.poulose@arm.com>,
	<yuzenghui@huawei.com>
Subject: Re: [PATCH] KVM: arm64: Implement KVM_TRANSLATE ioctl for arm64
Date: Tue, 23 Sep 2025 10:39:07 +0200	[thread overview]
Message-ID: <97759f51-385b-4ce4-8766-d00ed5af580b@amazon.com> (raw)
In-Reply-To: <20250923082955.66602-1-prl@amazon.com>

Hi Priscilla,

On 23.09.25 10:29, Priscilla Lam wrote:
> Hi Oliver and Marc,
>
> Thanks for the detailed feedback.
>
>> But at the end of the day, what do you need KVM_TRANSLATE for? This
>> interface is an absolute turd that is unable to represent the bare
>> minimum of the architecture (writable by whom? physical address in
>> which translation regime? what about S2 translations?), and is better
>> left in the "utter brain fart" category.
> Regarding motivation, this patch is intended to give a userspace vmm
> the ability to handle non-ISV guest faults. The Arm Arm (DDI 0487L.b,
> section B3.13.6) notes that for load/store pair faults, the syndrome
> may not provide the specifics of the access that faulted. In those
> cases, the vmm must manually decode the instruction to emulate it. The
> introduction of KVM_CAP_ARM_NISV_TO_USER
> (https://lore.kernel.org/kvm/20191120164236.29359-2-maz@kernel.org/)
> seems to have anticipated that flow by allowing exits to userspace on
> trapped NISV instructions. What is still missing is a reliable way for
> userspace to query VA->IPA translations in order to complete emulation.


All modern OSs constrain themselves to only ISV enabled MMIO 
instructions. NISV is really only useful to run non hypervisor 
enlightened guests. Did you encounter a real world OS that was causing 
NISV faults? And if so, what was causing these? It's most likely a 
driver or OS bug.

Alex




Amazon Web Services Development Center Germany GmbH
Tamara-Danz-Str. 13
10243 Berlin
Geschaeftsfuehrung: Christian Schlaeger
Eingetragen am Amtsgericht Charlottenburg unter HRB 257764 B
Sitz: Berlin
Ust-ID: DE 365 538 597

  reply	other threads:[~2025-09-23  8:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-22 20:24 [PATCH] KVM: arm64: Implement KVM_TRANSLATE ioctl for arm64 Priscilla Lam
2025-09-22 23:27 ` Oliver Upton
2025-09-23  8:03 ` Marc Zyngier
2025-09-23  8:29   ` Priscilla Lam
2025-09-23  8:39     ` Alexander Graf [this message]
2025-09-23  9:02       ` David Woodhouse
2025-09-23 18:05         ` Christoffer Dall
2025-09-23  9:25     ` Marc Zyngier
2025-09-25  5:21       ` Priscilla Lam

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=97759f51-385b-4ce4-8766-d00ed5af580b@amazon.com \
    --to=graf@amazon.com \
    --cc=christoffer.dall@arm.com \
    --cc=dwmw@amazon.co.uk \
    --cc=gurugubs@amazon.com \
    --cc=jgrall@amazon.co.uk \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oliver.upton@linux.dev \
    --cc=prl@amazon.com \
    --cc=suzuki.poulose@arm.com \
    --cc=yuzenghui@huawei.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