From patchwork Thu May 16 21:37:51 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: 10947043 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 9B50A1515 for ; Thu, 16 May 2019 21:39:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8ABE028B87 for ; Thu, 16 May 2019 21:39:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7D83528CE4; Thu, 16 May 2019 21:39:50 +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 730E228B87 for ; Thu, 16 May 2019 21:39:49 +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 1hRO4u-0000Dw-T1; Thu, 16 May 2019 21:38:16 +0000 Received: from us1-rack-dfw2.inumbo.com ([104.130.134.6]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hRO4t-0000Dq-GM for xen-devel@lists.xenproject.org; Thu, 16 May 2019 21:38:15 +0000 X-Inumbo-ID: e909b1c5-7822-11e9-8980-bc764e045a96 Received: from mail-it1-f194.google.com (unknown [209.85.166.194]) by us1-rack-dfw2.inumbo.com (Halon) with ESMTPS id e909b1c5-7822-11e9-8980-bc764e045a96; Thu, 16 May 2019 21:38:14 +0000 (UTC) Received: by mail-it1-f194.google.com with SMTP id g71so8723660ita.5 for ; Thu, 16 May 2019 14:38:14 -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=29kguvPIqID2QYtSaxUUcg0G2bgfjX7xxfa5dHdjQg4=; b=NzDCQI2+bRE6MNm3jeR5mpH7wjRwZd1wac0ib1PLjGNZb+fsQYk6Hj5joPrGOBweXD ShRAErnoyrwoFepUn9wYxnbnm51fxG72MjbyCgRif3NMX0cTpo4dxfz0vsAfgb/E3FkJ 1fsnTAaBLfiRSwFHAOb6Exu6eHsfGwWJl1L9CwSpfF+rQiRERfQjyePFvyYHIPJJx0ff QMCKNOrSoY6sRc03VOwtg8pM0F4L5gii91qlvn5GAmpqAUYChQucSbNHG+qv8TruIrJT UAHqAKmKcJdoPmWjwtZop52OTOs1T5obQfXRiQzTMRQWECWEc+dmRVKADI+mQalhkggP Gr6Q== X-Gm-Message-State: APjAAAX+hZMCPmE/OhuaFlCj50B813VhuFi70fDw6tQPe/QQwlVAKO5z bKE538ifbyPeOkd77dlYcCeeC6p+ X-Google-Smtp-Source: APXvYqzw4jWk8Q/Ok1a9cvBB/ke3ya1MIPLp8yBQr3u3B2LMkHlc9YLkDglMnR5zEPwo7vmJMuppVA== X-Received: by 2002:a02:3506:: with SMTP id k6mr3785074jaa.41.1558042693969; Thu, 16 May 2019 14:38:13 -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 j81sm2509701itj.26.2019.05.16.14.38.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 May 2019 14:38:13 -0700 (PDT) From: Tamas K Lengyel To: xen-devel@lists.xenproject.org Date: Thu, 16 May 2019 15:37:51 -0600 Message-Id: <20190516213752.1701-3-tamas@tklengyel.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190516213752.1701-1-tamas@tklengyel.com> References: <20190516213752.1701-1-tamas@tklengyel.com> MIME-Version: 1.0 Subject: [Xen-devel] [PATCH v5 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 9f9f7e93e3..afd0c17292 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;