Move pvmfw to under guest

and run rustfmt as requested

Bug: 352458998
Test: pass TH
Change-Id: I5bf24f2e1e9d27428fda8e3e60172748cd3ad55f
diff --git a/README.md b/README.md
index f02b8c3..c89cc31 100644
--- a/README.md
+++ b/README.md
@@ -14,7 +14,7 @@
 For in-depth explanations about individual topics and components, visit the following links.
 
 AVF components:
-* [pVM firmware](pvmfw/README.md)
+* [pVM firmware](guest/pvmfw/README.md)
 * [Android Boot Loader (ABL)](docs/abl.md)
 * [Microdroid](microdroid/README.md)
 * [Microdroid kernel](microdroid/kernel/README.md)
diff --git a/TEST_MAPPING b/TEST_MAPPING
index 58aff90..80e085c 100644
--- a/TEST_MAPPING
+++ b/TEST_MAPPING
@@ -120,7 +120,7 @@
       "path": "packages/modules/Virtualization/guest/microdroid_manager"
     },
     {
-      "path": "packages/modules/Virtualization/pvmfw"
+      "path": "packages/modules/Virtualization/guest/pvmfw"
     },
     {
       "path": "packages/modules/Virtualization/rialto"
diff --git a/docs/abl.md b/docs/abl.md
index 7139d26..c10f1bf 100644
--- a/docs/abl.md
+++ b/docs/abl.md
@@ -14,7 +14,7 @@
 * loading it into memory, and
 * describing the region where pvmfw is loaded using DT and passing it to hypervisor.
 
-See [ABL Support](../pvmfw/README.md#android-bootloader-abl_support) for more detail.
+See [ABL Support](../guest/pvmfw/README.md#android-bootloader-abl_support) for more detail.
 
 ABL is also responsible for constructing the pvmfw configuration data. The data consists of the
 following info:
@@ -26,7 +26,7 @@
     * Hashtree digest of the
       [microdroid-vendor.img](microdroid_vendor_modules.md#changes-in-abl).
 
-See [Configuration Data](../pvmfw/README.md#configuration-data) for more detail.
+See [Configuration Data](../guest/pvmfw/README.md#configuration-data) for more detail.
 
 ## Android
 
diff --git a/docs/debug/README.md b/docs/debug/README.md
index 1e5f096..4b42531 100644
--- a/docs/debug/README.md
+++ b/docs/debug/README.md
@@ -96,7 +96,7 @@
 
 1. Bootloader loads it from the `dpm` partition and verifies it.
 1. Bootloader appends the loaded debug policy as the [configuration
-   data](../../pvmfw/README.md#configuration-data) of the pvmfw.
+   data](../../guest/pvmfw/README.md#configuration-data) of the pvmfw.
 1. When a pVM is started, pvmfw [overlays][apply_debug_policy] the debug policy to the baseline
    device tree from crosvm.
 1. OS payload (e.g. Microdroid) [reads][read_debug_policy] the device tree and enables specific
diff --git a/docs/device_assignment.md b/docs/device_assignment.md
index 1166cdf..4b2296c 100644
--- a/docs/device_assignment.md
+++ b/docs/device_assignment.md
@@ -221,7 +221,7 @@
 incoming device tree with the VM DTBO.
 
 For more detail about providing VM DTBO in pvmfw,
-see: [pvmfw/README.md](../pvmfw/README.md#configuration-data-format)
+see: [pvmfw/README.md](../guest/pvmfw/README.md#configuration-data-format)
 
 
 ## Launch VM with device assignment
@@ -236,4 +236,4 @@
 
 ```sh
 adb shell /apex/com.android.virt/bin/vm run-microdroid --devices /sys/bus/platform/devices/16d00000.light
-```
\ No newline at end of file
+```
diff --git a/docs/microdroid_vendor_modules.md b/docs/microdroid_vendor_modules.md
index ef55225..6ead195 100644
--- a/docs/microdroid_vendor_modules.md
+++ b/docs/microdroid_vendor_modules.md
@@ -111,7 +111,7 @@
 
 The execution flow is very similar to the non-protected case above, however
 there is one important addition. The `pvmfw` binary will use the
-[VM reference DT blob](#../pvmfw/README.md#pvmfw-data-v1-2) passed from the
+[VM reference DT blob](#../guest/pvmfw/README.md#pvmfw-data-v1-2) passed from the
 Android Bootloader (ABL), to validate the guest DT overlay passed from the host.
 
 See [Changes in Android Bootloader](#changes-in-abl) section below for more
@@ -146,7 +146,7 @@
 the host's `vendor.img`.
 
 The Android Bootloader can read that property when construction the
-[VM reference DT blob](#../pvmfw/README.md#pvmfw-data-v1-2) passed to pvmfw.
+[VM reference DT blob](#../guest/pvmfw/README.md#pvmfw-data-v1-2) passed to pvmfw.
 
 ## GKI as Microdroid guest kernel
 
diff --git a/pvmfw/Android.bp b/guest/pvmfw/Android.bp
similarity index 100%
rename from pvmfw/Android.bp
rename to guest/pvmfw/Android.bp
diff --git a/pvmfw/README.md b/guest/pvmfw/README.md
similarity index 100%
rename from pvmfw/README.md
rename to guest/pvmfw/README.md
diff --git a/pvmfw/TEST_MAPPING b/guest/pvmfw/TEST_MAPPING
similarity index 100%
rename from pvmfw/TEST_MAPPING
rename to guest/pvmfw/TEST_MAPPING
diff --git a/pvmfw/avb/Android.bp b/guest/pvmfw/avb/Android.bp
similarity index 100%
rename from pvmfw/avb/Android.bp
rename to guest/pvmfw/avb/Android.bp
diff --git a/pvmfw/avb/fuzz/Android.bp b/guest/pvmfw/avb/fuzz/Android.bp
similarity index 100%
rename from pvmfw/avb/fuzz/Android.bp
rename to guest/pvmfw/avb/fuzz/Android.bp
diff --git a/pvmfw/avb/fuzz/with_footer_verify_fuzzer.rs b/guest/pvmfw/avb/fuzz/with_footer_verify_fuzzer.rs
similarity index 96%
rename from pvmfw/avb/fuzz/with_footer_verify_fuzzer.rs
rename to guest/pvmfw/avb/fuzz/with_footer_verify_fuzzer.rs
index 6eed15b..141361e 100644
--- a/pvmfw/avb/fuzz/with_footer_verify_fuzzer.rs
+++ b/guest/pvmfw/avb/fuzz/with_footer_verify_fuzzer.rs
@@ -55,5 +55,5 @@
         .copy_from_slice(&AVB_MAGIC[..(AVB_MAGIC_LEN as usize)]);
     modified_kernel[kernel_and_vbmeta.len()..].copy_from_slice(&avb_footer);
 
-    let _ = verify_payload(&modified_kernel, /*initrd=*/ None, &[0u8; 64]);
+    let _ = verify_payload(&modified_kernel, /* initrd= */ None, &[0u8; 64]);
 });
diff --git a/pvmfw/avb/fuzz/without_footer_verify_fuzzer.rs b/guest/pvmfw/avb/fuzz/without_footer_verify_fuzzer.rs
similarity index 93%
rename from pvmfw/avb/fuzz/without_footer_verify_fuzzer.rs
rename to guest/pvmfw/avb/fuzz/without_footer_verify_fuzzer.rs
index fc8fa85..d57f96f 100644
--- a/pvmfw/avb/fuzz/without_footer_verify_fuzzer.rs
+++ b/guest/pvmfw/avb/fuzz/without_footer_verify_fuzzer.rs
@@ -24,5 +24,5 @@
     // kernel can pass the kernel verification, so the value of `initrd`
     // is not so important as we won't reach initrd verification with
     // this fuzzer.
-    let _ = verify_payload(kernel, /*initrd=*/ None, &[0u8; 64]);
+    let _ = verify_payload(kernel, /* initrd= */ None, &[0u8; 64]);
 });
diff --git a/pvmfw/avb/src/error.rs b/guest/pvmfw/avb/src/error.rs
similarity index 100%
rename from pvmfw/avb/src/error.rs
rename to guest/pvmfw/avb/src/error.rs
diff --git a/pvmfw/avb/src/lib.rs b/guest/pvmfw/avb/src/lib.rs
similarity index 100%
rename from pvmfw/avb/src/lib.rs
rename to guest/pvmfw/avb/src/lib.rs
diff --git a/pvmfw/avb/src/ops.rs b/guest/pvmfw/avb/src/ops.rs
similarity index 100%
rename from pvmfw/avb/src/ops.rs
rename to guest/pvmfw/avb/src/ops.rs
diff --git a/pvmfw/avb/src/partition.rs b/guest/pvmfw/avb/src/partition.rs
similarity index 100%
rename from pvmfw/avb/src/partition.rs
rename to guest/pvmfw/avb/src/partition.rs
diff --git a/pvmfw/avb/src/verify.rs b/guest/pvmfw/avb/src/verify.rs
similarity index 100%
rename from pvmfw/avb/src/verify.rs
rename to guest/pvmfw/avb/src/verify.rs
diff --git a/pvmfw/avb/tests/api_test.rs b/guest/pvmfw/avb/tests/api_test.rs
similarity index 100%
rename from pvmfw/avb/tests/api_test.rs
rename to guest/pvmfw/avb/tests/api_test.rs
diff --git a/pvmfw/avb/tests/utils.rs b/guest/pvmfw/avb/tests/utils.rs
similarity index 100%
rename from pvmfw/avb/tests/utils.rs
rename to guest/pvmfw/avb/tests/utils.rs
diff --git a/pvmfw/idmap.S b/guest/pvmfw/idmap.S
similarity index 100%
rename from pvmfw/idmap.S
rename to guest/pvmfw/idmap.S
diff --git a/pvmfw/image.ld b/guest/pvmfw/image.ld
similarity index 100%
rename from pvmfw/image.ld
rename to guest/pvmfw/image.ld
diff --git a/pvmfw/platform.dts b/guest/pvmfw/platform.dts
similarity index 100%
rename from pvmfw/platform.dts
rename to guest/pvmfw/platform.dts
diff --git a/pvmfw/src/bcc.rs b/guest/pvmfw/src/bcc.rs
similarity index 100%
rename from pvmfw/src/bcc.rs
rename to guest/pvmfw/src/bcc.rs
diff --git a/pvmfw/src/bootargs.rs b/guest/pvmfw/src/bootargs.rs
similarity index 100%
rename from pvmfw/src/bootargs.rs
rename to guest/pvmfw/src/bootargs.rs
diff --git a/pvmfw/src/config.rs b/guest/pvmfw/src/config.rs
similarity index 100%
rename from pvmfw/src/config.rs
rename to guest/pvmfw/src/config.rs
diff --git a/pvmfw/src/device_assignment.rs b/guest/pvmfw/src/device_assignment.rs
similarity index 100%
rename from pvmfw/src/device_assignment.rs
rename to guest/pvmfw/src/device_assignment.rs
diff --git a/pvmfw/src/dice.rs b/guest/pvmfw/src/dice.rs
similarity index 100%
rename from pvmfw/src/dice.rs
rename to guest/pvmfw/src/dice.rs
diff --git a/pvmfw/src/entry.rs b/guest/pvmfw/src/entry.rs
similarity index 100%
rename from pvmfw/src/entry.rs
rename to guest/pvmfw/src/entry.rs
diff --git a/pvmfw/src/exceptions.rs b/guest/pvmfw/src/exceptions.rs
similarity index 100%
rename from pvmfw/src/exceptions.rs
rename to guest/pvmfw/src/exceptions.rs
diff --git a/pvmfw/src/fdt.rs b/guest/pvmfw/src/fdt.rs
similarity index 100%
rename from pvmfw/src/fdt.rs
rename to guest/pvmfw/src/fdt.rs
diff --git a/pvmfw/src/gpt.rs b/guest/pvmfw/src/gpt.rs
similarity index 100%
rename from pvmfw/src/gpt.rs
rename to guest/pvmfw/src/gpt.rs
diff --git a/pvmfw/src/helpers.rs b/guest/pvmfw/src/helpers.rs
similarity index 100%
rename from pvmfw/src/helpers.rs
rename to guest/pvmfw/src/helpers.rs
diff --git a/pvmfw/src/instance.rs b/guest/pvmfw/src/instance.rs
similarity index 100%
rename from pvmfw/src/instance.rs
rename to guest/pvmfw/src/instance.rs
diff --git a/pvmfw/src/main.rs b/guest/pvmfw/src/main.rs
similarity index 100%
rename from pvmfw/src/main.rs
rename to guest/pvmfw/src/main.rs
diff --git a/pvmfw/src/memory.rs b/guest/pvmfw/src/memory.rs
similarity index 100%
rename from pvmfw/src/memory.rs
rename to guest/pvmfw/src/memory.rs
diff --git a/pvmfw/testdata/expected_dt_with_dependency.dts b/guest/pvmfw/testdata/expected_dt_with_dependency.dts
similarity index 100%
rename from pvmfw/testdata/expected_dt_with_dependency.dts
rename to guest/pvmfw/testdata/expected_dt_with_dependency.dts
diff --git a/pvmfw/testdata/expected_dt_with_dependency_loop.dts b/guest/pvmfw/testdata/expected_dt_with_dependency_loop.dts
similarity index 100%
rename from pvmfw/testdata/expected_dt_with_dependency_loop.dts
rename to guest/pvmfw/testdata/expected_dt_with_dependency_loop.dts
diff --git a/pvmfw/testdata/expected_dt_with_multiple_dependencies.dts b/guest/pvmfw/testdata/expected_dt_with_multiple_dependencies.dts
similarity index 100%
rename from pvmfw/testdata/expected_dt_with_multiple_dependencies.dts
rename to guest/pvmfw/testdata/expected_dt_with_multiple_dependencies.dts
diff --git a/pvmfw/testdata/test_crosvm_dt_base.dtsi b/guest/pvmfw/testdata/test_crosvm_dt_base.dtsi
similarity index 100%
rename from pvmfw/testdata/test_crosvm_dt_base.dtsi
rename to guest/pvmfw/testdata/test_crosvm_dt_base.dtsi
diff --git a/pvmfw/testdata/test_pvmfw_devices_overlapping_pvmfw.dts b/guest/pvmfw/testdata/test_pvmfw_devices_overlapping_pvmfw.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_overlapping_pvmfw.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_overlapping_pvmfw.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_vm_dtbo.dts b/guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_vm_dtbo.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_dependencies.dts b/guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_dependencies.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_dependencies.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_dependencies.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_duplicated_iommus.dts b/guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_duplicated_iommus.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_duplicated_iommus.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_with_duplicated_iommus.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_without_symbols.dts b/guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_without_symbols.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_vm_dtbo_without_symbols.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_vm_dtbo_without_symbols.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_dependency.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_dependency.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_dependency.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_dependency.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_dependency_loop.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_dependency_loop.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_dependency_loop.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_dependency_loop.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_duplicated_pviommus.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_duplicated_pviommus.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_duplicated_pviommus.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_duplicated_pviommus.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_iommu_id_conflict.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_iommu_id_conflict.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_iommu_id_conflict.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_iommu_id_conflict.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_iommu_sharing.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_iommu_sharing.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_iommu_sharing.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_iommu_sharing.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_multiple_dependencies.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_multiple_dependencies.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_multiple_dependencies.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_multiple_dependencies.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_multiple_devices_iommus.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_multiple_devices_iommus.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_multiple_devices_iommus.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_multiple_devices_iommus.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_multiple_reg_iommus.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_multiple_reg_iommus.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_multiple_reg_iommus.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_multiple_reg_iommus.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_with_rng.dts b/guest/pvmfw/testdata/test_pvmfw_devices_with_rng.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_with_rng.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_with_rng.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_without_device.dts b/guest/pvmfw/testdata/test_pvmfw_devices_without_device.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_without_device.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_without_device.dts
diff --git a/pvmfw/testdata/test_pvmfw_devices_without_iommus.dts b/guest/pvmfw/testdata/test_pvmfw_devices_without_iommus.dts
similarity index 100%
rename from pvmfw/testdata/test_pvmfw_devices_without_iommus.dts
rename to guest/pvmfw/testdata/test_pvmfw_devices_without_iommus.dts
diff --git a/microdroid/README.md b/microdroid/README.md
index 3c5db3b..e3d310f 100644
--- a/microdroid/README.md
+++ b/microdroid/README.md
@@ -182,7 +182,7 @@
 [fstab.microdroid]: fstab.microdroid
 [dm-verity]: https://source.android.com/docs/security/features/verifiedboot/dm-verity
 [DTBO]: https://android.googlesource.com/platform/external/dtc/+/refs/heads/main/Documentation/dt-object-internal.txt
-[pvmfw config data]: ../pvmfw/README.md#configuration-data-format
+[pvmfw config data]: ../guest/pvmfw/README.md#configuration-data-format
 [bootloader]: https://source.android.com/docs/core/architecture/bootloader
 [Makefile]: https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/Makefile