From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v11][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Wed, 22 Jul 2015 23:00:19 +0800 Message-ID: <55AFB003.6020804@intel.com> References: <1437528607-19315-1-git-send-email-tiejun.chen@intel.com> <1437528607-19315-12-git-send-email-tiejun.chen@intel.com> <21935.39327.738755.273206@mariner.uk.xensource.com> <55AF9BC6.4030200@intel.com> <21935.41699.296723.745804@mariner.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <21935.41699.296723.745804@mariner.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Jackson Cc: Stefano Stabellini , Wei Liu , Ian Campbell , xen-devel@lists.xen.org List-Id: xen-devel@lists.xenproject.org On 2015/7/22 22:04, Ian Jackson wrote: > Chen, Tiejun writes ("Re: [v11][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM"): >> Sounds you start to merge them into your tree? >> >> But now Jan is trying to update patch #1 as you see. I think something >> needs to be synced on tool sides. Although that is not finished, at >> least three changes exist: > > Thanks. I am negotiating with Jan et al on IRC. > We just need to sync two patches: #1. To patch #8: diff --git a/tools/libxc/include/xenctrl.h b/tools/libxc/include/xenctrl.h index 2991333..9c5ef8b 100644 --- a/tools/libxc/include/xenctrl.h +++ b/tools/libxc/include/xenctrl.h @@ -1316,7 +1316,7 @@ int xc_get_machine_memory_map(xc_interface *xch, uint32_t max_entries); int xc_reserved_device_memory_map(xc_interface *xch, - uint32_t flag, + uint32_t flags, uint16_t seg, uint8_t bus, uint8_t devfn, diff --git a/tools/libxc/xc_domain.c b/tools/libxc/xc_domain.c index 298b3b5..1b074b7 100644 --- a/tools/libxc/xc_domain.c +++ b/tools/libxc/xc_domain.c @@ -686,7 +686,7 @@ int xc_domain_set_memory_map(xc_interface *xch, } int xc_reserved_device_memory_map(xc_interface *xch, - uint32_t flag, + uint32_t flags, uint16_t seg, uint8_t bus, uint8_t devfn, @@ -695,11 +695,11 @@ int xc_reserved_device_memory_map(xc_interface *xch, { int rc; struct xen_reserved_device_memory_map xrdmmap = { - .flag = flag, - .seg = seg, - .bus = bus, - .devfn = devfn, - .nr_entries = *max_entries + .flags = flags, + .nr_entries = *max_entries, + .dev.pci.seg = seg, + .dev.pci.bus = bus, + .dev.pci.devfn = devfn, }; DECLARE_HYPERCALL_BOUNCE(entries, sizeof(struct xen_reserved_device_memory) * #2. To patch #11: diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c index 29476fc..40b2bba 100644 --- a/tools/libxl/libxl_dm.c +++ b/tools/libxl/libxl_dm.c @@ -212,7 +212,7 @@ int libxl__domain_device_construct_rdm(libxl__gc *gc, unsigned int nr_entries; /* Collect all rdm info if exist. */ - rc = libxl__xc_device_get_rdm(gc, PCI_DEV_RDM_ALL, + rc = libxl__xc_device_get_rdm(gc, XENMEM_RDM_ALL, 0, 0, 0, &nr_entries, &xrdm); if (rc) goto out; @@ -240,7 +240,7 @@ int libxl__domain_device_construct_rdm(libxl__gc *gc, devfn = PCI_DEVFN(d_config->pcidevs[i].dev, d_config->pcidevs[i].func); nr_entries = 0; - rc = libxl__xc_device_get_rdm(gc, ~PCI_DEV_RDM_ALL, + rc = libxl__xc_device_get_rdm(gc, 0, seg, bus, devfn, &nr_entries, &xrdm); if (rc) goto out; Note I just compiled with these changes since right now I can't access any machine to test. Thanks Tiejun