From patchwork Mon Nov 17 14:58:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 5322231 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 103E7C11AC for ; Mon, 17 Nov 2014 14:59:01 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3B4102015E for ; Mon, 17 Nov 2014 14:59:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7AE4D2015A for ; Mon, 17 Nov 2014 14:58:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752931AbaKQO64 (ORCPT ); Mon, 17 Nov 2014 09:58:56 -0500 Received: from mail-wg0-f42.google.com ([74.125.82.42]:59043 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752548AbaKQO6z (ORCPT ); Mon, 17 Nov 2014 09:58:55 -0500 Received: by mail-wg0-f42.google.com with SMTP id z12so7009432wgg.29 for ; Mon, 17 Nov 2014 06:58: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:from:to:cc:subject:date:message-id; bh=5LU1aMAgtqQsISTQ9kzFOaqN525dE2Ro3/uYWlD6cK4=; b=eRCAxorPfEWVB65qIKIoIQki5/nX3RZqfJQ9itS5HF4a9m7Iv/rKbQBzHxJFwvKkeP NdwK7YhnqeXACUrcoxUH+ctOEXY+gNehe5xKG/h02RVTzXafLaB+IzMXNBx2M1g+oIVZ vuCWrkFZMoFc4UK4VlzPLrspl4FjMA7E9BE81DlAmxTzpUoqyUnBuIDSR5++JZ5eviHF t6T+UABRsBvtLXTumwiHwJAWhenEczBb3WV0bkFzrmxvRA0pr7zmfiaXokCGv0kFYZpy xh09+wrKrye3ZRCEIZBpglHekC8K3ZLVFJHTGCyCLPPTrCuC/u0nSaeytz/9Zrjq60uK 3YQw== X-Gm-Message-State: ALoCoQkEMgXQ4dgbcY+Twwhtg5becttLKfwbW/hqaBXXOi9e8edkIYU8uqUtMFvxiDSNz4SMs3IH X-Received: by 10.194.103.232 with SMTP id fz8mr9838604wjb.110.1416236334196; Mon, 17 Nov 2014 06:58:54 -0800 (PST) Received: from ards-macbook-pro.local (cag06-7-83-153-85-71.fbx.proxad.net. [83.153.85.71]) by mx.google.com with ESMTPSA id n3sm8751786wjz.21.2014.11.17.06.58.52 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Nov 2014 06:58:53 -0800 (PST) From: Ard Biesheuvel To: kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org, marc.zyngier@arm.com, lersek@redhat.com, drjones@redhat.com, wei@redhat.com Cc: kvm@vger.kernel.org, Ard Biesheuvel Subject: [PATCH 1/3] kvm: add a memslot flag for incoherent memory regions Date: Mon, 17 Nov 2014 15:58:51 +0100 Message-Id: <1416236333-9378-1-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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 --- 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 a6059bdf7b03..e4d8f705fecd 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