qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use


From: Michael S. Tsirkin
Subject: [Qemu-devel] Re: [patch uq/master 2/2] kvm-all.c: define smp_wmb and use it for coalesced mmio
Date: Mon, 22 Feb 2010 16:44:32 +0200
User-agent: Mutt/1.5.19 (2009-01-05)

On Mon, Feb 22, 2010 at 10:59:08AM -0300, Marcelo Tosatti wrote:
> Cc: "Michael S. Tsirkin" <address@hidden>
> Signed-off-by: Marcelo Tosatti <address@hidden>

Acked-by: Michael S. Tsirkin <address@hidden>

We'll need implementation for other arches, I'll dust off
my patch that adds it and repost, but for now this
is better than what we have.

> Index: qemu/kvm-all.c
> ===================================================================
> --- qemu.orig/kvm-all.c
> +++ qemu/kvm-all.c
> @@ -718,6 +718,9 @@ static int kvm_handle_io(uint16_t port, 
>      return 1;
>  }
>  
> +/* FIXME: arch dependant, x86 version */
> +#define smp_wmb()   asm volatile("" ::: "memory")
> +
>  void kvm_flush_coalesced_mmio_buffer(void)
>  {
>  #ifdef KVM_CAP_COALESCED_MMIO
> @@ -730,7 +733,7 @@ void kvm_flush_coalesced_mmio_buffer(voi
>              ent = &ring->coalesced_mmio[ring->first];
>  
>              cpu_physical_memory_write(ent->phys_addr, ent->data, ent->len);
> -            /* FIXME smp_wmb() */
> +            smp_wmb();
>              ring->first = (ring->first + 1) % KVM_COALESCED_MMIO_MAX;
>          }
>      }
> 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]