* [PATCH] kvm tools: add status notification hook to virtio-mmio
@ 2013-05-21 12:29 Marc Zyngier
2013-05-26 15:33 ` Sasha Levin
0 siblings, 1 reply; 5+ messages in thread
From: Marc Zyngier @ 2013-05-21 12:29 UTC (permalink / raw)
To: kvm, kvmarm; +Cc: Sasha Levin, Will Deacon
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 <sasha.levin@oracle.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
---
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);
--
1.8.2.3
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tools: add status notification hook to virtio-mmio
2013-05-21 12:29 [PATCH] kvm tools: add status notification hook to virtio-mmio Marc Zyngier
@ 2013-05-26 15:33 ` Sasha Levin
2013-05-27 0:10 ` Asias He
0 siblings, 1 reply; 5+ messages in thread
From: Sasha Levin @ 2013-05-26 15:33 UTC (permalink / raw)
To: Marc Zyngier; +Cc: kvm, kvmarm, Sasha Levin, Will Deacon
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 <sasha.levin@oracle.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
> ---
> 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 <sasha.levin@oracle.com>
Thanks,
Sasha
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tools: add status notification hook to virtio-mmio
2013-05-26 15:33 ` Sasha Levin
@ 2013-05-27 0:10 ` Asias He
2013-06-10 14:22 ` Will Deacon
0 siblings, 1 reply; 5+ messages in thread
From: Asias He @ 2013-05-27 0:10 UTC (permalink / raw)
To: Sasha Levin; +Cc: Marc Zyngier, KVM, kvmarm, Will Deacon
On Sun, May 26, 2013 at 11:33 PM, Sasha Levin <sasha.levin@oracle.com> wrote:
> 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 <sasha.levin@oracle.com>
>> Cc: Will Deacon <will.deacon@arm.com>
>> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Acked-by: Asias He <asias.hejun@gmail.com>
>> ---
>> 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 <sasha.levin@oracle.com>
>
>
> Thanks,
> Sasha
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
Asias
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tools: add status notification hook to virtio-mmio
2013-05-27 0:10 ` Asias He
@ 2013-06-10 14:22 ` Will Deacon
2013-06-10 14:39 ` Pekka Enberg
0 siblings, 1 reply; 5+ messages in thread
From: Will Deacon @ 2013-06-10 14:22 UTC (permalink / raw)
To: Asias He; +Cc: Sasha Levin, Marc Zyngier, KVM, kvmarm, penberg
On Mon, May 27, 2013 at 01:10:28AM +0100, Asias He wrote:
> On Sun, May 26, 2013 at 11:33 PM, Sasha Levin <sasha.levin@oracle.com> wrote:
> > 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 <sasha.levin@oracle.com>
> >> Cc: Will Deacon <will.deacon@arm.com>
> >> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
>
> Acked-by: Asias He <asias.hejun@gmail.com>
>
> >> ---
> >> tools/kvm/virtio/mmio.c | 7 ++++++-
> >> 1 file changed, 6 insertions(+), 1 deletion(-)
Can you pick this one up please Pekka? If it helps:
Acked-by: Will Deacon <will.deacon@arm.com>
Will
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] kvm tools: add status notification hook to virtio-mmio
2013-06-10 14:22 ` Will Deacon
@ 2013-06-10 14:39 ` Pekka Enberg
0 siblings, 0 replies; 5+ messages in thread
From: Pekka Enberg @ 2013-06-10 14:39 UTC (permalink / raw)
To: Will Deacon; +Cc: Asias He, Sasha Levin, Marc Zyngier, KVM, kvmarm
On Mon, Jun 10, 2013 at 5:22 PM, Will Deacon <will.deacon@arm.com> wrote:
> Can you pick this one up please Pekka? If it helps:
>
> Acked-by: Will Deacon <will.deacon@arm.com>
CC'ing me helped even more! ;-) Applied, thanks guys!
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-06-10 14:39 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-21 12:29 [PATCH] kvm tools: add status notification hook to virtio-mmio Marc Zyngier
2013-05-26 15:33 ` Sasha Levin
2013-05-27 0:10 ` Asias He
2013-06-10 14:22 ` Will Deacon
2013-06-10 14:39 ` Pekka Enberg
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.