From mboxrd@z Thu Jan 1 00:00:00 1970 From: Elena Ufimtseva Subject: Re: [PATCH 2/2] iommu: add rmrr Xen command line option for misc rmrrs Date: Tue, 10 Mar 2015 14:30:03 -0400 Message-ID: <20150310183003.GB6182@elena.ufimtseva> References: <1425912177-2890-1-git-send-email-elena.ufimtseva@oracle.com> <1425912177-2890-3-git-send-email-elena.ufimtseva@oracle.com> <20150310161620.GA6182@elena.ufimtseva> <54FF29730200007800068351@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <54FF29730200007800068351@mail.emea.novell.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: Jan Beulich Cc: Yang Z Zhang , Kevin Tian , "boris.ostrovsky@oracle.com" , "xen-devel@lists.xen.org" List-Id: xen-devel@lists.xenproject.org On Tue, Mar 10, 2015 at 04:27:15PM +0000, Jan Beulich wrote: > >>> On 10.03.15 at 17:16, wrote: > > On Tue, Mar 10, 2015 at 02:47:24AM +0000, Tian, Kevin wrote: > >> > From: elena.ufimtseva@oracle.com [mailto:elena.ufimtseva@oracle.com] > >> > --- a/xen/drivers/passthrough/vtd/iommu.c > >> > +++ b/xen/drivers/passthrough/vtd/iommu.c > >> > @@ -1232,6 +1232,38 @@ static int intel_iommu_domain_init(struct domain > >> > *d) > >> > return 0; > >> > } > >> > > >> > +static void add_misc_rmrr(void) > >> > +{ > >> > + struct acpi_rmrr_unit *rmrrn; > >> > + struct misc_rmrr_unit *rmrru, *r; > >> > + > >> > + list_for_each_entry_safe( rmrru, r, &misc_rmrr_units, list ) > >> > + { > >> > + rmrrn = xzalloc(struct acpi_rmrr_unit); > >> > + if ( !rmrrn ) > >> > + goto free; > >> > + > >> > + rmrrn->scope.devices = xzalloc(typeof(*rmrrn->scope.devices)); > >> > + if ( !rmrrn->scope.devices ) > >> > + { > >> > + xfree(rmrrn); > >> > + goto free; > >> > + } > >> > + rmrrn->scope.devices_cnt = 1; > >> > + rmrrn->segment = rmrru->segment; > >> > + rmrrn->scope.devices[0] = rmrru->device; > >> > >> need handle one-rmrr-multiple-deviecs. even if you don't want > >> to support it, need capture user attempts at least. > > > > Kevin, on the second thought, I think to support multiple devices > > per one rmrr one need to put on command line same address/range and > > specify unique device each time. > > Why? Iirc it was you who already proposed a way to properly > express this on the command line without having to repeat the > memory addresses. One more thought and exploring options as I dont have strong inclination to either of the options. > > Jan >