Patchwork ivshmem assertion failure with EventNotifier

login
register
mail settings
Submitter Paolo Bonzini
Date Aug. 22, 2012, 12:01 p.m.
Message ID <5034CA1D.80101@redhat.com>
Download mbox | patch
Permalink /patch/179309/
State New
Headers show

Comments

Paolo Bonzini - Aug. 22, 2012, 12:01 p.m.
Il 22/08/2012 06:29, Cam Macdonell ha scritto:
> Hi Paolo,
> 
> I've noticed an assertion error when sending interrupts via ivshmem.
> I bisected to this patch.

Does this help?

     memory_region_transaction_begin();

Paolo
Cam Macdonell - Aug. 22, 2012, 5 p.m.
On Wed, Aug 22, 2012 at 6:01 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 22/08/2012 06:29, Cam Macdonell ha scritto:
>> Hi Paolo,
>>
>> I've noticed an assertion error when sending interrupts via ivshmem.
>> I bisected to this patch.
>
> Does this help?

Yes, that solves it.

>
> diff --git a/hw/ivshmem.c b/hw/ivshmem.c
> index b4d65a6..47f2a16 100644
> --- a/hw/ivshmem.c
> +++ b/hw/ivshmem.c
> @@ -366,6 +366,10 @@ static void close_guest_eventfds(IVShmemState *s,
> int posn)
>  {
>      int i, guest_curr_max;
>
> +    if (!ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
> +        return;
> +    }
> +
>      guest_curr_max = s->peers[posn].nb_eventfds;
>
>      memory_region_transaction_begin();
>
> Paolo
>

Patch

diff --git a/hw/ivshmem.c b/hw/ivshmem.c
index b4d65a6..47f2a16 100644
--- a/hw/ivshmem.c
+++ b/hw/ivshmem.c
@@ -366,6 +366,10 @@  static void close_guest_eventfds(IVShmemState *s,
int posn)
 {
     int i, guest_curr_max;

+    if (!ivshmem_has_feature(s, IVSHMEM_IOEVENTFD)) {
+        return;
+    }
+
     guest_curr_max = s->peers[posn].nb_eventfds;