Skip to content

Conversation

@jinankjain
Copy link
Member

This patch series contains the final set of patches required to boot ARM64 guests on MSHV.

jinankjain added 2 commits May 7, 2025 11:12
Currently PPI interrupt ID are hardcoded as numbers, it would be ideal
to define them as constants and could be reused in other parts of the
hypervisor crate.

Signed-off-by: Jinank Jain <[email protected]>
Since this would be used in other places inside the hypervisor and
hypervisor crate cannot take a dependency on arch crate, as that creates
cyclic dependency.

Signed-off-by: Jinank Jain <[email protected]>
@jinankjain jinankjain requested a review from a team as a code owner May 8, 2025 08:05
jinankjain added 7 commits May 9, 2025 01:18
For ARM64 guests we need to set three important partition property:

1) PPI interrupt ID for timer interrupt
2) PPI interrupt ID for PMU interrupts.
3) Hiding LPI support from the guest because MSHV does emulate ITS for
   the guest.

Signed-off-by: Jinank Jain <[email protected]>
For MSHV guests, we would need interrupt controller to be initialized
before the VM gets initialized. This is because we are registering the
base address of GIC distributor with MSHV as part of interrupt
controller initialization workflow. And MSHV mandates that this property
is set before we initialize the VM.

Signed-off-by: Jinank Jain <[email protected]>
This will satisfy the requirement of MSHV i.e., setting the GICD base
address before initializing the VM.

Signed-off-by: Jinank Jain <[email protected]>
It just simplifies code and improves the code read-ability without much
affecting the boot performance.

Signed-off-by: Jinank Jain <[email protected]>
It seems like address allocation has been spread into different files
and different location for x86 vs ARM. This makes it hard to follow the
code. Thus, unify it a single location which satisfies all the
requirement.

Signed-off-by: Jinank Jain <[email protected]>
Num SPI and Base SPI nodes should be added before the end node to be
included in the device tree generation.

Fixes: eac44e6 (arch: Extend FDT for GICv2M device for ARM64 on MSHV)
Signed-off-by: Jinank Jain <[email protected]>
Currently a lot of functions are stubbed out with unimplemented feature
tag. Add the missing implementation to successfully boot ARM64 guests on
MSHV.

Signed-off-by: Jinank Jain <[email protected]>
@jinankjain
Copy link
Member Author

@rbradford @likebreath It would be great if one of you could also take a look at this one?

Copy link
Member

@rbradford rbradford left a comment

Choose a reason for hiding this comment

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

Code looks good overall with some potential nits.

@jinankjain jinankjain added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@jinankjain jinankjain added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@jinankjain
Copy link
Member Author

@rbradford Something changed in the CI getting this error:


Run scripts/dev_cli.sh tests --integration-vfio
  scripts/dev_cli.sh tests --integration-vfio
  shell: /usr/bin/bash -e {0}
  env:
    AUTH_DOWNLOAD_TOKEN: ***
[Cloud Hypervisor] Wrong permissions for /tmp/cloud-hypervisor/ctr-build. Attempting to fix them ...
chmod: changing permissions of '/tmp/cloud-hypervisor/ctr-build': Operation not permitted
[Cloud Hypervisor] Error: wrong permissions for /tmp/cloud-hypervisor/ctr-build. Should be +x+w

@jinankjain jinankjain added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@rbradford
Copy link
Member

@rbradford Something changed in the CI getting this error:


Run scripts/dev_cli.sh tests --integration-vfio
  scripts/dev_cli.sh tests --integration-vfio
  shell: /usr/bin/bash -e {0}
  env:
    AUTH_DOWNLOAD_TOKEN: ***
[Cloud Hypervisor] Wrong permissions for /tmp/cloud-hypervisor/ctr-build. Attempting to fix them ...
chmod: changing permissions of '/tmp/cloud-hypervisor/ctr-build': Operation not permitted
[Cloud Hypervisor] Error: wrong permissions for /tmp/cloud-hypervisor/ctr-build. Should be +x+w

I've fixed this. And it's running the job now - https://github.com/cloud-hypervisor/cloud-hypervisor/actions/runs/14931917110/job/41951078105

@rbradford rbradford added this pull request to the merge queue May 9, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 9, 2025
@jinankjain jinankjain added this pull request to the merge queue May 9, 2025
Merged via the queue into cloud-hypervisor:main with commit 8f40268 May 9, 2025
38 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants