[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: Jan Beulich <JBeulich@xxxxxxxx>, George Dunlap <George.Dunlap@xxxxxxxxxxxxx>
  • From: Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>
  • Date: Mon, 22 Jul 2019 12:39:32 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=bitdefender.com;dmarc=pass action=none header.from=bitdefender.com;dkim=pass header.d=bitdefender.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=NyISo+wQwKp11fQT0NnfFLEVSjLvKRVOisYcoQY46Ss=; b=aIMpD+3bbo1vBFyA6isPKqGUK6k/xRs3fQSVY3DiVWAiw9p3r6YZzbQzolv9ajvq6/7jjkTKRLe7ZuNgESr998GFSjoVZThQUdJQqCL0Zobrxs/KB/vfsCRz7vcrEbGeKpP/jCoX1GXdkITyPyCLCTqZdD831KHMrPqQfa1UUBW+CSyEHGRVDmyV+kvSqSh+1JjSZhfNhYb4XDPWGp7OWOc3CN00n0oGdZTLx0aAudUgXdLMyA71ZCYtebKcPQ3iZKhmsSKs5ngMD9sQYV9haTSw0JmD89LqakAKrcjZlCDioBdWNswvYEB6jeA8rtx5r/d+nOTaVMehQED67jCP6A==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RpBVSeI/GwZGZxgHCo8c87SufmjUSW3vVeMjrEHQPnjoX0QbH5pYxEdlXLv5dnmyZ3jwpEriinXOwcMUVc9X3LCIzCwUS/32O2iMBD2k5hwQ+bQ4qS1q6nCM+I20zKr2dWE7Igg8/27sJF7x6YiN9TNGmM6J/nb02/QY2SU6H4VXPGo8hHkZXWABUYjnJtWZTbguHEbWBSd6tB6Ef+AduhgvvHCzmouf8wiOBra6Uhbj9xJeiCSYk5kVM25I93XLqzLTgyDl6Cl9i+FVP1hbciW658QmssChhqzsGGfL63SDmjI51q5kX7W6KgRNP6yH9Jt9TFPvjgkP1uh7wlZWVA==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=aisaila@xxxxxxxxxxxxxxx;
  • Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>, WeiLiu <wl@xxxxxxx>, Konrad Rzeszutek Wilk <konrad.wilk@xxxxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Ian Jackson <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:39:41 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVHR91gFCC2wnfik6rp2c4QxPTkqaQFCmAgEbGmYA=
  • Thread-topic: [PATCH v3] x86/altp2m: Add a new hypercall to get the active altp2m index

Ping,

Any reviews on this patch are appreciated.

Regards,
Alex

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