From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] vhost: flush used->idx update before reading avail->flags Date: Wed, 13 May 2015 12:46:30 +0200 Message-ID: <1907109.z7RyHoHxuq@xps13> References: <1429720392-25345-1-git-send-email-huawei.xie@intel.com> <1430305884-9139-1-git-send-email-huawei.xie@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org, mst@redhat.com To: Huawei Xie Return-path: Received: from mail-wi0-f180.google.com (mail-wi0-f180.google.com [209.85.212.180]) by dpdk.org (Postfix) with ESMTP id B596B5694 for ; Wed, 13 May 2015 12:47:15 +0200 (CEST) Received: by wicmx19 with SMTP id mx19so7502461wic.0 for ; Wed, 13 May 2015 03:47:14 -0700 (PDT) In-Reply-To: <1430305884-9139-1-git-send-email-huawei.xie@intel.com> List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 2015-04-29 19:11, Huawei Xie: > update of used->idx and read of avail->flags could be reordered. > memory fence should be used to ensure the order, otherwise guest could see a stale used->idx value after it toggles the interrupt suppression flag. > After guest sets the interrupt suppression flag, it will check if there is more buffer to process through used->idx. If it sees a stale value, it will exit the processing while host willn't send interrupt to guest. > > Signed-off-by: Huawei Xie Applied with following title, thanks vhost: fix virtio freeze due to missed interrupt