From patchwork Tue Apr 9 02:59:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: FionaLi-oc X-Patchwork-Id: 10890397 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3827C14DB for ; Tue, 9 Apr 2019 03:02:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19085287BF for ; Tue, 9 Apr 2019 03:02:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 16F6F28820; Tue, 9 Apr 2019 03:02:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E610D287BF for ; Tue, 9 Apr 2019 03:02:19 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDgzC-0004mM-RL; Tue, 09 Apr 2019 02:59:46 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hDgzC-0004mB-5i for xen-devel@lists.xenproject.org; Tue, 09 Apr 2019 02:59:46 +0000 X-Inumbo-ID: 8242371e-5a73-11e9-9dc5-330ef5c92a36 Received: from ZXSHCAS1.zhaoxin.com (unknown [203.148.12.81]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id 8242371e-5a73-11e9-9dc5-330ef5c92a36; Tue, 09 Apr 2019 02:59:39 +0000 (UTC) Received: from zxbjmbx1.zhaoxin.com (10.29.252.163) by ZXSHCAS1.zhaoxin.com (10.28.252.161) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Tue, 9 Apr 2019 10:59:29 +0800 Received: from localhost.localdomain (10.29.8.62) by zxbjmbx1.zhaoxin.com (10.29.252.163) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1261.35; Tue, 9 Apr 2019 10:59:29 +0800 From: FionaLi-oc To: Date: Tue, 9 Apr 2019 10:59:27 +0800 Message-ID: <1554778767-3480-1-git-send-email-fionali-oc@zhaoxin.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-Originating-IP: [10.29.8.62] X-ClientProxiedBy: zxbjmbx1.zhaoxin.com (10.29.252.163) To zxbjmbx1.zhaoxin.com (10.29.252.163) Subject: [Xen-devel] [PATCH 0/2] x86/iommu: support IOMMU for Zhaoxin CPU X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: wei.liu2@citrix.com, andrew.cooper3@citrix.com, cobechen@zhaoxin.com, FionaLi-oc , jbeulich@suse.com, roger.pau@citrix.com Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP The patchset supports some features for Zhaoxin CPU whose vendor ID is 'Shanghai'. Zhaoxin x86 SOC supports I/O virtualization which is compatible with Intel I/O virtulizaiton. Indent with four spaces. Signed-off-by: FionaLi-oc --- xen/include/asm-x86/iommu.h | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/xen/include/asm-x86/iommu.h b/xen/include/asm-x86/iommu.h index 8dc3924..ec5a009 100644 --- a/xen/include/asm-x86/iommu.h +++ b/xen/include/asm-x86/iommu.h @@ -71,10 +71,11 @@ static inline int iommu_hardware_setup(void) { switch ( boot_cpu_data.x86_vendor ) { - case X86_VENDOR_INTEL: - return intel_vtd_setup(); - case X86_VENDOR_AMD: - return amd_iov_detect(); + case X86_VENDOR_INTEL: + case X86_VENDOR_SHANGHAI: + return intel_vtd_setup(); + case X86_VENDOR_AMD: + return amd_iov_detect(); } return -ENODEV;