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

Re: [Xen-devel] [PATCH] nested vmx: fix instruction decode segment limit check



>>> On 24.04.12 at 19:24, Tim Deegan <tim@xxxxxxx> wrote:
>> @@ -342,6 +342,11 @@ static int decode_vmx_inst(struct cpu_us
>>          hvm_get_segment_register(v, sreg_to_index[info.fields.segment], 
>> &seg);
>>          seg_base = seg.base;
>>  
>> +        if ( hvm_long_mode_enabled(v) )
>> +            hvm_get_segment_register(v, x86_seg_cs, &cs);
>> +        else
>> +            memset(&cs, 0, sizeof(cs));
>> +
> 
> I found this a bit confusing - maybe you could extract the attr.fields.l
> bit into a bool here instead of zeroing the struct and extracting it later?

Okay, let me re-do that, and fold in some other adjustments I thought
of making after having sent out the patch.

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