On Thu, Apr 06, 2017 at 07:31:00PM +0800, Eli Qiao wrote:
On Thursday, 6 April 2017 at 5:51 PM, Daniel P. Berrange wrote:
> On Thu, Apr 06, 2017 at 11:49:14AM +0200, Martin Kletzander wrote:
> > On Thu, Apr 06, 2017 at 04:20:06PM +0800, Eli Qiao wrote:
> > > This patch is based on Martin's cache branch.
> > >
> > > This patch amends the cache bank capability as follow:
> > >
> > > <bank id='0' level='3' type='unified'
size='15360' unit='KiB' cpus='0-5'/>
> > > <control min='768' unit='KiB' type='unified'
nclos='4'/>
> > > <bank id='1' level='3' type='unified'
size='15360' unit='KiB' cpus='6-11'/>
> > > <control min='768' unit='KiB' type='unified'
nclos='4'/>
> > >
> >
> >
>
>
> Either the XML is malformed, or the indentation is wrong. The indentation
> suggests you want nested XML elements, but the parent element is an empty
> tag, so you've actually got a flat namespace here.
>
<cache>
<bank id='0' level='3' type='unified' size='15360'
unit='KiB' cpus='0-5'/>
<control min='768' unit='KiB' type='unified'
nallocations='4'/>
<bank id='1' level='3' type='unified' size='15360'
unit='KiB' cpus='6-11'/>
<control min='768' unit='KiB' type='unified'
nallocations='4'/>
</cache>
I validate it online, no errors, the result is:
You've checked the XML syntax, but *not* the semantics.
You've implemented this:
<cache>
<bank id='0' level='3' type='unified' size='15360'
unit='KiB' cpus='0-5'/>
<control min='768' unit='KiB' type='unified'
nallocations='4'/>
<bank id='1' level='3' type='unified' size='15360'
unit='KiB' cpus='6-11'/>
<control min='768' unit='KiB' type='unified'
nallocations='4'/>
</cache>
but indentation suggests you meant to do
<cache>
<bank id='0' level='3' type='unified' size='15360'
unit='KiB' cpus='0-5'>
<control min='768' unit='KiB' type='unified'
nallocations='4'/>
</bank>
<bank id='1' level='3' type='unified' size='15360'
unit='KiB' cpus='6-11'>
<control min='768' unit='KiB' type='unified'
nallocations='4'/>
</bank>
</cache>
both are valid XML, but they have completely different semantics
Regards,
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://entangle-photo.org -o-
http://search.cpan.org/~danberr/ :|