From patchwork Mon May 11 11:16:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sasha Levin X-Patchwork-Id: 48250 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 089A721550 for ; Mon, 11 May 2015 11:19:34 +0000 (UTC) Received: by lbbrr5 with SMTP id rr5sf37780969lbb.3 for ; Mon, 11 May 2015 04:19:33 -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:sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=n2fekK2kfTVSSKPQZgYYr4SFET260DgY5NxpbF4NEu4=; b=drpANohCwpdfmo2JKlH4y4oeZa5cZ3hC9xuuoEuWL4JowF9M6EO6scgIt81AQe/JOO cDU8H4TM3GUt7w7CANP+o1VmdDfYdSbPu1hMZZUCnpeirXAI5w85EsWoYmY04E3H3oK8 3HGaVKhVh25/6CbxtW+hDz/Pyay3YWWm3gY8+9p+uuVzbTennwaNgx4jIkUSK3Lr7klw lCZLct6YscUQ7jW3LcoSUd1Mdic6Tre491IYU+zx68AMUjWE8XuWPePWFIhZr3qWGV9W qsTiUDAqEj8A3cMnpggJ3b+akhE8QeqRvDA2wGll+y3ccdFtDeZqswl+5zeCJ55QYZ0X 7nJw== X-Gm-Message-State: ALoCoQlwCNWPoMwerkQSGtmVI8geAA00jxLo/tTcOFSNqIh81+h075CluzKHWUNE4S9GC49lXlnX X-Received: by 10.112.26.5 with SMTP id h5mr7220657lbg.4.1431343172990; Mon, 11 May 2015 04:19:32 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.87.171 with SMTP id az11ls650315lab.107.gmail; Mon, 11 May 2015 04:19:32 -0700 (PDT) X-Received: by 10.112.188.194 with SMTP id gc2mr7672939lbc.25.1431343172884; Mon, 11 May 2015 04:19:32 -0700 (PDT) Received: from mail-lb0-f175.google.com (mail-lb0-f175.google.com. [209.85.217.175]) by mx.google.com with ESMTPS id eu8si8164922lbc.171.2015.05.11.04.19.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 11 May 2015 04:19:32 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.175 as permitted sender) client-ip=209.85.217.175; Received: by lbbqq2 with SMTP id qq2so91305160lbb.3 for ; Mon, 11 May 2015 04:19:32 -0700 (PDT) X-Received: by 10.112.150.100 with SMTP id uh4mr7555613lbb.112.1431343172771; Mon, 11 May 2015 04:19:32 -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.108.230 with SMTP id hn6csp1444490lbb; Mon, 11 May 2015 04:19:31 -0700 (PDT) X-Received: by 10.66.177.238 with SMTP id ct14mr18310526pac.121.1431343170656; Mon, 11 May 2015 04:19:30 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cf1si17583618pdb.112.2015.05.11.04.19.29; Mon, 11 May 2015 04:19:30 -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 S1753810AbbEKLT2 (ORCPT + 2 others); Mon, 11 May 2015 07:19:28 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:26242 "EHLO aserp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753747AbbEKLT2 (ORCPT ); Mon, 11 May 2015 07:19:28 -0400 Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4BBJLeV003224 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 11 May 2015 11:19:21 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t4BBJLkh025446 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Mon, 11 May 2015 11:19:21 GMT Received: from abhmp0009.oracle.com (abhmp0009.oracle.com [141.146.116.15]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t4BBJLhV004475; Mon, 11 May 2015 11:19:21 GMT Received: from lappy.hsd1.nh.comcast.net (/10.159.243.153) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 11 May 2015 04:19:20 -0700 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: Ard Biesheuvel , Marc Zyngier , Shannon Zhao , Sasha Levin Subject: [added to the 3.18 stable tree] kvm: add a memslot flag for incoherent memory regions Date: Mon, 11 May 2015 07:16:22 -0400 Message-Id: <1431343152-19437-1-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.1.0 X-Source-IP: aserv0021.oracle.com [141.146.126.233] 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: patch@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.217.175 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 Signed-off-by: Sasha Levin --- 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