Re: [PATCH] KVM: s390: Cleanup initial cpu reset

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 10.01.20 15:01, Cornelia Huck wrote:
> On Fri, 10 Jan 2020 08:48:24 -0500
> Janosch Frank <frankja@xxxxxxxxxxxxx> wrote:
> 
>> The code seems to be quite old and uses lots of unneeded spaces for
>> alignment, which doesn't really help with readability.
>>
>> Let's:
>> * Get rid of the extra spaces
>> * Remove the ULs as they are not needed on 0s
>> * Define constants for the CR 0 and 14 initial values
>> * Use the sizeof of the gcr array to memset it to 0
>>
>> Signed-off-by: Janosch Frank <frankja@xxxxxxxxxxxxx>
>> ---
>>
>> Something like this?
> 
> +1, like.
> 
>> Did I forget something?
>>
>> ---
>>  arch/s390/include/asm/kvm_host.h |  5 +++++
>>  arch/s390/kvm/kvm-s390.c         | 18 +++++++-----------
>>  2 files changed, 12 insertions(+), 11 deletions(-)
>>
>> diff --git a/arch/s390/include/asm/kvm_host.h b/arch/s390/include/asm/kvm_host.h
>> index 02f4c21c57f6..37747db884bd 100644
>> --- a/arch/s390/include/asm/kvm_host.h
>> +++ b/arch/s390/include/asm/kvm_host.h
>> @@ -122,6 +122,11 @@ struct mcck_volatile_info {
>>  	__u32 reserved;
>>  };
>>  
>> +#define CR0_INITIAL (CR0_UNUSED_56 | CR0_INTERRUPT_KEY_SUBMASK | \
>> +		     CR0_MEASUREMENT_ALERT_SUBMASK)
>> +#define CR14_INITIAL (CR14_UNUSED_32 | CR14_UNUSED_33 | \
>> +		      CR14_EXTERNAL_DAMAGE_SUBMASK)
> 
> Maybe CR<n>_INITIAL_MASK?

+1

Reviewed-by: David Hildenbrand <david@xxxxxxxxxx>


-- 
Thanks,

David / dhildenb




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux