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: <20160803095750.GB22251@potion>
Date:	Wed, 3 Aug 2016 11:57:51 +0200
From:	Radim Krčmář <rkrcmar@...hat.com>
To:	Wanpeng Li <kernellwp@...il.com>
Cc:	linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
	Wanpeng Li <wanpeng.li@...mail.com>,
	Paolo Bonzini <pbonzini@...hat.com>
Subject: Re: [PATCH 2/2] KVM: lapic: don't recalculate apic map table twice
 when enabling LAPIC

2016-08-03 12:04+0800, Wanpeng Li:
> From: Wanpeng Li <wanpeng.li@...mail.com>
> 
> APIC map table is recalculated during reset APIC ID to the initial value
> when enabling LAPIC. This patch move the recalculate_apic_map() to the 
> next branch since we don't need to recalculate apic map twice in current
> codes.
> 
> Cc: Paolo Bonzini <pbonzini@...hat.com>
> Cc: Radim Krčmář <rkrcmar@...hat.com>
> Signed-off-by: Wanpeng Li <wanpeng.li@...mail.com>
> ---

Reviewed-by: Radim Krčmář <rkrcmar@...hat.com>

> diff --git a/arch/x86/kvm/lapic.c b/arch/x86/kvm/lapic.c
> @@ -1760,9 +1760,10 @@ void kvm_lapic_set_base(struct kvm_vcpu *vcpu, u64 value)
>  		if (value & MSR_IA32_APICBASE_ENABLE) {
>  			kvm_apic_set_xapic_id(apic, vcpu->vcpu_id);
>  			static_key_slow_dec_deferred(&apic_hw_disabled);
> -		} else
> +		} else {
>  			static_key_slow_inc(&apic_hw_disabled.key);
> -		recalculate_apic_map(vcpu->kvm);
> +			recalculate_apic_map(vcpu->kvm);
> +		}
>  	}
>  
>  	if ((old_value ^ value) & X2APIC_ENABLE) {
> -- 
> 1.9.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ