From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH] pci-assign: Hide ioport regions on lacking sysfs support Date: Wed, 30 May 2012 11:50:55 +0300 Message-ID: <4FC5DF6F.30301@redhat.com> References: <4FC501BA.5010105@siemens.com> <4FC503CD.6010804@redhat.com> <1338312532.4714.139.camel@ul30vt> <4FC5D872.6080702@redhat.com> <4FC5DEA6.5040607@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Cc: Alex Williamson , Marcelo Tosatti , kvm To: Jan Kiszka Return-path: Received: from mx1.redhat.com ([209.132.183.28]:5420 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932264Ab2E3IvA (ORCPT ); Wed, 30 May 2012 04:51:00 -0400 In-Reply-To: <4FC5DEA6.5040607@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/30/2012 11:47 AM, Jan Kiszka wrote: > On 2012-05-30 10:21, Avi Kivity wrote: >> On 05/29/2012 08:28 PM, Alex Williamson wrote: >>> On Tue, 2012-05-29 at 20:13 +0300, Avi Kivity wrote: >>>> On 05/29/2012 08:04 PM, Jan Kiszka wrote: >>>>> As suggested by Alex: Instead of failing if the kernel does not allow us >>>>> to speak to an ioport region, warn the user but, hide the region and >>>>> continue. >>>> >>>> >>>> Should we not, in addition, abort if the region is actually used? A >>>> guest malfunction is likely if we don't. >>> >>> The only way we could know that it's used is if it's the device ends up >>> with no valid regions as a result of this. Otherwise it's dependent on >>> both the device and the driver whether it can still function without the >>> i/o port regions. Thanks, >> >> If the I/O callback is called, we know it's used. > > We neither expose the region to the guest (so the guest has no clue > where to write to unless it assumes a fixed address - of which we have > no clue) nor register any callback for it. Ah, I thought you expose the BAR but don't back it with anything. No idea which approach is better, so we might as well try yours first. -- error compiling committee.c: too many arguments to function