Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp3143190pxk; Mon, 7 Sep 2020 04:37:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz2SQrcP+ydiR3Guz2y01n3aGw8VIrjjX3qzkHTDuBXr9S0nGxf1DHDywgeL7bqD5zq7pp4 X-Received: by 2002:a17:906:71cc:: with SMTP id i12mr15681243ejk.507.1599478657336; Mon, 07 Sep 2020 04:37:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599478657; cv=none; d=google.com; s=arc-20160816; b=G5J4mqt4a9GWeNuziPWdbAS57BZbFEUJXw17CYJ/FK7/4i5OFKV9WMxWbPVxwz6Rku nZwgZtihBOfX9L51VRLch0fjn7AIg4Td+670kh6DMwOsLv1GuXy9ePXNA4Bx7u9WJL/a XeAo2qPhRzooqAc22RCUuQ0cA7Jo+gsFRO37cXTIrE6eZEpWHxNUHRhYNe8nTpiRGC3k dBOMp2nt7zpuB1EbeLIWiQZsNi2IfzpsAv4eDExJQh1gXAdHRIeahCI2Z031I1Tlw49q j11Bsovw6cngyn/z0ghmzkL/PZqJv/arxohshofW0jaXezmCrN5KdiwB8MUEiF6eHzPp 9+iA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=xh0jDnNxVb+gfwupJzhZeFoIO1CEsK8pGfyr2cjqVvU=; b=rOQAnvwzUvfFMJPXLICk73Vywrau159I7dUXPUkMVPowcwLf6oDUXZqpSas/4QomKl Lc8xYgpqoPAAxwaLXfiFkoEy/3xsinzOZTXIby9WFIBCW/rZHjsMZZeZrouyQWqlfQIW jrkLtRH3mQh2ZA1a4o/9y455A5ROC5ey3DY7pk1uRC7Y2qv5IxvpyOvUY1hgVWRuNevg Wa/bXg/2cwom4l3aoanKJcmf+GFpEDze2VgBa3+3Fsyx8BwQJGEvBRY0BC7ZK29qEeFj p9o/A+KwzuRZtC8rbwF+6SgSVJCRKGTKpbE1cZxc8tjMFem+rQHZa/x6GPOxJWc59ZBg LqeA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cX8Hogyq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l25si9550324eds.531.2020.09.07.04.37.15; Mon, 07 Sep 2020 04:37:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cX8Hogyq; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1729126AbgIGLfD (ORCPT + 99 others); Mon, 7 Sep 2020 07:35:03 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:58010 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729078AbgIGLcm (ORCPT ); Mon, 7 Sep 2020 07:32:42 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1599478361; 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=xh0jDnNxVb+gfwupJzhZeFoIO1CEsK8pGfyr2cjqVvU=; b=cX8HogyqdeteAhyamzVoAVnBvn3zFwKRGkdFa153InSndGrMZ4VY6xs4UkXd2axHOq5hWX EHX2dPiDG94mtz0kU/vkluG4vzymbjoq//cNA/vSM1ouZPP+EJBfh7tEY6dfuMgAvxqUiv dtm3YDxPwNf8RwgAQR4LukXu6yGVLZk= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-23-AfCqVRE6PhKiZpFwLUznCA-1; Mon, 07 Sep 2020 07:32:39 -0400 X-MC-Unique: AfCqVRE6PhKiZpFwLUznCA-1 Received: by mail-wm1-f69.google.com with SMTP id g79so4852759wmg.0 for ; Mon, 07 Sep 2020 04:32:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=xh0jDnNxVb+gfwupJzhZeFoIO1CEsK8pGfyr2cjqVvU=; b=GxlrbR2Lc/41q5AniDjqVHn/ddMWlqafegL55VAji7njhUcoLO6qOJujEQLgIsTlYs rGgPWKEMcfnkYfO506gR2V3hTnYBqKh7NFaeXr9yClU7ZWMmNsJnqU1Z1lu6Yqc6Ro/6 oQ9S8Q2W+CxRP0eYUhCVQDkxESib+urq9vQBa04hrhJWvn4/TkbPQ+SKxdrzITCVifsL NJbdyV8t143Tc0/prNWc6GMLUuClbiskbF1IImAUHH39Dvv108nK2XRkLi1oFU6lemJg mWIjpHIEU+TOmHmMJhZSMT74J/pZDm/qRU5WWVqYKhZjOAhMywHl6FkD1UE83ZcwnLHY NKgw== X-Gm-Message-State: AOAM531sUC7HH99QMJfpa+dUZg2JKkdY5pXBeMoQeSWQ0JfLPVopE6en ogPbf4/QVnJZyNBLHh5qSsDaa5r7IObpcPRqyfxc/SyZWmGwS76wupfs+T6Z7IKQNRMKFsGTdDf IgB0GTFmtVT3Pl+c2cEJTbbnh X-Received: by 2002:a5d:680b:: with SMTP id w11mr22519857wru.73.1599478358045; Mon, 07 Sep 2020 04:32:38 -0700 (PDT) X-Received: by 2002:a5d:680b:: with SMTP id w11mr22519838wru.73.1599478357797; Mon, 07 Sep 2020 04:32:37 -0700 (PDT) Received: from redhat.com ([192.117.173.58]) by smtp.gmail.com with ESMTPSA id j14sm28032781wrr.66.2020.09.07.04.32.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 07 Sep 2020 04:32:36 -0700 (PDT) Date: Mon, 7 Sep 2020 07:32:23 -0400 From: "Michael S. Tsirkin" To: Vitaly Kuznetsov Cc: Sean Christopherson , Peter Xu , kvm@vger.kernel.org, Paolo Bonzini , Wanpeng Li , Jim Mattson , Julia Suvorova , Andy Lutomirski , Andrew Jones , linux-kernel@vger.kernel.org, Gerd Hoffmann Subject: Re: [PATCH v2 0/3] KVM: x86: KVM_MEM_PCI_HOLE memory Message-ID: <20200907072829-mutt-send-email-mst@kernel.org> References: <20200807141232.402895-1-vkuznets@redhat.com> <20200825212526.GC8235@xz-x1> <87eenlwoaa.fsf@vitty.brq.redhat.com> <20200901200021.GB3053@xz-x1> <877dtcpn9z.fsf@vitty.brq.redhat.com> <20200904061210.GA22435@sjchrist-ice> <20200904072905.vbkiq3h762fyzds6@sirius.home.kraxel.org> <20200904160008.GA2206@sjchrist-ice> <874koanfsc.fsf@vitty.brq.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <874koanfsc.fsf@vitty.brq.redhat.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 07, 2020 at 10:37:39AM +0200, Vitaly Kuznetsov wrote: > Sean Christopherson writes: > > > On Fri, Sep 04, 2020 at 09:29:05AM +0200, Gerd Hoffmann wrote: > >> Hi, > >> > >> > Unless I'm mistaken, microvm doesn't even support PCI, does it? > >> > >> Correct, no pci support right now. > >> > >> We could probably wire up ecam (arm/virt style) for pcie support, once > >> the acpi support for mictovm finally landed (we need acpi for that > >> because otherwise the kernel wouldn't find the pcie bus). > >> > >> Question is whenever there is a good reason to do so. Why would someone > >> prefer microvm with pcie support over q35? > >> > >> > If all of the above is true, this can be handled by adding "pci=lastbus=0" > >> > as a guest kernel param to override its scanning of buses. And couldn't > >> > that be done by QEMU's microvm_fix_kernel_cmdline() to make it transparent > >> > to the end user? > >> > >> microvm_fix_kernel_cmdline() is a hack, not a solution. > >> > >> Beside that I doubt this has much of an effect on microvm because > >> it doesn't support pcie in the first place. > > > > I am so confused. Vitaly, can you clarify exactly what QEMU VM type this > > series is intended to help? If this is for microvm, then why is the guest > > doing PCI scanning in the first place? If it's for q35, why is the > > justification for microvm-like workloads? > > I'm not exactly sure about the plans for particular machine types, the > intention was to use this for pcie in QEMU in general so whatever > machine type uses pcie will benefit. > > Now, it seems that we have a more sophisticated landscape. The > optimization will only make sense to speed up boot so all 'traditional' > VM types with 'traditional' firmware are out of > question. 'Container-like' VMs seem to avoid PCI for now, I'm not sure > if it's because they're in early stages of their development, because > they can get away without PCI or, actually, because of slowness at boot > (which we're trying to tackle with this feature). I'd definitely like to > hear more what people think about this. I suspect microvms will need pci eventually. I would much rather KVM had an exit-less discovery mechanism in place by then because learning from history if it doesn't they will do some kind of hack on the kernel command line, and everyone will be stuck supporting that for years ... > > > > Either way, I think it makes sense explore other options before throwing > > something into KVM, e.g. modifying guest command line, adding a KVM hint, > > "fixing" QEMU, etc... > > > > Initially, this feature looked like a small and straitforward > (micro-)optimization to me: memory regions with 'PCI hole' semantics do > exist and we can speed up access to them. Ideally, I'd like to find > other 'constant memory' regions requiring fast access and come up with > an interface to create them in KVM but so far nothing interesting came > up... True, me neither. > -- > Vitaly