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

Re: [Xen-devel] [PATCH v3 06/38] arm/p2m: Add HVMOP_altp2m_get_domain_state



Hi Julien,

On 09/01/2016 07:06 PM, Julien Grall wrote:
> Hello Sergej,
> 
> On 16/08/16 23:16, Sergej Proskurin wrote:
>> This commit adopts the x86 HVMOP_altp2m_get_domain_state implementation.
>>
>> Signed-off-by: Sergej Proskurin <proskurin@xxxxxxxxxxxxx>
>> ---
>> Cc: Stefano Stabellini <sstabellini@xxxxxxxxxx>
>> Cc: Julien Grall <julien.grall@xxxxxxx>
>> ---
>> v3: Removed the "altp2m_enabled" check in HVMOP_altp2m_get_domain_state
>>     case as it has been moved in front of the switch statement in
>>     "do_altp2m_op".
>>
>>     Removed the macro "altp2m_enabled". Instead, check directly for the
>>     HVM_PARAM_ALTP2M param in d->arch.hvm_domain.
>> ---
>>  xen/arch/arm/hvm.c | 5 +++--
>>  1 file changed, 3 insertions(+), 2 deletions(-)
>>
>> diff --git a/xen/arch/arm/hvm.c b/xen/arch/arm/hvm.c
>> index ce6a436..180154e 100644
>> --- a/xen/arch/arm/hvm.c
>> +++ b/xen/arch/arm/hvm.c
>> @@ -66,7 +66,7 @@ static int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void)
>> arg)
>>          goto out;
>>      }
>>
>> -    if ( !(d)->arch.hvm_domain.params[HVM_PARAM_ALTP2M] )
>> +    if ( !d->arch.hvm_domain.params[HVM_PARAM_ALTP2M] )
> 
> Spurious change. This should be merged in patch #4.
> 

I will change that, thanks.

>>      {
>>          rc = -EINVAL;
>>          goto out;
>> @@ -78,7 +78,8 @@ static int do_altp2m_op(XEN_GUEST_HANDLE_PARAM(void)
>> arg)
>>      switch ( a.cmd )
>>      {
>>      case HVMOP_altp2m_get_domain_state:
>> -        rc = -EOPNOTSUPP;
>> +        a.u.domain_state.state = altp2m_active(d);
>> +        rc = __copy_to_guest(arg, &a, 1) ? -EFAULT : 0;
>>          break;
>>
>>      case HVMOP_altp2m_set_domain_state:
>>
> 
> Regards,
> 

Best regards,
~Sergej

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel

 


Rackspace

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