From mboxrd@z Thu Jan 1 00:00:00 1970 From: Bandan Das Subject: Re: [PATCH] kvm: nVMX: Track active shadow VMCSs Date: Sat, 16 Jul 2016 15:48:39 -0400 Message-ID: References: <20160715173923.GA12702@jmattson.sea.corp.google.com> <78dd4e63-ca2e-4317-0d51-d1fa08958edc@redhat.com> Mime-Version: 1.0 Content-Type: text/plain Cc: Jim Mattson , kvm@vger.kernel.org, dmatlack@google.com, pfeiner@google.com To: Paolo Bonzini Return-path: Received: from mx1.redhat.com ([209.132.183.28]:55377 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751687AbcGPTsl (ORCPT ); Sat, 16 Jul 2016 15:48:41 -0400 In-Reply-To: <78dd4e63-ca2e-4317-0d51-d1fa08958edc@redhat.com> (Paolo Bonzini's message of "Sat, 16 Jul 2016 16:50:22 +0200") Sender: kvm-owner@vger.kernel.org List-ID: Hi Paolo, Paolo Bonzini writes: > On 16/07/2016 02:50, Bandan Das wrote: >>> > + int ret = setup_shadow_vmcs(vmx); >>> > + if (ret) >>> > + return ret; >> Nit: >> if (setup_shadow_vmcs(vmx)) >> return -ENOMEM; > > Nope, -errno is a much better return value than bool, because you never > know if bool means success or failure. Jim's patch got it right. :) This doesn't seem to be ambiguous in the context of setup_shadow_vmcs since it has one error path and it always returns 0 on success. Just a nit to get rid of that local variable... > Paolo > -- > To unsubscribe from this list: send the line "unsubscribe kvm" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html