Re: [RFCv2 11/37] KVM: s390/mm: Make pages accessible before destroying the guest

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

 




On 05.02.20 11:35, Cornelia Huck wrote:
> On Mon,  3 Feb 2020 08:19:31 -0500
> Christian Borntraeger <borntraeger@xxxxxxxxxx> wrote:
> 
>> Before we destroy the secure configuration, we better make all
>> pages accessible again. This also happens during reboot, where we reboot
>> into a non-secure guest that then can go again into a secure mode. As
> 
> s/a secure/secure/

ack
> 
>> this "new" secure guest will have a new ID we cannot reuse the old page
>> state.
>>
>> Signed-off-by: Christian Borntraeger <borntraeger@xxxxxxxxxx>
>> ---
>>  arch/s390/include/asm/pgtable.h |  1 +
>>  arch/s390/kvm/pv.c              |  2 ++
>>  arch/s390/mm/gmap.c             | 35 +++++++++++++++++++++++++++++++++
>>  3 files changed, 38 insertions(+)
> 
> (...)
> 
>> +void s390_reset_acc(struct mm_struct *mm)
>> +{
>> +	/*
>> +	 * we might be called during
>> +	 * reset:                            we walk the pages and clear
>> +	 * close of all kvm file descriptor: we walk the pages and clear
> 
> s/descriptor/descriptors/

ack

> 
>> +	 * exit of process on fd closure:    vma already gone, do nothing
>> +	 */
>> +	if (!mmget_not_zero(mm))
>> +		return;
>> +	down_read(&mm->mmap_sem);
>> +	walk_page_range(mm, 0, TASK_SIZE, &reset_acc_walk_ops, NULL);
>> +	up_read(&mm->mmap_sem);
>> +	mmput(mm);
>> +}
>> +EXPORT_SYMBOL_GPL(s390_reset_acc);
> 
> Reviewed-by: Cornelia Huck <cohuck@xxxxxxxxxx>
> 




[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