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: <CAOLK0pyET5GGqMcoK7u5781mf_U1js6LtfoYxMpntwVCfGO3Zg@mail.gmail.com>
Date:   Fri, 1 Feb 2019 15:10:55 +0800
From:   Tianyu Lan <lantianyu1986@...il.com>
To:     Dan Carpenter <dan.carpenter@...cle.com>
Cc:     "linux-kernel@...r kernel org" <linux-kernel@...r.kernel.org>,
        "H. Peter Anvin" <hpa@...or.com>, mchehab+samsung@...nel.org,
        sashal@...nel.org, sthemmin@...rosoft.com,
        Joerg Roedel <joro@...tes.org>,
        "the arch/x86 maintainers" <x86@...nel.org>,
        michael.h.kelley@...rosoft.com, Ingo Molnar <mingo@...hat.com>,
        Lan Tianyu <Tianyu.Lan@...rosoft.com>,
        Arnd Bergmann <arnd@...db.de>, haiyangz@...rosoft.com,
        Alex Williamson <alex.williamson@...hat.com>, bp@...en8.de,
        Thomas Gleixner <tglx@...utronix.de>,
        Vitaly Kuznetsov <vkuznets@...hat.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        nicolas.ferre@...rochip.com, iommu@...ts.linux-foundation.org,
        devel@...uxdriverproject.org, akpm@...ux-foundation.org,
        davem@...emloft.net
Subject: Re: [PATCH 1/3] x86/Hyper-V: Set x2apic destination mode to physical
 when x2apic is available

On Fri, Feb 1, 2019 at 3:07 PM Dan Carpenter <dan.carpenter@...cle.com> wrote:
>
> On Thu, Jan 31, 2019 at 06:17:31PM +0800, lantianyu1986@...il.com wrote:
> >
> >
>
> This comment needs to be indented one tab or it looks like we're outside
> the funciton.
>
> > +/*
> > + * Hyper-V doesn't provide irq remapping for IO-APIC. To enable x2apic,
> > + * set x2apic destination mode to physcial mode when x2apic is available
> > + * and Hyper-V IOMMU driver makes sure cpus assigned with IO-APIC irqs
> > + * have 8-bit APIC id.
> > + */
> > +# if IS_ENABLED(CONFIG_HYPERV_IOMMU)
> > +     if (x2apic_supported())
> > +             x2apic_phys = 1;
> > +# endif
>
> The IS_ENABLED() macro is really magical.  You could write this like so:
>
>         if (IS_ENABLED(CONFIG_HYPERV_IOMMU) && x2apic_supported())
>                 x2apic_phys = 1;
>
> It works the same and is slightly more pleasant to look at.

Yes, that will better. Thanks for your suggestion. Dan

-- 
Best regards
Tianyu Lan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ