From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sasha Levin Subject: Re: [PATCH] kvm tools: add status notification hook to virtio-mmio Date: Sun, 26 May 2013 11:33:42 -0400 Message-ID: <51A22B56.6040504@oracle.com> References: <1369139376-11921-1-git-send-email-marc.zyngier@arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org, kvmarm@lists.cs.columbia.edu, Sasha Levin , Will Deacon To: Marc Zyngier Return-path: Received: from userp1040.oracle.com ([156.151.31.81]:18515 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754018Ab3EZPeQ (ORCPT ); Sun, 26 May 2013 11:34:16 -0400 In-Reply-To: <1369139376-11921-1-git-send-email-marc.zyngier@arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 05/21/2013 08:29 AM, Marc Zyngier wrote: > Patch e03b449cbddf (kvm tools: add status notification hook for > virtio) converted virtio-net to use a new notification mechanism, > but unfortunately left virtio-mmio behind. > > The direct consequence is that both arm and arm64 guests are left > without any form of networking. Not good. > > Bring virtio-mmio into this brave new notified world, and feel the > power of being able to ping again. > > Cc: Sasha Levin > Cc: Will Deacon > Signed-off-by: Marc Zyngier > --- > tools/kvm/virtio/mmio.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/tools/kvm/virtio/mmio.c b/tools/kvm/virtio/mmio.c > index a4e4855..afa2692 100644 > --- a/tools/kvm/virtio/mmio.c > +++ b/tools/kvm/virtio/mmio.c > @@ -144,16 +144,21 @@ static void virtio_mmio_config_out(u64 addr, void *data, u32 len, > struct virtio_device *vdev) > { > struct virtio_mmio *vmmio = vdev->virtio; > + struct kvm *kvm = vmmio->kvm; > u32 val = 0; > > switch (addr) { > case VIRTIO_MMIO_HOST_FEATURES_SEL: > case VIRTIO_MMIO_GUEST_FEATURES_SEL: > case VIRTIO_MMIO_QUEUE_SEL: > - case VIRTIO_MMIO_STATUS: > val = ioport__read32(data); > *(u32 *)(((void *)&vmmio->hdr) + addr) = val; > break; > + case VIRTIO_MMIO_STATUS: > + vmmio->hdr.status = ioport__read32(data); > + if (vdev->ops->notify_status) > + vdev->ops->notify_status(kvm, vmmio->dev, vmmio->hdr.status); > + break; > case VIRTIO_MMIO_GUEST_FEATURES: > if (vmmio->hdr.guest_features_sel == 0) { > val = ioport__read32(data); > Pekka, could you apply please? Acked-by: Sasha Levin Thanks, Sasha