All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: linux-s390 <linux-s390@vger.kernel.org>,
	Anthony Liguori <aliguori@us.ibm.com>,
	Rusty Russell <rusty@rustcorp.com.au>, KVM <kvm@vger.kernel.org>,
	Carsten Otte <cotte@de.ibm.com>,
	Sebastian Ott <sebott@linux.vnet.ibm.com>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	qemu-devel <qemu-devel@nongnu.org>,
	Alexander Graf <agraf@suse.de>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>
Subject: Re: [PATCH v2 3/5] s390: Add new channel I/O based virtio transport.
Date: Tue, 18 Dec 2012 16:01:34 +0100	[thread overview]
Message-ID: <50D0854E.5030509@redhat.com> (raw)
In-Reply-To: <20121218155842.5ac3c4ee@gondolin>

Il 18/12/2012 15:58, Cornelia Huck ha scritto:
> On Tue, 18 Dec 2012 09:45:27 +0100
> Paolo Bonzini <pbonzini@redhat.com> wrote:
> 
>> Il 04/09/2012 17:13, Cornelia Huck ha scritto:
>>> +VirtioCcwBus *virtio_ccw_bus_init(void)
>>> +{
>>> +    VirtioCcwBus *cbus;
>>> +    BusState *bus;
>>> +    DeviceState *dev;
>>> +
>>> +    /* Create bridge device */
>>> +    dev = qdev_create(NULL, "virtio-ccw-bridge");
>>> +    qdev_init_nofail(dev);
>>> +
>>> +    /* Create bus on bridge device */
>>> +    bus = qbus_create(TYPE_VIRTIO_CCW_BUS, dev, "virtio-ccw");
>>> +    cbus = DO_UPCAST(VirtioCcwBus, bus, bus);
>>> +
>>> +    /* Enable hotplugging */
>>> +    bus->allow_hotplug = 1;
>>> +
>>> +    qemu_register_reset(virtio_ccw_reset_subchannels, cbus);
>>
>> Please use qdev device-reset and bus-reset callbacks instead of this.
> 
> Will do for the next version.
>>
>> In particular, when writing the status you should call
>> qdev_reset_all(DEVICE(sch)), and whatever state should be reset will
>> have to be cleared by the device-reset callback of SubchDev, including
>> calling virtio_reset.
> 
> With "writing the status" you mean "the guest sets the status to 0",
> right?

Yes.

Paolo

>> Everything else will be cleared instead by the bus-reset callback of
>> virtio-ccw-bus, similar to what you are doing in
>> virtio_ccw_reset_subchannels.
> 
> Looking at the reset handler, css_reset() is a bit oddly placed, as it
> doesn't really have anything to do with virtio-ccw; virtio-ccw is just
> the only current creator of channel subsystem images. I'll try to come
> up with a better model.
> 
>>
>> Paolo
>>
>>
>>> +    return cbus;
>>> +}
>>
> 

  reply	other threads:[~2012-12-18 15:01 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 15:13 [RFC PATCH v2 0/5] qemu: s390: virtual css and virtio-ccw Cornelia Huck
2012-09-04 15:13 ` [PATCH v2 1/5] Update headers for upcoming s390 changes Cornelia Huck
2012-09-04 15:13 ` [PATCH v2 2/5] s390: Virtual channel subsystem support Cornelia Huck
2012-09-04 15:13 ` [PATCH v2 3/5] s390: Add new channel I/O based virtio transport Cornelia Huck
2012-09-19 16:12   ` Alexander Graf
2012-09-20  7:39     ` Jens Freimann
2012-09-20 14:24   ` Anthony Liguori
2012-09-20 14:50     ` Alexander Graf
2012-12-18  8:45   ` Paolo Bonzini
2012-12-18 14:58     ` Cornelia Huck
2012-12-18 15:01       ` Paolo Bonzini [this message]
2012-09-04 15:13 ` [PATCH v2 4/5] s390: Virtual channel subsystem support for !KVM Cornelia Huck
2012-09-19 16:22   ` Alexander Graf
2012-09-04 15:13 ` [PATCH v2 5/5] [HACK] Handle multiple virtio aliases Cornelia Huck
2012-09-19 16:24   ` Alexander Graf
2012-09-20 14:27   ` Anthony Liguori
2012-10-09 14:39     ` Cornelia Huck

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=50D0854E.5030509@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=agraf@suse.de \
    --cc=aliguori@us.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=cornelia.huck@de.ibm.com \
    --cc=cotte@de.ibm.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rusty@rustcorp.com.au \
    --cc=schwidefsky@de.ibm.com \
    --cc=sebott@linux.vnet.ibm.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.