Skip to content

feat(vm): add prepare lend mthp option#7

Merged
BigfootACA merged 1 commit into
Droid-VM:masterfrom
lateautumn233:master
May 13, 2026
Merged

feat(vm): add prepare lend mthp option#7
BigfootACA merged 1 commit into
Droid-VM:masterfrom
lateautumn233:master

Conversation

@lateautumn233
Copy link
Copy Markdown
Contributor

  • Decouple --prepare-lend-mthp from hugepages in crosvm backend
  • Add UI toggle for prepare lend mTHP (disabled by default)
  • Display toggle after hugepages in VM options

Copilot AI review requested due to automatic review settings May 13, 2026 10:02
Copy link
Copy Markdown

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 a new VM option to control CrosVM’s --prepare-lend-mthp flag independently from hugepages, exposing it as a UI toggle (disabled by default) and persisting it into the VM config.

Changes:

  • Added a new localized string for “Prepare Lend mTHP”.
  • Added a new SwitchRowWidget in the VM basic options UI and wired it into config load/save.
  • Updated CrosVM command construction to append --prepare-lend-mthp based on its own config flag (no longer gated by hugepages).

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/src/main/res/values/strings.xml Adds English label for the new option.
app/src/main/res/values-zh-rCN/strings.xml Adds Simplified Chinese label for the new option.
app/src/main/res/layout/partial_vm_edit_basic.xml Adds the new switch row in the VM options section (after hugepages).
app/src/main/java/cn/classfun/droidvm/ui/vm/edit/basic/VMEditBasicTab.java Loads/saves the new config key prepare_lend_mthp.
app/src/main/java/cn/classfun/droidvm/daemon/vm/backend/CrosvmBackendInstance.java Emits --prepare-lend-mthp independently from --hugepages.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@@ -76,6 +78,7 @@ public void loadConfig(@NonNull VMConfig config) {
swUsb.setChecked(item.optBoolean("usb", false));
swSandbox.setChecked(item.optBoolean("sandbox", false));
swHugepages.setChecked(item.optBoolean("hugepages", false));
- Decouple --prepare-lend-mthp from hugepages in crosvm backend
- Add UI toggle for prepare lend mTHP (enabled by default)
- Display toggle after hugepages in VM options
@BigfootACA BigfootACA merged commit f20b250 into Droid-VM:master May 13, 2026
1 check passed
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.

3 participants