Received: by 2002:a17:90a:2044:0:0:0:0 with SMTP id n62csp531261pjc; Mon, 20 May 2019 11:20:37 -0700 (PDT) X-Google-Smtp-Source: APXvYqwKBiy81n6N/SNXdSYzE3wLw2jLBoAfaHwo2j2Cjf13YU3nYIuS1ltkwYmRZLSoGmXQqHDy X-Received: by 2002:a63:4a4f:: with SMTP id j15mr76377180pgl.338.1558376437474; Mon, 20 May 2019 11:20:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558376437; cv=none; d=google.com; s=arc-20160816; b=P4yTUGtFJtd3ElcHNC9vDpJ68GxiVgSYi1uiTG32Gvvg66O3VkZ8joWQv4doUwGHIH 0e7l3LSsYkKTi6OPC+KBWu+rbPs7XHXpE9xwPtJ42h03hcIipGFnMYp/zkw+kwuPXryU CiGW+dET8FIr8dlsQu5LAOJkFOLzApIHXrfC0vfdSHuJx0HTJmHHYhW5J8UtCln2zyhq WhVSJYFggnhx+bcRalYcOrxSrcsTJ2ZwCPhqnpyeNGML2Qmhyw872UnJBD55eYxs0SyM OlUq9RdoKInnOOr/iPhNMWhPUCa8esbbCRP7KwKsCKx4H9b7uROByslBKB9nIZLXhCN0 a8sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject; bh=5IBTHlLWle5UHeHtFTJc2+zC+bcnwX/bM8+GOzR3AZs=; b=hQnZsOmTklTV5iYgLQ21IZaDaVsRDFOLa+AhdKqPbKgM1Wipbh62gz23rNd6V+AJ38 +82+m4Uv2f6f8xBOFCoTo3Jd6G3j+LyDOdVF2AgQb3H09Tz4q+ziKVIwwnr8pqxVIF4k /S6J3g0xzuAsn2rLRQ3oKr8H7YEwbmuxvJBRxwkm+u9attWSdq3odabbvwGcltkeKuk/ csEKEt/bBWVWtgdN0UhQhaMZKAYNEfdHDm2c4mjV7RjHUsGy2glWCgTYyJMTGA+PjGl6 Mr49mwyD8l0TNUh6Rb+Rch/E6X0NDSg8wFWIuMadg4A94TvFJodXysEDK4UNWB1etH9H rxUg== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g11si17699549plt.35.2019.05.20.11.20.22; Mon, 20 May 2019 11:20:37 -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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392864AbfETRXq (ORCPT + 99 others); Mon, 20 May 2019 13:23:46 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:36212 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392854AbfETRXp (ORCPT ); Mon, 20 May 2019 13:23:45 -0400 Received: by mail-wr1-f66.google.com with SMTP id s17so15538607wru.3 for ; Mon, 20 May 2019 10:23:45 -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:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=5IBTHlLWle5UHeHtFTJc2+zC+bcnwX/bM8+GOzR3AZs=; b=qKq5TDrXTcIG00Y7F3EUAI141t+DhQXLgcgyqPEp3KMu+gS5Luc06LsMW7A41/f2i8 jKo3ki66STo4iP20N8Um8SoqGM9tfSWJvH9txDDwlSdWPqwyI8/SFyNQBzZT9x70yhDV rrZCnoRWpzzIMZIWbx8E/UvNP70wOmF1jbjQsM27nCwufyuPyvDbvspTvNB+Gv4EMQL5 xHCrhCpzNSRW1/f582/5BDiRSsKDdSwjA3aDaahe+DVZJlKbXYzuYzQmX64F63dxJos3 8lsDcLGd9SRTWZ7usv8yN5a+g2CaCS5JVoqJoPS98xGjdRXoK9k3hkM66Q3+DYINlJS3 DolQ== X-Gm-Message-State: APjAAAXjEtrIeBFnPi344zf1zWAU9zPkV/93aJHBAL/5gHYfqohHxApd F+Hu3fiacAipolhrnykuFbWRYTEhXit7sA== X-Received: by 2002:a5d:53c8:: with SMTP id a8mr10808166wrw.152.1558373024313; Mon, 20 May 2019 10:23:44 -0700 (PDT) Received: from ?IPv6:2001:b07:6468:f312:ac04:eef9:b257:b844? ([2001:b07:6468:f312:ac04:eef9:b257:b844]) by smtp.gmail.com with ESMTPSA id x6sm27281408wru.36.2019.05.20.10.23.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 20 May 2019 10:23:43 -0700 (PDT) Subject: Re: [PATCH RESEND] kvm: make kvm_vcpu_(un)map dependency on CONFIG_HAS_IOMEM explicit To: Michal Kubecek , kvm@vger.kernel.org Cc: Radim Krcmar , KarimAllah Ahmed , linux-kernel@vger.kernel.org References: <20190520164418.06D1CE0184@unicorn.suse.cz> From: Paolo Bonzini Message-ID: <41adfaf7-90e8-b011-2716-ea5dc464ae5a@redhat.com> Date: Mon, 20 May 2019 19:23:43 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 MIME-Version: 1.0 In-Reply-To: <20190520164418.06D1CE0184@unicorn.suse.cz> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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