From patchwork Mon Jan 18 18:40:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Cooper X-Patchwork-Id: 8057031 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 7A5FFBEEE5 for ; Mon, 18 Jan 2016 18:43:14 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A520720522 for ; Mon, 18 Jan 2016 18:43:13 +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 C61FD2051A for ; Mon, 18 Jan 2016 18:43:12 +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 1aLEio-0005Gs-MN; Mon, 18 Jan 2016 18:40:10 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aLEim-0005Gn-S8 for xen-devel@lists.xen.org; Mon, 18 Jan 2016 18:40:08 +0000 Received: from [85.158.137.68] by server-13.bemta-3.messagelabs.com id 30/D3-31443-8813D965; Mon, 18 Jan 2016 18:40:08 +0000 X-Env-Sender: prvs=818908af8=Andrew.Cooper3@citrix.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1453142406!6961471!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 35407 invoked from network); 18 Jan 2016 18:40:07 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 18 Jan 2016 18:40:07 -0000 X-IronPort-AV: E=Sophos;i="5.22,313,1449532800"; d="scan'208";a="325951309" From: Andrew Cooper To: Xen-devel Date: Mon, 18 Jan 2016 18:40:04 +0000 Message-ID: <1453142404-8819-1-git-send-email-andrew.cooper3@citrix.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 X-DLP: MIA2 Cc: Andrew Cooper , Doug Goldstein , Jan Beulich Subject: [Xen-devel] [PATCH] x86: Convert shadow-paging to Kconfig 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: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, 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 Signed-off-by: Andrew Cooper Reviewed-by: Doug Goldstein --- CC: Jan Beulich CC: Doug Goldstein --- xen/arch/x86/Kconfig | 14 ++++++++++++++ xen/arch/x86/Rules.mk | 4 ---- xen/arch/x86/mm/shadow/Makefile | 2 +- 3 files changed, 15 insertions(+), 5 deletions(-) diff --git a/xen/arch/x86/Kconfig b/xen/arch/x86/Kconfig index 4781b34..9869630 100644 --- a/xen/arch/x86/Kconfig +++ b/xen/arch/x86/Kconfig @@ -27,6 +27,20 @@ menu "Architecture Features" source "arch/Kconfig" +config SHADOW_PAGING + bool "Shadow Paging" + default y + ---help--- + Shadow paging is a software alternative to hardware paging support + (Intel EPT, AMD NPT) for use with HVM guests. + + It is required to run HVM guests for first-generation hardware + virtualisation (Intel VT-x, AMD SVM) which did not include hardware + paging support. Under a small number of specific workloads, shadow + paging may also be deliberately used as a performance improvement. + + If unsure, say Y. + config BIGMEM bool "big memory support" default n diff --git a/xen/arch/x86/Rules.mk b/xen/arch/x86/Rules.mk index a108d24..a1cdae0 100644 --- a/xen/arch/x86/Rules.mk +++ b/xen/arch/x86/Rules.mk @@ -22,13 +22,9 @@ $(call as-insn-check,CFLAGS,CC,".equ \"x\"$$(comma)1", \ -U__OBJECT_LABEL__ -DHAVE_GAS_QUOTED_SYM \ '-D__OBJECT_LABEL__=$(subst $(BASEDIR)/,,$(CURDIR))/$$@') -shadow-paging ?= y - CFLAGS += -mno-red-zone -mno-sse -fpic CFLAGS += -fno-asynchronous-unwind-tables # -fvisibility=hidden reduces -fpic cost, if it's available ifneq ($(call cc-option,$(CC),-fvisibility=hidden,n),n) CFLAGS += -DGCC_HAS_VISIBILITY_ATTRIBUTE endif - -CFLAGS-$(shadow-paging) += -DCONFIG_SHADOW_PAGING diff --git a/xen/arch/x86/mm/shadow/Makefile b/xen/arch/x86/mm/shadow/Makefile index a07bc0c..df194ad 100644 --- a/xen/arch/x86/mm/shadow/Makefile +++ b/xen/arch/x86/mm/shadow/Makefile @@ -1,4 +1,4 @@ -ifeq ($(shadow-paging),y) +ifdef CONFIG_SHADOW_PAGING obj-y += common.o guest_2.o guest_3.o guest_4.o else obj-y += none.o