From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: [PATCH 1/2] VMX: also use proper instruction mnemonic for VMREAD Date: Mon, 16 Sep 2013 13:49:27 +0100 Message-ID: <5236FE57.9000001@citrix.com> References: <523701D802000078000F394E@nat28.tlf.novell.com> <5237024902000078000F3962@nat28.tlf.novell.com> <5236F130.8050701@citrix.com> <523716E702000078000F3A24@nat28.tlf.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta4.messagelabs.com ([85.158.143.247]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1VLYF9-0000Jy-DI for xen-devel@lists.xenproject.org; Mon, 16 Sep 2013 12:49:31 +0000 In-Reply-To: <523716E702000078000F3A24@nat28.tlf.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Jan Beulich Cc: xen-devel , Eddie Dong , Jun Nakajima List-Id: xen-devel@lists.xenproject.org On 16/09/2013 13:34, Jan Beulich wrote: >>>> On 16.09.13 at 13:53, Andrew Cooper 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, ®->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 > Ah ok, in which case it should be kept. ~Andrew