From: Vitaly Kuznetsov <vkuznets@redhat.com>
To: Wei Liu <wei.liu@kernel.org>
Cc: Sunil Muthuswamy <sunilmut@microsoft.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Matheus Castello <matheus@castello.eng.br>,
KY Srinivasan <kys@microsoft.com>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Wei Liu <liuwe@microsoft.com>,
Michael Kelley <mikelley@microsoft.com>,
Tianyu Lan <Tianyu.Lan@microsoft.com>,
Wei Liu <wei.liu@kernel.org>
Subject: Re: [PATCH v2] x86/Hyper-V: Support for free page reporting
Date: Wed, 06 Jan 2021 17:12:54 +0100 [thread overview]
Message-ID: <87pn2igi2h.fsf@vitty.brq.redhat.com> (raw)
In-Reply-To: <20210106153523.nbnrkp4papebxqwy@liuwe-devbox-debian-v2>
Wei Liu <wei.liu@kernel.org> writes:
> On Wed, Jan 06, 2021 at 02:28:20PM +0100, Vitaly Kuznetsov wrote:
> [...]
>>
>> > +bool hv_query_ext_cap(u64 cap_query)
>> > +{
>> > + u64 *cap;
>> > + unsigned long flags;
>> > + u64 ext_cap = 0;
>> > +
>> > + /*
>> > + * Querying extended capabilities is an extended hypercall. Check if the
>> > + * partition supports extended hypercall, first.
>> > + */
>> > + if (!(ms_hyperv.priv_high & HV_ENABLE_EXTENDED_HYPERCALLS))
>> > + return 0;
>> > +
>> > + /*
>> > + * Repurpose the input page arg to accept output from Hyper-V for
>> > + * now because this is the only call that needs output from the
>> > + * hypervisor. It should be fixed properly by introducing an
>> > + * output arg once we have more places that require output.
>> > + */
>>
>> I remember there was a patch from Wei (realter to running Linux as root
>> partition) doing the job, we can probably merge it early to avoid this
>> re-purposing.
>>
>
> We want to be frugal regarding memory usage, so in my patch the output
> page is only allocated when Linux is running as the root partition.
>
> This patch is mostly only useful when Linux is running as a child
> partition. This is a different use case.
Well, yea, while one 4k page per CPU is probably not much, why
allocating something we don't really need? The whole 're-purposing' idea
comes from the misleading 'hyperv_pcpu_input_arg' name, which can be
just 'hyperv_pcpu_arg' (and we can allocate two pages for root
partition).
All this is not a big deal, we can take a look again after root
partition support lands and do some cleanup if needed.
--
Vitaly
next prev parent reply other threads:[~2021-01-06 16:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-05 17:39 [PATCH v2] x86/Hyper-V: Support for free page reporting Sunil Muthuswamy
2021-01-06 13:28 ` Vitaly Kuznetsov
2021-01-06 15:35 ` Wei Liu
2021-01-06 16:12 ` Vitaly Kuznetsov [this message]
2021-01-06 16:15 ` Wei Liu
2021-01-06 23:04 ` [EXTERNAL] " Sunil Muthuswamy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87pn2igi2h.fsf@vitty.brq.redhat.com \
--to=vkuznets@redhat.com \
--cc=Tianyu.Lan@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liuwe@microsoft.com \
--cc=matheus@castello.eng.br \
--cc=mikelley@microsoft.com \
--cc=sthemmin@microsoft.com \
--cc=sunilmut@microsoft.com \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).