From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754576AbbKXNxj (ORCPT ); Tue, 24 Nov 2015 08:53:39 -0500 Received: from mga14.intel.com ([192.55.52.115]:2793 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752920AbbKXNxg (ORCPT ); Tue, 24 Nov 2015 08:53:36 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,338,1444719600"; d="scan'208";a="827977057" From: Lan Tianyu To: a.motakis@virtualopensystems.com, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, bhelgaas@google.com, carolyn.wyborny@intel.com, donald.c.skidmore@intel.com, eddie.dong@intel.com, nrupal.jani@intel.com, agraf@suse.de, kvm@vger.kernel.org, pbonzini@redhat.com, qemu-devel@nongnu.org, emil.s.tantilov@intel.com, gerlitz.or@gmail.com, mark.d.rustad@intel.com, mst@redhat.com, eric.auger@linaro.org, intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com, john.ronciak@intel.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, matthew.vick@intel.com, mitch.a.williams@intel.com, netdev@vger.kernel.org, shannon.nelson@intel.com, tianyu.lan@intel.com, weiyang@linux.vnet.ibm.com, zajec5@gmail.com Subject: [RFC PATCH V2 2/3] PCI: Add macros for faked PCI migration capability Date: Tue, 24 Nov 2015 21:38:17 +0800 Message-Id: <1448372298-28386-3-git-send-email-tianyu.lan@intel.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> References: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch is to extend PCI CAP id for migration cap and add reg macros. The CAP ID is trial and we may find better one if the solution is feasible. *PCI_VF_MIGRATION_CAP For VF driver to control that triggers mailbox irq or not during migration. *PCI_VF_MIGRATION_VMM_STATUS Qemu stores migration status in the reg *PCI_VF_MIGRATION_VF_STATUS VF driver tells Qemu ready for migration *PCI_VF_MIGRATION_IRQ VF driver stores mailbox interrupt vector in the reg for Qemu to trigger during migration. Signed-off-by: Lan Tianyu --- include/uapi/linux/pci_regs.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index efe3443..9defb6f 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h @@ -216,7 +216,8 @@ #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ -#define PCI_CAP_ID_MAX PCI_CAP_ID_AF +#define PCI_CAP_ID_MIGRATION 0X14 +#define PCI_CAP_ID_MAX PCI_CAP_ID_MIGRATION #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ #define PCI_CAP_SIZEOF 4 @@ -904,4 +905,19 @@ #define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */ #define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */ +/* Migration*/ +#define PCI_VF_MIGRATION_CAP 0x04 +#define PCI_VF_MIGRATION_VMM_STATUS 0x05 +#define PCI_VF_MIGRATION_VF_STATUS 0x06 +#define PCI_VF_MIGRATION_IRQ 0x07 + +#define PCI_VF_MIGRATION_DISABLE 0x00 +#define PCI_VF_MIGRATION_ENABLE 0x01 + +#define VMM_MIGRATION_END 0x00 +#define VMM_MIGRATION_START 0x01 + +#define PCI_VF_WAIT_FOR_MIGRATION 0x00 +#define PCI_VF_READY_FOR_MIGRATION 0x01 + #endif /* LINUX_PCI_REGS_H */ -- 1.8.4.rc0.1.g8f6a3e5.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:35004) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1E2L-00050f-Go for qemu-devel@nongnu.org; Tue, 24 Nov 2015 08:53:41 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1E2K-00026Q-J4 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 08:53:37 -0500 Received: from mga02.intel.com ([134.134.136.20]:27187) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1E2K-00026E-D4 for qemu-devel@nongnu.org; Tue, 24 Nov 2015 08:53:36 -0500 From: Lan Tianyu Date: Tue, 24 Nov 2015 21:38:17 +0800 Message-Id: <1448372298-28386-3-git-send-email-tianyu.lan@intel.com> In-Reply-To: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> References: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> Subject: [Qemu-devel] [RFC PATCH V2 2/3] PCI: Add macros for faked PCI migration capability List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: a.motakis@virtualopensystems.com, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, bhelgaas@google.com, carolyn.wyborny@intel.com, donald.c.skidmore@intel.com, eddie.dong@intel.com, nrupal.jani@intel.com, agraf@suse.de, kvm@vger.kernel.org, pbonzini@redhat.com, qemu-devel@nongnu.org, emil.s.tantilov@intel.com, gerlitz.or@gmail.com, mark.d.rustad@intel.com, mst@redhat.com, eric.auger@linaro.org, intel-wired-lan@lists.osuosl.org, jeffrey.t.kirsher@intel.com, jesse.brandeburg@intel.com, john.ronciak@intel.com, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, matthew.vick@intel.com, mitch.a.williams@intel.com, netdev@vger.kernel.org, shannon.nelson@intel.com, tianyu.lan@intel.com, weiyang@linux.vnet.ibm.com, zajec5@gmail.com This patch is to extend PCI CAP id for migration cap and add reg macros. The CAP ID is trial and we may find better one if the solution is feasible. *PCI_VF_MIGRATION_CAP For VF driver to control that triggers mailbox irq or not during migration. *PCI_VF_MIGRATION_VMM_STATUS Qemu stores migration status in the reg *PCI_VF_MIGRATION_VF_STATUS VF driver tells Qemu ready for migration *PCI_VF_MIGRATION_IRQ VF driver stores mailbox interrupt vector in the reg for Qemu to trigger during migration. Signed-off-by: Lan Tianyu --- include/uapi/linux/pci_regs.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index efe3443..9defb6f 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h @@ -216,7 +216,8 @@ #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ -#define PCI_CAP_ID_MAX PCI_CAP_ID_AF +#define PCI_CAP_ID_MIGRATION 0X14 +#define PCI_CAP_ID_MAX PCI_CAP_ID_MIGRATION #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ #define PCI_CAP_SIZEOF 4 @@ -904,4 +905,19 @@ #define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */ #define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */ +/* Migration*/ +#define PCI_VF_MIGRATION_CAP 0x04 +#define PCI_VF_MIGRATION_VMM_STATUS 0x05 +#define PCI_VF_MIGRATION_VF_STATUS 0x06 +#define PCI_VF_MIGRATION_IRQ 0x07 + +#define PCI_VF_MIGRATION_DISABLE 0x00 +#define PCI_VF_MIGRATION_ENABLE 0x01 + +#define VMM_MIGRATION_END 0x00 +#define VMM_MIGRATION_START 0x01 + +#define PCI_VF_WAIT_FOR_MIGRATION 0x00 +#define PCI_VF_READY_FOR_MIGRATION 0x01 + #endif /* LINUX_PCI_REGS_H */ -- 1.8.4.rc0.1.g8f6a3e5.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lan Tianyu Subject: [RFC PATCH V2 2/3] PCI: Add macros for faked PCI migration capability Date: Tue, 24 Nov 2015 21:38:17 +0800 Message-ID: <1448372298-28386-3-git-send-email-tianyu.lan@intel.com> References: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> To: a.motakis-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org, alex.williamson-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, b.reynal-lrHrjnjw1UfHK3s98zE1ajGjJy/sRE9J@public.gmane.org, bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org, carolyn.wyborny-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, donald.c.skidmore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, eddie.dong-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, nrupal.jani-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, agraf-l3A5Bk7waGM@public.gmane.org, kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, pbonzini-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, qemu-devel-qX2TKyscuCcdnm+yROfE0A@public.gmane.org, emil.s.tantilov-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, gerlitz.or-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org, mark.d.rustad-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, mst-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org, eric.auger-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org, intel-wired-lan-qjLDD68F18P21nG7glBr7A@public.gmane.org, jeffrey.t.kirsher-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, jesse.brandeburg-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, john.ronciak-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, linux-api-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, matthew.vick-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, mitch.a.williams-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, shannon.nelson-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org, weiyang-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org, zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org Return-path: In-Reply-To: <1448372298-28386-1-git-send-email-tianyu.lan-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> Sender: linux-api-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: netdev.vger.kernel.org This patch is to extend PCI CAP id for migration cap and add reg macros. The CAP ID is trial and we may find better one if the solution is feasible. *PCI_VF_MIGRATION_CAP For VF driver to control that triggers mailbox irq or not during migration. *PCI_VF_MIGRATION_VMM_STATUS Qemu stores migration status in the reg *PCI_VF_MIGRATION_VF_STATUS VF driver tells Qemu ready for migration *PCI_VF_MIGRATION_IRQ VF driver stores mailbox interrupt vector in the reg for Qemu to trigger during migration. Signed-off-by: Lan Tianyu --- include/uapi/linux/pci_regs.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index efe3443..9defb6f 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h @@ -216,7 +216,8 @@ #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ -#define PCI_CAP_ID_MAX PCI_CAP_ID_AF +#define PCI_CAP_ID_MIGRATION 0X14 +#define PCI_CAP_ID_MAX PCI_CAP_ID_MIGRATION #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ #define PCI_CAP_SIZEOF 4 @@ -904,4 +905,19 @@ #define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */ #define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */ +/* Migration*/ +#define PCI_VF_MIGRATION_CAP 0x04 +#define PCI_VF_MIGRATION_VMM_STATUS 0x05 +#define PCI_VF_MIGRATION_VF_STATUS 0x06 +#define PCI_VF_MIGRATION_IRQ 0x07 + +#define PCI_VF_MIGRATION_DISABLE 0x00 +#define PCI_VF_MIGRATION_ENABLE 0x01 + +#define VMM_MIGRATION_END 0x00 +#define VMM_MIGRATION_START 0x01 + +#define PCI_VF_WAIT_FOR_MIGRATION 0x00 +#define PCI_VF_READY_FOR_MIGRATION 0x01 + #endif /* LINUX_PCI_REGS_H */ -- 1.8.4.rc0.1.g8f6a3e5.dirty From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lan Tianyu Date: Tue, 24 Nov 2015 21:38:17 +0800 Subject: [Intel-wired-lan] [RFC PATCH V2 2/3] PCI: Add macros for faked PCI migration capability In-Reply-To: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> References: <1448372298-28386-1-git-send-email-tianyu.lan@intel.com> Message-ID: <1448372298-28386-3-git-send-email-tianyu.lan@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: intel-wired-lan@osuosl.org List-ID: This patch is to extend PCI CAP id for migration cap and add reg macros. The CAP ID is trial and we may find better one if the solution is feasible. *PCI_VF_MIGRATION_CAP For VF driver to control that triggers mailbox irq or not during migration. *PCI_VF_MIGRATION_VMM_STATUS Qemu stores migration status in the reg *PCI_VF_MIGRATION_VF_STATUS VF driver tells Qemu ready for migration *PCI_VF_MIGRATION_IRQ VF driver stores mailbox interrupt vector in the reg for Qemu to trigger during migration. Signed-off-by: Lan Tianyu --- include/uapi/linux/pci_regs.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/uapi/linux/pci_regs.h b/include/uapi/linux/pci_regs.h index efe3443..9defb6f 100644 --- a/include/uapi/linux/pci_regs.h +++ b/include/uapi/linux/pci_regs.h @@ -216,7 +216,8 @@ #define PCI_CAP_ID_MSIX 0x11 /* MSI-X */ #define PCI_CAP_ID_SATA 0x12 /* SATA Data/Index Conf. */ #define PCI_CAP_ID_AF 0x13 /* PCI Advanced Features */ -#define PCI_CAP_ID_MAX PCI_CAP_ID_AF +#define PCI_CAP_ID_MIGRATION 0X14 +#define PCI_CAP_ID_MAX PCI_CAP_ID_MIGRATION #define PCI_CAP_LIST_NEXT 1 /* Next capability in the list */ #define PCI_CAP_FLAGS 2 /* Capability defined flags (16 bits) */ #define PCI_CAP_SIZEOF 4 @@ -904,4 +905,19 @@ #define PCI_TPH_CAP_ST_SHIFT 16 /* st table shift */ #define PCI_TPH_BASE_SIZEOF 12 /* size with no st table */ +/* Migration*/ +#define PCI_VF_MIGRATION_CAP 0x04 +#define PCI_VF_MIGRATION_VMM_STATUS 0x05 +#define PCI_VF_MIGRATION_VF_STATUS 0x06 +#define PCI_VF_MIGRATION_IRQ 0x07 + +#define PCI_VF_MIGRATION_DISABLE 0x00 +#define PCI_VF_MIGRATION_ENABLE 0x01 + +#define VMM_MIGRATION_END 0x00 +#define VMM_MIGRATION_START 0x01 + +#define PCI_VF_WAIT_FOR_MIGRATION 0x00 +#define PCI_VF_READY_FOR_MIGRATION 0x01 + #endif /* LINUX_PCI_REGS_H */ -- 1.8.4.rc0.1.g8f6a3e5.dirty