vishesh92 opened a new pull request, #11340:
URL: https://github.com/apache/cloudstack/pull/11340

   ### Description
   
   This PR contains fixes especially in the discovery for mdev devices with 
SR-IOV enabled. vGPU with A10 has been tested successfully with these changes.
   
   <details><summary>Generated Summary</summary>
   <p>
   
   This pull request introduces several updates to improve GPU device handling, 
enhance vGPU discovery, and simplify the UI logic for GPU summaries. The 
changes include updates to the KVM hypervisor plugin, GPU discovery scripts, 
backend GPU service logic, and the GPU summary UI component.
   
   ### Updates to GPU Device Handling and vGPU Discovery:
   1. **KVM Hypervisor Plugin Enhancements**:
      - Modified `LibvirtGpuDef.java` to include the `model='vfio-pci'` 
attribute in the XML for MDEV devices, ensuring compatibility with 
vfio-pci-based configurations.
   
   2. **GPU Discovery Script Improvements**:
      - Refactored `gpudiscovery.sh` to introduce a reusable 
`process_mdev_instances` function for handling MDEV instances, consolidating 
logic and improving maintainability. 
[[1]](diffhunk://#diff-e2ccf95e13f6536546d815fea31d4fead77ecd21e525567ca53ad6894f5ee7bdR519-R567)
 
[[2]](diffhunk://#diff-e2ccf95e13f6536546d815fea31d4fead77ecd21e525567ca53ad6894f5ee7bdR640-R642)
      - Updated the XML parsing logic to correctly locate MDEV UUIDs by 
targeting the `source/address` element.
      - Added support for discovering vGPU instances on Virtual Functions (VFs) 
for NVIDIA SR-IOV devices.
      - Consolidated vGPU instance data into a unified JSON array for better 
organization.
   
   ### Backend Logic Enhancements:
   3. **GPU Service Updates**:
      - Improved handling of GPU device types in `GpuServiceImpl.java`, 
ensuring proper assignment of `VGPUOnly` and passthrough types based on device 
capabilities. 
[[1]](diffhunk://#diff-17f531fed585823ba1707b503466dab56a61613e7227b0c44472b48cbc790296L894-R906)
 
[[2]](diffhunk://#diff-17f531fed585823ba1707b503466dab56a61613e7227b0c44472b48cbc790296R1031-R1038)
      - Removed unnecessary state transitions for unmanaged GPU devices to 
streamline error handling.
   
   ### UI Simplifications:
   4. **GPU Summary Tab Refinements**:
      - Simplified the logic in `GPUSummaryTab.vue` by removing filters that 
excluded passthrough profiles from card summaries, ensuring all devices are 
considered. 
[[1]](diffhunk://#diff-e8c5857c5a6b11e5b7fad0f3d911254e0aa21daf5b91e1661c579ecfffdd92b2L170-R170)
 
[[2]](diffhunk://#diff-e8c5857c5a6b11e5b7fad0f3d911254e0aa21daf5b91e1661c579ecfffdd92b2L195)
      - Excluded devices of type `VGPUOnly` from the summary calculations to 
focus on relevant device types.
   
   </p>
   </details> 
   
   <!--- Describe your changes in DETAIL - And how has behaviour functionally 
changed. -->
   
   <!-- For new features, provide link to FS, dev ML discussion etc. -->
   <!-- In case of bug fix, the expected and actual behaviours, steps to 
reproduce. -->
   
   <!-- When "Fixes: #<id>" is specified, the issue/PR will automatically be 
closed when this PR gets merged -->
   <!-- For addressing multiple issues/PRs, use multiple "Fixes: #<id>" -->
   <!-- Fixes: # -->
   
   <!--- 
******************************************************************************* 
-->
   <!--- NOTE: AUTOMATION USES THE DESCRIPTIONS TO SET LABELS AND PRODUCE 
DOCUMENTATION. -->
   <!--- PLEASE PUT AN 'X' in only **ONE** box -->
   <!--- 
******************************************************************************* 
-->
   
   ### Types of changes
   
   - [ ] Breaking change (fix or feature that would cause existing 
functionality to change)
   - [ ] New feature (non-breaking change which adds functionality)
   - [x] Bug fix (non-breaking change which fixes an issue)
   - [x] Enhancement (improves an existing feature and functionality)
   - [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
   - [ ] build/CI
   - [ ] test (unit or integration test code)
   
   ### Feature/Enhancement Scale or Bug Severity
   
   #### Feature/Enhancement Scale
   
   - [ ] Major
   - [x] Minor
   
   ### Screenshots (if appropriate):
   
   ### How Has This Been Tested?
   
   <!-- Please describe in detail how you tested your changes. -->
   <!-- Include details of your testing environment, and the tests you ran to 
-->
   
   #### How did you try to break this feature and the system with this change?
   
   <!-- see how your change affects other areas of the code, etc. -->
   
   <!-- Please read the 
[CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) 
document -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to