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: <87tuy1p85k.fsf@vitty.brq.redhat.com>
Date:   Tue, 21 Jul 2020 10:46:47 +0200
From:   Vitaly Kuznetsov <vkuznets@...hat.com>
To:     Haiwei Li <lihaiwei.kernel@...il.com>
Cc:     "pbonzini\@redhat.com" <pbonzini@...hat.com>,
        Sean Christopherson <sean.j.christopherson@...el.com>,
        "wanpengli\@tencent.com" <wanpengli@...cent.com>,
        "jmattson\@google.com" <jmattson@...gle.com>,
        "joro\@8bytes.org" <joro@...tes.org>,
        "tglx\@linutronix.de" <tglx@...utronix.de>, mingo@...hat.com,
        "bp\@alien8.de" <bp@...en8.de>, "hpa\@zytor.com" <hpa@...or.com>,
        "linux-kernel\@vger.kernel.org" <linux-kernel@...r.kernel.org>,
        "kvm\@vger.kernel.org" <kvm@...r.kernel.org>,
        "x86\@kernel.org" <x86@...nel.org>
Subject: Re: [PATCH] KVM: Using macros instead of magic values

Haiwei Li <lihaiwei.kernel@...il.com> writes:

> From: Haiwei Li <lihaiwei@...cent.com>
>
> Instead of using magic values, use macros.
>
> Signed-off-by: Haiwei Li <lihaiwei@...cent.com>
> ---
>   arch/x86/kvm/lapic.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> index 47801a4..d5fb2ea 100644
> --- a/arch/x86/kvm/lapic.c
> +++ b/arch/x86/kvm/lapic.c
> @@ -2083,7 +2083,8 @@ int kvm_lapic_reg_write(struct kvm_lapic *apic, 
> u32 reg, u32 val)
>
>   	case APIC_SELF_IPI:
>   		if (apic_x2apic_mode(apic)) {
> -			kvm_lapic_reg_write(apic, APIC_ICR, 0x40000 | (val & 0xff));
> +			kvm_lapic_reg_write(apic, APIC_ICR,
> +					    APIC_DEST_SELF | (val & APIC_VECTOR_MASK));
>   		} else
>   			ret = 1;
>   		break;
> --
> 1.8.3.1
>

Reviewed-by: Vitaly Kuznetsov <vkuznets@...hat.com>

-- 
Vitaly

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ