[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALzav=dHNYP02q_CJncwk-JdL9OSB=613v4+siBm1Cp2rmxLLw@mail.gmail.com>
Date: Wed, 6 Mar 2024 16:36:25 -0800
From: David Matlack <dmatlack@...gle.com>
To: isaku.yamahata@...el.com
Cc: kvm@...r.kernel.org, isaku.yamahata@...il.com,
linux-kernel@...r.kernel.org, Sean Christopherson <seanjc@...gle.com>,
Paolo Bonzini <pbonzini@...hat.com>, Michael Roth <michael.roth@....com>,
Federico Parola <federico.parola@...ito.it>
Subject: Re: [RFC PATCH 6/8] KVM: x86: Implement kvm_arch_{, pre_}vcpu_map_memory()
On Wed, Mar 6, 2024 at 4:31 PM David Matlack <dmatlack@...gle.com> wrote:
>
> On 2024-03-01 09:28 AM, isaku.yamahata@...el.com wrote:
> >
> > + if (IS_ALIGNED(mapping->base_gfn, KVM_PAGES_PER_HPAGE(PG_LEVEL_1G)) &&
> > + mapping->nr_pages >= KVM_PAGES_PER_HPAGE(PG_LEVEL_1G))
> > + max_level = PG_LEVEL_1G;
> > + else if (IS_ALIGNED(mapping->base_gfn, KVM_PAGES_PER_HPAGE(PG_LEVEL_2M)) &&
> > + mapping->nr_pages >= KVM_PAGES_PER_HPAGE(PG_LEVEL_2M))
> > + max_level = PG_LEVEL_2M;
> > + else
> > + max_level = PG_LEVEL_4K;
>
> Is there a requirement that KVM must not map memory outside of the
> requested region?
And if so, what if the requested region is already mapped with a larger page?
Powered by blists - more mailing lists