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

Re: [Xen-devel] [PATCH 1/2] VMX: also use proper instruction mnemonic for VMREAD



>>> On 16.09.13 at 13:53, Andrew Cooper <andrew.cooper3@xxxxxxxxxx> wrote:
> On 16/09/2013 12:06, Jan Beulich wrote:
>>      case x86_seg_ldtr:
>> -        reg->sel   = __vmread(GUEST_LDTR_SELECTOR);
>> -        reg->limit = __vmread(GUEST_LDTR_LIMIT);
>> -        reg->base  = __vmread(GUEST_LDTR_BASE);
>> -        attr       = __vmread(GUEST_LDTR_AR_BYTES);
>> +        __vmread(GUEST_LDTR_SELECTOR, &sel);
>> +        __vmread(GUEST_LDTR_LIMIT,    &limit);
>> +        __vmread(GUEST_LDTR_BASE,     &reg->base);
>> +        __vmread(GUEST_LDTR_AR_BYTES, &attr);
>>          break;
>>      default:
>>          BUG();
>> +        return;
> 
> This return is dead code.

But the compiler doesn't know, and hence whines about possibly
uninitialized variables if you leave this out.

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