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 D645DC10F14 for ; Thu, 3 Oct 2019 15:50:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B363720700 for ; Thu, 3 Oct 2019 15:50:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729958AbfJCPuy (ORCPT ); Thu, 3 Oct 2019 11:50:54 -0400 Received: from mx1.redhat.com ([209.132.183.28]:48228 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727024AbfJCPuy (ORCPT ); Thu, 3 Oct 2019 11:50:54 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (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 D8BB9368FF for ; Thu, 3 Oct 2019 15:50:53 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id k184so1305019wmk.1 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=ecpKjNmPzq6xACrCZA5r8fRRQ/pGPBb8fdKOx1/OtfSaBrNpvYpWKgLhVcTOshiPw8 Az1yUYGR6ZvfNl57AQdJwj+f2JDMZp3LsGWz4rWZWAz2A1c7KEI7N4m/RB+KTh+Q/MeD SM2bp6sZwXsFlRX8uLOgx8Cdk5CJ1A5kqsdLGMKvvgvtjC4aPUZ2Wuv0mWtWYZEr04yN ZYOBQoFiu4OpILKqpaGUxL6hiWwxleatBgwR7engHUeg1mZwIGslOkvVfJw3zhsS8iJL tBJ+HQ/suQud0DMQ3T/ABI1rZDCKRUbIkqmfpdoXTDovgDqbm8S5QyrJ0C7M7sFWKiYG CU9g== X-Gm-Message-State: APjAAAVBc/IRwJ1SYQy4HPBizD12to8xI1yP5jKpojbdvRlhjFaYZUZP IkAzV3qAonJ2UIJRUuHFpRh3m5xBsS8ZIjzkPHTB2dd+9rHIz9z2RkOo4PjZ4EeN4vJ5PPBFmEa tpDQJtyz2bUW4 X-Received: by 2002:a05:600c:1103:: with SMTP id b3mr7656888wma.3.1570117852381; 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 Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org 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