Remove bootloader-related death reasons

There isn't a separate bootloader any more, so it can't cause
failure. The strings we are looking for to generate them are never
sent by anything.

I'm keeping the related constants in Telemetry & the Java API, because
changing those is non-trivial, and they're pretty harmless. (We should
deprecate the API constants next time round.)

I'm leaving the PVMFW constants, even though we don't currently send
those strings either, since that might change.

Bug: 274567065
Test: atest MicrodroidTests
Change-Id: I91310b98e4bc983af76db2c99cbb1e46f396903b
diff --git a/javalib/src/android/system/virtualmachine/VirtualMachine.java b/javalib/src/android/system/virtualmachine/VirtualMachine.java
index 7713faf..f96effa 100644
--- a/javalib/src/android/system/virtualmachine/VirtualMachine.java
+++ b/javalib/src/android/system/virtualmachine/VirtualMachine.java
@@ -23,8 +23,6 @@
 import static android.system.virtualmachine.VirtualMachineCallback.ERROR_PAYLOAD_INVALID_CONFIG;
 import static android.system.virtualmachine.VirtualMachineCallback.ERROR_PAYLOAD_VERIFICATION_FAILED;
 import static android.system.virtualmachine.VirtualMachineCallback.ERROR_UNKNOWN;
-import static android.system.virtualmachine.VirtualMachineCallback.STOP_REASON_BOOTLOADER_INSTANCE_IMAGE_CHANGED;
-import static android.system.virtualmachine.VirtualMachineCallback.STOP_REASON_BOOTLOADER_PUBLIC_KEY_MISMATCH;
 import static android.system.virtualmachine.VirtualMachineCallback.STOP_REASON_CRASH;
 import static android.system.virtualmachine.VirtualMachineCallback.STOP_REASON_HANGUP;
 import static android.system.virtualmachine.VirtualMachineCallback.STOP_REASON_INFRASTRUCTURE_ERROR;
@@ -1353,10 +1351,6 @@
                     return STOP_REASON_PVM_FIRMWARE_PUBLIC_KEY_MISMATCH;
                 case DeathReason.PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED:
                     return STOP_REASON_PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED;
-                case DeathReason.BOOTLOADER_PUBLIC_KEY_MISMATCH:
-                    return STOP_REASON_BOOTLOADER_PUBLIC_KEY_MISMATCH;
-                case DeathReason.BOOTLOADER_INSTANCE_IMAGE_CHANGED:
-                    return STOP_REASON_BOOTLOADER_INSTANCE_IMAGE_CHANGED;
                 case DeathReason.MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE:
                     return STOP_REASON_MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE;
                 case DeathReason.MICRODROID_PAYLOAD_HAS_CHANGED:
diff --git a/virtualizationmanager/src/crosvm.rs b/virtualizationmanager/src/crosvm.rs
index 60dd4cf..856ff1e 100644
--- a/virtualizationmanager/src/crosvm.rs
+++ b/virtualizationmanager/src/crosvm.rs
@@ -639,10 +639,6 @@
             "PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED" => {
                 return DeathReason::PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED
             }
-            "BOOTLOADER_PUBLIC_KEY_MISMATCH" => return DeathReason::BOOTLOADER_PUBLIC_KEY_MISMATCH,
-            "BOOTLOADER_INSTANCE_IMAGE_CHANGED" => {
-                return DeathReason::BOOTLOADER_INSTANCE_IMAGE_CHANGED
-            }
             "MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE" => {
                 return DeathReason::MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE
             }
diff --git a/virtualizationservice/aidl/android/system/virtualizationcommon/DeathReason.aidl b/virtualizationservice/aidl/android/system/virtualizationcommon/DeathReason.aidl
index 3f47002..0164de4 100644
--- a/virtualizationservice/aidl/android/system/virtualizationcommon/DeathReason.aidl
+++ b/virtualizationservice/aidl/android/system/virtualizationcommon/DeathReason.aidl
@@ -38,10 +38,7 @@
     PVM_FIRMWARE_PUBLIC_KEY_MISMATCH = 7,
     /** The pVM firmware failed to verify the VM because the instance image changed. */
     PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED = 8,
-    /** The bootloader failed to verify the VM because the public key doesn't match. */
-    BOOTLOADER_PUBLIC_KEY_MISMATCH = 9,
-    /** The bootloader failed to verify the VM because the instance image changed. */
-    BOOTLOADER_INSTANCE_IMAGE_CHANGED = 10,
+    // 9 & 10 intentionally removed.
     /** The microdroid failed to connect to VirtualizationService's RPC server. */
     MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE = 11,
     /** The payload for microdroid is changed. */
diff --git a/virtualizationservice/src/atom.rs b/virtualizationservice/src/atom.rs
index 47a1603..4aa3550 100644
--- a/virtualizationservice/src/atom.rs
+++ b/virtualizationservice/src/atom.rs
@@ -87,12 +87,6 @@
         DeathReason::PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED => {
             vm_exited::DeathReason::PvmFirmwareInstanceImageChanged
         }
-        DeathReason::BOOTLOADER_PUBLIC_KEY_MISMATCH => {
-            vm_exited::DeathReason::BootloaderPublicKeyMismatch
-        }
-        DeathReason::BOOTLOADER_INSTANCE_IMAGE_CHANGED => {
-            vm_exited::DeathReason::BootloaderInstanceImageChanged
-        }
         DeathReason::MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE => {
             vm_exited::DeathReason::MicrodroidFailedToConnectToVirtualizationService
         }
diff --git a/vmclient/src/death_reason.rs b/vmclient/src/death_reason.rs
index c417a7c..0610c1a 100644
--- a/vmclient/src/death_reason.rs
+++ b/vmclient/src/death_reason.rs
@@ -37,10 +37,6 @@
     PvmFirmwarePublicKeyMismatch,
     /// The pVM firmware failed to verify the VM because the instance image changed.
     PvmFirmwareInstanceImageChanged,
-    /// The bootloader failed to verify the VM because the public key doesn't match.
-    BootloaderPublicKeyMismatch,
-    /// The bootloader failed to verify the VM because the instance image changed.
-    BootloaderInstanceImageChanged,
     /// The microdroid failed to connect to VirtualizationService's RPC server.
     MicrodroidFailedToConnectToVirtualizationService,
     /// The payload for microdroid is changed.
@@ -71,10 +67,6 @@
             AidlDeathReason::PVM_FIRMWARE_INSTANCE_IMAGE_CHANGED => {
                 Self::PvmFirmwareInstanceImageChanged
             }
-            AidlDeathReason::BOOTLOADER_PUBLIC_KEY_MISMATCH => Self::BootloaderPublicKeyMismatch,
-            AidlDeathReason::BOOTLOADER_INSTANCE_IMAGE_CHANGED => {
-                Self::BootloaderInstanceImageChanged
-            }
             AidlDeathReason::MICRODROID_FAILED_TO_CONNECT_TO_VIRTUALIZATION_SERVICE => {
                 Self::MicrodroidFailedToConnectToVirtualizationService
             }