From patchwork Tue Feb 23 13:12:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Douglas Goldstein X-Patchwork-Id: 8391411 Return-Path: X-Original-To: patchwork-xen-devel@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 0526CC0553 for ; Tue, 23 Feb 2016 13:15:52 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1AC9D20328 for ; Tue, 23 Feb 2016 13:15:51 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E88D7202DD for ; Tue, 23 Feb 2016 13:15:49 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYClt-0008E4-TJ; Tue, 23 Feb 2016 13:12:57 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aYCls-0008Dz-LM for xen-devel@lists.xen.org; Tue, 23 Feb 2016 13:12:56 +0000 Received: from [193.109.254.147] by server-1.bemta-14.messagelabs.com id 89/FF-28791-7DA5CC65; Tue, 23 Feb 2016 13:12:55 +0000 X-Env-Sender: cardoe@cardoe.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1456233174!24058722!1 X-Originating-IP: [209.85.192.52] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 50861 invoked from network); 23 Feb 2016 13:12:54 -0000 Received: from mail-qg0-f52.google.com (HELO mail-qg0-f52.google.com) (209.85.192.52) by server-2.tower-27.messagelabs.com with AES128-GCM-SHA256 encrypted SMTP; 23 Feb 2016 13:12:54 -0000 Received: by mail-qg0-f52.google.com with SMTP id b35so135111998qge.0 for ; Tue, 23 Feb 2016 05:12:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cardoe.com; s=google; h=from:to:cc:subject:date:message-id; bh=Nu3VJQSQoOIv+47Ayn5Pga3SPiOGAyJyC1XbMXA2YDg=; b=Fa2AAJ0cO8gp+mAAuxxd9Z5/CyfEbH0+NEHtFs6uCLpF6xFzvkS8RQpJWvy+U8ZBlC uv08N9K2BxRacCreNEgrRJe3TRMKG/F9SeH4h9pXzwu3QGaVPEGZbh8/sMaHYEOB6xPO zv7G+G8YiE67R4V9q450zYP7AcieJBHO90nJE= 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=Nu3VJQSQoOIv+47Ayn5Pga3SPiOGAyJyC1XbMXA2YDg=; b=GB9IjXFS3BvpOgfzbJQ2p2854GMjhbN9JVuA+eCGDgUmfQnuHwhyv+cL71/5GV8P+2 cigggSNVWir6T2KpwM6FFkF64me4VjRcPgoVgAA5EHWSI+XcQV2Fh/jLk2OH5I17SUhO 0r4IhdWYNReMuhoWlHrxjqI0392kLLPaCNk1wpq4SfYqsDNfV76iRC7tb5CtYPcZ0wJD d7+zPGt3q5/T+RtUm7EDcdevgBCWd2OwVQ0797yiy4WOEFHETjGkcBbQv+A8AfK/6yYr suXaXioP/GXSd9QVXwiFe94vVbJ7G9TQ5tbKdsrT2T6eY4pTSp19o/th0LpsCqGE1mrr NTkA== X-Gm-Message-State: AG10YOSTwBP1B7HElC4L29IqOGTidhCCKbrML2W8oZ01ZaITOA0uf/3DlNpVs8nIZpV+Uw== X-Received: by 10.140.42.137 with SMTP id c9mr9289448qga.5.1456233173928; Tue, 23 Feb 2016 05:12:53 -0800 (PST) Received: from swanson.lan (c-68-46-196-185.hsd1.al.comcast.net. [68.46.196.185]) by smtp.gmail.com with ESMTPSA id a129sm12114746qkb.45.2016.02.23.05.12.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 23 Feb 2016 05:12:52 -0800 (PST) From: Doug Goldstein To: xen-devel@lists.xen.org Date: Tue, 23 Feb 2016 07:12:43 -0600 Message-Id: <1456233163-20862-1-git-send-email-cardoe@cardoe.com> X-Mailer: git-send-email 2.4.10 Cc: Keir Fraser , Doug Goldstein , Jan Beulich , Andrew Cooper Subject: [Xen-devel] [PATCH v2] xenoprof: drop necessary macro X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, 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 This macro doesn't really provide a benefit. When support is added the implementer can implement this how it needs to be and not conform to the macro. Additionally this change limits the output of the warning to just once instead of nrpages worth. While editing this area I dropped trailing whitespace. Signed-off-by: Doug Goldstein Reviewed-by: Andrew Cooper --- CC: Keir Fraser CC: Jan Beulich CC: Andrew Cooper changes since v1: - add commit message about whitespace change - only print warning once - shorten warning to be fully greppable --- xen/common/xenoprof.c | 7 +++++-- xen/include/asm-x86/xenoprof.h | 8 -------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/xen/common/xenoprof.c b/xen/common/xenoprof.c index 7a3fc86..a5fe620 100644 --- a/xen/common/xenoprof.c +++ b/xen/common/xenoprof.c @@ -177,11 +177,14 @@ xenoprof_shared_gmfn_with_guest( struct domain *d, unsigned long maddr, unsigned long gmaddr, int npages) { int i; - + for ( i = 0; i < npages; i++, maddr += PAGE_SIZE, gmaddr += PAGE_SIZE ) { BUG_ON(page_get_owner(maddr_to_page(maddr)) != d); - xenoprof_shared_gmfn(d, gmaddr, maddr); + if ( i == 0 ) + gdprintk(XENLOG_WARNING, + "xenoprof unsupported with autotranslated guests\n"); + } } diff --git a/xen/include/asm-x86/xenoprof.h b/xen/include/asm-x86/xenoprof.h index dca4223..3a1b001 100644 --- a/xen/include/asm-x86/xenoprof.h +++ b/xen/include/asm-x86/xenoprof.h @@ -62,14 +62,6 @@ static inline int xenoprof_backtrace_supported(void) void xenoprof_backtrace(struct vcpu *, const struct cpu_user_regs *, unsigned long depth, int mode); -#define xenoprof_shared_gmfn(d, gmaddr, maddr) \ - do { \ - (void)(maddr); \ - gdprintk(XENLOG_WARNING, \ - "xenoprof/x86 with autotranslated mode enabled" \ - "isn't supported yet\n"); \ - } while (0) - int passive_domain_do_rdmsr(unsigned int msr, uint64_t *msr_content); int passive_domain_do_wrmsr(unsigned int msr, uint64_t msr_content); void passive_domain_destroy(struct vcpu *v);