From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,SUBJ_ALL_CAPS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id DBD70C10F14 for ; Thu, 3 Oct 2019 15:50:57 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 7C3EE20700 for ; Thu, 3 Oct 2019 15:50:57 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7C3EE20700 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id B2FC26B0005; Thu, 3 Oct 2019 11:50:56 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id AE0856B0006; Thu, 3 Oct 2019 11:50:56 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 9CED06B0007; Thu, 3 Oct 2019 11:50:56 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0116.hostedemail.com [216.40.44.116]) by kanga.kvack.org (Postfix) with ESMTP id 7758C6B0005 for ; Thu, 3 Oct 2019 11:50:56 -0400 (EDT) Received: from smtpin23.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay05.hostedemail.com (Postfix) with SMTP id D41DE181AC9AE for ; Thu, 3 Oct 2019 15:50:55 +0000 (UTC) X-FDA: 76002911670.23.beast71_7c79b191c3e3e X-HE-Tag: beast71_7c79b191c3e3e X-Filterd-Recvd-Size: 4809 Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by imf28.hostedemail.com (Postfix) with ESMTP for ; Thu, 3 Oct 2019 15:50:55 +0000 (UTC) Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id C5CC490C99 for ; Thu, 3 Oct 2019 15:50:53 +0000 (UTC) Received: by mail-wr1-f71.google.com with SMTP id c17so1020557wro.18 for ; Thu, 03 Oct 2019 08:50:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:openpgp:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=Dk0aNdQXz53G0n9Tb1zT+SP0bhczdeQIv0e4Y/L1PB4=; b=oBg1vcJnWqHvvmiTujv8qW3WTb1/HmpdszfdXGQ8QgFA/T11wpUXTSMs6ACu0RBQU6 N+fFNE6GEmdC4mAiutJkRVaBCVXad7f1E/fhz0KEqjVdAGtQMVO7jXEoLEM9XwCVncSZ c/c8lrymiYY9hXlE/Ig1BYhroUpYSsEOCpeEAB3+5RBIHWZ13tnj+JOd4FeSUJwIQjrR G59QMuh0G4UUTfq/wo9lmlbxkk0DiPfd7mQNATjKxhoUePONPgMy2165LC5awPDwryb5 KKJS1MfGzSRH3RfXWARq18aUVvcqhgbD+DB3N/9ksrqIRXXGnqYDjrV/ozEnODMonJQn ABDA== X-Gm-Message-State: APjAAAWMfM78nsHOVhCG02V9W6hxSGvZhKvaOrL4sjt4HkSdCf5zCvHW /yQLxyrq5XD8g1xCTqhr4nuRUcOPHf1iaRcBFhdYfv4LmaudWvGUke8vjcC8W7EpAhaqlEVNSXc fuLfYsLsFcyQ= X-Received: by 2002:a05:600c:1103:: with SMTP id b3mr7656896wma.3.1570117852382; Thu, 03 Oct 2019 08:50:52 -0700 (PDT) X-Google-Smtp-Source: APXvYqyyTTq1KRj0SEdnWQ7WCYfTtrUQZd+OAAW9EGTeyhKb1SxWiUABbHcl0VEgD9om8ZETiNdbGA== X-Received: by 2002:a05:600c:1103:: with SMTP id b3mr7656870wma.3.1570117852120; Thu, 03 Oct 2019 08:50:52 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:b903:6d6f:a447:e464? ([2001:b07:6468:f312:b903:6d6f:a447:e464]) by smtp.gmail.com with ESMTPSA id f13sm3749326wmj.17.2019.10.03.08.50.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Oct 2019 08:50:51 -0700 (PDT) Subject: Re: DANGER WILL ROBINSON, DANGER To: Jerome Glisse Cc: Mircea CIRJALIU - MELIU , =?UTF-8?Q?Adalbert_Laz=c4=83r?= , Matthew Wilcox , "kvm@vger.kernel.org" , "linux-mm@kvack.org" , "virtualization@lists.linux-foundation.org" , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , Konrad Rzeszutek Wilk , Tamas K Lengyel , Mathieu Tarral , =?UTF-8?Q?Samuel_Laur=c3=a9n?= , Patrick Colp , Jan Kiszka , Stefan Hajnoczi , Weijiang Yang , Yu C , =?UTF-8?Q?Mihai_Don=c8=9bu?= References: <20190905180955.GA3251@redhat.com> <5b0966de-b690-fb7b-5a72-bc7906459168@redhat.com> <20191002192714.GA5020@redhat.com> <20191002141542.GA5669@redhat.com> <20191002170429.GA8189@redhat.com> <20191003154233.GA4421@redhat.com> From: Paolo Bonzini Openpgp: preference=signencrypt Message-ID: Date: Thu, 3 Oct 2019 17:50:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0 MIME-Version: 1.0 In-Reply-To: <20191003154233.GA4421@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On 03/10/19 17:42, Jerome Glisse wrote: > All that is needed is to make sure that vm_normal_page() will see those > pte (inside the process that is mirroring the other process) as special > which is the case either because insert_pfn() mark the pte as special or > the kvm device driver which control the vm_operation struct set a > find_special_page() callback that always return NULL, or the vma has > either VM_PFNMAP or VM_MIXEDMAP set (which is the case with insert_pfn). > > So you can keep the existing kvm code unmodified. Great, thanks. And KVM is already able to handle VM_PFNMAP/VM_MIXEDMAP, so that should work. Paolo