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

Re: [Xen-devel] [PATCH v3] x86/altp2m: Add a new hypercall to get the active altp2m index


  • To: Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>
  • From: Jan Beulich <JBeulich@xxxxxxxx>
  • Date: Mon, 22 Jul 2019 12:56:45 +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=CY0dsQvK4O4yp29+23bWzTOUuTEoulpGRgzEL+DNZqY=; b=Vt97PHAm1oiKWMLALo508ws0u/9uqEGbtED+P3uh9ZIT1lQTGtfueiNrn7MjYdG3YXF55NkgylQw/xfhaBwavkJYVV8PnS4q2znR7XhJZuPXAc5c0XUFGLCCFqhX/24GcfsjwKoLmgNO5EDz/DoFV2Bmo5JvP99Qg+oXx9l9rZ52TB1nl/Z9NexcKHnzcJhNuF4CN7KFrP7zL7vFUB8jm3vcUfZy1Jl2cKmNtRRHDJmc9lKvBUQA8SvVJPBf3w/P0goArLwIxBmRHn66kv+BLKypdnc9m47oUe32XwcMrQ0hVBdpiGTPaNsCYzBRMUxo4ikVcnjQbKfXe6Z1Mh9Ofw==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=aocBBLELancMFkPw3jqPe6HgesB9aZuk6X46Sl1ldR7TFSAxWE+uXuhalFE3H/A/1oONeLdNGrwNxrv8it3bM6gnIkXR2xIrk8c7uphQD3zhSANHOS6jf6tATtK1hqlTXPornq3ZcEONw/pXUwG81mL4DMaQa0nedkuEFuWriRteb4x8ju/cMOF+qDNueTtfc+0bBBEtrk5Ewqs6qtfvhMzfXnJr68hUHjkw5cYjkuM5ii8Hjxw8VVU6owBtdiRGtQytO11ACyZVYklfBZwZ2cHwDvwu8/9OKxlZjb/jynTAzZyPGr7uo3rSpy9vTjVxHyiBTIMBLmTpEjuvSsF+qA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=JBeulich@xxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, KonradRzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, IanJackson <Ian.Jackson@xxxxxxxxxxxxx>, Tim Deegan <tim@xxxxxxx>, Julien Grall <julien.grall@xxxxxxx>, xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Delivery-date: Mon, 22 Jul 2019 12:59:56 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVHR91gFCC2wnfik6rp2c4QxPTkqaQFCmAgEbGmYCAAATLAA==
  • Thread-topic: [PATCH v3] x86/altp2m: Add a new hypercall to get the active altp2m index

On 22.07.2019 14:39, Alexandru Stefan ISAILA wrote:
> Ping,
> 
> Any reviews on this patch are appreciated.

FAOD I think I've provided all the feedback I have. The patch doesn't
seem to have a tool stack maintainer ack yet, and I think I had made
clear previously that I'm willing to look at changes to do_altp2m_op(),
but that I'm not willing to ack new additions to this interface as long
as it's (optionally or not) exposed to guests. It effectively being
part of altp2m, strictly speaking it shouldn't be a general x86
maintainer ack that's needed here anyway. As a hint - it certainly
would help if the function was moved suitably.

Jan

> On 07.06.2019 14:50, Jan Beulich wrote:
>>>>> On 07.06.19 at 12:55, <aisaila@xxxxxxxxxxxxxxx> wrote:
>>> @@ -4735,6 +4736,28 @@ static int do_altp2m_op(
>>>                        _gfn(a.u.change_gfn.old_gfn),
>>>                        _gfn(a.u.change_gfn.new_gfn));
>>>            break;
>>> +
>>> +    case HVMOP_altp2m_get_p2m_idx:
>>> +    {
>>> +        struct vcpu *v;
>>> +
>>> +        if ( !altp2m_active(d) )
>>> +        {
>>> +            rc = -EOPNOTSUPP;
>>> +            break;
>>> +        }
>>> +
>>> +        if ( (v = domain_vcpu(d, a.u.get_vcpu_p2m_idx.vcpu_id)) == NULL )
>>> +        {
>>> +            rc = -EINVAL;
>>> +            break;
>>> +        }
>>
>> The order of return values was the other way around before, but
>> I suppose this doesn't matter much?
>>
>>> +        a.u.get_vcpu_p2m_idx.altp2m_idx = altp2m_vcpu_idx(v);
>>> +        rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
>>
>> Just as remark for the future (I didn't pay attention before,
>> and the difference isn't overly meaningful for operations that
>> don't occur frequently) - __copy_field_to_guest() would be
>> less overhead here. Oh, right - this is once again not possible
>> because of arg (still) being a handle of void.
>>
>> Jan
>>
>>
>>
>> ________________________
>> This email was scanned by Bitdefender
>>

_______________________________________________
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®.