From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Chen, Tiejun" Subject: Re: [v10][PATCH 11/16] tools/libxl: detect and avoid conflicts with RDM Date: Tue, 21 Jul 2015 21:41:38 +0800 Message-ID: <55AE4C12.5070303@intel.com> References: <1437373023-14884-1-git-send-email-tiejun.chen@intel.com> <1437373023-14884-12-git-send-email-tiejun.chen@intel.com> <21932.63595.566823.211293@mariner.uk.xensource.com> <21934.8684.318670.874156@mariner.uk.xensource.com> <55AE272A.4020306@intel.com> <21934.10490.615041.203428@mariner.uk.xensource.com> <55AE2BB1.9030604@intel.com> <21934.11410.844215.554291@mariner.uk.xensource.com> <55AE30D4.8000009@intel.com> <21934.15393.528332.534956@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: <21934.15393.528332.534956@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 >>> But another answer would be to take the union of the specified >>> regions. That would be more complicated, because the union would have >>> to be computed. >>> >>>> if (d_config->rdms[i].start == rdm_start) >>>> return; >>> >>> That doesn't, of course, compute the union. >> >> Sorry I don't understand what the "take the union of the specified >> regions" is here. > > A "region" is a subset of the address space. I meant the set union: > https://en.wikipedia.org/wiki/Union_%28set_theory%29 > > That is, an address would be reserved if it was reserved in any of the > rdm regions implied by the config. Are you saying this point? "The union of two sets A and B is the set of elements which are in A, in B, or in both A and B." > > The explicitly specified regions might overlap with the computed ones, > without being identical. Computing the union would not be entirely > trivial. > Just to your example, libxl_domain_config cfg; cfg.stuff = blah; cfg.rdm.strategy = HOST; libxl_domain_create_new(&cfg, &domid); libxl_domain_destroy(domid); Here looks you mean d_config->rdms would be changed, right? Currently this shouldn't be allowed. But I think we need to further discussion make this case clear after feature freeze since we didn't have this kind of assumption in our previous design. libxl_domain_create_new(&cfg, &domid); Thanks Tiejun