qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: BALATON Zoltan <balaton@eik.bme.hu>,
	qemu-devel@nongnu.org, qemu-block@nongnu.org
Cc: Eduardo Habkost <ehabkost@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	philmd@redhat.com,
	Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
	hpoussin@reactos.org,
	Aleksandar Markovic <amarkovic@wavecomp.com>,
	John Snow <jsnow@redhat.com>,
	Artyom Tarasenko <atar4qemu@gmail.com>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs()
Date: Sat, 14 Mar 2020 11:01:29 +0100	[thread overview]
Message-ID: <cb660aa6-6bb6-b75e-ebe3-8fc0e59fb1da@redhat.com> (raw)
In-Reply-To: <alpine.BSF.2.22.395.2003132307280.85181@zero.eik.bme.hu>

On 13/03/20 23:16, BALATON Zoltan wrote:
>>
>> +    pci_dev = pci_create_simple(pci_bus, -1, "cmd646-ide");
>> +    pci_ide_create_devs(pci_dev);
> 
> Additionally, I think it may also make sense to move pci_ide_create_devs
> call into the realize methods of these IDE controllers so boards do not
> need to do it explicitely. These calls always follow the creation of the
> device immediately so could just be done internally in IDE device and
> simplify it further. I can attempt to prepare additional patches for
> that but first I'd like to hear if anyone has anything against that to
> avoid doing useless work.

No, it's better to do it separately.  I think that otherwise you could
add another IDE controller with -device, and both controllers would try
to add the drives.

Basically, separating the call means that only automatically added
controllers obey "if=ide".

Paolo



  reply	other threads:[~2020-03-14 10:02 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-13 21:14 [PATCH 0/8] Misc hw/ide legacy clean up BALATON Zoltan
2020-03-13 21:14 ` [PATCH 3/8] hw/ide: Remove now unneded #include "hw/pci/pci.h" from hw/ide.h BALATON Zoltan
2020-03-14 22:03   ` Philippe Mathieu-Daudé
2020-03-13 21:14 ` [PATCH 1/8] hw/ide: Get rid of piix3_init functions BALATON Zoltan
2020-03-14 21:59   ` Philippe Mathieu-Daudé
2020-03-16  6:34   ` Markus Armbruster
2020-03-16 12:40     ` BALATON Zoltan
2020-03-13 21:14 ` [PATCH 6/8] hw/ide: Do ide_drive_get() within pci_ide_create_devs() BALATON Zoltan
2020-03-13 22:16   ` BALATON Zoltan
2020-03-14 10:01     ` Paolo Bonzini [this message]
2020-03-16  6:23       ` Markus Armbruster
2020-03-16  8:30         ` Philippe Mathieu-Daudé
2020-03-16 14:03           ` Markus Armbruster
2020-03-13 21:14 ` [PATCH 4/8] hw/ide: Move MAX_IDE_BUS define to one header BALATON Zoltan
2020-03-16  6:53   ` Markus Armbruster
2020-03-16  8:23     ` Philippe Mathieu-Daudé
2020-03-13 21:14 ` [PATCH 7/8] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h BALATON Zoltan
2020-03-13 21:14 ` [PATCH 8/8] hw/ide: Remove unneeded inclusion of hw/ide.h BALATON Zoltan
2020-03-13 21:14 ` [PATCH 5/8] hw/ide/pci.c: Coding style update to fix checkpatch errors BALATON Zoltan
2020-03-14 22:05   ` Philippe Mathieu-Daudé
2020-03-13 21:14 ` [PATCH 2/8] hw/ide: Get rid of piix4_init function BALATON Zoltan
2020-03-14 22:02   ` Philippe Mathieu-Daudé
2020-03-14 23:52     ` BALATON Zoltan
2020-03-15  5:35   ` Michael S. Tsirkin
2020-03-15 12:08     ` BALATON Zoltan
2020-03-14 11:45 ` [PATCH 0/8] Misc hw/ide legacy clean up Mark Cave-Ayland
2020-03-14 11:54   ` Paolo Bonzini
2020-03-16  6:58 ` Markus Armbruster
2020-03-16 13:06   ` BALATON Zoltan
2020-03-16 13:41     ` BALATON Zoltan
2020-03-17  4:25       ` John Snow
2020-03-16 12:55 ` [PATCH v2] hw/ide: Move MAX_IDE_DEVS define to hw/ide/internal.h BALATON Zoltan
2020-03-16 13:35 ` [PATCH v2] hw/ide: Do ide_drive_get() within pci_ide_create_devs() BALATON Zoltan

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=cb660aa6-6bb6-b75e-ebe3-8fc0e59fb1da@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=amarkovic@wavecomp.com \
    --cc=atar4qemu@gmail.com \
    --cc=balaton@eik.bme.hu \
    --cc=ehabkost@redhat.com \
    --cc=hpoussin@reactos.org \
    --cc=jsnow@redhat.com \
    --cc=mark.cave-ayland@ilande.co.uk \
    --cc=mst@redhat.com \
    --cc=philmd@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@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).