From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751392AbdAVIBl (ORCPT ); Sun, 22 Jan 2017 03:01:41 -0500 Received: from mx1.redhat.com ([209.132.183.28]:54808 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750813AbdAVIBd (ORCPT ); Sun, 22 Jan 2017 03:01:33 -0500 Subject: Re: [PATCH v3] vfio error recovery: kernel support To: "Michael S. Tsirkin" , linux-kernel@vger.kernel.org References: <1485070594-27713-1-git-send-email-mst@redhat.com> Cc: Alex Williamson , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org From: Jason Wang Message-ID: Date: Sun, 22 Jan 2017 16:01:28 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <1485070594-27713-1-git-send-email-mst@redhat.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.29]); Sun, 22 Jan 2017 08:01:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017年01月22日 15:38, Michael S. Tsirkin wrote: > diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h > index 26c155b..6b0f416 100644 > --- a/include/linux/virtio_config.h > +++ b/include/linux/virtio_config.h > @@ -159,7 +159,17 @@ static inline bool virtio_has_iommu_quirk(const struct virtio_device *vdev) > * Note the reverse polarity of the quirk feature (compared to most > * other features), this is for compatibility with legacy systems. > */ > - return !virtio_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM); > + if (virtio_has_feature(vdev, VIRTIO_F_IOMMU_PLATFORM)) > + return false; > + > + /* > + * fastboot emulator for ARM puts virtio devices behind an SMMU > + * and never bypasses it for legacy devices. > + */ > + if (IS_ENABLED(CONFIG_ARM) || IS_ENABLED(CONFIG_ARM64)) > + return virtio_has_feature(vdev, VIRTIO_F_VERSION_1); > + > + return true; > } > Hi Michael: This part of codes seems unrelated. Thanks