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] [thread-next>] [day] [month] [year] [list]
Message-ID: <SN6PR12MB2767A51D40E7F53395770DE58EB39@SN6PR12MB2767.namprd12.prod.outlook.com>
Date:   Tue, 21 Jun 2022 17:45:42 +0000
From:   "Kalra, Ashish" <Ashish.Kalra@....com>
To:     Peter Gonda <pgonda@...gle.com>
CC:     the arch/x86 maintainers <x86@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        kvm list <kvm@...r.kernel.org>,
        "linux-coco@...ts.linux.dev" <linux-coco@...ts.linux.dev>,
        "linux-mm@...ck.org" <linux-mm@...ck.org>,
        Linux Crypto Mailing List <linux-crypto@...r.kernel.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>, Joerg Roedel <jroedel@...e.de>,
        "Lendacky, Thomas" <Thomas.Lendacky@....com>,
        "H. Peter Anvin" <hpa@...or.com>, Ard Biesheuvel <ardb@...nel.org>,
        Paolo Bonzini <pbonzini@...hat.com>,
        Sean Christopherson <seanjc@...gle.com>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Wanpeng Li <wanpengli@...cent.com>,
        Jim Mattson <jmattson@...gle.com>,
        Andy Lutomirski <luto@...nel.org>,
        Dave Hansen <dave.hansen@...ux.intel.com>,
        Sergio Lopez <slp@...hat.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Srinivas Pandruvada <srinivas.pandruvada@...ux.intel.com>,
        David Rientjes <rientjes@...gle.com>,
        Dov Murik <dovmurik@...ux.ibm.com>,
        Tobin Feldman-Fitzthum <tobin@....com>,
        Borislav Petkov <bp@...en8.de>,
        "Roth, Michael" <Michael.Roth@....com>,
        Vlastimil Babka <vbabka@...e.cz>,
        "Kirill A . Shutemov" <kirill@...temov.name>,
        Andi Kleen <ak@...ux.intel.com>,
        Tony Luck <tony.luck@...el.com>, Marc Orr <marcorr@...gle.com>,
        Sathyanarayanan Kuppuswamy 
        <sathyanarayanan.kuppuswamy@...ux.intel.com>,
        Alper Gun <alpergun@...gle.com>,
        "Dr. David Alan Gilbert" <dgilbert@...hat.com>,
        "jarkko@...nel.org" <jarkko@...nel.org>
Subject: RE: [PATCH Part2 v6 02/49] iommu/amd: Introduce function to check
 SEV-SNP support

[AMD Official Use Only - General]

Hello Peter,

>> +bool iommu_sev_snp_supported(void)
>> +{
>> +       struct amd_iommu *iommu;
>> +
>> +       /*
>> +        * The SEV-SNP support requires that IOMMU must be enabled, and is
>> +        * not configured in the passthrough mode.
>> +        */
>> +       if (no_iommu || iommu_default_passthrough()) {
>> +               pr_err("SEV-SNP: IOMMU is either disabled or 
>> + configured in passthrough mode.\n");

> Like below could this say something like snp support is disabled because of iommu settings.

Here we may need to be more precise with the error information indicating why SNP is not enabled.
Please note that this patch may actually become part of the IOMMU + SNP patch series, where
additional checks are done, for example, not enabling SNP if IOMMU v2 page tables are enabled,
so precise error information will be useful here.

>> +               return false;
>> +       }
>> +
>> +       /*
>> +        * Iterate through all the IOMMUs and verify the SNPSup feature is
>> +        * enabled.
>> +        */
>> +       for_each_iommu(iommu) {
>> +               if (!iommu_feature(iommu, FEATURE_SNP)) {
>> +                       pr_err("SNPSup is disabled (devid: 
>> + %02x:%02x.%x)\n",

> SNPSup might not be obvious to readers, what about " SNP Support is disabled ...".

Yes, that makes sense.

> Also should this have the "SEV-SNP:" prefix like the above log?

Probably, we want to be more consistent with the SNP guest patches and replace
SEV-SNP with SNP everywhere, including function names, etc.

Thanks,
Ashish

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ