From: Thomas Huth <thuth@redhat.com>
To: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
pbonzini@redhat.com, famz@redhat.com, hpoussin@reactos.org,
rth@twiddle.net, peter.maydell@linaro.org, armbru@redhat.com,
qemu-devel@nongnu.org, qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions
Date: Thu, 6 Sep 2018 14:02:51 +0200 [thread overview]
Message-ID: <5c204531-2e59-4166-0325-745e4aa98531@redhat.com> (raw)
In-Reply-To: <20180906055736.20256-1-mark.cave-ayland@ilande.co.uk>
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
next prev parent reply other threads:[~2018-09-06 12:16 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-06 5:57 [Qemu-devel] [PATCH 0/3] scsi: remove lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
2018-09-06 5:57 ` [Qemu-devel] [PATCH 1/3] scsi: move lsi53c895a structures and defines into separate lsi53c895a.h file Mark Cave-Ayland
2018-09-06 11:52 ` Thomas Huth
2018-09-06 16:20 ` Mark Cave-Ayland
2018-09-06 5:57 ` [Qemu-devel] [PATCH 2/3] scsi: move lsi53c895a_create() and lsi53c810_create() callers to pci_create_simple() Mark Cave-Ayland
2018-09-06 5:57 ` [Qemu-devel] [PATCH 3/3] scsi: remove unused lsi53c895a_create() and lsi53c810_create() functions Mark Cave-Ayland
2018-09-06 12:02 ` Thomas Huth [this message]
2018-09-06 14:50 ` [Qemu-devel] [PATCH 0/3] scsi: remove " Peter Maydell
2018-09-06 16:40 ` Thomas Huth
2018-09-06 17:02 ` Peter Maydell
2018-09-06 17:15 ` Mark Cave-Ayland
2018-09-07 6:27 ` Thomas Huth
2018-09-07 12:34 ` Mark Cave-Ayland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5c204531-2e59-4166-0325-745e4aa98531@redhat.com \
--to=thuth@redhat.com \
--cc=armbru@redhat.com \
--cc=famz@redhat.com \
--cc=hpoussin@reactos.org \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
--cc=rth@twiddle.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).