All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Chen, Tiejun" <tiejun.chen@intel.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	xen-devel@lists.xen.org
Subject: Re: [v11][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM
Date: Wed, 22 Jul 2015 23:00:19 +0800	[thread overview]
Message-ID: <55AFB003.6020804@intel.com> (raw)
In-Reply-To: <21935.41699.296723.745804@mariner.uk.xensource.com>

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

  reply	other threads:[~2015-07-22 15:00 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-22  1:29 [v11][PATCH 00/16] Fix RMRR Tiejun Chen
2015-07-22  1:29 ` [v11][PATCH 01/16] xen: introduce XENMEM_reserved_device_memory_map Tiejun Chen
2015-07-22  9:32   ` Jan Beulich
2015-07-22 10:42   ` [PATCH v12] " Jan Beulich
2015-07-22 12:17     ` Julien Grall
2015-07-22 12:28       ` Jan Beulich
2015-07-22 12:52     ` Ian Campbell
2015-07-22 13:14       ` Jan Beulich
2015-07-22 13:19         ` Ian Campbell
2015-07-22 12:55     ` Chen, Tiejun
2015-07-22 13:03       ` Jan Beulich
2015-07-22 13:20         ` Chen, Tiejun
2015-07-22 13:28           ` Jan Beulich
2015-07-22 13:46     ` Ian Campbell
2015-07-22 14:22     ` [PATCH v12a] " Jan Beulich
2015-07-22  1:29 ` [v11][PATCH 02/16] xen/vtd: create RMRR mapping Tiejun Chen
2015-07-22  1:29 ` [v11][PATCH 03/16] xen/passthrough: extend hypercall to support rdm reservation policy Tiejun Chen
2015-07-22  1:29 ` [v11][PATCH 04/16] xen: enable XENMEM_memory_map in hvm Tiejun Chen
2015-07-22  1:29 ` [v11][PATCH 05/16] hvmloader: get guest memory map into memory_map[] Tiejun Chen
2015-07-22  1:29 ` [v11][PATCH 06/16] hvmloader/pci: Try to avoid placing BARs in RMRRs Tiejun Chen
2015-07-22  8:43   ` Jan Beulich
2015-07-22 13:00   ` Jan Beulich
2015-07-22  1:29 ` [v11][PATCH 07/16] hvmloader/e820: construct guest e820 table Tiejun Chen
2015-07-22  1:29 ` [v11][PATCH 08/16] tools/libxc: Expose new hypercall xc_reserved_device_memory_map Tiejun Chen
2015-07-22  1:30 ` [v11][PATCH 09/16] tools: extend xc_assign_device() to support rdm reservation policy Tiejun Chen
2015-07-22 13:06   ` Ian Jackson
2015-07-22 15:01     ` Wei Liu
2015-07-22  1:30 ` [v11][PATCH 10/16] tools: introduce some new parameters to set rdm policy Tiejun Chen
2015-07-22  1:30 ` [v11][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Tiejun Chen
2015-07-22  8:28   ` Jan Beulich
2015-07-22  8:52     ` Chen, Tiejun
2015-07-22 10:12       ` Jan Beulich
2015-07-22 10:54       ` George Dunlap
2015-07-22 10:04   ` Ian Jackson
2015-07-22 16:05     ` Jan Beulich
2015-07-22 13:24   ` Ian Jackson
2015-07-22 13:33     ` Chen, Tiejun
2015-07-22 14:04       ` Ian Jackson
2015-07-22 15:00         ` Chen, Tiejun [this message]
2015-07-22 15:09           ` Chen, Tiejun
2015-07-22 15:09           ` Ian Jackson
2015-07-22 15:21             ` Chen, Tiejun
2015-07-22  1:30 ` [v11][PATCH 12/16] tools: introduce a new parameter to set a predefined rdm boundary Tiejun Chen
2015-07-22  1:30 ` [v11][PATCH 13/16] libxl: construct e820 map with RDM information for HVM guest Tiejun Chen
2015-07-22  1:30 ` [v11][PATCH 14/16] xen/vtd: enable USB device assignment Tiejun Chen
2015-07-22  1:30 ` [v11][PATCH 15/16] xen/vtd: prevent from assign the device with shared rmrr Tiejun Chen
2015-07-22  1:30 ` [v11][PATCH 16/16] tools: parse to enable new rdm policy parameters Tiejun Chen
2015-07-22 14:09   ` Ian Jackson
2015-07-22 14:40     ` Wei Liu
2015-07-22 12:38 ` [v11][PATCH 00/16] Fix RMRR Wei Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=55AFB003.6020804@intel.com \
    --to=tiejun.chen@intel.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.