From patchwork Mon May 4 01:25:05 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shannon Zhao X-Patchwork-Id: 47917 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f71.google.com (mail-wg0-f71.google.com [74.125.82.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 868E320553 for ; Mon, 4 May 2015 01:26:30 +0000 (UTC) Received: by wgtl5 with SMTP id l5sf40939936wgt.1 for ; Sun, 03 May 2015 18:26:29 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=E70kszMge2zIxyt0awFolNfgnMnDiRP/d8/aNmxVP8U=; b=C+ZEXRnV3B+yjQXhfvwFkbLLbqgN5LzWIotT3qx96+OcveqHFc3ZE9AlERaf3vLIOz 3w7sNaekevor8bG1IfpZzMhA+dQAD9GO3B5hrm0Wl9brY2i7rmzyri08ymQKL6h1LLYE hy0XDaJMHPJIArSnUEreBl+rXkP98V0vdT1Bd2BQOxNxqYi8wRO5IvNVn002krQh8ia1 qR2RsbyZIXqdP2xMyMJLrFLAGKX3xJgOtP8SRaasnpnedHxVYp+DZRN+mIUsv1/evcCS ze7aaPjY4LXeA4kp4KG1qdPmKp5fIoqpqYoIf0lPQ91h6sPd1nL4sVMVjFnwLdI8yXHI YR+g== X-Gm-Message-State: ALoCoQmV98ZMkMCc2DHnjXLyKkfm4e22z8cFzlMnzYKfgJWdBCLLN8ZMGdVasyVxxttQEcrWZdW7 X-Received: by 10.180.211.168 with SMTP id nd8mr6855519wic.4.1430702789748; Sun, 03 May 2015 18:26:29 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.104 with SMTP id j8ls581368laj.106.gmail; Sun, 03 May 2015 18:26:29 -0700 (PDT) X-Received: by 10.112.120.199 with SMTP id le7mr17377972lbb.48.1430702789451; Sun, 03 May 2015 18:26:29 -0700 (PDT) Received: from mail-la0-f45.google.com (mail-la0-f45.google.com. [209.85.215.45]) by mx.google.com with ESMTPS id yj8si9061168lab.53.2015.05.03.18.26.29 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 03 May 2015 18:26:29 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.45 as permitted sender) client-ip=209.85.215.45; Received: by lagv1 with SMTP id v1so94721863lag.3 for ; Sun, 03 May 2015 18:26:29 -0700 (PDT) X-Received: by 10.152.4.72 with SMTP id i8mr18058065lai.32.1430702788990; Sun, 03 May 2015 18:26:28 -0700 (PDT) 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.67.65 with SMTP id l1csp1405644lbt; Sun, 3 May 2015 18:26:28 -0700 (PDT) X-Received: by 10.66.141.143 with SMTP id ro15mr38883270pab.4.1430702787212; Sun, 03 May 2015 18:26:27 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id es7si17680936pbd.123.2015.05.03.18.26.26; Sun, 03 May 2015 18:26:27 -0700 (PDT) Received-SPF: none (google.com: stable-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751172AbbEDB00 (ORCPT + 2 others); Sun, 3 May 2015 21:26:26 -0400 Received: from mail-pa0-f51.google.com ([209.85.220.51]:34833 "EHLO mail-pa0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751160AbbEDB0Z (ORCPT ); Sun, 3 May 2015 21:26:25 -0400 Received: by pabtp1 with SMTP id tp1so147342835pab.2 for ; Sun, 03 May 2015 18:26:25 -0700 (PDT) X-Received: by 10.68.252.106 with SMTP id zr10mr38248901pbc.79.1430702785181; Sun, 03 May 2015 18:26:25 -0700 (PDT) Received: from localhost ([180.150.153.1]) by mx.google.com with ESMTPSA id og11sm10986688pdb.91.2015.05.03.18.26.23 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 03 May 2015 18:26:23 -0700 (PDT) From: shannon.zhao@linaro.org To: stable@vger.kernel.org Cc: sasha.levin@oracle.com, christoffer.dall@linaro.org, shannon.zhao@linaro.org, Ard Biesheuvel , Marc Zyngier Subject: [PATCH for 3.18.y stable 01/22] kvm: add a memslot flag for incoherent memory regions Date: Mon, 4 May 2015 09:25:05 +0800 Message-Id: <1430702726-2056-2-git-send-email-shannon.zhao@linaro.org> X-Mailer: git-send-email 1.9.5.msysgit.1 In-Reply-To: <1430702726-2056-1-git-send-email-shannon.zhao@linaro.org> References: <1430702726-2056-1-git-send-email-shannon.zhao@linaro.org> Sender: stable-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: stable@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: shannon.zhao@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.45 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 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , From: Ard Biesheuvel commit 1050dcda3052912984b26fb6d2695a3f41792000 upstream. 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 Signed-off-by: Shannon Zhao --- 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