Received: from eggs.gnu.org ([208.118.235.92]:59080) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDesW-0004XH-Tt for qemu-devel@nongnu.org; Thu, 07 Mar 2013 12:45:21 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UDesV-0001tj-7Z for qemu-devel@nongnu.org; Thu, 07 Mar 2013 12:45:16 -0500 Received: from mx1.redhat.com ([209.132.183.28]:49439) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UDesU-0001tX-Uk for qemu-devel@nongnu.org; Thu, 07 Mar 2013 12:45:15 -0500 From: Markus Armbruster References: <1362418348-27398-1-git-send-email-pbonzini@redhat.com> <51350131.1070703@redhat.com> <874ngnsiig.fsf@blackfin.pond.sub.org> <87boavgzdo.fsf@blackfin.pond.sub.org> <8738w719b1.fsf@codemonkey.ws> <87zjyf3zqv.fsf@blackfin.pond.sub.org> <87d2vbuo27.fsf@codemonkey.ws> Date: Thu, 07 Mar 2013 18:45:10 +0100 In-Reply-To: <87d2vbuo27.fsf@codemonkey.ws> (Anthony Liguori's message of "Thu, 07 Mar 2013 11:17:36 -0600") Message-ID: <87ppzbyuhl.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] sysbus: add no_user for devices using mmio or IRQ or GPIO List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Peter Maydell , qemu-devel@nongnu.org, Paolo Bonzini Anthony Liguori writes: > Markus Armbruster writes: > >> Anthony Liguori writes: >> >>> Markus Armbruster writes: >>> >>>> Peter Maydell writes: >>>>>>> [and I don't think "this device >>>>>>> can be added via the monitor but not the command line" >>>>>>> counts as consistent or coherent...] >>>>>> >>>>>> no_user applies equally to -device and device_add. >>>>> >>>>> In the codebase as it stands, it applies only to -device. >>>>> I agree that we should be consistent here, which we could do >>>>> by applying Christian's patch or some variation to make device_add >>>>> honour no_user. (Or by removing no_user altogether :-)) >>>> >>>> Actually, it appears to apply only to help now! >>>> >>>> git-bisect blames this one: >>> >>> Let's step back and try to figure out the problem we're trying to solve. >>> >>> What is -devices help trying to show? Devices that are valid to for a >>> user to pass? Hint: on a PC, the only thing that's valid to add are >>> devices that implement a certain bus type. In fact, it depends on the >>> bus model. >>> >>> So if you want to make -device help prettier, we should add a filter >>> that looks at the busses available and filters anything that isn't an >>> instance of the appropriate bus types. >> >> Necessary, but not sufficient; see the two examples I posted upstream. >> Both devices would pass a "appropriate bus is available" filter. Both >> devices cannot possibly work. One of them starts up fine (mayhem at >> guest runtime expected), > > Note that what you've done with the first one is 100% representative of > real hardware. ISA bus conflicts are part of the nature of ISA and > why it was such an awful bus. Would be nice if we could make QEMU behave less awful. >> the other makes qemu crash & burn immediately. > > This is a modeling problem. It doesn't make sense for q35-pcihost > to be a PCIDevice. It's not a PCI device. > > But even so, segv'ing is always a bug and we ought to prevent it from > seg faulting. no_user to hide a SEGV is just using a bandaid. A bandaid isn't half bad when you're bleeding :)