qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>
To: Marcel Apfelbaum <marcel@redhat.com>
Cc: kraxel@redhat.com, qemu-devel@nongnu.org, ehabkost@redhat.com,
	mst@redhat.com
Subject: Re: [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio devices
Date: Tue, 1 Dec 2015 16:19:27 +0200	[thread overview]
Message-ID: <20151201161927.41e37652@pixies> (raw)
In-Reply-To: <565DA81C.50003@redhat.com>

Hi,

On Tue, 1 Dec 2015 16:01:00 +0200, marcel@redhat.com wrote:
> On 12/01/2015 03:18 PM, Shmulik Ladkani wrote:
> > On Tue, 1 Dec 2015 13:48:13 +0200, marcel@redhat.com wrote:
> >>> May I suggest the following:
> >>> - Expose 'pci_qdev_realize'
> >>> - Have 'virtio_pci_class_init' arm it's own dc->realize,
> >>>     which will first set 'QEMU_PCI_CAP_EXPRESS' flag as needed,
> >>>     and then call 'pci_qdev_realize'
> >>> - Now, in 'virtio_pci_realize' we may use 'pci_is_express' instead of
> >>>     directly checking the proxy->flags
> >>>
> >>> If this sounds ok, I'll submit a fix.
> >>
> >> Give it a try, sure, but you don't need to expose pci_qdev_realize,
> >> you can 'hijack' parent's realize method before replacing it.
> >
> > Actually I caught this as I needed to do something very similar to
> > vmxnet3.
> >
> > Since we need this in 2 places, I thought it would be better to expose
> > pci_qdev_realize (maybe name it better) and not store parent's original
> > realize before replacing it.
> >
> > WDYT?
> 
> Personally I don't think pci_qdev_realize should be visible outside hw/pci/pci.c
> because "realize" should be private to object...

Thanks I'll follow that path and submit a patch shortly.

  reply	other threads:[~2015-12-01 14:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-10 11:41 [Qemu-devel] [PATCH V5] hw/virtio: Add PCIe capability to virtio devices Marcel Apfelbaum
2015-12-01 10:29 ` Shmulik Ladkani
2015-12-01 11:48   ` Marcel Apfelbaum
2015-12-01 13:18     ` Shmulik Ladkani
2015-12-01 14:01       ` Marcel Apfelbaum
2015-12-01 14:19         ` Shmulik Ladkani [this message]
2015-12-01 14:25           ` Marcel Apfelbaum

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=20151201161927.41e37652@pixies \
    --to=shmulik.ladkani@ravellosystems.com \
    --cc=ehabkost@redhat.com \
    --cc=kraxel@redhat.com \
    --cc=marcel@redhat.com \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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).