qemu-ppc
[Top][All Lists]
Advanced

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

Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c81


From: Thomas Huth
Subject: Re: [Qemu-ppc] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions
Date: Thu, 6 Sep 2018 14:02:51 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

On 2018-09-06 07:57, Mark Cave-Ayland wrote:
> As part of an upcoming 40p patchset I have a requirement to change the PCI
> configuration of the LSI SCSI. However since commits a64aa5785d "hw: 
> Deprecate -drive
> if=scsi with non-onboard HBAs" and b891538e81 "hw/ppc/prep: Fix implicit 
> creation of
> "-drive if=scsi", the lsi53c8*_create() wrapper functions don't return the 
> device
> state itself.
> 
> Rather than altering these functions to return PCIDevice I simply went ahead 
> and split
> the LSIState structure and QOM types into a new lsi53c895a.h file, as is 
> fairly
> standard QEMU practice.
> 
> Not only does this enable me to change the PCI configuration of the LSI SCSI 
> device
> in an upcoming patchset, but it also allows full access to LSIState if 
> required
> (which is fairly similar to how the code was arranged before a64aa5785d).

I somehow fail to see that something outside of lsi53c895a.c should
really need to access the internals of LSIState. If there is something
that needs to be configured from the outside, it should be done via QOM
properties instead, shouldn't it? So I think I'd rather prefer if you
could do it the other way round and change the lsi*_create() functions
to return a pointer to PCIDevice instead, if possible.

 Thomas



reply via email to

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