summary refs log tree commit diff stats
path: root/gitlab/issues_toml/target_missing/host_missing/accel_missing/2521.toml
blob: 7ac4a9273e6f9733ffc1caa344337b61245a01dd (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
id = 2521
title = "USB Passthrough Improper Remote Wakeup"
state = "opened"
created_at = "2024-08-20T18:48:39.716Z"
closed_at = "n/a"
labels = ["USB"]
url = "https://gitlab.com/qemu-project/qemu/-/issues/2521"
host-os = "Ubuntu 22.04.3"
host-arch = "x86_64"
qemu-version = "9.0.90"
guest-os = "Debian 12"
guest-arch = "x86_64"
description = """I am doing research with Linux Power Management interactions with USB devices. Which is why I would like to be able to wake a qemu vm from suspend with a passed through USB device. The first issue is that remote wakeup from usb devices do not wake the vm at all when running in -nographic mode (issuing system_wakeup from a qemu monitor shell will wake it though). When running with a GUI it is possible to wake the vm from a usb device as well as the qemu monitor shell but both will result in the GUI screen being black afterwards. It is still possible to use the vm though. Finally, waking the vm with a usb device is only possible when a valid usb device is passed through in the qemu launch command line. But interestingly the usb device specified to be passed through will only wakeup the vm if it is unplugged and plugged back in during the suspend. All other usb devices can wakeup the vm normally even though they are not passed through. It is not clear to me what is going on here and why other devices not being passed through to qemu can wake the vm. Note I have also enabled the /sys/bus/usb/devices/usb#/power/wakeup file and have manually unsuppressed the remote_wakeup flag in the source code to enable the /sys/bus/usb/devices/#-#/power/wakeup files to be generated but it has not affected anything."""
reproduce = """I have tested this issue with multiple kernel versions (6.10, 6.10-rc4, 6.6.43) as well as custom and generic kernel configs and different debian images so these do not seem to be the problem. But here is a detailed description of the exact setup I am currently using:

1. Download linux-6.10-rc4 source and configure with syzkaller fuzzing config https://github.com/google/syzkaller/blob/master/dashboard/config/linux/upstream-usb.config 
2. Set CONFIG_KCOV_INSTRUMENT_ALL to off (breaks suspend/resume in vm) and create bzImage
2. Create a debian bookworm image with syzkaller script https://github.com/google/syzkaller/blob/master/tools/create-image.sh
3. Download and build Qemu from source (see attached for detailed configuration and dependencies)
4. Attach a usb keyboard and mouse
5. Choose one device to pass through via command line
6. Try waking the vm with nographic and graphic mode using the usb devices"""
additional = """[configuration_output.txt](/uploads/f7d3487dab65deef40bd0e110b64a573/configuration_output.txt)
[gui_wakeup_log.txt](/uploads/72b192a88d587eced4bb4032307307e5/gui_wakeup_log.txt)"""