|
From: | Dmitry Fleytman |
Subject: | Re: [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation |
Date: | Sun, 2 Dec 2012 10:33:05 +0200 |
On Fri, Nov 16, 2012 at 2:55 PM, Dmitry Fleytman <address@hidden> wrote:These two fields should be bool.
> + /* Whether MSI-X support was installed successfully */
> + uint8_t msix_used;
> + /* Whether MSI support was installed successfully */
> + uint8_t msi_used;
bool
> + /* Whether automatic interrupts masking enabled */
> + uint8_t auto_int_masking;
It's useful to document why a memory barrier is being used in each
> +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();
> +}
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?
Daynix Computing Ltd.
Cell: +972-54-2819481
Skype: dmitry.fleytman[Prev in Thread] | Current Thread | [Next in Thread] |