Date   

Re: Using Virtio-gpio in guest VM

Liu, Fuzhong
 

Hi

Checked with ACRN expert, following ACRN virtio devices work well with V1.4; but not maintained  any more.

devicemodel/include/virtio.h

 

* ACRN virtio device IDs

*/

#define VIRTIO_DEV_RPMB         0x8601

#define VIRTIO_DEV_HECI         0x8602

#define VIRTIO_DEV_AUDIO        0x8603

#define VIRTIO_DEV_IPU          0x8604

#define VIRTIO_DEV_TSN          0x8605

#define VIRTIO_DEV_HYPERDMABUF  0x8606

#define VIRTIO_DEV_HDCP         0x8607

#define VIRTIO_DEV_COREU        0x8608

#define VIRTIO_DEV_GPIO         0x8609

#define VIRTIO_DEV_I2C          0x860a

 

 

https://github.com/projectacrn/acrn-hypervisor/tree/release_1.4/

https://github.com/projectacrn/acrn-kernel/tree/release_1.4

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Monday, May 9, 2022 6:06 PM
To: acrn-users@...
Subject: Re: [acrn-users] Using Virtio-gpio in guest VM

 

On Mon, May 9, 2022 at 02:43 PM, Liu, Fuzhong wrote:

lspci -xxxxvvvv


attached lspci info


Re: ACRN configurator failing to start in master branch

Xie, Nanlin
 

Hi,

 

              We are using new configurator to replace old configurator in the v3.0, it is in progress, but you could have a try with below guide:

https://github.com/projectacrn/acrn-hypervisor/blob/master/misc/config_tools/configurator/README.md

 

Best wishes!

Nanlin

 

From: acrn-users@... <acrn-users@...> On Behalf Of Liu, Fuzhong
Sent: Monday, May 9, 2022 3:58 PM
To: acrn-users@...
Subject: Re: [acrn-users] ACRN configurator failing to start in master branch

 

Hi

Please help to raise one git issue with following link:

https://github.com/projectacrn/acrn-hypervisor/issues/new?assignees=&labels=status%3A+new&template=bug_report.md&title=

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Wednesday, May 4, 2022 1:12 PM
To: acrn-users@...
Subject: [acrn-users] ACRN configurator failing to start in master branch

 

Hello
             I am getting the below error when launching the acrn_configurator.py. How to get rid of this error.
ACRN-hypervisor branch: master commit:e491773f5e0a97d36b03180306458c47c196aada

Error:

rn@acrn-NUC6CAYH:~/acrn-work/acrn-hypervisor/misc/config_tools/config_app$ sudo python3 acrn_configurator.py

[sudo] password for acrn:

Traceback (most recent call last):

  File "acrn_configurator.py", line 34, in <module>

    from views import CONFIG_APP

  File "/home/acrn/acrn-work/acrn-hypervisor/misc/config_tools/config_app/views.py", line 26, in <module>

    from launch_config.launch_cfg_gen import get_launch_item_values

ImportError: cannot import name 'get_launch_item_values' from 'launch_config.launch_cfg_gen' (/home/acrn/acrn-work/acrn-hypervisor/misc/config_tools/config_app/../launch_config/launch_cfg_gen.py)

 


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

On Mon, May 9, 2022 at 02:43 PM, Liu, Fuzhong wrote:
lspci -xxxxvvvv

attached lspci info


Re: Using Virtio-gpio in guest VM

Liu, Fuzhong
 

Please share lspci -xxxxvvvv

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Monday, May 9, 2022 4:43 PM
To: acrn-users@...
Subject: Re: [acrn-users] Using Virtio-gpio in guest VM

 

Please find the attachments. config, dmesg and lspci.


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

Please find the attachments. config, dmesg and lspci.


Re: Using Virtio-gpio in guest VM

Liu, Fuzhong
 

Hi

Please share the kernel config and dmesg log of User VM which included the driver.

 

Thanks!

 

BR.

Fuzhong

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Saturday, May 7, 2022 9:57 AM
To: acrn-users@...
Subject: Re: [acrn-users] Using Virtio-gpio in guest VM

 

Hi Geoffroy,
      I checked in the latest version of kernels(i.e., 5.18) which included the driver in question. I compiled the kernel with CONFIG_GPIO_VIRTIO=y. I see the same behavior as before. The virtio-gpio gets emulated as a PCI device.
Should there be some examples or some references that was used while evaluating the virtio gpio, please share that. Thanks in Advance


Re: ACRN configurator failing to start in master branch

Liu, Fuzhong
 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Wednesday, May 4, 2022 1:12 PM
To: acrn-users@...
Subject: [acrn-users] ACRN configurator failing to start in master branch

 

Hello
             I am getting the below error when launching the acrn_configurator.py. How to get rid of this error.
ACRN-hypervisor branch: master commit:e491773f5e0a97d36b03180306458c47c196aada

Error:

rn@acrn-NUC6CAYH:~/acrn-work/acrn-hypervisor/misc/config_tools/config_app$ sudo python3 acrn_configurator.py

[sudo] password for acrn:

Traceback (most recent call last):

  File "acrn_configurator.py", line 34, in <module>

    from views import CONFIG_APP

  File "/home/acrn/acrn-work/acrn-hypervisor/misc/config_tools/config_app/views.py", line 26, in <module>

    from launch_config.launch_cfg_gen import get_launch_item_values

ImportError: cannot import name 'get_launch_item_values' from 'launch_config.launch_cfg_gen' (/home/acrn/acrn-work/acrn-hypervisor/misc/config_tools/config_app/../launch_config/launch_cfg_gen.py)

 


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

Hi Geoffroy,
      I checked in the latest version of kernels(i.e., 5.18) which included the driver in question. I compiled the kernel with CONFIG_GPIO_VIRTIO=y. I see the same behavior as before. The virtio-gpio gets emulated as a PCI device.
Should there be some examples or some references that was used while evaluating the virtio gpio, please share that. Thanks in Advance


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

Is CONFIG_VIRTIO_IOMMU needed for using GPIO_VIRTIO in guest VM?


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

Could someone please reply and help me


ACRN configurator failing to start in master branch

shibi590268@...
 

Hello
             I am getting the below error when launching the acrn_configurator.py. How to get rid of this error.
ACRN-hypervisor branch: master commit:e491773f5e0a97d36b03180306458c47c196aada

Error:
rn@acrn-NUC6CAYH:~/acrn-work/acrn-hypervisor/misc/config_tools/config_app$ sudo python3 acrn_configurator.py
[sudo] password for acrn:
Traceback (most recent call last):
  File "acrn_configurator.py", line 34, in <module>
    from views import CONFIG_APP
  File "/home/acrn/acrn-work/acrn-hypervisor/misc/config_tools/config_app/views.py", line 26, in <module>
    from launch_config.launch_cfg_gen import get_launch_item_values
ImportError: cannot import name 'get_launch_item_values' from 'launch_config.launch_cfg_gen' (/home/acrn/acrn-work/acrn-hypervisor/misc/config_tools/config_app/../launch_config/launch_cfg_gen.py)
 


Re: Booting to ACRN (Yocto) image is getting struck at WARNING: no console will be available to OS

Liu, Fuzhong
 

Hi Shrikant

Please boot into native to check the grub version of Yocto rootfs; then help to share the grub version and grub menu info on git issue:7342

Thanks!

 

BR.

Fuzhong

From: acrn-users@... <acrn-users@...> On Behalf Of HALLUR, SHRIKANT
Sent: Monday, May 2, 2022 9:32 PM
To: acrn-users@...
Subject: Re: [acrn-users] Booting to ACRN (Yocto) image is getting struck at WARNING: no console will be available to OS

 

Hi Fuzhong,

Issue https://github.com/projectacrn/acrn-hypervisor/issues/7342 is closed and ACRN working well with Linux but still issue persists with Yocto.

Please help with this.

Regards,
Shrikant U H


Re: Booting to ACRN (Yocto) image is getting struck at WARNING: no console will be available to OS

HALLUR, SHRIKANT
 

Hi Fuzhong,

Issue https://github.com/projectacrn/acrn-hypervisor/issues/7342 is closed and ACRN working well with Linux but still issue persists with Yocto.

Please help with this.

Regards,
Shrikant U H


Re: Using Virtio-gpio in guest VM

Geoffroy Van Cutsem
 

Yes, that’s the driver in question. I do not know if we have a version of it for the latest kernel, let’s see what the kernel team has to say about it.

 

Geoffroy

 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Monday, May 2, 2022 1:09 pm
To: acrn-users@...
Subject: Re: [acrn-users] Using Virtio-gpio in guest VM

 

Hi 
   I want to use little latest kernel. Do you mean this driver gpio-virtio.c. Is following the config that you are pointing to? 

config GPIO_VIRTIO

 

 

 

tristate "GPIO virtio-based front-end driver"

 

 

 

depends on X86 && PCI && VIRTIO_PCI

 

 

 

help

 

 

 

This module implements GPIO emulation over virtio transport.

 

 

 

 

 

 

 

Say Y or M here to build GPIO virtio front-end driver.

 

 

 

 

 

 

 

If the driver is built as a module, it will be called gpio-virtio.

 

 


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

Hi 
   I want to use little latest kernel. Do you mean this driver gpio-virtio.c. Is following the config that you are pointing to? 

config GPIO_VIRTIO
  tristate "GPIO virtio-based front-end driver"
  depends on X86 && PCI && VIRTIO_PCI
  help
  This module implements GPIO emulation over virtio transport.
   
  Say Y or M here to build GPIO virtio front-end driver.
   
  If the driver is built as a module, it will be called gpio-virtio.


Re: Using Virtio-gpio in guest VM

Geoffroy Van Cutsem
 

I don’t see this anywhere in the 5.10 version, while it was there in the 4.19/preempt-rt. I suspect that means it’s a driver that was never upstreamed (or is still in the process of being upstreamed).

 

Is using the 4.19 kernel an option for you?

 

Does anyone from the kernel team know if there is a version of that driver for the 5.10 preempt-rt kernel?

 

Thanks,

Geoffroy

 

 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Monday, May 2, 2022 9:44 am
To: acrn-users@...
Subject: Re: [acrn-users] Using Virtio-gpio in guest VM

 

Hi
   I am using the ACRN patched rt kernel from https://github.com/projectacrn/acrn-kernel.git with 5.10/prempt-rt branch to use it in RTVM. I am unable to locate CONFIG_VIRTIO_GPIO=Y in the config. Is there any separate patch available for this?

Attached is the .config file
 


Re: Using Virtio-gpio in guest VM

shibi590268@...
 

Hi
   I am using the ACRN patched rt kernel from https://github.com/projectacrn/acrn-kernel.git with 5.10/prempt-rt branch to use it in RTVM. I am unable to locate CONFIG_VIRTIO_GPIO=Y in the config. Is there any separate patch available for this?

Attached is the .config file
 


Re: Using Virtio-gpio in guest VM

Liu, Fuzhong
 

Hi

Is following kernel config enabled in your User VM?

CONFIG_VIRTIO_GPIO=y

 

Please share the kernel config and dmesg log of User VM.

 

Thanks!

 

BR.

Fuzhong

 

From: acrn-users@... <acrn-users@...> On Behalf Of shibi590268@...
Sent: Friday, April 29, 2022 9:30 PM
To: acrn-users@...
Subject: [acrn-users] Using Virtio-gpio in guest VM

 

Hello,
         I need to use two gpio pins from a VM. 
I used    -s 10,virtio-gpio,@gpiochip0{11=pin0:12=pin1} \ in the launch scripts. The kernel boots up successfully with a new pci device added 00:0a.0 PIC: Intel Corporation Device 8609.

The device is getting listed as PIC: Intel Corporation Device 8609 is this correct?

But i couldn't find the gpio device listed under /dev/

ls /dev/gpio

ls: cannot access '/dev/gpio': No such file or directory


or in /sys/class/gpio

ls /sys/class/gpio/

export  unexport

ls /sys/bus/gpio/devices/

ubunturt@ubunturt-Standard-PC-i440FX-PIIX-1996:~$

I couldn't find virtio-gpio module in kernel. So I used a patch from https://lkml.iu.edu/hypermail/linux/kernel/2108.1/01975.html. But still i am not successful in this. 
Is there anything that i am missing? Is there any patch recommendation available that could be used.

User VM: ubuntu
Service VM : ubuntu
I am using ACRN hypervisor: v2.8

 

 


Using Virtio-gpio in guest VM

shibi590268@...
 

Hello,
         I need to use two gpio pins from a VM. 
I used    -s 10,virtio-gpio,@gpiochip0{11=pin0:12=pin1} \ in the launch scripts. The kernel boots up successfully with a new pci device added 00:0a.0 PIC: Intel Corporation Device 8609.

The device is getting listed as PIC: Intel Corporation Device 8609 is this correct?
But i couldn't find the gpio device listed under /dev/
ls /dev/gpio
ls: cannot access '/dev/gpio': No such file or directory

or in /sys/class/gpio

ls /sys/class/gpio/
export  unexport

ls /sys/bus/gpio/devices/
ubunturt@ubunturt-Standard-PC-i440FX-PIIX-1996:~$

I couldn't find virtio-gpio module in kernel. So I used a patch from https://lkml.iu.edu/hypermail/linux/kernel/2108.1/01975.html. But still i am not successful in this. 
Is there anything that i am missing? Is there any patch recommendation available that could be used.

User VM: ubuntu
Service VM : ubuntu
I am using ACRN hypervisor: v2.8
 
 


Re: Booting to ACRN (Yocto) image is getting struck at WARNING: no console will be available to OS

HALLUR, SHRIKANT
 

Hi Fuzhong,

Thanks for your response.

This issue is hitting with yocto and issue https://github.com/projectacrn/acrn-hypervisor/issues/7342 with linux. Is root-case same for boot?

Please help, how to collect console log?

Regards,
Shrikant U H

41 - 60 of 1235