Skip to contentSkip to conversation

xl.cfg error in usbdev, doc and code are different

PATCH In review Anthony PERARD 4 participants 9 messages Mar 14, 2018

lore
Share & tools
lore
#0 lore raw

Hi,

I followed man xl.cfg to add an usbdev property to my guest config, and xl rejected it.

# xl create "usbdev=['devtype=hostdev,hostbus=1,hostaddr=2',]" ~/arch.hvm
Unknown string `devtype=hostdev' in usbdev spec

In xl_parse.c, the expected string seems to be "type=hostdev", not "devtype".

What's the right property name?

Thanks,

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#1 lore raw

Cc George and Juergen

Quoted 9 lines · Anthony PERARD

Hi,

I followed man xl.cfg to add an usbdev property to my guest config, and xl rejected it.

# xl create "usbdev=['devtype=hostdev,hostbus=1,hostaddr=2',]" ~/arch.hvm
Unknown string `devtype=hostdev' in usbdev spec
Quoted 9 lines

In xl_parse.c, the expected string seems to be "type=hostdev", not "devtype".

What's the right property name?

Thanks,

Signature · 1 line
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#2 lore raw
Quoted 16 lines · Wei Liu

Cc George and Juergen

Quoted 13 lines · Anthony PERARD

Hi,

I followed man xl.cfg to add an usbdev property to my guest config, and xl rejected it.

# xl create "usbdev=['devtype=hostdev,hostbus=1,hostaddr=2',]" ~/arch.hvm
Unknown string `devtype=hostdev' in usbdev spec

In xl_parse.c, the expected string seems to be "type=hostdev", not "devtype".

What's the right property name?

I did some archaeology, and it appears:

* In response to v7 of Chunyan's pvusb series, I suggested adding the 'type=hostdev' option (in response to patch 7/7, xl.cfg)

* In v8 of the series, Chunyan added the "devtype=hostdev" option (in 5/7, the command-line parsing functions, which are re-used for config parsing). It was also called "devtype" in the xl.cfg man page.

* In v9 first send, Chunyan still had "devtype=hostdev" in the parser and the man page

* In v9's RESEND (to which I gave my R-b), it had silently changed to "type=hostdev" in the parser, but was still "devtype=hostdev" in the man page.

Personally I'd probably change the docs to fit the actual behavior. Any other thoughts?

-George

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#3 lore raw
Quoted 30 lines · George Dunlap
Quoted 16 lines · Wei Liu

Cc George and Juergen

Quoted 13 lines · Anthony PERARD

Hi,

I followed man xl.cfg to add an usbdev property to my guest config, and xl rejected it.

# xl create "usbdev=['devtype=hostdev,hostbus=1,hostaddr=2',]" ~/arch.hvm
Unknown string `devtype=hostdev' in usbdev spec

In xl_parse.c, the expected string seems to be "type=hostdev", not "devtype".

What's the right property name?

I did some archaeology, and it appears:

* In response to v7 of Chunyan's pvusb series, I suggested adding the 'type=hostdev' option (in response to patch 7/7, xl.cfg)

* In v8 of the series, Chunyan added the "devtype=hostdev" option (in 5/7, the command-line parsing functions, which are re-used for config parsing). It was also called "devtype" in the xl.cfg man page.

* In v9 first send, Chunyan still had "devtype=hostdev" in the parser and the man page

Quoted 6 lines

* In v9's RESEND (to which I gave my R-b), it had silently changed to "type=hostdev" in the parser, but was still "devtype=hostdev" in the man page.

Personally I'd probably change the docs to fit the actual behavior. Any other thoughts?

I don't have an opinion on which entity to chang if there is no compatibility issue.

Juergen, does suse uses this parameter?

Wei.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#4 lore raw
Quoted 31 lines · Wei Liu
Quoted 30 lines · George Dunlap
Quoted 16 lines · Wei Liu

Cc George and Juergen

Quoted 13 lines · Anthony PERARD

Hi,

I followed man xl.cfg to add an usbdev property to my guest config, and xl rejected it.

# xl create "usbdev=['devtype=hostdev,hostbus=1,hostaddr=2',]" ~/arch.hvm
Unknown string `devtype=hostdev' in usbdev spec

In xl_parse.c, the expected string seems to be "type=hostdev", not "devtype".

What's the right property name?

I did some archaeology, and it appears:

* In response to v7 of Chunyan's pvusb series, I suggested adding the 'type=hostdev' option (in response to patch 7/7, xl.cfg)

* In v8 of the series, Chunyan added the "devtype=hostdev" option (in 5/7, the command-line parsing functions, which are re-used for config parsing). It was also called "devtype" in the xl.cfg man page.

* In v9 first send, Chunyan still had "devtype=hostdev" in the parser and the man page

Quoted 6 lines
Quoted 6 lines

* In v9's RESEND (to which I gave my R-b), it had silently changed to "type=hostdev" in the parser, but was still "devtype=hostdev" in the man page.

Personally I'd probably change the docs to fit the actual behavior. Any other thoughts?

+1

Quoted 5 lines

I don't have an opinion on which entity to chang if there is no compatibility issue.

Juergen, does suse uses this parameter?

I don't think so.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

#5 lore raw
In reply to Wei Liu
Quoted 35 lines · Wei Liu
Quoted 34 lines · George Dunlap
Quoted 16 lines · Wei Liu

Cc George and Juergen

Quoted 13 lines · Anthony PERARD

Hi,

I followed man xl.cfg to add an usbdev property to my guest config, and xl rejected it.

# xl create "usbdev=['devtype=hostdev,hostbus=1,hostaddr=2',]" ~/arch.hvm
Unknown string `devtype=hostdev' in usbdev spec

In xl_parse.c, the expected string seems to be "type=hostdev", not "devtype".

What's the right property name?

I did some archaeology, and it appears:

* In response to v7 of Chunyan's pvusb series, I suggested adding the 'type=hostdev' option (in response to patch 7/7, xl.cfg)

* In v8 of the series, Chunyan added the "devtype=hostdev" option (in 5/7, the command-line parsing functions, which are re-used for config parsing). It was also called "devtype" in the xl.cfg man page.

* In v9 first send, Chunyan still had "devtype=hostdev" in the parser and the man page

* In v9's RESEND (to which I gave my R-b), it had silently changed to "type=hostdev" in the parser, but was still "devtype=hostdev" in the man page.

Quoted 5 lines
Quoted 2 lines

Personally I'd probably change the docs to fit the actual behavior. Any other thoughts?

I don't have an opinion on which entity to chang if there is no compatibility issue.

"type" seems to be ignore by everything beside the xl parser. libvirt doesn't specify it, libxl doesn't check it. All assume that it's a "hostdev", which is fine because it's the only supported type.

I'm also to change the doc. I'll send a patch.

Signature · 6 lines
Anthony PERARD

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
#6 lore raw

PATCH 1/1 docs: Fix entry for the "usbdev" option

The man for xl.cfg have the "devtype=hostdev" option, but xl only understand "type=hostdev", fix the manual to reflect actual implementation.

---
 docs/man/xl.cfg.pod.5.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
docs/man/xl.cfg.pod.5.in +1 -1
index 69552f8a05..2c1a6e1422 100644
@@ -986,7 +986,7 @@ settings, from the following list:
 
 =over 4
 
-=item B<devtype=hostdev>
+=item B<type=hostdev>
 
 Specifies USB device type. Currently only "hostdev" is supported.
 
Signature · 7 lines
Anthony PERARD


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel
Reviewed-by on v1 1/1
#7 lore raw

Re: [PATCH] docs: Fix entry for the "usbdev" option

Quoted 5 lines · Anthony PERARD

The man for xl.cfg have the "devtype=hostdev" option, but xl only understand "type=hostdev", fix the manual to reflect actual implementation.

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reviewed-by on v1 1/1
#8 lore raw

Re: [PATCH] docs: Fix entry for the "usbdev" option

In reply to Anthony PERARD
Quoted 5 lines · Anthony PERARD

The man for xl.cfg have the "devtype=hostdev" option, but xl only understand "type=hostdev", fix the manual to reflect actual implementation.

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel