lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Tue, 6 Jun 2023 20:52:58 +0200
From:   Aleksandr Mikhalitsyn <aleksandr.mikhalitsyn@...onical.com>
To:     Sean Christopherson <seanjc@...gle.com>
Cc:     pbonzini@...hat.com,
        Stéphane Graber <stgraber@...ntu.com>,
        kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
        Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
        "H. Peter Anvin" <hpa@...or.com>
Subject: Re: [PATCH v2 2/2] KVM: SVM: enhance info printk's in SEV init

On Tue, Jun 6, 2023 at 8:46 PM Sean Christopherson <seanjc@...gle.com> wrote:
>
> On Mon, May 22, 2023, Alexander Mikhalitsyn wrote:
> > diff --git a/arch/x86/kvm/svm/sev.c b/arch/x86/kvm/svm/sev.c
> > index cc832a8d1bca..fff63d1f2a34 100644
> > --- a/arch/x86/kvm/svm/sev.c
> > +++ b/arch/x86/kvm/svm/sev.c
> > @@ -2224,7 +2224,6 @@ void __init sev_hardware_setup(void)
> >               goto out;
> >       }
> >
> > -     pr_info("SEV supported: %u ASIDs\n", sev_asid_count);
> >       sev_supported = true;
> >
> >       /* SEV-ES support requested? */
> > @@ -2252,10 +2251,16 @@ void __init sev_hardware_setup(void)
> >       if (misc_cg_set_capacity(MISC_CG_RES_SEV_ES, sev_es_asid_count))
> >               goto out;
> >
> > -     pr_info("SEV-ES supported: %u ASIDs\n", sev_es_asid_count);
> >       sev_es_supported = true;
> >
> >  out:
> > +     if (boot_cpu_has(X86_FEATURE_SEV))
> > +             pr_info("SEV %s (ASIDs %u - %u)\n",
> > +                     sev_supported ? "enabled" : "disabled", min_sev_asid, max_sev_asid);
> > +     if (boot_cpu_has(X86_FEATURE_SEV_ES))
> > +             pr_info("SEV-ES %s (ASIDs %u - %u)\n",
> > +                     sev_es_supported ? "enabled" : "disabled", 1, min_sev_asid - 1);
>
> The min should print '0' if min_sev_asid<=1, otherwise the output will be
>
>         SEV-ES disabled (ASIDs 1 - 0)
>
> which is confusing.  That would also align with what gets printed out for SEV
> when it's not supported at all (min==max=0).
>
> No need for v3, I'll fixup when applying.

Got it. Ok!

Thanks again for looking into that.

Kind regards,
Alex

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ