From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Huth Subject: Re: [PATCH kvm-unit-tests] build: enable -Werror Date: Fri, 4 Mar 2016 09:47:53 +0100 Message-ID: <56D94BB9.3030705@redhat.com> References: <1457042122-30727-1-git-send-email-pfeiner@google.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: Peter Feiner , kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com Return-path: Received: from mx1.redhat.com ([209.132.183.28]:48672 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755510AbcCDIr5 (ORCPT ); Fri, 4 Mar 2016 03:47:57 -0500 In-Reply-To: <1457042122-30727-1-git-send-email-pfeiner@google.com> Sender: kvm-owner@vger.kernel.org List-ID: On 03.03.2016 22:55, Peter Feiner wrote: > Tested with arch=i386, x86_64, ppc64, and arm64. > > Signed-off-by: Peter Feiner > --- > Makefile | 2 +- > x86/hypercall.c | 2 +- > x86/vmx_tests.c | 4 ++-- > 3 files changed, 4 insertions(+), 4 deletions(-) ... > @@ -1392,6 +1390,7 @@ static void dbgctls_main(void) > asm volatile("mov %%dr7,%0" : "=r" (dr7)); > debugctl = rdmsr(MSR_IA32_DEBUGCTLMSR); > /* Commented out: KVM does not support DEBUGCTL so far */ > + assert(debugctl == debugctl); > report("Load debug controls", dr7 == 0x404 /* && debugctl == 0x2 */); > > dr7 = 0x408; > @@ -1413,6 +1412,7 @@ static void dbgctls_main(void) > asm volatile("mov %%dr7,%0" : "=r" (dr7)); > debugctl = rdmsr(MSR_IA32_DEBUGCTLMSR); > /* Commented out: KVM does not support DEBUGCTL so far */ > + assert(debugctl == debugctl); > report("Guest=host debug controls", dr7 == 0x402 /* && debugctl == 0x1 */); Now these assert()s are really ugly. Wouldn't it be better do comment out the "debugctl = rdmsr(MSR_IA32_DEBUGCTLMSR);" line instead? Thomas