michaelmelanson / michaelmelanson/panda-os

Implement ConfigurationAccess::unsafe_clone for virtio-gpu PCI config

Open
#46 0 comments 0 reactions 0 assignees View on GitHub
bug drivers technical-debt
Dominant language
Rust
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

## Summary

`virtio_gpu/mod.rs` has a `todo!()` in the `ConfigurationAccess::unsafe_clone` trait implementation for PCI configuration access. This is not called in normal operation but will panic if ever invoked.

## Current state

- The `unsafe_clone` method in the PCI configuration access trait impl for virtio-gpu contains `todo!()`
- This code path is not exercised during normal boot or operation
- If it were ever called (e.g., by future multi-context GPU code), it would panic the kernel

## Desired behaviour

Implement `unsafe_clone` properly, or if the operation is fundamentally unsafe/unsupported, replace the `todo!()` with an explicit `unimplemented!()` with a comment explaining why, or remove the trait bound if possible.

## Key files

- `panda-kernel/src/drivers/virtio_gpu/mod.rs` — the `todo!()` site

## Testing

- If implemented: test that `unsafe_clone` returns a working configuration access handle
- If marked unimplemented: verify the code path is never reached in existing tests
- Run existing virtio-gpu tests to verify no regressions

## Documentation

- Document why `unsafe_clone` is or isn't supported for this driver

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at panda-kernel/src/drivers/virtio_gpu/mod.rs and inspect the ConfigurationAccess::unsafe_clone implementation containing todo!(). Determine whether a working configuration access handle can be returned or whether the operation must remain unsupported. Done means replacing the panic with the appropriate implementation or documented explicit unimplemented behavior, then running the existing virtio-gpu tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
computer-graphics, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.