Re: [libvirt] [RFC PATCH v2 REBASE 17/18] docs: Document the new hostdev and address type 'mdev'

2017-02-22 Thread Erik Skultety
On Wed, Feb 22, 2017 at 08:20:06PM +0530, Kirti Wankhede wrote:
> 
> 
> On 2/20/2017 7:58 PM, Erik Skultety wrote:
> > Signed-off-by: Erik Skultety 
> > ---
> >  docs/formatdomain.html.in | 48 
> > +++
> >  1 file changed, 44 insertions(+), 4 deletions(-)
> > 
> > diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> > index b69bd4c..13cb767 100644
> > --- a/docs/formatdomain.html.in
> > +++ b/docs/formatdomain.html.in
> > @@ -3277,8 +3277,20 @@
> >  attributes: iobase and irq.
> >  Since 1.2.1
> >
> > +  mdev
> > +  Mediated devices' addresses have so far only one mandatory 
> > attribute
> > +uuid (since 3.1.0) which
> > +uniquely identifies a mediated device under the syfs file system.
> > +  
> >  
> >  
> > +
> > +Note: Due to nature of mediated devices, being only software 
> > devices
> > +defining an allocation of resources on the physical parent device, 
> > the
> > +address type mdev is supposed to be used to identify a
> > +device on the host only, rather than identifying it in the guest.
> > +
> > +
> >  Controllers
> >  
> >  
> > @@ -3774,6 +3786,19 @@
> >/devices
> >...
> >  
> > +or:
> > +
> > +
> > +  ...
> > +  devices
> > +hostdev mode='subsystem' type='mdev' model='vfio-pci'
> > +source
> > +  address type='mdev' 
> > uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'
> > +/source
> > +/hostdev
> > +  /devices
> > +  ...
> > +
> 
> Hi Erik,
> 
> Changes looks good so far. I did some basic testing with these patches.
> I used above example snippet of hostdev element and it throws below
> error. Add a '/' before '' and after uuid in address line.
> 
> error: (domain_definition):74: Opening and ending tag mismatch: address
> line 73 and source
>   
> ---^
> Failed. Try again? [y,n,i,f,?]:
> 
> Thanks,
> Kirti
> 

Oh, right, good catch.

Thanks,
Erik

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


Re: [libvirt] [RFC PATCH v2 REBASE 17/18] docs: Document the new hostdev and address type 'mdev'

2017-02-22 Thread Kirti Wankhede


On 2/20/2017 7:58 PM, Erik Skultety wrote:
> Signed-off-by: Erik Skultety 
> ---
>  docs/formatdomain.html.in | 48 
> +++
>  1 file changed, 44 insertions(+), 4 deletions(-)
> 
> diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
> index b69bd4c..13cb767 100644
> --- a/docs/formatdomain.html.in
> +++ b/docs/formatdomain.html.in
> @@ -3277,8 +3277,20 @@
>  attributes: iobase and irq.
>  Since 1.2.1
>
> +  mdev
> +  Mediated devices' addresses have so far only one mandatory 
> attribute
> +uuid (since 3.1.0) which
> +uniquely identifies a mediated device under the syfs file system.
> +  
>  
>  
> +
> +Note: Due to nature of mediated devices, being only software devices
> +defining an allocation of resources on the physical parent device, 
> the
> +address type mdev is supposed to be used to identify a
> +device on the host only, rather than identifying it in the guest.
> +
> +
>  Controllers
>  
>  
> @@ -3774,6 +3786,19 @@
>/devices
>...
>  
> +or:
> +
> +
> +  ...
> +  devices
> +hostdev mode='subsystem' type='mdev' model='vfio-pci'
> +source
> +  address type='mdev' uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'
> +/source
> +/hostdev
> +  /devices
> +  ...
> +

Hi Erik,

Changes looks good so far. I did some basic testing with these patches.
I used above example snippet of hostdev element and it throws below
error. Add a '/' before '' and after uuid in address line.

error: (domain_definition):74: Opening and ending tag mismatch: address
line 73 and source
  
---^
Failed. Try again? [y,n,i,f,?]:

Thanks,
Kirti

>  
>hostdev
>The hostdev element is the main container for 
> describing
> @@ -3818,12 +3843,23 @@
>  type passes all LUNs presented by a single HBA to
>  the guest.
>
> +  mdev
> +  For mediated devices (Since 3.1.0)
> +  the model attribute specifies the device API which
> +  determines how the host's vfio driver will expose the device to the
> +  guest. Currently, only vfio-pci model is supported.
> +  The model also has implications on the guest's address type, i.e.
> +  for vfio-pci device API any address type other than 
> PCI
> +  will result in an error.
> +  
>  
>  
> -  Note: The managed attribute is only used with PCI 
> devices
> -  and is ignored by all the other device types, thus setting
> -  managed explicitly with other than PCI device has the 
> same
> -  effect as omitting it.
> +  Note: The managed attribute is only used with PCI and 
> is
> +  ignored by all the other device types, thus setting
> +  managed explicitly with other than a PCI device has 
> the
> +  same effect as omitting it. Similarly, model 
> attribute is
> +  only supported by mediated devices and ignored by all other device
> +  types.
>  
>
>source
> @@ -3888,6 +3924,10 @@
>  is the vhost_scsi wwpn (16 hexadecimal digits with a prefix of
>  "naa.") established in the host configfs.
>
> +  mdev
> +  Mediated devices (Since 3.1.0) are
> +  described by the address element.
> +  
>  
>
>vendor, product
> 

---
This email message is for the sole use of the intended recipient(s) and may 
contain
confidential information.  Any unauthorized review, use, disclosure or 
distribution
is prohibited.  If you are not the intended recipient, please contact the 
sender by
reply email and destroy all copies of the original message.
---

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list


[libvirt] [RFC PATCH v2 REBASE 17/18] docs: Document the new hostdev and address type 'mdev'

2017-02-20 Thread Erik Skultety
Signed-off-by: Erik Skultety 
---
 docs/formatdomain.html.in | 48 +++
 1 file changed, 44 insertions(+), 4 deletions(-)

diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index b69bd4c..13cb767 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -3277,8 +3277,20 @@
 attributes: iobase and irq.
 Since 1.2.1
   
+  mdev
+  Mediated devices' addresses have so far only one mandatory attribute
+uuid (since 3.1.0) which
+uniquely identifies a mediated device under the syfs file system.
+  
 
 
+
+Note: Due to nature of mediated devices, being only software devices
+defining an allocation of resources on the physical parent device, the
+address type mdev is supposed to be used to identify a
+device on the host only, rather than identifying it in the guest.
+
+
 Controllers
 
 
@@ -3774,6 +3786,19 @@
   /devices
   ...
 
+or:
+
+
+  ...
+  devices
+hostdev mode='subsystem' type='mdev' model='vfio-pci'
+source
+  address type='mdev' uuid='c2177883-f1bb-47f0-914d-32a22e3a8804'
+/source
+/hostdev
+  /devices
+  ...
+
 
   hostdev
   The hostdev element is the main container for describing
@@ -3818,12 +3843,23 @@
 type passes all LUNs presented by a single HBA to
 the guest.
   
+  mdev
+  For mediated devices (Since 3.1.0)
+  the model attribute specifies the device API which
+  determines how the host's vfio driver will expose the device to the
+  guest. Currently, only vfio-pci model is supported.
+  The model also has implications on the guest's address type, i.e.
+  for vfio-pci device API any address type other than PCI
+  will result in an error.
+  
 
 
-  Note: The managed attribute is only used with PCI 
devices
-  and is ignored by all the other device types, thus setting
-  managed explicitly with other than PCI device has the 
same
-  effect as omitting it.
+  Note: The managed attribute is only used with PCI and is
+  ignored by all the other device types, thus setting
+  managed explicitly with other than a PCI device has the
+  same effect as omitting it. Similarly, model attribute 
is
+  only supported by mediated devices and ignored by all other device
+  types.
 
   
   source
@@ -3888,6 +3924,10 @@
 is the vhost_scsi wwpn (16 hexadecimal digits with a prefix of
 "naa.") established in the host configfs.
   
+  mdev
+  Mediated devices (Since 3.1.0) are
+  described by the address element.
+  
 
   
   vendor, product
-- 
2.10.2

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list