
Hi all, I 've such a config on xen (4.14): name = "marax.chao5.int" uuid = "e0de3cb7-3937-417d-8d63-b0993b377b6a" maxmem = 16384 memory = 16384 kernel = '/usr/lib64/xen/boot/hvmloader' vcpus = 16 rtc_timeoffset = 0 localtime = 1 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" vif = [ "mac=00:16:3e:05:01:10,bridge=xenbr5,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" type = "hvm" loader = "/usr/lib64/xen/boot/hvmloader" disk = [ "phy:/dev/mapper/marax_c,hda,rw", "phy:/dev/vg_lilith/lv_marax_d,hdb,rw" ] max_grant_frames = "128" pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "05:00.0" ] pci_permissive = 1 keymap = "de" vnclisten="0.0.0.0" pci_power_mgmt=1 xen_platform_pci=1 pci_msitranslate=1 viridian=1 hpet=1 acpi=1 apic=1 pae=1 I want to convert it to a xml format for use it with libvirt/virsh but I get an error: "error: An error occurred, but the cause is unknown" If I comment out the line with pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "05:00.0" ] then it works but I dont see the settings like xen_platform_pci=1 pci_msitranslate=1 pci_permissive = 1 max_grant_frames = "128 and the pci passthrough devices are not there... Does libvirt doesnt support such a config? -- ------ Greetz

On 7/27/20 9:17 AM, Christoph wrote:
Hi all,
I 've such a config on xen (4.14):
name = "marax.chao5.int" uuid = "e0de3cb7-3937-417d-8d63-b0993b377b6a" maxmem = 16384 memory = 16384 kernel = '/usr/lib64/xen/boot/hvmloader' vcpus = 16 rtc_timeoffset = 0 localtime = 1 on_poweroff = "destroy" on_reboot = "restart" on_crash = "restart" vif = [ "mac=00:16:3e:05:01:10,bridge=xenbr5,script=vif-bridge,model=e1000" ] parallel = "none" serial = "none" type = "hvm" loader = "/usr/lib64/xen/boot/hvmloader" disk = [ "phy:/dev/mapper/marax_c,hda,rw", "phy:/dev/vg_lilith/lv_marax_d,hdb,rw" ] max_grant_frames = "128" pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "05:00.0" ] pci_permissive = 1 keymap = "de" vnclisten="0.0.0.0" pci_power_mgmt=1 xen_platform_pci=1 pci_msitranslate=1 viridian=1 hpet=1 acpi=1 apic=1 pae=1
I want to convert it to a xml format for use it with libvirt/virsh but I get an error: "error: An error occurred, but the cause is unknown"
If I comment out the line with pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "05:00.0" ] then it works but I dont see the settings like
xen_platform_pci=1
This setting is not supported in the libvirt libxl driver, but AFAICT libxl sets the default to 'true' for HVM guests.
pci_msitranslate=1
This is also not supported in libvirt and unfortunately defaults to 'false'.
pci_permissive = 1
Patches have been submitted for this setting but so far there has not been agreement on the schema change https://www.redhat.com/archives/libvir-list/2020-April/msg01230.html
max_grant_frames = "128
This, along with max_event_channels, is supported as an attribute on the xenbus controller, e.g. <controller type='xenbus' maxGrantFrames='128' maxEventChannels='2047'/>
and the pci passthrough devices are not there...
Is setting maxGrantFrames (and possibly maxEventChannels) on the xenbus controller enough to see the devices in the guest? Regards, Jim

xen_platform_pci=1
This setting is not supported in the libvirt libxl driver, but AFAICT libxl sets the default to 'true' for HVM guests.
pci_msitranslate=1
This is also not supported in libvirt and unfortunately defaults to 'false'.
pci_permissive = 1
Patches have been submitted for this setting but so far there has not been agreement on the schema change
https://www.redhat.com/archives/libvir-list/2020-April/msg01230.html
thats bad :(
max_grant_frames = "128
This, along with max_event_channels, is supported as an attribute on the xenbus controller, e.g.
<controller type='xenbus' maxGrantFrames='128' maxEventChannels='2047'/>
yep I know but why does virsh not translate it from xen-xm->xml?
and the pci passthrough devices are not there...
Is setting maxGrantFrames (and possibly maxEventChannels) on the xenbus controller enough to see the devices in the guest?
no and I know these settings are suported but here the same, why does virsh not translate it?
Regards, Jim
--- ------ Greetz

On 8/10/20 2:38 AM, Christoph wrote:
xen_platform_pci=1
This setting is not supported in the libvirt libxl driver, but AFAICT libxl sets the default to 'true' for HVM guests.
pci_msitranslate=1
This is also not supported in libvirt and unfortunately defaults to 'false'.
pci_permissive = 1
Patches have been submitted for this setting but so far there has not been agreement on the schema change
https://www.redhat.com/archives/libvir-list/2020-April/msg01230.html
thats bad :(
max_grant_frames = "128
This, along with max_event_channels, is supported as an attribute on the xenbus controller, e.g.
<controller type='xenbus' maxGrantFrames='128' maxEventChannels='2047'/>
yep I know but why does virsh not translate it from xen-xm->xml?
It does. Those are xl.cfg(5) settings and are not supported by the old xmdomain.cfg(5) format. Did you try xen-xl? E.g. virsh domxml-{to,from}-native xen-xl ... Regards, Jim

oh cool it translates more THX... but: pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "06:00.0" ] this still doesnt work :( --- ------ Greetz Am 10.08.2020 17:23, schrieb Jim Fehlig:
On 8/10/20 2:38 AM, Christoph wrote:
xen_platform_pci=1
This setting is not supported in the libvirt libxl driver, but AFAICT libxl sets the default to 'true' for HVM guests.
pci_msitranslate=1
This is also not supported in libvirt and unfortunately defaults to 'false'.
pci_permissive = 1
Patches have been submitted for this setting but so far there has not been agreement on the schema change
https://www.redhat.com/archives/libvir-list/2020-April/msg01230.html
thats bad :(
max_grant_frames = "128
This, along with max_event_channels, is supported as an attribute on the xenbus controller, e.g.
<controller type='xenbus' maxGrantFrames='128' maxEventChannels='2047'/>
yep I know but why does virsh not translate it from xen-xm->xml?
It does. Those are xl.cfg(5) settings and are not supported by the old xmdomain.cfg(5) format. Did you try xen-xl? E.g.
virsh domxml-{to,from}-native xen-xl ...
Regards, Jim

I use this command: virsh domxml-from-native xen-xl /etc/xen/marax_hvm.cfg If this line: pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "06:00.0" ] is activated I get this error: error: An error occurred, but the cause is unknown If I comment this line out then it works... --- ------ Greetz Am 10.08.2020 21:56, schrieb Jim Fehlig:
On 8/10/20 1:20 PM, Christoph wrote:
oh cool it translates more THX...
but: pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "06:00.0" ] this still doesnt work :(
You'll need to provide more info :-). What doesn't work and what is the error/failure?
Regards, Jim

On 8/10/20 2:03 PM, Christoph wrote:
I use this command:
virsh domxml-from-native xen-xl /etc/xen/marax_hvm.cfg
If this line:
pci = [ "01:00.0", "01:00.1", "01:00.2", "01:00.3", "00:1f.3", "06:00.0" ]
is activated I get this error:
error: An error occurred, but the cause is unknown
That's not a very helpful error message and in no way points to the problem: the converter expects full dddd.bb.ss.f format for each PCI device. If you add the domain to each of the above it will work. E.g. pci = [ "0000:01:00.0", "0000:01:00.1", "0000:01:00.2", "0000:01:00.3", "0000:00:1f.3", "0000:06:00.0" ] I'll work on a patch to improve the converter. IMO it should accept the bb.ss.f format and assume domain '0000' if not specified. I'll cc you when posting the patch to libvirt-dev. Regards, Jim

On 8/10/20 4:38 AM, Christoph wrote:
xen_platform_pci=1
This setting is not supported in the libvirt libxl driver, but AFAICT libxl sets the default to 'true' for HVM guests.
pci_msitranslate=1
This is also not supported in libvirt and unfortunately defaults to 'false'.
pci_permissive = 1
Patches have been submitted for this setting but so far there has not been agreement on the schema change
https://www.redhat.com/archives/libvir-list/2020-April/msg01230.html
Hmm, so I see that discussion stalled after I asked a few questions, and then you (Jim) made a few suggestions about where the attribute should go and what it should be named. (note for newcomers - the original patch messages linked above were at the end of April, but the replies discussing them were in May, so they don't show up directly in the primitive mailman archive page for the original messages; to see them you need to go here: https://www.redhat.com/archives/libvir-list/2020-May/thread.html then search for "permissive" in the page - this will show you followups to all the original patch mails. I'm not sure who should be pushing the discussion/decision - I've already said my piece, and would be just as happy with anything as long as it doesn't interfere with usage for qemu. Maybe someone else has a stronger opinion.

On 8/10/20 10:55 AM, Laine Stump wrote:
On 8/10/20 4:38 AM, Christoph wrote:
xen_platform_pci=1
This setting is not supported in the libvirt libxl driver, but AFAICT libxl sets the default to 'true' for HVM guests.
pci_msitranslate=1
This is also not supported in libvirt and unfortunately defaults to 'false'.
pci_permissive = 1
Patches have been submitted for this setting but so far there has not been agreement on the schema change
https://www.redhat.com/archives/libvir-list/2020-April/msg01230.html
Hmm, so I see that discussion stalled after I asked a few questions, and then you (Jim) made a few suggestions about where the attribute should go and what it should be named. (note for newcomers - the original patch messages linked above were at the end of April, but the replies discussing them were in May, so they don't show up directly in the primitive mailman archive page for the original messages; to see them you need to go here:
https://www.redhat.com/archives/libvir-list/2020-May/thread.html
then search for "permissive" in the page - this will show you followups to all the original patch mails.
I'm not sure who should be pushing the discussion/decision - I've already said my piece, and would be just as happy with anything as long as it doesn't interfere with usage for qemu. Maybe someone else has a stronger opinion.
I just posted a V3 that supports a 'writeFiltering' attribute on the <source> element https://www.redhat.com/archives/libvir-list/2020-August/msg00465.html E.g. <hostdev mode='subsystem' type='pci'> ... <source writeFiltering='no'> <address .../> </source> </hostdev> However, after reading your reply again, I realize I forgot to add the check you requested in the qemu driver's post-parse validation logic. I can do that in V4 but I'd like to get some feedback on the modeling approach first. Regards, Jim
participants (3)
-
Christoph
-
Jim Fehlig
-
Laine Stump