Re: [PATCH v2] KVM: arm64: Only set KVM_MODE_PROTECTED if is_hyp_mode_available()

2022-09-10 Thread Elliot Berman
On 9/9/2022 10:28 AM, Catalin Marinas wrote: On Fri, Sep 09, 2022 at 07:45:52AM -0700, Elliot Berman wrote: Do not switch kvm_mode to KVM_MODE_PROTECTED if hypervisor mode is not available. This prevents "Protected KVM" cpu capability being reported when Linux is booting in EL1 and would not

[PATCH v2] KVM: arm64: Only set KVM_MODE_PROTECTED if is_hyp_mode_available()

2022-09-10 Thread Elliot Berman
Do not switch kvm_mode to KVM_MODE_PROTECTED if hypervisor mode is not available. This prevents "Protected KVM" cpu capability being reported when Linux is booting in EL1 and would not have KVM enabled. Signed-off-by: Elliot Berman --- arch/arm64/kvm/arm.c | 4 +++- 1 file changed, 3

Re: [PATCH v2] KVM: arm64: Only set KVM_MODE_PROTECTED if is_hyp_mode_available()

2022-09-10 Thread Marc Zyngier
On Sat, 10 Sep 2022 14:43:44 +0100, Will Deacon wrote: > > On Sat, Sep 10, 2022 at 10:09:31AM +0100, Marc Zyngier wrote: > > On Fri, 09 Sep 2022 18:55:18 +0100, > > Elliot Berman wrote: > > > > > > > > > > > > On 9/9/2022 10:28 AM, Catalin Marinas wrote: > > > > On Fri, Sep 09, 2022 at

Re: [PATCH v2] KVM: arm64: Only set KVM_MODE_PROTECTED if is_hyp_mode_available()

2022-09-10 Thread Will Deacon
On Sat, Sep 10, 2022 at 10:09:31AM +0100, Marc Zyngier wrote: > On Fri, 09 Sep 2022 18:55:18 +0100, > Elliot Berman wrote: > > > > > > > > On 9/9/2022 10:28 AM, Catalin Marinas wrote: > > > On Fri, Sep 09, 2022 at 07:45:52AM -0700, Elliot Berman wrote: > > >> Do not switch kvm_mode to

Re: [PATCH v2] KVM: arm64: Only set KVM_MODE_PROTECTED if is_hyp_mode_available()

2022-09-10 Thread Marc Zyngier
On Fri, 09 Sep 2022 18:55:18 +0100, Elliot Berman wrote: > > > > On 9/9/2022 10:28 AM, Catalin Marinas wrote: > > On Fri, Sep 09, 2022 at 07:45:52AM -0700, Elliot Berman wrote: > >> Do not switch kvm_mode to KVM_MODE_PROTECTED if hypervisor mode is not > >> available. This prevents "Protected

Re: [PATCH v2] KVM: arm64: Only set KVM_MODE_PROTECTED if is_hyp_mode_available()

2022-09-09 Thread Catalin Marinas
On Fri, Sep 09, 2022 at 07:45:52AM -0700, Elliot Berman wrote: > Do not switch kvm_mode to KVM_MODE_PROTECTED if hypervisor mode is not > available. This prevents "Protected KVM" cpu capability being reported > when Linux is booting in EL1 and would not have KVM enabled. > > Signed-off-by: Elliot