From patchwork Tue Dec 9 11:26:03 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoffer Dall X-Patchwork-Id: 42040 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f200.google.com (mail-lb0-f200.google.com [209.85.217.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id A114F244AC for ; Tue, 9 Dec 2014 11:36:55 +0000 (UTC) Received: by mail-lb0-f200.google.com with SMTP id f15sf316623lbj.7 for ; Tue, 09 Dec 2014 03:36:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=xmJf4/6zyoObUlYzht4uOJHCR3loG1tUEvA1v2y8uYg=; b=XTMMyhlLgZ/LlBuXNe8guA8cJEA5s18L7TSa21jGyc9IrF6IW1Mc49xkA7fcbCXE97 Ab08OtgnV18dRKVQOmIvyTDQNneVxuMc0uPFQ7NIgSc2iVEE2X33zYbOOfMZoDjB0KNR b/gJIvCTNtX5xmVsrQYbgCX7jefTRMapMfDI1gKc1z7BbdFbDPPpIN29rUbK4WbwzLVZ YSmhSvQ5cYH0tsPIfzn7cylzIEWJkOYBGG1goXwSV3COx3YYoqfgkHxvaYSmPPdSY2p2 RVDWYGqNtQ+T0JZNNLlAp1PXT60BLTHfAUSR37NFo7hwkjVuxdy331kR+M4+e4vL58Cp TLKw== X-Gm-Message-State: ALoCoQkC2UkRkfZL49Jon1Y7apgEfcnd8yoyjnMqZO5jT6O5faop0x1t0+KLjeHYGb0jCoGLEJnj X-Received: by 10.180.82.34 with SMTP id f2mr456824wiy.1.1418125014588; Tue, 09 Dec 2014 03:36:54 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.2.227 with SMTP id 3ls30303lax.49.gmail; Tue, 09 Dec 2014 03:36:54 -0800 (PST) X-Received: by 10.112.199.40 with SMTP id jh8mr21641808lbc.5.1418125014405; Tue, 09 Dec 2014 03:36:54 -0800 (PST) Received: from mail-la0-f46.google.com (mail-la0-f46.google.com. [209.85.215.46]) by mx.google.com with ESMTPS id j1si1040899lah.68.2014.12.09.03.36.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 09 Dec 2014 03:36:54 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) client-ip=209.85.215.46; Received: by mail-la0-f46.google.com with SMTP id q1so336224lam.5 for ; Tue, 09 Dec 2014 03:36:54 -0800 (PST) X-Received: by 10.152.21.66 with SMTP id t2mr20967756lae.27.1418125014001; Tue, 09 Dec 2014 03:36:54 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp739192lbc; Tue, 9 Dec 2014 03:36:53 -0800 (PST) X-Received: by 10.68.160.66 with SMTP id xi2mr4613217pbb.132.1418125012425; Tue, 09 Dec 2014 03:36:52 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id r11si1293936pdl.210.2014.12.09.03.36.51 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 09 Dec 2014 03:36:52 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XyJ0F-0000bj-OT; Tue, 09 Dec 2014 11:30:51 +0000 Received: from mail-la0-f42.google.com ([209.85.215.42]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XyIvK-0004pO-V4 for linux-arm-kernel@lists.infradead.org; Tue, 09 Dec 2014 11:25:47 +0000 Received: by mail-la0-f42.google.com with SMTP id gd6so331149lab.1 for ; Tue, 09 Dec 2014 03:25:24 -0800 (PST) X-Received: by 10.152.18.166 with SMTP id x6mr21114587lad.18.1418124324712; Tue, 09 Dec 2014 03:25:24 -0800 (PST) Received: from localhost.localdomain (188-178-240-98-static.dk.customer.tdc.net. [188.178.240.98]) by mx.google.com with ESMTPSA id w3sm279709law.36.2014.12.09.03.25.22 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 09 Dec 2014 03:25:23 -0800 (PST) From: Christoffer Dall To: Paolo Bonzini , kvm@vger.kernel.org Subject: [GIT PULL 4/9] kvm: add a memslot flag for incoherent memory regions Date: Tue, 9 Dec 2014 12:26:03 +0100 Message-Id: <1418124368-28418-5-git-send-email-christoffer.dall@linaro.org> X-Mailer: git-send-email 2.1.2.330.g565301e.dirty In-Reply-To: <1418124368-28418-1-git-send-email-christoffer.dall@linaro.org> References: <1418124368-28418-1-git-send-email-christoffer.dall@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141209_032547_181029_BA0A1447 X-CRM114-Status: GOOD ( 10.98 ) X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [209.85.215.42 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [209.85.215.42 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: Marc Zyngier , kvmarm@lists.cs.columbia.edu, linux-arm-kernel@lists.infradead.org, Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: christoffer.dall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.46 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Ard Biesheuvel Memory regions may be incoherent with the caches, typically when the guest has mapped a host system RAM backed memory region as uncached. Add a flag KVM_MEMSLOT_INCOHERENT so that we can tag these memslots and handle them appropriately when mapping them. Signed-off-by: Ard Biesheuvel Signed-off-by: Marc Zyngier --- include/linux/kvm_host.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index a6059bd..e4d8f70 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h @@ -43,6 +43,7 @@ * include/linux/kvm_h. */ #define KVM_MEMSLOT_INVALID (1UL << 16) +#define KVM_MEMSLOT_INCOHERENT (1UL << 17) /* Two fragments for cross MMIO pages. */ #define KVM_MAX_MMIO_FRAGMENTS 2