From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [Qemu-devel] [RFC PATCH v3 3/3] fw/pci: Allocate IGD stolen memory Date: Tue, 16 Feb 2016 13:08:56 +0100 Message-ID: <1455624536.7504.76.camel@redhat.com> References: <20160213001835.18456.46422.stgit@gimli.home> <20160213002318.18456.48603.stgit@gimli.home> <20160213024904.GA31040@morn.lan> <20160213081209.6e4342ab@t450s.home> <20160213181838.GA8842@morn.lan> <20160213115151.542d5d42@t450s.home> <20160213200509.GB16826@morn.lan> <20160213135709.692f9a55@t450s.home> <20160214002032.GA27805@morn.lan> <20160213180331.2aa0d010@t450s.home> <20160215105451.76cf6329@nial.brq.redhat.com> <20160215122023.737c7781@t450s.home> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8BIT Cc: Igor Mammedov , "Kevin O'Connor" , kvm@vger.kernel.org, "Michael S. Tsirkin" , seabios@seabios.org, allen.m.kay@intel.com, qemu-devel@nongnu.org To: Alex Williamson Return-path: Received: from mx1.redhat.com ([209.132.183.28]:51934 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754968AbcBPMI6 convert rfc822-to-8bit (ORCPT ); Tue, 16 Feb 2016 07:08:58 -0500 In-Reply-To: <20160215122023.737c7781@t450s.home> Sender: kvm-owner@vger.kernel.org List-ID: Hi, > I don't mind the allocation of guest memory issue, the fact that guest > memory is consumed by built-in devices is exactly what happens on bare > metal. And following in qemu what happens on bare metal usually works best long-term. > to pre-populate it, we could. It at least puts QEMU in control, but > relaying back the address via a device specific register is still a bit > ugly. It is the usual way. We do the same for a few other addresses too (mmconfig xbar, acpi registers). Firmware programs the hardware, and qemu picks up the addresses from there (and puts them into the generated acpi tables for example). Main advantage is that we don't need a paravirtual firmware <=> qemu interface for each address. Yes, each firmware (seabios/ovmf/...) needs to handle it then. But if we allocate the stolen memory from guest ram the firmware has to handle it _anyway_ so it is marked reserved in e820 etc. cheers, Gerd