All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Zhao <shannon.zhao@linaro.org>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: "peter.maydell@linaro.org" <peter.maydell@linaro.org>,
	"mst@redhat.com" <mst@redhat.com>,
	"peter.huangpeng@huawei.com" <peter.huangpeng@huawei.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"zhaoshenglong@huawei.com" <zhaoshenglong@huawei.com>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	"christoffer.dall@linaro.org" <christoffer.dall@linaro.org>
Subject: Re: [Qemu-devel] [PATCH 1/4] hw/s390x/virtio-ccw: Add virtio_ccw_device_plugged for virtio-ccw
Date: Fri, 17 Apr 2015 22:50:43 +0800	[thread overview]
Message-ID: <CAM2+HU68W2SZcx6uRcEvG9rpiYoHOK9VpXWT9_dgNSzKkdOBTQ@mail.gmail.com> (raw)
In-Reply-To: <20150417154455.2aa48701.cornelia.huck@de.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1602 bytes --]

On Friday, 17 April 2015, Cornelia Huck <cornelia.huck@de.ibm.com> wrote:
> On Fri, 17 Apr 2015 20:13:43 +0800
> Shannon Zhao <shannon.zhao@linaro.org> wrote:
>
>> Add virtio_ccw_device_plugged, it can be used to get backend's features.
>>
>> Signed-off-by: Shannon Zhao <zhaoshenglong@huawei.com>
>> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> ---
>>  hw/s390x/virtio-ccw.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
>> index 130535c..30ca377 100644
>> --- a/hw/s390x/virtio-ccw.c
>> +++ b/hw/s390x/virtio-ccw.c
>> @@ -1395,6 +1395,16 @@ static int virtio_ccw_load_config(DeviceState *d,
QEMUFile *f)
>>      return 0;
>>  }
>>
>> +/* This is called by virtio-bus just after the device is plugged. */
>> +static void virtio_ccw_device_plugged(DeviceState *d)
>> +{
>> +    VirtioCcwDevice *dev = VIRTIO_CCW_DEVICE(d);
>> +
>> +    /* Only the first 32 feature bits are used. */
>> +    dev->host_features[0] = virtio_bus_get_vdev_features(&dev->bus,
>> +
 dev->host_features[0]);
>> +}
>> +
>
> So how does this help? We already fetch the host features in the
> realize function.
>

please see patch 4/4, in this patch we will move the properties to
backends. So the features can't fetch through realize function.
If you ask me why we need to move, it's because these properties actually
belongs to the backends and then we can support virtio-mmio to have these
properties.

>>  /**************** Virtio-ccw Bus Device Descriptions
*******************/
>>
>>  static Property virtio_ccw_net_properties[] = {
>
>

[-- Attachment #2: Type: text/html, Size: 2267 bytes --]

  reply	other threads:[~2015-04-17 14:50 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-17 12:13 [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends Shannon Zhao
2015-04-17 12:13 ` [Qemu-devel] [PATCH 1/4] hw/s390x/virtio-ccw: Add virtio_ccw_device_plugged for virtio-ccw Shannon Zhao
2015-04-17 13:44   ` Cornelia Huck
2015-04-17 14:50     ` Shannon Zhao [this message]
2015-04-17 15:33   ` Peter Maydell
2015-04-18  1:36     ` Shannon Zhao
2015-04-17 12:13 ` [Qemu-devel] [PATCH 2/4] hw/s390x/s390-virtio-bus: Add virtio_s390_device_plugged for s390-virtio Shannon Zhao
2015-04-17 12:13 ` [Qemu-devel] [PATCH 3/4] hw/net/virtio-net: Move DEFINE_VIRTIO_NET_FEATURES to virtio-net Shannon Zhao
2015-04-17 14:05   ` Peter Maydell
2015-04-17 14:50     ` Shannon Zhao
2015-04-17 15:03       ` Peter Maydell
2015-04-17 12:13 ` [Qemu-devel] [PATCH 4/4] virtio-scsi: Move DEFINE_VIRTIO_SCSI_FEATURES to virtio-scsi Shannon Zhao
2015-04-17 13:43 ` [Qemu-devel] [PATCH 0/4] virtio: Move host features to backends Cornelia Huck
2015-04-17 14:00   ` Peter Maydell
2015-04-20  8:54     ` Cornelia Huck
2015-04-20  9:02       ` Peter Maydell
2015-04-20  9:12       ` Michael S. Tsirkin
2015-04-20 12:14         ` Cornelia Huck
2015-04-20 12:43           ` Michael S. Tsirkin

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=CAM2+HU68W2SZcx6uRcEvG9rpiYoHOK9VpXWT9_dgNSzKkdOBTQ@mail.gmail.com \
    --to=shannon.zhao@linaro.org \
    --cc=christoffer.dall@linaro.org \
    --cc=cornelia.huck@de.ibm.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.huangpeng@huawei.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=zhaoshenglong@huawei.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.