From patchwork Sun May 17 01:02: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: 48612 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f72.google.com (mail-wg0-f72.google.com [74.125.82.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id C600421411 for ; Sun, 17 May 2015 01:06:22 +0000 (UTC) Received: by wgvl6 with SMTP id l6sf40766013wgv.2 for ; Sat, 16 May 2015 18:06:22 -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=n2fekK2kfTVSSKPQZgYYr4SFET260DgY5NxpbF4NEu4=; b=ZGrP7CykdRAQx1BVINrQUxZd4TvAdtG0wyp3erzKBZ+vAm44H7dMS9GIenOH3yw0Vc VlfJfj9ctdIwCvPtMRe/xOlTOKmHnt1FrseosV+FL84pzfiNQPvw7RJ+FdGK63KwK6+t /SUeiSTG4ZUFwzjGT0/aN6OMeRLUCYJxiRdIsmmreEfeky0gBeuU33tf5T3VuXJ4nT0U U3Wu8FP+j7flw1v21Ok2zehN7cb3tc+IKAIbrWIn1BBxYApTF1hfz64dnio2r2EYuePF 11UEyyHq+xyHTlP+KxH7yzebXiPKfOvByWg67EJYgB5EMT73nDKG5jDwZ/s+PtAWY+Vh ZcQA== X-Gm-Message-State: ALoCoQkK54IWnJ3EYCEQlnZgtzRFBV1sc71pPwnKfLXmZru4eOZ+F3h6oE8FhfMp52jFgOfA3oL/ X-Received: by 10.112.219.200 with SMTP id pq8mr12532907lbc.7.1431824781666; Sat, 16 May 2015 18:06:21 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.23.74 with SMTP id k10ls663612laf.30.gmail; Sat, 16 May 2015 18:06:21 -0700 (PDT) X-Received: by 10.112.143.137 with SMTP id se9mr8481742lbb.60.1431824781347; Sat, 16 May 2015 18:06:21 -0700 (PDT) Received: from mail-la0-f47.google.com (mail-la0-f47.google.com. [209.85.215.47]) by mx.google.com with ESMTPS id r1si2526430lar.2.2015.05.16.18.06.21 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 16 May 2015 18:06:21 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.47 as permitted sender) client-ip=209.85.215.47; Received: by labbd9 with SMTP id bd9so172854121lab.2 for ; Sat, 16 May 2015 18:06:20 -0700 (PDT) X-Received: by 10.112.219.70 with SMTP id pm6mr12083126lbc.41.1431824780930; Sat, 16 May 2015 18:06:20 -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 hn6csp3022057lbb; Sat, 16 May 2015 18:06:19 -0700 (PDT) X-Received: by 10.70.91.104 with SMTP id cd8mr31963017pdb.94.1431824778018; Sat, 16 May 2015 18:06:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h13si9275368pdm.194.2015.05.16.18.06.16; Sat, 16 May 2015 18:06:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750775AbbEQBGN (ORCPT + 2 others); Sat, 16 May 2015 21:06:13 -0400 Received: from userp1040.oracle.com ([156.151.31.81]:25918 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750709AbbEQBGL (ORCPT ); Sat, 16 May 2015 21:06:11 -0400 Received: from userv0021.oracle.com (userv0021.oracle.com [156.151.31.71]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t4H16BHv028418 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 17 May 2015 01:06:11 GMT Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by userv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t4H16AdQ020159 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Sun, 17 May 2015 01:06:11 GMT Received: from abhmp0012.oracle.com (abhmp0012.oracle.com [141.146.116.18]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t4H16AfJ027751; Sun, 17 May 2015 01:06:10 GMT Received: from lappy.hsd1.nh.comcast.net (/10.159.157.103) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sat, 16 May 2015 18:06:10 -0700 From: Sasha Levin To: stable@vger.kernel.org, stable-commits@vger.kernel.org Cc: sasha.levin@oracle.com Subject: [PATCH 3.18 001/222] kvm: add a memslot flag for incoherent memory regions Date: Sat, 16 May 2015 21:02:22 -0400 Message-Id: <1431824764-20044-2-git-send-email-sasha.levin@oracle.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1431824764-20044-1-git-send-email-sasha.levin@oracle.com> References: <1431824764-20044-1-git-send-email-sasha.levin@oracle.com> X-Source-IP: userv0021.oracle.com [156.151.31.71] 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.215.47 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