qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] vl: Eliminate usb_enabled()


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH] vl: Eliminate usb_enabled()
Date: Wed, 8 Jun 2016 14:13:30 -0300
User-agent: Mutt/1.6.1 (2016-04-27)

On Wed, Jun 08, 2016 at 02:34:16PM +0100, Peter Maydell wrote:
> On 8 June 2016 at 12:48, Paolo Bonzini <address@hidden> wrote:
> > ----- Original Message -----
> >> From: "Marcel Apfelbaum" <address@hidden>
> >> To: "Eduardo Habkost" <address@hidden>, address@hidden
> >> Cc: "Paolo Bonzini" <address@hidden>, "Andrzej Zaborowski" 
> >> <address@hidden>, "Peter Maydell"
> >> <address@hidden>, "Michael S. Tsirkin" <address@hidden>, "Alexander Graf" 
> >> <address@hidden>
> >> Sent: Wednesday, June 8, 2016 1:25:41 PM
> >> Subject: Re: [PATCH] vl: Eliminate usb_enabled()
> >>
> >> On 06/07/2016 07:56 PM, Eduardo Habkost wrote:
> >> > @@ -2062,6 +2063,7 @@ PXA2xxState *pxa270_init(MemoryRegion 
> >> > *address_space,
> >> >       int i;
> >> >       DriveInfo *dinfo;
> >> >       s = g_new0(PXA2xxState, 1);
> >> > +    MachineState *machine = MACHINE(qdev_get_machine());
> >> >
> >>
> >> All the callers of pxa270_init have a reference to the machine,
> >> you can pass it as parameter IMO.
> >
> > Another possibility is to pass a "bool usb_enabled" argument.
> 
> Or we could just create the USB controller always -- this
> is a part of the SoC, not a removable pluggable device,
> so it doesn't make much sense for the user to be able
> to create a system where it's not present.

If you think this is better, I will do it and send v2. It will
make things simpler.

BTW, I am working on a series to refactor all the *_enabled/no_*
code. I will take this into account and add something that will
warn the user if they try to enable something that is never
present in the machine, or disable something that is always
present.

-- 
Eduardo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]