public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Marc Zyngier <maz@kernel.org>
To: Oliver Upton <oliver.upton@linux.dev>
Cc: kvmarm@lists.linux.dev, kvm@vger.kernel.org,
	James Morse <james.morse@arm.com>,
	Suzuki K Poulose <suzuki.poulose@arm.com>,
	Zenghui Yu <yuzenghui@huawei.com>
Subject: Re: [PATCH] KVM: arm64: Stop printing about MMIO accesses where ISV==0
Date: Wed, 25 Oct 2023 09:04:58 +0100	[thread overview]
Message-ID: <86il6v3z6d.wl-maz@kernel.org> (raw)
In-Reply-To: <20231024210739.1729723-1-oliver.upton@linux.dev>

On Tue, 24 Oct 2023 22:07:39 +0100,
Oliver Upton <oliver.upton@linux.dev> wrote:
> 
> It is a pretty well known fact that KVM does not support MMIO emulation
> without valid instruction syndrome information (ESR_EL2.ISV == 0). The
> dmesg is useless as it provides zero context and just winds up polluting
> logs. Let's just delete it.
> 
> Any userspace that cares should just use KVM_CAP_ARM_NISV_TO_USER, which
> inherently ties to a vCPU context.
> 
> Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
> ---
>  arch/arm64/kvm/mmio.c | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/arch/arm64/kvm/mmio.c b/arch/arm64/kvm/mmio.c
> index 3dd38a151d2a..a53721be32ec 100644
> --- a/arch/arm64/kvm/mmio.c
> +++ b/arch/arm64/kvm/mmio.c
> @@ -143,7 +143,6 @@ int io_mem_abort(struct kvm_vcpu *vcpu, phys_addr_t fault_ipa)
>  			return 0;
>  		}
>  
> -		kvm_pr_unimpl("Data abort outside memslots with no valid syndrome info\n");
>  		return -ENOSYS;
>  	}
>  
> 

While I totally agree that this *debug* statement should go, we should
also replace it with something else.

Because when you're trying to debug a guest (or even KVM itself),
seeing this message is a sure indication that the guest is performing
an access outside of memory. The fact that KVM tries to handle it as
MMIO is just an implementation artefact.

So I'd very much welcome a replacement tracepoint giving a bit more
information, such as guest PC, IPA being accessed, load or store. With
that, everybody wins.

Thanks,

	M.

-- 
Without deviation from the norm, progress is not possible.

  reply	other threads:[~2023-10-25  8:05 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 21:07 [PATCH] KVM: arm64: Stop printing about MMIO accesses where ISV==0 Oliver Upton
2023-10-25  8:04 ` Marc Zyngier [this message]
2023-10-25  8:25   ` Oliver Upton
2023-10-25  8:41     ` Marc Zyngier
2023-10-26  8:23       ` Oliver Upton

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=86il6v3z6d.wl-maz@kernel.org \
    --to=maz@kernel.org \
    --cc=james.morse@arm.com \
    --cc=kvm@vger.kernel.org \
    --cc=kvmarm@lists.linux.dev \
    --cc=oliver.upton@linux.dev \
    --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