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

Re: [Xen-devel] [PATCH] xen: handle paged gfn in wrmsr_hypervisor_regs



>>> On 03.05.13 at 15:40, Olaf Hering <olaf@xxxxxxxxx> wrote:
> On Fri, May 03, Olaf Hering wrote:
> 
>> On Fri, May 03, Jan Beulich wrote:
>> 
>> > >>> On 02.05.13 at 18:24, Olaf Hering <olaf@xxxxxxxxx> wrote:
>> > > @@ -1682,14 +1682,15 @@ static int svm_msr_write_intercept(unsig
>> > >          if ( wrmsr_viridian_regs(msr, msr_content) )
>> > >              break;
>> > >  
>> > > -        wrmsr_hypervisor_regs(msr, msr_content);
>> > > +        ret = wrmsr_hypervisor_regs(msr, msr_content);
>> > > +        retry = ret == -EAGAIN;
>> > 
>> > If you add error handling, don't constrain this to a single error code
>> > please. For the case here, the easiest would appear to be a switch
>> > converting to X86EMUL_OKAY, X86EMUL_RETRY, or
>> > X86EMUL_UNHANDLEABLE. If the function had ways to fail before,
>> > it would have been a bug anyway to not check the return value.
>> 
>> I just sent v2 of this patch.
> 
> My change v2 causes a boot failure, the return value 0 is not handled
> correctly.
> Did you really mean to translate ret == 0 to X86EMUL_UNHANDLEABLE?

Of course I didn't - I merely enumerated the values that I'd expect
to result, with no meaning implied from their ordering.

Jan


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


 


Rackspace

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