From patchwork Thu May 2 22:13:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tamas K Lengyel X-Patchwork-Id: 10927681 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 981411395 for ; Thu, 2 May 2019 22:15:30 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E86726224 for ; Thu, 2 May 2019 22:15:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6BE372654B; Thu, 2 May 2019 22:15:30 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 9F2BD26224 for ; Thu, 2 May 2019 22:15:27 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hMJxw-0006XH-IB; Thu, 02 May 2019 22:14:08 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hMJxv-0006Ww-4L for xen-devel@lists.xenproject.org; Thu, 02 May 2019 22:14:07 +0000 X-Inumbo-ID: 99557461-6d27-11e9-843c-bc764e045a96 Received: from mail-io1-f68.google.com (unknown [209.85.166.68]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id 99557461-6d27-11e9-843c-bc764e045a96; Thu, 02 May 2019 22:14:05 +0000 (UTC) Received: by mail-io1-f68.google.com with SMTP id h26so3647629ioj.1 for ; Thu, 02 May 2019 15:14:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=kfZC3ZKi78+hYcm1QckJJrxmSZuf6YhT3xoFtXtED9Y=; b=imhIhjp4DN0jkWlnoODT5fnC/UMGM/Qici1mPShIJGzI9Z7gJw+ymdJSryhwAkEcq3 Bw5G09jThcB1FeNZibeihiLdLDC95oZc7zw6VTsa6MJluHd9pKamtvcfcvRLHN8X8c45 jTloZ5EeVJ+Ka5YxbGHXAXN13M6EQI6wIBm9mB/NmHBU1p54i651w5pjvsBC/si4vCXP s02DejBQVSO7ppQVueS5JW9LMVa6DCBJkYqeZckTGmZtX0xJivDA3FAve3+KkFNwALSB nfYwrETySzpvAlGPPdM2xpOXO2zRI7MnBrffsBQr3BFHi3GPvIJ+hrT3vNeNvplh7nMq 4p+w== X-Gm-Message-State: APjAAAWGIFfZclQmzJMFAs/J5kJPFpja6h95g+XfM+63c+4o2gvv2Irp jmAKv6TLIsDKhzTNwme+0AkL+Tpl X-Google-Smtp-Source: APXvYqyqulK4xg9zaL3xQTogVmrY0jxGo0U7NB/hLt/eghkLY/b0lzSN+L8gAZoOxYk2mXPurluokQ== X-Received: by 2002:a6b:6909:: with SMTP id e9mr4438521ioc.208.1556835244993; Thu, 02 May 2019 15:14:04 -0700 (PDT) Received: from localhost.localdomain (c-71-205-12-124.hsd1.co.comcast.net. [71.205.12.124]) by smtp.gmail.com with ESMTPSA id n199sm239715itn.34.2019.05.02.15.14.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 May 2019 15:14:03 -0700 (PDT) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Thu, 2 May 2019 16:13:44 -0600 Message-Id: <20190502221345.18459-3-tamas@tklengyel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190502221345.18459-1-tamas@tklengyel.com> References: <20190502221345.18459-1-tamas@tklengyel.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v4 3/4] x86/mem_sharing: enable mem_share audit mode only in debug builds X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Andrew Cooper , Tamas K Lengyel , Wei Liu , Jan Beulich , Roger Pau Monne Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Improves performance for release builds. Signed-off-by: Tamas K Lengyel Cc: Jan Beulich Cc: Andrew Cooper Cc: Wei Liu Cc: Roger Pau Monne --- xen/include/asm-x86/mem_sharing.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xen/include/asm-x86/mem_sharing.h b/xen/include/asm-x86/mem_sharing.h index 0e77b7d935..bb19b7534f 100644 --- a/xen/include/asm-x86/mem_sharing.h +++ b/xen/include/asm-x86/mem_sharing.h @@ -25,7 +25,11 @@ #include /* Auditing of memory sharing code? */ +#ifndef NDEBUG #define MEM_SHARING_AUDIT 1 +#else +#define MEM_SHARING_AUDIT 0 +#endif typedef uint64_t shr_handle_t;