qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
	Shmulik Ladkani <shmulik.ladkani@ravellosystems.com>,
	Dmitry Fleytman <dmitry@daynix.com>
Cc: idan.brown@ravellosystems.com, qemu-devel@nongnu.org,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint
Date: Mon, 14 Dec 2015 20:25:49 +0200	[thread overview]
Message-ID: <566F09AD.40803@redhat.com> (raw)
In-Reply-To: <566EF8FD.3080206@redhat.com>

On 12/14/2015 07:14 PM, Paolo Bonzini wrote:
>
>
> On 13/12/2015 09:08, Shmulik Ladkani wrote:
>> +    pvs_k->parent_dc_realize = dc->realize;
>
> Marcel, Michael,
>
> this creates a really nasty dependency on the contents of pci_qdev_realize.

Hi Paolo,

In this case is exactly want we want to do. We don't care what pci_qdev_realize does.
We just want to made a change and then call it. We can think of it as "pre-realize."
I think I already saw a "post-realize" or something.

The usage is also documented in include/qom/object.h, how to derive "do_something" (see derived_do_something).

>
> Can you instead change PCIDeviceClass's pc->is_express to a function
> pointer, and provide a sample implementation pci_is_express_true for the
> devices that set is_express to true?

I think I thougth about this too and I have nothing against it.
The only "down side" I can see is that "is_express" means actually "can_be_express",
and some classes keep it true even if sometimes is not actually a PCIe device.

Now we change back the meaning to "is_really_express" :) , but we may encounter some side effects.
(I understand that we keep it true so we don't have to maintain some complicated code
on VMState related to the config space size.)

Thanks,
Marcel

>
> Thanks,
>
> Paolo
>

  parent reply	other threads:[~2015-12-14 18:25 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-13  8:08 [Qemu-devel] [PATCH v2 0/6] pvscsi: Fine-tune device capabilities Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 1/6] vmw_pvscsi: Set device subsystem and revision Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 2/6] vmw_pvscsi: Change offset of msi pci capability Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 3/6] vmw_pvscsi: Introduce 'x-old-pci-configuration' backword compatability property Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 4/6] vmw_pvscsi: coding: Introduce PVSCSIClass Shmulik Ladkani
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint Shmulik Ladkani
2015-12-14 17:14   ` Paolo Bonzini
2015-12-14 17:31     ` Shmulik Ladkani
2015-12-14 17:37     ` Michael S. Tsirkin
2015-12-14 18:05       ` Paolo Bonzini
2015-12-14 21:01       ` Shmulik Ladkani
2015-12-14 21:10         ` Michael S. Tsirkin
2015-12-15  5:48           ` Shmulik Ladkani
2015-12-14 18:25     ` Marcel Apfelbaum [this message]
2015-12-13  8:08 ` [Qemu-devel] [PATCH v2 6/6] vmw_pvscsi: Introduce 'x-disable-pcie' backword compatability property Shmulik Ladkani
2015-12-14 17:07   ` Paolo Bonzini
2015-12-14 17:12     ` Michael S. Tsirkin
2015-12-14 17:28       ` Paolo Bonzini
2015-12-14 17:35         ` Michael S. Tsirkin
2015-12-14 18:04           ` Paolo Bonzini
2015-12-14 18:26             ` Michael S. Tsirkin
2015-12-15  8:13               ` Shmulik Ladkani
2015-12-13  8:24 ` [Qemu-devel] [PATCH v2 0/6] pvscsi: Fine-tune device capabilities Dmitry Fleytman

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=566F09AD.40803@redhat.com \
    --to=marcel@redhat.com \
    --cc=dmitry@daynix.com \
    --cc=idan.brown@ravellosystems.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=shmulik.ladkani@ravellosystems.com \
    /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).