From patchwork Wed Mar 30 15:06:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Vivier X-Patchwork-Id: 8697881 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 856AAC0554 for ; Wed, 30 Mar 2016 15:06:34 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4E7320389 for ; Wed, 30 Mar 2016 15:06:33 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DC9E020397 for ; Wed, 30 Mar 2016 15:06:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752786AbcC3PG2 (ORCPT ); Wed, 30 Mar 2016 11:06:28 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46413 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751379AbcC3PG1 (ORCPT ); Wed, 30 Mar 2016 11:06:27 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 0FBC1C0467F1; Wed, 30 Mar 2016 15:06:27 +0000 (UTC) Received: from thinkpad.redhat.com (ovpn-112-32.ams2.redhat.com [10.36.112.32]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2UF6NEh017322; Wed, 30 Mar 2016 11:06:24 -0400 From: Laurent Vivier To: kvm@vger.kernel.org, kvm-ppc@vger.kernel.org Cc: drjones@redhat.com, thuth@redhat.com, dgibson@redhat.com, pbonzini@redhat.com, Laurent Vivier Subject: [kvm-unit-tests PATCH]] powerpc: display alignment exception in verbose mode only Date: Wed, 30 Mar 2016 17:06:21 +0200 Message-Id: <1459350381-23387-1-git-send-email-lvivier@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 In the emulator test, the illegal exception is displayed only in verbose mode, do the same thing for the alignment exception. Signed-off-by: Laurent Vivier Reviewed-by: Thomas Huth --- powerpc/emulator.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/powerpc/emulator.c b/powerpc/emulator.c index ef27f15..3696d83 100644 --- a/powerpc/emulator.c +++ b/powerpc/emulator.c @@ -35,8 +35,10 @@ static void alignment_handler(struct pt_regs *regs, void *opaque) { int *data = opaque; - printf("Detected alignment exception 0x%016lx: %08x\n", - regs->nip, *(uint32_t*)regs->nip); + if (verbose) { + printf("Detected alignment exception 0x%016lx: %08x\n", + regs->nip, *(uint32_t*)regs->nip); + } *data = 1;