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]
Date:	Wed, 03 Jun 2015 09:55:47 +0800
From:	Xiao Guangrong <guangrong.xiao@...ux.intel.com>
To:	Paolo Bonzini <pbonzini@...hat.com>
CC:	gleb@...nel.org, mtosatti@...hat.com, kvm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 05/15] KVM: MTRR: clean up mtrr default type


Thanks for your review, Paolo!


On 06/01/2015 05:11 PM, Paolo Bonzini wrote:

>>   struct kvm_vcpu_arch {
>> diff --git a/arch/x86/kvm/mtrr.c b/arch/x86/kvm/mtrr.c
>> index 562341b..6de49dd 100644
>> --- a/arch/x86/kvm/mtrr.c
>> +++ b/arch/x86/kvm/mtrr.c
>> @@ -105,7 +105,6 @@ EXPORT_SYMBOL_GPL(kvm_mtrr_valid);
>>   static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr)
>>   {
>>   	struct kvm_mtrr *mtrr_state = &vcpu->arch.mtrr_state;
>> -	unsigned char mtrr_enabled = mtrr_state->enabled;
>>   	gfn_t start, end, mask;
>>   	int index;
>>   	bool is_fixed = true;
>> @@ -114,7 +113,7 @@ static void update_mtrr(struct kvm_vcpu *vcpu, u32 msr)
>>   	      !kvm_arch_has_noncoherent_dma(vcpu->kvm))
>>   		return;
>>
>> -	if (!(mtrr_enabled & 0x2) && msr != MSR_MTRRdefType)
>> +	if (!mtrr_state->mtrr_enabled && msr != MSR_MTRRdefType)
>
> I know Linus doesn't like bitfields too much.  Can you change these to
> inline functions, and only leave an "u64 deftype" in the struct?
>

Sure. I will introduce mtrr_is_enabled() and fixed_mtrr_is_enabled() instead
of these bitfields.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ