All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oliver Upton <oliver.upton@linux.dev>
To: Fuad Tabba <tabba@google.com>
Cc: kvmarm@lists.linux.dev, maz@kernel.org, catalin.marinas@arm.com,
	joey.gouly@arm.com, suzuki.poulose@arm.com, yuzenghui@huawei.com,
	will@kernel.org
Subject: Re: [PATCH v1 4/4] KVM: arm64: Initialize trap register values in hyp in pKVM
Date: Tue, 15 Oct 2024 01:22:34 -0700	[thread overview]
Message-ID: <Zw4mSmoI84thN-4X@linux.dev> (raw)
In-Reply-To: <CA+EHjTzyAypPSXqrCxbc1oF5AH5P33GhtLruZfbFwY8GvnnSbg@mail.gmail.com>

On Tue, Oct 15, 2024 at 09:19:03AM +0100, Fuad Tabba wrote:
> Hi Oliver,
> 
> On Tue, 15 Oct 2024 at 08:57, Oliver Upton <oliver.upton@linux.dev> wrote:
> >
> > On Mon, Oct 14, 2024 at 11:24:12AM +0100, Fuad Tabba wrote:
> > > Handle the initialization of trap registers at the hypervisor in
> > > pKVM, even for non-protected guests. The host is not trusted with
> > > the values of the trap registers, regardless of the VM type.
> > > Therefore, when switching between the host and the guests, only
> > > flush the required bits of the trap registers from the host's
> > > view that are required for hyp-host communication.
> >
> > It'd be a bit more precise to just mention that the host is allowed to
> > configure TWI and TWE still for opportunistic scheduling, as neither
> > affects the protection of VMs or the hypervisor.
> 
> Sure, will do.
> 
> >
> > >       pvm_init_trap_regs(vcpu);
> > >       pvm_init_traps_aa64pfr0(vcpu);
> > >       pvm_init_traps_aa64pfr1(vcpu);
> >
> > aside: it'd be great to reorganize all of these traps in terms of the
> > affected trap register and not the feature register.
> >
> > But that can happen later.
> 
> I do have patches for that, but I thought I'll start with these first
> since they pave the way to those.

Entirely reasonable, as you're fixing a legitimate issue here.

-- 
Thanks,
Oliver

      reply	other threads:[~2024-10-15  8:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 10:24 [PATCH v1 0/4] KVM: arm64: Fix initialization of trap register values in pKVM Fuad Tabba
2024-10-14 10:24 ` [PATCH v1 1/4] KVM: arm64: Move pkvm_vcpu_init_traps() to init_pkvm_hyp_vcpu() Fuad Tabba
2024-10-15  7:37   ` Oliver Upton
2024-10-15  8:22     ` Fuad Tabba
2024-10-15  8:30       ` Oliver Upton
2024-10-15  9:35         ` Fuad Tabba
2024-10-14 10:24 ` [PATCH v1 2/4] KVM: arm64: Refactor kvm_vcpu_enable_ptrauth() for hyp use Fuad Tabba
2024-10-14 10:24 ` [PATCH v1 3/4] KVM: arm64: Initialize the hypervisor's VM state at EL2 Fuad Tabba
2024-10-14 10:24 ` [PATCH v1 4/4] KVM: arm64: Initialize trap register values in hyp in pKVM Fuad Tabba
2024-10-15  7:57   ` Oliver Upton
2024-10-15  8:19     ` Fuad Tabba
2024-10-15  8:22       ` Oliver Upton [this message]

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=Zw4mSmoI84thN-4X@linux.dev \
    --to=oliver.upton@linux.dev \
    --cc=catalin.marinas@arm.com \
    --cc=joey.gouly@arm.com \
    --cc=kvmarm@lists.linux.dev \
    --cc=maz@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=tabba@google.com \
    --cc=will@kernel.org \
    --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 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.