Skip to content

cvd: add acpi_table, device_tree_overlay, and file_backed_mapping to DiskArtifacts proto schema - #3390

Open
erjiaqing wants to merge 1 commit into
google:mainfrom
erjiaqing:510177847-p2.1
Open

erjiaqing wants to merge 1 commit into
google:mainfrom
erjiaqing:510177847-p2.1

Conversation

@erjiaqing

@erjiaqing erjiaqing commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Adds a DiceHandover config (build, addr, and an acpi_table or
device_tree_overlay firmware table). When set, the parser emits
--crosvm_file_backed_mapping_base64 for the build plus
--crosvm_acpi_table or --crosvm_device_tree_overlay for the table.

The mapping size is set by an optional size field (default 0x1000). The
firmware table type is set in the config because the parser does not
know the guest arch. Remote (@ab/...) builds are validated, it will be
implemented as an immediate follow up.

Bug: 544996625
Bug: 539399873

Test: bazel test //cuttlefish/host/commands/cvd/cli/parser/...
Assisted-by: Jetski:Gemini
TAG=agy
CONV=9d324de2-493b-495b-8490-a20d8e687190

@bridadan bridadan left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It looks like these changes assume that the ACPI table file, the device tree overlay, and/or the file backed memory file are already present in the local file system. This would work for local builds, but how does this work in CI? How are these artifacts fetched? In #3386 I added logic to the fetch handler to pull the artifacts from the build server. Is that required here as well?

@erjiaqing
erjiaqing force-pushed the 510177847-p2.1 branch 3 times, most recently from c8aa018 to 43d6f73 Compare October 23, 2026 09:22
@erjiaqing

Copy link
Copy Markdown
Contributor Author

It looks like these changes assume that the ACPI table file, the device tree overlay, and/or the file backed memory file are already present in the local file system. This would work for local builds, but how does this work in CI? How are these artifacts fetched? In #3386 I added logic to the fetch handler to pull the artifacts from the build server. Is that required here as well?

Thanks for the reviewing effort, I looked through #3386 again, and feel there are some feature gaps between cvd fetch and the requirement of this PR.

This PR is to provide extra parameters, instead of overriding standard images for Android. I confirmed that we can put the artifacts directly on CI.

I don't feel it is a good idea to add --dice-handover-build, --acpi-table-build, --dtb-build to cvd fetch, instead, I would prefer something like an array of --extra-artifact-build and control the file names in load_config.

Do you have any ideas on this?

Comment on lines +155 to +157
optional string acpi_table = 2;
optional DeviceTreeOverlayArtifact device_tree_overlay = 3;
optional FileBackedMapping file_backed_mapping = 4;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Based on our offline discussion, the expectation of the path for all of these fields is that they reference a file in the default_build, right?

@rmuthiah just heads up this differs from the vendor_boot and eventually the system fields since those accept a build string. Maybe a comment in each of the relevant fields would be helpful to show the difference.

@erjiaqing erjiaqing Oct 26, 2026 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes, these files should be located in the system_image_dir, which is the extracted default_build zip (Assuming #3234 is merged). Added a comment.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

After discussing offline, these paths can either be:

@bridadan

Copy link
Copy Markdown
Collaborator

It looks like these changes assume that the ACPI table file, the device tree overlay, and/or the file backed memory file are already present in the local file system. This would work for local builds, but how does this work in CI? How are these artifacts fetched? In #3386 I added logic to the fetch handler to pull the artifacts from the build server. Is that required here as well?

Thanks for the reviewing effort, I looked through #3386 again, and feel there are some feature gaps between cvd fetch and the requirement of this PR.

This PR is to provide extra parameters, instead of overriding standard images for Android. I confirmed that we can put the artifacts directly on CI.

I see what you mean, it does seem different from #3386 in that way.

I don't feel it is a good idea to add --dice-handover-build, --acpi-table-build, --dtb-build to cvd fetch, instead, I would prefer something like an array of --extra-artifact-build and control the file names in load_config.

Do you have any ideas on this?

From our discussion before, it sounds like all of the artifacts that would be used are tied to the target build (what goes in the default_build field). My understanding is the goal of this effort is to be able to select individual artifacts from that build, not from a different build. So I don't know that something like --extra-artifact-build flag is necessary in this case.

I think it makes sense for these fields to reference "build local" files. It's not a pattern I had considered before but I think its ok.

@rmuthiah any thoughts?

@erjiaqing
erjiaqing force-pushed the 510177847-p2.1 branch 3 times, most recently from 1cba198 to 0613f27 Compare November 3, 2026 10:10
@erjiaqing

erjiaqing commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor Author

Updates since offline discussions:

I still added

  // The firmware table describing the dice handover region to the guest.
  // Exactly one must be set. The file is expected to be bundled with the
  // image, i.e. a file in default_build.
  oneof firmware_table {
    // The ACPI table, usually used on x86_64 guests.
    string acpi_table = 3;
    // The device tree overlay, usually used on non-x86_64 guests.
    string device_tree_overlay = 4;
  }

Since it seems there are no good way to infer the arch of the VM. Also added an extra size parameter, so we don't have to infer the kernel pagesize of the guest vm.

We expect the acpi_table or device_tree_overlay can be found in the image.zip.

Adds a DiceHandover config (build, addr, and an acpi_table or
device_tree_overlay firmware table). When set, the parser emits
--crosvm_file_backed_mapping_base64 for the build plus
--crosvm_acpi_table or --crosvm_device_tree_overlay for the table.

The mapping is always 64K, which covers the guest page size on all
platforms. The firmware table type is set in the config because the
parser does not know the guest arch. Remote (@ab/...) builds are
validated but not yet passed to launch, since cvd fetch does not
support them.

Bug: 544996625
Bug: 539399873

Test: bazel test //cuttlefish/host/commands/cvd/cli/parser/...
Assisted-by: Jetski:Gemini
TAG=agy
CONV=ef35cb23-c351-4dd9-9690-b254baa904be

This branch has not been deployed

No deployments
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.

2 participants