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
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel