[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2 01/20] x86: make hvm_{get/set}_param accessible


  • To: Tamas K Lengyel <tamas.k.lengyel@xxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Fri, 27 Dec 2019 08:02:11 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=suse.com; dmarc=pass action=none header.from=suse.com; dkim=pass header.d=suse.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2joeicOqe/w0gss+IZ9O9BEdOZQAc8ABEKxSHBaSCOA=; b=MbeYDTo3GoHWdONSB4An56MwtkjCbXOrBijjQ0qMXaP/l9wWw8gGwMiv8O/y05fUniAq8q3EYca2admHUXTblrWZHqHWWnkCGP77ogWcSt7+rePmzBFQL83vJvjOsiSlGgNbETbI98f5SVyB2ZPBo49j9Q/lHdKaCpL/QWboDUumTIg2puywZ7PIUvl67HuklgoZLdrabvYyt9GpubPx/3D5EogTq7fct3enAijp+Ca1Uy0fPiXWnBHwBOaxFTjXBPeIHD2qkckNBP96uZ4C5QUKshEzdOJT8q2+H3aQ2i4bRAwtVrpTV3Y32c/NVflV2d8/hcpIarOxELwxVv8hgw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=EB2Vbwp7n9IMNuUEB7i9QTjoS38OeHbsNIyjBVpa7xoRVuK4AjlqNppv43x+1kPbDQu8y8AszbJxG/bXbbHE4ehzeWRi5QvFQoFfJU1WrZ4VBwJRsOkOcc3r+hfjSRR7nXbpT+K/2VT2BojmRSq94sVoF1W/I3dG+mNHqlLWCnmoJm8w/2GLmsuU2TIYMq7aw2cpeTWXkfr6optbJBi4mDPAKbs2J983Sy1QtaAHAmTXn7gJ9sF+n7uugs5tP7WGp5KB+SvmelON10ltQTcyCVXfy55OWzfaFwNR3R1giOfpo6osRjKcFGfv02oLxUa4HyTyuayF7SFyOwPX5mSW/g==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Tamas K Lengyel <tamas.lengyel@xxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Fri, 27 Dec 2019 08:04:15 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVuXSJhNM6yiIxok+f/IO5h+IrHqfHzv8AgAXWHwA=
  • Thread-topic: [PATCH v2 01/20] x86: make hvm_{get/set}_param accessible

(re-sending, as I still don't see the mail having appeared on the list)

On 23.12.2019 15:55, Tamas K Lengyel wrote:
> On Mon, Dec 23, 2019 at 2:37 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>
>> On 20.12.2019 18:32, Andrew Cooper wrote:
>>> On 20/12/2019 17:27, Tamas K Lengyel wrote:
>>>> On Fri, Dec 20, 2019 at 9:47 AM Jan Beulich <jbeulich@xxxxxxxx> wrote:
>>>>> On 18.12.2019 20:40, Tamas K Lengyel wrote:
>>>>>> Currently the hvm parameters are only accessible via the HVMOP 
>>>>>> hypercalls. By
>>>>>> exposing hvm_{get/set}_param it will be possible for VM forking to copy 
>>>>>> the
>>>>>> parameters directly into the clone domain.
>>>>> Having peeked ahead at patch 17, where this gets used, I wonder why
>>>>> you want a pair of one-by-one functions, rather than a copy-all one.
>>>>> This then wouldn't require exposure of the functions you touch here.
>>>> Well, provided there is no such function in existence today it was
>>>> just easier to use what's already available. I still wouldn't want to
>>>> implement a one-shot function like that because this same code-path is
>>>> shared by the save-restore operations on the toolstack side, so at
>>>> least I have a reasonable assumption that it won't break on me in the
>>>> future.
>>>
>>> In particular, a number of the set operations are distinctly
>>> non-trivial.
>>
>> How is trivial or not related to there being one function doing
>> the looping wanted here vs the looping being done by the caller
>> around the two per-entity calls?
> 
> I don't really get why would it matter where the looping is being
> done? Even if I were to add a single function to do this, it would do
> the same looping and just call the now internally kept get/set params
> functions.

The difference (to me) is what level of control gets exposed outside
of the file. For example I also dislike external code doing this
somewhat odd (but necessary as per your communication with Andrew)
checking against zero values. Such are implementation details which
would better not be scatter around.

Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.