lkml.org 
[lkml]   [2021]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v5 07/19] arm64: kvm: Enable access to TRBE support for host
On Tue, 30 Mar 2021 14:34:23 +0100,
Suzuki K Poulose <suzuki.poulose@arm.com> wrote:
>
> On 30/03/2021 13:15, Marc Zyngier wrote:
> > On Tue, 30 Mar 2021 12:12:49 +0100,
> > Suzuki K Poulose <suzuki.poulose@arm.com> wrote:

[...]

> >> May be we could do this check at kvm_arch_vcpu_load()/put() ?
> >
> > That would extend the tracing blackout period enormously, wouldn't it?
> > I'm not sure that's the best thing to do...
>
> Sorry for not making this clear. We could check if the SPE/TRBE is
> available on this CPU (including the PMB/TRB_IDR bits and a set a flag
> in the VCPU on every kvm_arch_vcpu_load() and cleared on put.
> The actual switching code could check this flag and check if the unit
> is enabled and then do the actual save/restore as we do below.
> (We may be able to even check if unit is enabled there, need to double
> check this.)

Ah, gotcha. Yes, this seems like a reasonable thing to do. We have the
per-vcpu debug flags already, and you could piggy-back on that.

Thanks,

M.

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

\
 
 \ /
  Last update: 2021-03-30 16:01    [W:0.055 / U:0.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site