Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp5367427rwb; Wed, 21 Sep 2022 06:59:05 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7XG30QJXRJdWeIZAV8gO394jSmD7LP/aOCELaeZiX2+uItMNlrFse6iCHss1+nqumxK0sA X-Received: by 2002:a17:90a:e293:b0:202:6eab:acac with SMTP id d19-20020a17090ae29300b002026eabacacmr9498122pjz.203.1663768744620; Wed, 21 Sep 2022 06:59:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663768744; cv=none; d=google.com; s=arc-20160816; b=F2CW3MPE0jmKejKadOk0O9hEAS1dS9VB/d6/Zer5cTvIjgLzeTcS0auCK7uc69IloH PZ7Gv/Te2snOWUmJ/pMwdH6T0bO1d25MgkLxEpqiaWM8GTByzmoJR9g/FJYSmVY9+g/Z RoVKXOHtJwgxbErQv2wOz/aK8+5/o8aHcc8GpM1qPFYTfL9IRd44ruxPNv73/5221o8y RElvDdLek+u7cNQ1FRTukcKb3LVqJ9mxQS64Oznq5bGLYS9ZFjDLX5RwP6vZ9J7dJjB+ rAqHrndezUDCErwtR4aMLWqyA5viEf2fo578wreAXTud7MF056W6+I3FOgUZhe9Zja8M cTfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=WbvVISdR0D5SgVri2kvUMTbYwrsa/O3VMAKDVY30tWE=; b=aN8zQv1hcsIQlMRVZavahRzjCTvfoJIS5lbxLGTBf8WIBRJVt8Ri8g7AfMcYQ2t2a7 LFHCUTqOP85RhHJKCaGGivbkgztIYguQL4lQy+tFPF+SYxJqw+tTueBo8S4t9+OzO+Cr KTzwRawJZKrLLiY5r+yavAV0aiNJTTbBhJe+cQ+vYJ9zrz7fvnvSl+m/cN0PkjXeCZY0 nbiwK4uY8yda/1/WJ7S8NDAZrk5sgKbAf4iT/hoa3CCubTQUBgMjyqGFxeDQqzgJ4Drz Ie6PmYiqqJbzrjH5j39N16TqT7vz2H2GUAmGGvXT6oJ9YRaF+GVIDd9v9F6YtAkLBXM8 oidw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MyfhgBuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s135-20020a632c8d000000b0041cefab5b61si2858523pgs.719.2022.09.21.06.58.53; Wed, 21 Sep 2022 06:59:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=MyfhgBuV; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229762AbiIUNnJ (ORCPT + 99 others); Wed, 21 Sep 2022 09:43:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229580AbiIUNnH (ORCPT ); Wed, 21 Sep 2022 09:43:07 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F60B6D567 for ; Wed, 21 Sep 2022 06:43:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1663767786; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=WbvVISdR0D5SgVri2kvUMTbYwrsa/O3VMAKDVY30tWE=; b=MyfhgBuVgQXk9wN7FfeHxabYQyMgBFEGiuBkmA9ob2hopvllxgQgGgoWw+YCVOg47HP3Ta m4Zl8czKAqlH2OSdBUFLBR6ZIviA8VtvWRnGhbNYZRffmjFmn3qrN0fXVlq7N5BMcJaIMD f2NRmnOagTYgbUe19b+Kcw9ggIbikLc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-621-mu9sk1t3P66-vQ7fqDjLSg-1; Wed, 21 Sep 2022 09:43:03 -0400 X-MC-Unique: mu9sk1t3P66-vQ7fqDjLSg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 73FA8803520; Wed, 21 Sep 2022 13:43:02 +0000 (UTC) Received: from sirius.home.kraxel.org (unknown [10.39.192.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9AA17111D3DB; Wed, 21 Sep 2022 13:42:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 3A5B31800081; Wed, 21 Sep 2022 15:42:46 +0200 (CEST) Date: Wed, 21 Sep 2022 15:42:46 +0200 From: Gerd Hoffmann To: Sean Christopherson Cc: kvm@vger.kernel.org, Paolo Bonzini , Wanpeng Li , Vitaly Kuznetsov , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "maintainer:X86 ARCHITECTURE (32-BIT AND 64-BIT)" , "H. Peter Anvin" , "open list:X86 ARCHITECTURE (32-BIT AND 64-BIT)" Subject: Re: [PATCH] kvm/x86: reserve bit KVM_HINTS_PHYS_ADDRESS_SIZE_DATA_VALID Message-ID: <20220921134246.xibospqoktp4wjie@sirius.home.kraxel.org> References: <20220908114146.473630-1-kraxel@redhat.com> <20220909050224.rzlt4x7tjrespw3k@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220909050224.rzlt4x7tjrespw3k@sirius.home.kraxel.org> X-Scanned-By: MIMEDefang 3.1 on 10.11.54.3 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_NONE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 09, 2022 at 07:02:24AM +0200, Gerd Hoffmann wrote: > On Thu, Sep 08, 2022 at 02:52:36PM +0000, Sean Christopherson wrote: > > On Thu, Sep 08, 2022, Gerd Hoffmann wrote: > > > -#define KVM_HINTS_REALTIME 0 > > > +#define KVM_HINTS_REALTIME 0 > > > +#define KVM_HINTS_PHYS_ADDRESS_SIZE_DATA_VALID 1 > > > > Why does KVM need to get involved? This is purely a userspace problem. > > It doesn't. I only need reserve a hints bit, and the canonical source > for that happens to live in the kernel. That's why this patch doesn't > touch any actual code ;) > > > E.g. why not use QEMU's fw_cfg to communicate this information to the > > guest? > > That is indeed the other obvious way to implement this. Given this > information will be needed in code paths which already do CPUID queries > using CPUID to transport that information looked like the better option > to me. I'd like to move forward with this. So, any comment further comments and opinions? Is it ok to grab a hints bit given the explanation above? Or should I go for the fw_cfg approach? thanks & take care, Gerd