From patchwork Thu Mar 3 21:55:22 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Feiner X-Patchwork-Id: 8496461 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id D49289F38C for ; Thu, 3 Mar 2016 21:55:31 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0375620351 for ; Thu, 3 Mar 2016 21:55:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 2799320373 for ; Thu, 3 Mar 2016 21:55:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757611AbcCCVz0 (ORCPT ); Thu, 3 Mar 2016 16:55:26 -0500 Received: from mail-pa0-f43.google.com ([209.85.220.43]:35304 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755773AbcCCVz0 (ORCPT ); Thu, 3 Mar 2016 16:55:26 -0500 Received: by mail-pa0-f43.google.com with SMTP id bj10so22006668pad.2 for ; Thu, 03 Mar 2016 13:55:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=niJJL/wuGlwn1yABnyR4/Tpuhe/99qLm1eTHoSg//6I=; b=CO91Rd2jYOBBTXfRHTw8v/ZmyFzbrHFo+z5SOSKY1c9Xf1VFWU2tFdgcxjcvvUrdpP +f7mpaO2Qg31TN+l4zdu0URrDOj05rS+7LhRcsYrrdW57t4AyeNtPg1sJb3JjaGE4uHn hlb9KDyOG7O4dnu7NuwWsLfWZR/9spEIxVtnmOECW+WFfOn2QM5MQc9ZTWRDWGVYE3lo dKQt9M0xnFiCpZPvXp5b12JmAeERLy+iugAfcMVblKFDtttRmevsZctLi8gZfX6XpV3g f0FTR59QLOe2nSuExJm+HGK4PaggHcPpgqFVJnGvyN0R4AdVicjh1DUuDE1GIHub0GNL fbGA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=niJJL/wuGlwn1yABnyR4/Tpuhe/99qLm1eTHoSg//6I=; b=jUD9PG6Ebb/EoR/rvvEAvjERNf/sg2Vch9bS4AuP7D9N0qAU87HvonXlcrU0VHT/I9 g6n4xvUKILrkqe3tggRF3OsBwF8uDcnO4/KbNFHEVpL98h8rPaLTrWCVqAaM1M3Nb2t1 Go9Zecyocue7O58R/s9Egdw4pWWsXVPFIcv91XbfrZg4EtsUukcxkJt9sY2MIZsJ8TE1 5AB5OBNtqOyrr0ztYVkSIA6I6jsRuC5+UHxgltA3PUOvpl8iExG79fLU9VLEiksGSAgC kDLZWmMhyzmEI87Y7vVDpmX4ujUWoiSTRv0JCy5MoaS0RqAVIm7cBCQJThgNyXoEJ7Ry yYxA== X-Gm-Message-State: AD7BkJLzJzWSTZJMXwqrnwnQ2q6wxlTVKoV1XbjGPuicoUcoKtR1+Lr3TYCFHqbS4IutgGol X-Received: by 10.66.160.7 with SMTP id xg7mr6960023pab.10.1457042125168; Thu, 03 Mar 2016 13:55:25 -0800 (PST) Received: from localhost ([2620:0:1009:3:48a8:c9fe:5013:71d]) by smtp.gmail.com with ESMTPSA id ti6sm403465pab.4.2016.03.03.13.55.24 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 03 Mar 2016 13:55:24 -0800 (PST) From: Peter Feiner To: kvm@vger.kernel.org, drjones@redhat.com, pbonzini@redhat.com Cc: pfeiner@google.com Subject: [PATCH kvm-unit-tests] build: enable -Werror Date: Thu, 3 Mar 2016 13:55:22 -0800 Message-Id: <1457042122-30727-1-git-send-email-pfeiner@google.com> X-Mailer: git-send-email 2.7.0.rc3.207.g0ac5344 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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(-) diff --git a/Makefile b/Makefile index 72e6711..09999c6 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,7 @@ cc-option = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) CFLAGS += -g -CFLAGS += $(autodepend-flags) -Wall +CFLAGS += $(autodepend-flags) -Wall -Werror CFLAGS += $(call cc-option, -fomit-frame-pointer, "") CFLAGS += $(call cc-option, -fno-stack-protector, "") CFLAGS += $(call cc-option, -fno-stack-protector-all, "") diff --git a/x86/hypercall.c b/x86/hypercall.c index 3ac5ff9..75179a1 100644 --- a/x86/hypercall.c +++ b/x86/hypercall.c @@ -34,7 +34,6 @@ asm ("gp_tss: \n\t" "iretq\n\t" "jmp gp_tss\n\t" ); -#endif static inline int test_edge(void) @@ -47,6 +46,7 @@ test_edge(void) printf("Return from int 13, test_rip = %lx\n", test_rip); return test_rip == (1ul << 47); } +#endif int main(int ac, char **av) { diff --git a/x86/vmx_tests.c b/x86/vmx_tests.c index d851692..b7dfcbb 100644 --- a/x86/vmx_tests.c +++ b/x86/vmx_tests.c @@ -1174,12 +1174,10 @@ static int vpid_exit_handler() u64 guest_rip; ulong reason; u32 insn_len; - u32 exit_qual; guest_rip = vmcs_read(GUEST_RIP); reason = vmcs_read(EXI_REASON) & 0xff; insn_len = vmcs_read(EXI_INST_LEN); - exit_qual = vmcs_read(EXI_QUALIFICATION); switch (reason) { case VMX_VMCALL: @@ -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 */); dr7 = 0x408;