Skip to content

Pass NHLT table in intel-laptop target only when present on the host#1661

Merged
brianmcgillion merged 1 commit intotiiuae:mainfrom
nesteroff:fix-hotplugging
Dec 23, 2025
Merged

Pass NHLT table in intel-laptop target only when present on the host#1661
brianmcgillion merged 1 commit intotiiuae:mainfrom
nesteroff:fix-hotplugging

Conversation

@nesteroff
Copy link
Copy Markdown
Contributor

@nesteroff nesteroff commented Dec 22, 2025

Description of Changes

This disables static passthrough of the NHLT table in the intel-laptop target and creates a rule for vhotplug so that it's passed only when it exists on the host. It allows the intel-laptop target to work both on devices that have the table and on those that don't, like System 76.

Type of Change

  • New Feature
  • Bug Fix
  • Improvement / Refactor

Related Issues / Tickets

Checklist

  • Clear summary in PR description
  • Detailed and meaningful commit message(s)
  • Commits are logically organized and squashed if appropriate
  • Contribution guidelines followed
  • Ghaf documentation updated with the commit - https://tiiuae.github.io/ghaf/
  • Author has run make-checks and it passes
  • All automatic GitHub Action checks pass - see actions
  • Author has added reviewers and removed PR draft status

Testing Instructions

Applicable Targets

  • Orin AGX aarch64
  • Orin NX aarch64
  • Lenovo X1 x86_64
  • Dell Latitude x86_64
  • System 76 x86_64

Installation Method

  • Requires full re-installation
  • Can be updated with nixos-rebuild ... switch
  • Other:

Test Steps To Verify:

Run the intel-laptop image on System 76 and make sure audio-vm is running and audio is working. On the current main, it fails to start because qemu is unable to read the NHLT table.

@brianmcgillion
Copy link
Copy Markdown
Collaborator

Dec 23 04:20:37 ghaf-host microvm@audio-vm[1794]: WARNING API connection closed by remote
Dec 23 04:20:37 ghaf-host vhotplug[875]: ERROR API client unix socket receive failed
Dec 23 04:20:37 ghaf-host vhotplug[875]: Traceback (most recent call last):
Dec 23 04:20:37 ghaf-host vhotplug[875]:   File "/nix/store/p8kc51h46i045qha50g77b1pgabqblk7-vhotplug-1.0/lib/python3.13/site-packages/vhotplug/apiserver.py", line 175, in _client_handler
Dec 23 04:20:37 ghaf-host vhotplug[875]:     res = self.handle_message(client_sock, client_addr, msg)
Dec 23 04:20:37 ghaf-host vhotplug[875]:   File "/nix/store/p8kc51h46i045qha50g77b1pgabqblk7-vhotplug-1.0/lib/python3.13/site-packages/vhotplug/apiserver.py", line 281, in handle_message
Dec 23 04:20:37 ghaf-host vhotplug[875]:     return handler(client_sock, client_addr, msg)
Dec 23 04:20:37 ghaf-host vhotplug[875]:   File "/nix/store/p8kc51h46i045qha50g77b1pgabqblk7-vhotplug-1.0/lib/python3.13/site-packages/vhotplug/apiserver.py", line 438, in _on_vmm_args
Dec 23 04:20:37 ghaf-host vhotplug[875]:     args = get_vmm_args(self.app_context, vm, qemu_bus_prefix)
Dec 23 04:20:37 ghaf-host vhotplug[875]:   File "/nix/store/p8kc51h46i045qha50g77b1pgabqblk7-vhotplug-1.0/lib/python3.13/site-packages/vhotplug/device.py", line 883, in get_vmm_args
Dec 23 04:20:37 ghaf-host vhotplug[875]:     os.chown(table.acpi_table, uid, gid)
Dec 23 04:20:37 ghaf-host vhotplug[875]:     ~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 23 04:20:37 ghaf-host vhotplug[875]: FileNotFoundError: [Errno 2] No such file or directory: '/sys/firmware/acpi/tables/NHLT'
.....
Dec 23 04:20:43 ghaf-host vhotplug[875]: WARNING VM is not booted while adding device 0000:00:1f.0 8086:7702 (Intel Corporation None)
Dec 23 04:20:43 ghaf-host vhotplug[875]: INFO Attaching 0000:00:1f.3 8086:7728 (Intel Corporation None) to audio-vm
Dec 23 04:20:43 ghaf-host vhotplug[875]: WARNING Socket /var/lib/microvms/audio-vm/audio-vm.sock is not alive

microvm -l shows that that the vm is running, but it is not possible to ssh to the vm. There is no audio. and the logs are spammed with the above error messages as if the vm is in a constant boot loop

@brianmcgillion brianmcgillion self-requested a review December 23, 2025 04:35
Signed-off-by: Yuri Nesterov <yuriy.nesterov@unikie.com>
@nesteroff
Copy link
Copy Markdown
Contributor Author

microvm -l shows that that the vm is running, but it is not possible to ssh to the vm. There is no audio. and the logs are spammed with the above error messages as if the vm is in a constant boot loop

Thanks for testing! This should be fixed now.

Copy link
Copy Markdown
Collaborator

@vunnyso vunnyso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Corrected: Audio works fine with the latest changes on System 76 with intel-laptop-debug image

@brianmcgillion brianmcgillion merged commit 8f678b5 into tiiuae:main Dec 23, 2025
32 checks passed
@nesteroff nesteroff deleted the fix-hotplugging branch December 23, 2025 15:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants