lkml.org 
[lkml]   [2023]   [Nov]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v9 04/15] KVM: pfncache: add a mark-dirty helper
On 22/11/2023 12:24, David Woodhouse wrote:
> On Wed, 2023-11-22 at 12:18 +0000, Paul Durrant wrote:
>>
>> --- a/include/linux/kvm_host.h
>> +++ b/include/linux/kvm_host.h
>> @@ -1367,6 +1367,16 @@ int kvm_gpc_refresh(struct gfn_to_pfn_cache *gpc, unsigned long len);
>>   */
>>  void kvm_gpc_deactivate(struct gfn_to_pfn_cache *gpc);
>>
>> +/**
>> + * kvm_gpc_mark_dirty - mark a cached page as dirty.
>> + *
>> + * @gpc:          struct gfn_to_pfn_cache object.
>> + */
>> +static inline void kvm_gpc_mark_dirty(struct gfn_to_pfn_cache *gpc)
>> +{
>> +       mark_page_dirty_in_slot(gpc->kvm, gpc->memslot, gpc->gpa >> PAGE_SHIFT);
>> +}
>
> This doesn't rescind my existing ack, but it's probably worth asserting
> that gpc->lock is held here?

Yes, a good idea. If a v10 is needed, I'll add it. Otherwise I can do it
as an incremental patch.

Paul

\
 
 \ /
  Last update: 2023-11-22 14:04    [W:0.613 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site