[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5580a562-b6ac-448d-a8fe-cedc32d33bab@redhat.com>
Date: Fri, 23 Feb 2024 10:48:51 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: David Stevens <stevensd@...omium.org>,
Sean Christopherson <seanjc@...gle.com>
Cc: Yu Zhang <yu.c.zhang@...ux.intel.com>,
Isaku Yamahata <isaku.yamahata@...il.com>,
Zhi Wang <zhi.wang.linux@...il.com>, Maxim Levitsky <mlevitsk@...hat.com>,
kvmarm@...ts.linux.dev, linux-kernel@...r.kernel.org, kvm@...r.kernel.org
Subject: Re: [PATCH v10 4/8] KVM: mmu: Improve handling of non-refcounted pfns
On 2/21/24 08:25, David Stevens wrote:
> + /*
> + * TODO: Remove the first branch once all callers have been
> + * taught to play nice with non-refcounted struct pages.
> + */
> + if (page && !kfp->refcounted_page &&
> + !kfp->allow_non_refcounted_struct_page) {
> + r = -EFAULT;
Is the TODO practical, considering that 32-bit AMD as well as all
non-TDP x86 do not support non-refcounted pages?
If the field is not going to go away, it's better to point out (in the
definition of the struct) that some architectures may not have enough
free space in the PTEs for the required tracking; and then drop the TODO.
> + } else if (!kfp->refcounted_page &&
> + !kfp->guarded_by_mmu_notifier &&
> + !allow_unsafe_mappings) {
> + r = -EFAULT;
Why is allow_unsafe_mappings desirable at all?
None of this is worth a respin, it can be fixed when applying.
Paolo
Powered by blists - more mailing lists