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

 

 

Join {acrn-users@lists.projectacrn.org to automatically receive all group messages.