[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation |
Date: |
Fri, 30 Nov 2012 17:37:32 +0100 |
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?
- [Qemu-devel] [PATCH V7 0/6] VMXNET3 paravirtual NIC device implementation, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 1/6] Adding utility function net_checksum_add_cont() that allows checksum calculation of scattered data with odd chunk sizes, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 2/6] Adding utility function iov_net_csum_add() for iovec checksum calculation Adding utility function iov_rebuild() for smart iovec copy, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 3/6] Adding common definitions for VMWARE devices, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 4/6] Adding common code for VMWARE network devices, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 5/6] Adding packet abstraction for VMWARE network devices, Dmitry Fleytman, 2012/11/16
- [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation, Dmitry Fleytman, 2012/11/16
- Re: [Qemu-devel] [PATCH V7 6/6] Adding VMXNET3 device implementation,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [PATCH V7 0/6] VMXNET3 paravirtual NIC device implementation, Stefan Hajnoczi, 2012/11/21
- Re: [Qemu-devel] [PATCH V7 0/6] VMXNET3 paravirtual NIC device implementation, Stefan Hajnoczi, 2012/11/29