Skip to content

hyperv: add location-path passthrough pools#4370

Merged
LiliDeng merged 2 commits intomainfrom
vyadav_pass2
Mar 26, 2026
Merged

hyperv: add location-path passthrough pools#4370
LiliDeng merged 2 commits intomainfrom
vyadav_pass2

Conversation

@vyadavmsft
Copy link
Copy Markdown
Collaborator

@vyadavmsft vyadavmsft commented Mar 20, 2026

Description

Related Issue

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Refactoring
  • Documentation update

Checklist

  • Description is filled in above
  • No credentials, secrets, or internal details are included
  • Peer review requested (if not, add required peer reviewers after raising PR)
  • Tests executed and results posted below

Test Validation

Key Test Cases:

verify_device_passthrough_on_guest

Impacted LISA Features:

NIC Passthrough

Tested Azure Marketplace Images:

-Local VHD

Test Results

verify_device_passthrough_on_guest

Image VM Size Result
PASSED

Copilot AI review requested due to automatic review settings March 20, 2026 20:41
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds Hyper-V host device passthrough pool enhancements, aiming to support selecting DDA devices by Hyper-V LocationPath and improving robustness around PowerShell command handling.

Changes:

  • Add Hyper-V device pool APIs intended for location_path-based pool creation, including host-side “reclaim/restore” helpers.
  • Improve PowerShell quoting/escaping for VM names, location paths, and instance IDs when assigning/releasing devices.
  • Refactor DDA device discovery logic (MMIO parsing, device eligibility checks) and add discovery by location path.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Adds location-path pool entry point + host restore logic; improves escaping and error handling in pool/device operations.
lisa/sut_orchestrator/hyperv/get_assignable_devices.py Adds location-path based assignable device lookup; refactors DDA eligibility checks and MMIO parsing/validation.

Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread lisa/sut_orchestrator/util/device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Copilot AI review requested due to automatic review settings March 23, 2026 16:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

Comment thread lisa/sut_orchestrator/util/device_pool.py
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py
Comment thread lisa/sut_orchestrator/util/schema.py
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Copilot AI review requested due to automatic review settings March 23, 2026 23:39
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py
Comment thread lisa/sut_orchestrator/util/schema.py
Comment thread lisa/sut_orchestrator/util/schema.py
Copilot AI review requested due to automatic review settings March 24, 2026 00:23
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Add Hyper-V DDA discovery by location path and refactor assignable-device
checks into smaller helpers.

This commit teaches the assignable device helper to enumerate present PCI
devices with location paths, resolve requested location_path values back to
assignable DDA devices, and tighten MMIO parsing and device eligibility checks.

Pool integration is added in the next commit.
Copilot AI review requested due to automatic review settings March 24, 2026 01:55
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py
Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py Outdated
Copilot AI review requested due to automatic review settings March 25, 2026 07:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

Comment thread lisa/sut_orchestrator/hyperv/get_assignable_devices.py Outdated
Comment thread lisa/sut_orchestrator/hyperv/hyperv_device_pool.py
@LiliDeng LiliDeng merged commit 15cf4b5 into main Mar 26, 2026
58 checks passed
@LiliDeng LiliDeng deleted the vyadav_pass2 branch March 26, 2026 01:09
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.

4 participants