qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH 02/17] ipmi: Add a PC ISA type structure


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH 02/17] ipmi: Add a PC ISA type structure
Date: Wed, 13 May 2015 16:52:11 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0


On 11/05/2015 21:58, Corey Minyard wrote:
> I've debated this in my mind since I've been learning more about
> qemu. Some of the bmc properties are being passed in to the interface
> and passed on to the bmc. Plus some IPMI systems have multiple
> interfaces that point to the same bmc.  It might be best to have the
> user create a bmc device then tie an interface device to it.
> 
> If I do this, what is the acceptable way to look up another object
> this way?  I hunted a bit and didn't come up with anything clean.

Yes, you're right indeed!!!  I think you want something like

   -object ipmi-bmc-extern,id=bmc0,chardev=foo
   -device isa-ipmi-kcs,bmc=bmc0

vs.

   -object ipmi-bmc,id=bmc0
   -device isa-ipmi-bt,bmc=bmc0

ipmi-bmc would be a subclass of Object like the one that you have, but
it needs to implement the UserCreatable interface; see backends/rng.c
for an example.

Then ipmi-isa-kcs would be your usual ISA device, so a subclass of
TYPE_ISA_DEVICE; however it would implement IPMIInterface, which would
be an interface rather than an abstract class.  For an example of
interface boilerplate, see hw/core/hotplug.c.  For an example of how to
implement the "bmc" property, see hw/mem/pc-dimm.c.

Paolo



reply via email to

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