qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation


From: Dmitry Fleytman
Subject: Re: [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation
Date: Sun, 2 Dec 2012 10:33:05 +0200

Hello, Stefan

Thanks for the review.
I'll go over it later this week and prepare new patches.

Dmitry.


On Fri, Nov 30, 2012 at 6:37 PM, Stefan Hajnoczi <address@hidden> wrote:
On Fri, Nov 16, 2012 at 2:55 PM, Dmitry Fleytman <address@hidden> wrote:
> +        /* Whether MSI-X support was installed successfully */
> +        uint8_t msix_used;
> +        /* Whether MSI support was installed successfully */
> +        uint8_t msi_used;

These two fields should be bool.

> +        /* Whether automatic interrupts masking enabled */
> +        uint8_t auto_int_masking;

bool

> +static inline void vmxnet3_flush_shmem_changes(void)
> +{
> +    /*
> +     * Flush shared memory changes
> +     * Needed before sending interrupt to guest to ensure
> +     * it gets consistent memory state
> +     */
> +    smp_wmb();
> +}

It's useful to document why a memory barrier is being used in each
instance.  Therefore hiding smp_wmb() inside a wrapper function isn't
great.

Also, it's suspicious that smb_wmb() is used but no other barriers are
used.  What about a read memory barrier when accessing shared memory
written by the guest?



--
Dmitry Fleytman
Technology Expert and Consultant,

Daynix Computing Ltd.

Cell: +972-54-2819481

Skype: dmitry.fleytman


reply via email to

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