[libvirt] [PATCH] RFC: bhyve: implement PCI address allocation

2014-04-12 Thread Roman Bogorodskiy
Hi, This is the first attempt to implement PCI address allocation for the bhyve driver. This patch is by no means a complete version and the idea of this is to understand if I'm moving in a right direction. This code is based on the one from QEMU driver. Even though bhyve currently has no support

[libvirt] [PATCH] bhyve: implement PCI address allocation

2014-04-12 Thread Roman Bogorodskiy
Automatically allocate PCI addresses for devices instead of hardcoding them in the driver code. The current allocation schema is to dedicate an entire slot for each devices. Also, allow having arbitrary number of devices. --- po/POTFILES.in| 1 + src/Makefile.am | 4 + s

Re: [libvirt] RFC: Exposing backing chains in XML

2014-04-12 Thread Eric Blake
On 03/12/2014 02:21 PM, Eric Blake wrote: > tl;dr: > I am working on a series of patches to expose backing chain information > in XML. Comments are welcome, to make sure my XML design is on > the right track. > > > A backing chain of 3 files (base <- mid <- top) in the local file system: > >

[libvirt] [PATCH 5/6] conf: move storage source details to common RNG file

2014-04-12 Thread Eric Blake
Start reflecting the C source code by moving RelaxNG grammar for virStorageSource into a common file. There's still more to move, but doing it in pieces makes it easier to validate. * docs/schemas/domaincommon.rng (diskSourceFile, diskSourceBlock) (diskSourceDir, diskSourceNetwork, diskSourceVolu

[libvirt] [PATCH 3/6] conf: tighten schema

2014-04-12 Thread Eric Blake
This patch is my first experience playing with nested grammars, as documented in http://relaxng.org/tutorial-20011203.html#IDA3PZR. I plan on doing more overrides in order to make the RelaxNG grammar mirror the C code refactoring into a common virStorageSource, but where different clients of that s

[libvirt] [PATCH 6/6] conf: move and to disk source

2014-04-12 Thread Eric Blake
In a backing chain, each file of the chain can have a different authorization or encryption; therefore, this information should be associated with the common storage source elements. * docs/schemas/domaincommon.rng (diskspec): Drop source-related portions... (disksource): ...and include common typ

[libvirt] [PATCH 2/6] conf: better interleaving in schema

2014-04-12 Thread Eric Blake
In general, we try to make virt-xml-validate tolerant of input elements in any order when possible. However, as written, the RNG grammar did not permit unless there was an explicit type= attribute (even though the C code manages just fine by defaulting to type='file'). After making the attribute

[libvirt] [PATCH 0/6] RelaxNG improvements for virStorageSource

2014-04-12 Thread Eric Blake
Part of extending the domain XML to show an entire backing chain is splitting the RelaxNG definitions so that the portion related to a single source within the chain can easily be reused. I'm still debating about the way to handle storage volumes using vs. domain disks using . The majority of th

[libvirt] [PATCH 1/6] conf: create common storage RNG grammar file

2014-04-12 Thread Eric Blake
Having two tiny files with a couple definitions didn't make as much sense as one common file, especially since I plan to add more definitions and use it in more places. * docs/schemas/storageencryption.rng: Merge this... * docs/schemas/storagefilefeatures.rng: ...and this, into... * docs/schemas/s

[libvirt] [PATCH 4/6] conf: split schema into more pieces

2014-04-12 Thread Eric Blake
Disk snapshots use a subset of sources (no directory or pool support yet, and while domain disks support a startupPolicy, it doesn't make sense for snapshots). This patch lets the two RelaxNG grammars share a bit more code, as well as factoring things into pieces that will be easier to move to a

Re: [libvirt] [PATCH 6/6] conf: delete internal directory field

2014-04-12 Thread Eric Blake
On 04/11/2014 08:56 PM, John Ferlan wrote: > > > On 04/11/2014 12:21 AM, Eric Blake wrote: >> Another field no longer needed, getting us one step closer to >> merging virStorageFileMetadata and virStorageSource. >> >> * src/util/virstoragefile.h (_virStorageFileMetadata): Drop >> field. >> * src/

Re: [libvirt] [PATCH 5/6] conf: tweak chain lookup internals

2014-04-12 Thread Eric Blake
On 04/11/2014 10:13 PM, Eric Blake wrote: >> >> ACK >> >> I suppose the only >> odd part I found was the comparison < VIR_STORAGE_TYPE_DIR - leaving >> currently DIR, NETWORK, and VOLUME out of the comparison. My thoughts >> went to what if something new comes along and what on earth was being >