[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <6985f630-3b2a-75f5-5b55-bd76cf32f20b@redhat.com>
Date: Wed, 21 Oct 2020 19:20:15 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Yu Zhang <yu.c.zhang@...ux.intel.com>,
Ben Gardon <bgardon@...gle.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Cannon Matthews <cannonmatthews@...gle.com>,
Peter Xu <peterx@...hat.com>,
Sean Christopherson <sean.j.christopherson@...el.com>,
Peter Shier <pshier@...gle.com>,
Peter Feiner <pfeiner@...gle.com>,
Junaid Shahid <junaids@...gle.com>,
Jim Mattson <jmattson@...gle.com>,
Yulei Zhang <yulei.kernel@...il.com>,
Wanpeng Li <kernellwp@...il.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Xiao Guangrong <xiaoguangrong.eric@...il.com>
Subject: Re: [PATCH v2 07/20] kvm: x86/mmu: Support zapping SPTEs in the TDP
MMU
On 21/10/20 17:02, Yu Zhang wrote:
>> void kvm_tdp_mmu_free_root(struct kvm *kvm, struct kvm_mmu_page *root)
>> {
>> + gfn_t max_gfn = 1ULL << (boot_cpu_data.x86_phys_bits - PAGE_SHIFT);
>> +
> boot_cpu_data.x86_phys_bits is the host address width. Value of the guest's
> may vary. So maybe we should just traverse the memslots and zap the gfn ranges
> in each of them?
>
It must be smaller than the host value for two-dimensional paging, though.
Paolo
Powered by blists - more mailing lists