[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Network driver domain broken


  • To: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • From: Andrea Stevanato <andrea.stevanato@xxxxxxxxxxxxxxx>
  • Date: Mon, 7 Mar 2022 16:00:02 +0100
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=santannapisa.it; dmarc=pass action=none header.from=santannapisa.it; dkim=pass header.d=santannapisa.it; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rlyDpvG2RcY23M/mSa9UtC9Ah5HjLZStW52pPkfn6c0=; b=DUZ54c2QDSmhmxahhfwHfmbvP+5YzZSgvPxZm7N1Xtk/eY1MMUVp7Tr7UX5zMtnDJy4gqM+LCJS4ig8Akkz8OzWwPRHhMahczH49ocTuXqCl/TpCovGeR48B/TcjXD7DDQLoy5W1pTKeq43VIDlGGvTqVDzcWJ4lZmCEX5eoe/LwexoK0OAFTPuUyJ/SpooOPlw+4rtD7+yXldINqfkxJ/De/6YIbtF14BYgHtMOamMG8Ew4+SEK7rv5fQGRUb6QvsMu8yb4U358e37y7j40d+Msl8xzb/8JpGwznLBuaxvHp6Qj5Q4+TYu/ILH8KLwO8IdzjCbTpeWOa9FBTW2QSg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IQEmUrKwOncBxYopxKs0R0xOPA49eGt1a2bI0EdmwrG0iEvvPelLWDLQcuJpyz/IJLUWnQh43aflYD9VhO7GLkhaOaA8m44QJlyypCbb3ut1ZIBhwl2abWs43o6sKrMfqJg7x1qfdg/HiuqLsGqIGlcg9Td9j4ozStwpAX32Es+fXYfkqdgH76EZMIgCskTmHvtTZ8C7Peuq4y8ZxTBgMa6COydYEmXDlzy+ZoRc3ioQvWDp8U7C+f9zeXN2hdGOuEyzCudViDSSaV7KhBdsYaNwgp8UJppTzcXisjfKMfM6lKRvxeQr6/k7hqF/QWFFMWvzwFEAXWeWU19M+s34jQ==
  • Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=santannapisa.it;
  • Cc: Jason Andryuk <jandryuk@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>, "wl@xxxxxxx" <wl@xxxxxxx>, Anthony Perard <anthony.perard@xxxxxxxxxx>
  • Delivery-date: Mon, 07 Mar 2022 15:00:14 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

On 3/7/2022 3:50 PM, Andrew Cooper wrote:
> On 07/03/2022 14:43, Andrea Stevanato wrote:
>> On 3/7/2022 3:36 PM, Jan Beulich wrote:
>>> On 07.03.2022 15:20, Andrea Stevanato wrote:
>>>> On 3/7/2022 12:46 PM, Roger Pau Monné wrote:
>>>>> On Mon, Mar 07, 2022 at 12:39:22PM +0100, Andrea Stevanato wrote:
>>>>>> /local/domain/2 = ""   (n0,r2)
>>>>>> /local/domain/2/vm = "/vm/f6dca20a-54bb-43af-9a62-67c55cb75708"   (n0,r2)
>>>>>> /local/domain/2/name = "guest1"   (n0,r2)
>>>>>> /local/domain/2/cpu = ""   (n0,r2)
>>>>>> /local/domain/2/cpu/0 = ""   (n0,r2)
>>>>>> /local/domain/2/cpu/0/availability = "online"   (n0,r2)
>>>>>> /local/domain/2/cpu/1 = ""   (n0,r2)
>>>>>> /local/domain/2/cpu/1/availability = "online"   (n0,r2)
>>>>>> /local/domain/2/memory = ""   (n0,r2)
>>>>>> /local/domain/2/memory/static-max = "1048576"   (n0,r2)
>>>>>> /local/domain/2/memory/target = "1048577"   (n0,r2)
>>>>>> /local/domain/2/memory/videoram = "-1"   (n0,r2)
>>>>>> /local/domain/2/device = ""   (n0,r2)
>>>>>> /local/domain/2/device/suspend = ""   (n0,r2)
>>>>>> /local/domain/2/device/suspend/event-channel = ""   (n2)
>>>>>> /local/domain/2/device/vif = ""   (n0,r2)
>>>>>> /local/domain/2/device/vif/0 = ""   (n2,r1)
>>>>>> /local/domain/2/device/vif/0/backend = "/local/domain/1/backend/vif/2/0"
>>>>>> (n2,r1)
>>>>>> /local/domain/2/device/vif/0/backend-id = "1"   (n2,r1)
>>>>>> /local/domain/2/device/vif/0/state = "6"   (n2,r1)
>>>>>> /local/domain/2/device/vif/0/handle = "0"   (n2,r1)
>>>>>> /local/domain/2/device/vif/0/mac = "00:16:3e:07:df:91"   (n2,r1)
>>>>>> /local/domain/2/device/vif/0/xdp-headroom = "0"   (n2,r1)
>>>>>> /local/domain/2/control = ""   (n0,r2)
>>>>>> /local/domain/2/control/shutdown = ""   (n2)
>>>>>> /local/domain/2/control/feature-poweroff = "1"   (n2)
>>>>>> /local/domain/2/control/feature-reboot = "1"   (n2)
>>>>>> /local/domain/2/control/feature-suspend = ""   (n2)
>>>>>> /local/domain/2/control/sysrq = ""   (n2)
>>>>>> /local/domain/2/control/platform-feature-multiprocessor-suspend = "1"
>>>>>> (n0,r2)
>>>>>> /local/domain/2/control/platform-feature-xs_reset_watches = "1"   (n0,r2)
>>>>>> /local/domain/2/data = ""   (n2)
>>>>>> /local/domain/2/drivers = ""   (n2)
>>>>>> /local/domain/2/feature = ""   (n2)
>>>>>> /local/domain/2/attr = ""   (n2)
>>>>>> /local/domain/2/error = ""   (n2)
>>>>>> /local/domain/2/error/device = ""   (n2)
>>>>>> /local/domain/2/error/device/vif = ""   (n2)
>>>>>> /local/domain/2/error/device/vif/0 = ""   (n2)
>>>>>> /local/domain/2/error/device/vif/0/error = "1 allocating event channel"
>>>>>> (n2)
>>>>> That's the real error. Your guest netfront fails to allocate the event
>>>>> channel. Do you get any messages in the guest dmesg after trying to
>>>>> attach the network interface?
>>>> Just these two lines:
>>>>
>>>> [  389.453390] vif vif-0: 1 allocating event channel
>>>> [  389.804135] vif vif-0: 1 allocating event channel
>>> Well, these are the error messages, from xenbus_alloc_evtchn().
>>> What's a little odd is that the error code is positive, but that's
>>> how -EPERM is logged. Is there perhaps a strange or broken XSM
>>> policy in use? I ask because evtchn_alloc_unbound() itself
>>> wouldn't return -EPERM afaics.
>> As you can see I'm pretty new to Xen. Furthermore, it is the first
>> time that I heard about XSM, so since I did not change anything I
>> do not know what to answer!
> 
> Please can you attach the full output of `xl dmesg`, which will help
> answer this question.

# xl dmesg
(XEN) Checking for initrd in /chosen
(XEN) RAM: 0000000000000000 - 000000007fefffff
(XEN) RAM: 0000000800000000 - 000000087fffffff
(XEN)
(XEN) MODULE[0]: 0000000007000000 - 000000000700e000 Device Tree
(XEN) MODULE[1]: 0000000002a00000 - 0000000006d1e0aa Ramdisk
(XEN) MODULE[2]: 0000000000e00000 - 0000000002891200 Kernel
(XEN)
(XEN)
(XEN) Command line: console=dtuart dtuart=serial0 dom0_mem=1500M 
dom0_max_vcpus=1 bootscrub=0 vwfi=native sched=null loglvl=all guest_loglvl=all
(XEN) PFN compression on bits 19...22
(XEN) Domain heap initialised
(XEN) Booting using Device Tree
(XEN) Platform: Xilinx ZynqMP
(XEN) Looking for dtuart at "serial0", options ""
 Xen 4.14.3-pre
(XEN) Xen version 4.14.3-pre (xen-4.14+gitAUTOINC+e9efd896f9-r0@petalinux) 
(aarch64-xilinx-linux-gcc (GCC) 10.2.0) debug=n  2021-09-24
(XEN) Latest ChangeSet: Thu Sep 23 18:38:11 2021 -0700 git:e9efd896f9-dirty
(XEN) build-id: 4b7faa4d0c0a308eee0ae8eb52a6fda106026076
(XEN) Processor: 410fd034: "ARM Limited", variant: 0x0, part 0xd03, rev 0x4
(XEN) 64-bit Execution:
(XEN)   Processor Features: 1100000000002222 0000000000000000
(XEN)     Exception Levels: EL3:64+32 EL2:64+32 EL1:64+32 EL0:64+32
(XEN)     Extensions: FloatingPoint AdvancedSIMD
(XEN)   Debug Features: 0000000010305106 0000000000000000
(XEN)   Auxiliary Features: 0000000000000000 0000000000000000
(XEN)   Memory Model Features: 0000000000001122 0000000000000000
(XEN)   ISA Features:  0000000000011120 0000000000000000
(XEN) 32-bit Execution:
(XEN)   Processor Features: 00001231:00011011
(XEN)     Instruction Sets: AArch32 A32 Thumb Thumb-2 ThumbEE Jazelle
(XEN)     Extensions: GenericTimer Security
(XEN)   Debug Features: 03010066
(XEN)   Auxiliary Features: 00000000
(XEN)   Memory Model Features: 10101105 40000000 01260000 02102211
(XEN)  ISA Features: 02101110 13112111 21232042 01112131 00011142 00011121
(XEN) Using SMC Calling Convention v1.2
(XEN) Using PSCI v1.1
(XEN) SMP: Allowing 4 CPUs
(XEN) Generic Timer IRQ: phys=30 hyp=26 virt=27 Freq: 65000 KHz
(XEN) GICv2 initialization:
(XEN)         gic_dist_addr=00000000f9010000
(XEN)         gic_cpu_addr=00000000f9020000
(XEN)         gic_hyp_addr=00000000f9040000
(XEN)         gic_vcpu_addr=00000000f9060000
(XEN)         gic_maintenance_irq=25
(XEN) GICv2: Adjusting CPU interface base to 0xf902f000
(XEN) GICv2: 192 lines, 4 cpus, secure (IID 00000000).
(XEN) XSM Framework v1.0.0 initialized
(XEN) Initialising XSM SILO mode
(XEN) Using scheduler: null Scheduler (null)
(XEN) Initializing null scheduler
(XEN) WARNING: This is experimental software in development.
(XEN) Use at your own risk.
(XEN) Allocated console ring of 32 KiB.
(XEN) CPU0: Guest atomics will try 1 times before pausing the domain
(XEN) Bringing up CPU1
(XEN) CPU1: Guest atomics will try 1 times before pausing the domain
(XEN) CPU 1 booted.
(XEN) Bringing up CPU2
(XEN) CPU2: Guest atomics will try 1 times before pausing the domain
(XEN) CPU 2 booted.
(XEN) Bringing up CPU3
(XEN) CPU3: Guest atomics will try 1 times before pausing the domain
(XEN) CPU 3 booted.
(XEN) Brought up 4 CPUs
(XEN) smmu: /axi/smmu@fd800000: probing hardware configuration...
(XEN) smmu: /axi/smmu@fd800000: SMMUv2 with:
(XEN) smmu: /axi/smmu@fd800000:         stage 2 translation
(XEN) smmu: /axi/smmu@fd800000:         stream matching with 48 register 
groups, mask 0x7fff
(XEN) smmu: /axi/smmu@fd800000:         16 context banks (0 stage-2 only)
(XEN) smmu: /axi/smmu@fd800000:         Stage-2: 48-bit IPA -> 48-bit PA
(XEN) smmu: /axi/smmu@fd800000: registered 29 master devices
(XEN) I/O virtualisation enabled
(XEN)  - Dom0 mode: Relaxed
(XEN) P2M: 40-bit IPA with 40-bit PA and 8-bit VMID
(XEN) P2M: 3 levels with order-1 root, VTCR 0x80023558
(XEN) Scheduling granularity: cpu, 1 CPU per sched-resource
(XEN) alternatives: Patching with alt table 00000000002c3360 -> 00000000002c3b28
(XEN) *** LOADING DOMAIN 0 ***
(XEN) Loading d0 kernel from boot module @ 0000000000e00000
(XEN) Loading ramdisk from boot module @ 0000000002a00000
(XEN) Allocating 1:1 mappings totalling 1500MB for dom0:
(XEN) BANK[0] 0x00000020000000-0x0000007c000000 (1472MB)
(XEN) BANK[1] 0x0000007e000000-0x0000007fc00000 (28MB)
(XEN) Grant table range: 0x00000006e00000-0x00000006e40000
(XEN) smmu: /axi/smmu@fd800000: d0: p2maddr 0x000000087bf94000
(XEN) Allocating PPI 16 for event channel interrupt
(XEN) Loading zImage from 0000000000e00000 to 0000000020000000-0000000021a91200
(XEN) Loading d0 initrd from 0000000002a00000 to 
0x0000000028200000-0x000000002c51e0aa
(XEN) Loading d0 DTB to 0x0000000028000000-0x000000002800c4d5
(XEN) Initial low memory virq threshold set at 0x4000 pages.
(XEN) Std. Loglevel: All
(XEN) Guest Loglevel: All
(XEN) *** Serial input to DOM0 (type 'CTRL-a' three times to switch input)
(XEN) Freed 336kB init memory.
(XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER4
(XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER8
(XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER12
(XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER16
(XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER20
(XEN) d0v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
(XEN) d1v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
(XEN) d1v1: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
(XEN) d2v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
(XEN) d2v1: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0
(XEN) d3v0: vGICD: unhandled word write 0x000000ffffffff to ICACTIVER0

# cat /boot/xen-4.14.3-pre.config | grep XSM
CONFIG_XSM=y
CONFIG_XSM_FLASK=y
CONFIG_XSM_FLASK_AVC_STATS=y
# CONFIG_XSM_FLASK_POLICY is not set
CONFIG_XSM_SILO=y
# CONFIG_XSM_DUMMY_DEFAULT is not set
# CONFIG_XSM_FLASK_DEFAULT is not set
CONFIG_XSM_SILO_DEFAULT=y

This is the default configuration shipped with petalinux. From the
help menuconfig, it seems that this XSM SILO deny communication
between unprivileged VMs.
 
> ~Andrew

Cheers,
Andrea



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.