lkml.org 
[lkml]   [2021]   [Apr]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [RFCv2 13/13] KVM: unmap guest memory using poisoned pages
From
Date
On 4/17/2021 1:30 AM, Sean Christopherson wrote:
> On Fri, Apr 16, 2021, Kirill A. Shutemov wrote:
[...]
>> index fadaccb95a4c..cd2374802702 100644
>> --- a/include/linux/kvm_host.h
>> +++ b/include/linux/kvm_host.h
>> @@ -436,6 +436,8 @@ static inline int kvm_arch_vcpu_memslots_id(struct kvm_vcpu *vcpu)
>> }
>> #endif
>>
>> +#define KVM_NR_SHARED_RANGES 32
>> +
>> /*
>> * Note:
>> * memslots are not sorted by id anymore, please use id_to_memslot()
>> @@ -513,6 +515,10 @@ struct kvm {
>> pid_t userspace_pid;
>> unsigned int max_halt_poll_ns;
>> u32 dirty_ring_size;
>> + bool mem_protected;
>> + void *id;
>> + int nr_shared_ranges;
>> + struct range shared_ranges[KVM_NR_SHARED_RANGES];
>
> Hard no for me. IMO, anything that requires KVM to track shared/pinned pages in
> a separate tree/array is non-starter. More specific to TDX #MCs, KVM should not
> be the canonical reference for the state of a page.
>

Do you mean something in struct page to track if the page is shared or
private?

\
 
 \ /
  Last update: 2021-04-19 13:33    [W:0.130 / U:1.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site