From: Tim Deegan Subject: Re: [PATCH 01/13] Nested Virtualization: tools Date: Tue, 16 Nov 2010 11:37:06 +0000 Message-ID: <20101116113706.GA24801@whitby.uk.xensource.com> References: <201011121940.26108.Christoph.Egger@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Return-path: Content-Disposition: inline In-Reply-To: <201011121940.26108.Christoph.Egger@amd.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Christoph Egger Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Hi, At 18:40 +0000 on 12 Nov (1289587225), Christoph Egger wrote: > +#define SVM_FEATURE_NPT 0x00000001 > +#define SVM_FEATURE_LBRV 0x00000002 > +#define SVM_FEATURE_SVML 0x00000004 > +#define SVM_FEATURE_NRIPS 0x00000008 > +#define SVM_FEATURE_PAUSEFILTER 0x00000400 > + > + /* Only passthrough SVM features which are implemented */ > + edx = 0; > + if (regs[3] & SVM_FEATURE_NPT) > + edx |= SVM_FEATURE_NPT; > + if (regs[3] & SVM_FEATURE_LBRV) > + edx |= SVM_FEATURE_LBRV; > + if (regs[3] & SVM_FEATURE_NRIPS) > + edx |= SVM_FEATURE_NRIPS; > + if (regs[3] & SVM_FEATURE_PAUSEFILTER) > + edx |= SVM_FEATURE_PAUSEFILTER; > + > + regs[3] = edx; Minor niggle - why isn't this just a single &= operation? Tim. -- Tim Deegan Principal Software Engineer, Xen Platform Team Citrix Systems UK Ltd. (Company #02937203, SL9 0BG)