[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <87y1v3v54b.wl-maz@kernel.org>
Date:   Thu, 01 Sep 2022 10:03:16 +0100
From:   Marc Zyngier <maz@...nel.org>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     "Huang, Kai" <kai.huang@...el.com>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "Yamahata, Isaku" <isaku.yamahata@...el.com>,
        "pbonzini@...hat.com" <pbonzini@...hat.com>,
        "Shahar, Sagi" <sagis@...gle.com>,
        "Aktas, Erdem" <erdemaktas@...gle.com>,
        "isaku.yamahata@...il.com" <isaku.yamahata@...il.com>,
        Will Deacon <will@...nel.org>
Subject: Re: [PATCH v8 003/103] KVM: Refactor CPU compatibility check on module initialization
Sean,
On Thu, 11 Aug 2022 18:39:53 +0100,
Sean Christopherson <seanjc@...gle.com> wrote:
> 
> +Will (for arm crud)
When it comes to KVM/arm64, I'd appreciate if you could Cc me.
> arm64 is also quite evil and circumvents KVM's hardware enabling
> logic to some extent.  kvm_arch_init() => init_subsystems()
> unconditionally enables hardware, and for pKVM _leaves_ hardware
> enabled.  And then hyp_init_cpu_pm_notifier() disables/enables
> hardware across lower power enter+exit, except if pKVM is enabled.
> The icing on the cake is "disabling" hardware doesn't even do
> anything (AFAICT) if the kernel is running at EL2 (which I think is
> nVHE + not-pKVM?).
In the cases where disabling doesn't do anything (which are the exact
opposite of the cases you describe), that's because there is
absolutely *nothing* to do:
- If VHE, the kernel is the bloody hypervisor: disable virtualisation,
  kill the kernel.
- if pKVM, the kernel is basically a guest, and has no business
  touching anything at all.
So much the 'evil' behaviour.
	M.
-- 
Without deviation from the norm, progress is not possible.
Powered by blists - more mailing lists
 
