From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750797AbdAVXBP (ORCPT ); Sun, 22 Jan 2017 18:01:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:35266 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750704AbdAVXBO (ORCPT ); Sun, 22 Jan 2017 18:01:14 -0500 Date: Mon, 23 Jan 2017 01:01:12 +0200 From: "Michael S. Tsirkin" To: Jason Wang Cc: linux-kernel@vger.kernel.org, Alex Williamson , kvm@vger.kernel.org, virtualization@lists.linux-foundation.org Subject: Re: [PATCH v3] vfio error recovery: kernel support Message-ID: <20170123010102-mutt-send-email-mst@kernel.org> References: <1485070594-27713-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Sun, 22 Jan 2017 23:01:14 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Jan 22, 2017 at 04:01:28PM +0800, Jason Wang wrote: > > > 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 Of course it is, thanks!