From mboxrd@z Thu Jan 1 00:00:00 1970 From: Anthony Liguori Subject: Re: [PATCH 1/1] kvm: bios: make MMIO address page aligned in guest Date: Tue, 24 Feb 2009 14:11:24 -0600 Message-ID: <49A4546C.2030504@codemonkey.ws> References: <715D42877B251141A38726ABF5CABF2C0195A1FE52@pdsmsx503.ccr.corp.intel.com> <49A3CF4C.2010601@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: "Han, Weidong" , "'kvm@vger.kernel.org'" To: Avi Kivity Return-path: Received: from qw-out-2122.google.com ([74.125.92.27]:58019 "EHLO qw-out-2122.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757830AbZBXUMA (ORCPT ); Tue, 24 Feb 2009 15:12:00 -0500 Received: by qw-out-2122.google.com with SMTP id 5so2084261qwi.37 for ; Tue, 24 Feb 2009 12:11:57 -0800 (PST) In-Reply-To: <49A3CF4C.2010601@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: Avi Kivity wrote: > Han, Weidong wrote: >> MMIO of some devices are not page aligned, such as some EHCI >> controllers and virtual Realtek NIC in guest. Current guest >> bios doesn't guarantee the start address of MMIO page aligned. >> This may result in failure of device assignment, because KVM >> only allow to register page aligned memory slots. For example, >> it fails to assign EHCI controller (its MMIO size is 1KB) with >> virtual Realtek NIC (its MMIO size is 256Bytes), because MMIO >> of virtual Realtek NIC in guest starts from 0xf2001000, MMIO of >> the EHCI controller will starts from 0xf2001400. >> >> MMIO addresses in guest are allocated in guest bios. This patch >> makes MMIO address page aligned in bios, then fixes the issue. >> >> > > Applied, thanks. I think this patch could also be sent to upstream QEMU/bochs-devel. Even though neither supports device assignment right now, QEMU eventually will and it seems like a sane thing to do anyway. Regards, Anthony Liguori