Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp561802ybm; Mon, 20 May 2019 22:55:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUHQETiigQw1mCik4yEHVd911KT9hi6DdW5qhYcz8H+Y5kvXX0LXRrMwh7r0YkieWHwFl8 X-Received: by 2002:a63:d615:: with SMTP id q21mr78853419pgg.401.1558418125420; Mon, 20 May 2019 22:55:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558418125; cv=none; d=google.com; s=arc-20160816; b=RZ3HVj9rfDjMWzO5vtTpVXVjRIbY5pD6dSGM5XNMBnxhKb3/oliDT8q92Yc8vatow/ ncHjkeyncpW0eE1uOH7ay6FT2ypNCTh2YFvT7UW3laR7Oeg5CO+UZBNpO3s1xqJoxcve ZCfa5pg6foRM5aizWA+xYurcpR85J4kRHTAsQ1f37KGPeri56R0UxEOuecK2UUPZZIFF TBcaVY37beH4LmPnbluvsUtX5k17eyHSAg5pCUnmluTS8BUEIVNb59cE5F/6xbGgwW7x Vyc43unGJ9yOxw1QbXlHvHZNwhAUAlCzuQ0VrMQC3/rbI6HzrXkIAR49z1yH8k30BekO sviw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=Iww+T0ME8VNbFx/h9v/E9Ayy+6j1TjQxSk8JySPEf28=; b=UokCUXCH99gapGDQHLFEV0CbGkuuE5bh2glUftK2XZvh88E2xBZvUhfGIAus76OyQP 2iAsVn+aXoRYUjc1w3FtO3m5J9I3nLj+F1dt5AEtK1xQgRLrvisc0UkZxMhtlr/3cyRW jMk7DAwcMakaYXvRf2HrE2yOTXSUVEbnMsdQ0tjis3ViOS7M3BHspwIQjxqZRmLJHFdB nVDlfvX9bSiIPq2/pNvDyQwr2nK+7dGsMuIDNi/T7vtN//07tkpqPjDDJS6YQhPGlTQq JFECUEBwPimEmCUPFYk+l8XOwm1/E8EpLHx15yS4tUHPi9/OglcshfL3O27mVnjIp5P6 2Xwg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y16si20273786plr.150.2019.05.20.22.55.10; Mon, 20 May 2019 22:55:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727899AbfEUFx3 (ORCPT + 99 others); Tue, 21 May 2019 01:53:29 -0400 Received: from mx2.suse.de ([195.135.220.15]:48878 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725794AbfEUFx2 (ORCPT ); Tue, 21 May 2019 01:53:28 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id B9527AEEE; Tue, 21 May 2019 05:53:27 +0000 (UTC) Received: by unicorn.suse.cz (Postfix, from userid 1000) id 6607FE0184; Tue, 21 May 2019 07:53:27 +0200 (CEST) Date: Tue, 21 May 2019 07:53:27 +0200 From: Michal Kubecek To: Paolo Bonzini Cc: kvm@vger.kernel.org, Radim Krcmar , KarimAllah Ahmed , linux-kernel@vger.kernel.org Subject: Re: [PATCH RESEND] kvm: make kvm_vcpu_(un)map dependency on CONFIG_HAS_IOMEM explicit Message-ID: <20190521055327.GD25473@unicorn.suse.cz> References: <20190520164418.06D1CE0184@unicorn.suse.cz> <41adfaf7-90e8-b011-2716-ea5dc464ae5a@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <41adfaf7-90e8-b011-2716-ea5dc464ae5a@redhat.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 20, 2019 at 07:23:43PM +0200, Paolo Bonzini wrote: > On 20/05/19 18:44, Michal Kubecek wrote: > > Recently introduced functions kvm_vcpu_map() and kvm_vcpu_unmap() call > > memremap() and memunmap() which are only available if HAS_IOMEM is enabled > > but this dependency is not explicit, so that the build fails with HAS_IOMEM > > disabled. > > > > As both function are only used on x86 where HAS_IOMEM is always enabled, > > the easiest fix seems to be to only provide them when HAS_IOMEM is enabled. > > > > Fixes: e45adf665a53 ("KVM: Introduce a new guest mapping API") > > Signed-off-by: Michal Kubecek > > --- > > Thank you very much. However, it's better if only the memremap part is > hidden behind CONFIG_HAS_IOMEM. I'll send a patch tomorrow and have it > reach Linus at most on Wednesday. That sounds like a better solution. As I'm not familiar with the code, I didn't want to risk and suggested the easiest way around. Michal > There is actually nothing specific to CONFIG_HAS_IOMEM in them, > basically the functionality we want is remap_pfn_range but without a > VMA. However, it's for a niche use case where KVM guest memory is > mmap-ed from /dev/mem and it's okay if for now that part remains > disabled on s390. > > Paolo