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

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



>>> On 03.05.13 at 16:11, Olaf Hering <olaf@xxxxxxxxx> wrote:
> On Fri, May 03, Jan Beulich wrote:
> 
>> >>> On 03.05.13 at 14:57, Olaf Hering <olaf@xxxxxxxxx> wrote:
>> > @@ -1682,14 +1682,25 @@ 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);
>> > +        switch ( ret )
>> > +        {
>> > +            case -EAGAIN:
>> > +                result = X86EMUL_RETRY;
>> > +                break;
>> > +            case 0:
>> > +                result = X86EMUL_UNHANDLEABLE;
>> > +                break;
>> > +            default:
>> > +                break;
>> 
>> As you had already noticed the hard way - case 0 and default of
>> course need to be switched (0 -> okay, anything else ->
>> unhandleable).
> 
> I dont follow.
> ret == 1 looks like success to me, ret == 0 some sort of failure.

Let me check again... Positive values (or 1 in particular) mean
"handled", 0 means not handled, negative values are errors.

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