Delete references to ivsh in flags and the config.

Bug: 144111429
Test: launch_cvd -vm_manager=qemu_cli
Change-Id: I7b1c53d44e6be063eaa1a8ba1cc816ed89c8cfce
diff --git a/host/commands/assemble_cvd/flags.cc b/host/commands/assemble_cvd/flags.cc
index 09e76e6..a975d63 100644
--- a/host/commands/assemble_cvd/flags.cc
+++ b/host/commands/assemble_cvd/flags.cc
@@ -75,8 +75,6 @@
               "be vendor_boot.img in the directory specified by -system_image_dir.");
 DEFINE_int32(memory_mb, 2048,
              "Total amount of memory available for guest, MB.");
-DEFINE_string(mempath, vsoc::GetDefaultMempath(),
-              "Target location for the shmem file.");
 DEFINE_string(mobile_interface, GetPerInstanceDefault("cvd-mbr-"),
               "Network interface to use for mobile networking");
 DEFINE_string(mobile_tap_name, GetPerInstanceDefault("cvd-mtap-"),
@@ -118,9 +116,6 @@
 DEFINE_string(kernel_log_monitor_binary,
               vsoc::DefaultHostArtifactsPath("bin/kernel_log_monitor"),
               "Location of the log monitor binary.");
-DEFINE_string(ivserver_binary,
-              vsoc::DefaultHostArtifactsPath("bin/ivserver"),
-              "Location of the ivshmem server binary.");
 DEFINE_int32(vnc_server_port, GetPerInstanceDefault(6444),
              "The port on which the vnc server should listen");
 DEFINE_string(socket_forward_proxy_binary,
@@ -430,13 +425,6 @@
     }
   }
 
-  tmp_config_obj.set_mempath(FLAGS_mempath);
-  tmp_config_obj.set_ivshmem_qemu_socket_path(
-      tmp_config_obj.PerInstanceInternalPath("ivshmem_socket_qemu"));
-  tmp_config_obj.set_ivshmem_client_socket_path(
-      tmp_config_obj.PerInstanceInternalPath("ivshmem_socket_client"));
-  tmp_config_obj.set_ivshmem_vector_count(0);
-
   if (tmp_config_obj.adb_mode().count(vsoc::AdbMode::Usb) > 0) {
     tmp_config_obj.set_usb_v1_socket_name(
         tmp_config_obj.PerInstanceInternalPath("usb-v1"));
@@ -471,7 +459,6 @@
   tmp_config_obj.set_qemu_binary(FLAGS_qemu_binary);
   tmp_config_obj.set_crosvm_binary(FLAGS_crosvm_binary);
   tmp_config_obj.set_console_forwarder_binary(FLAGS_console_forwarder_binary);
-  tmp_config_obj.set_ivserver_binary(FLAGS_ivserver_binary);
   tmp_config_obj.set_kernel_log_monitor_binary(FLAGS_kernel_log_monitor_binary);
 
   tmp_config_obj.set_enable_vnc_server(FLAGS_start_vnc_server);
@@ -502,7 +489,7 @@
   tmp_config_obj.set_logcat_vsock_port(FLAGS_logcat_vsock_port);
   tmp_config_obj.set_config_server_port(FLAGS_config_server_port);
   tmp_config_obj.set_frames_vsock_port(FLAGS_frames_vsock_port);
-  if (!tmp_config_obj.enable_ivserver() && tmp_config_obj.enable_vnc_server()) {
+  if (tmp_config_obj.enable_vnc_server()) {
     tmp_config_obj.add_kernel_cmdline(concat("androidboot.vsock_frames_port=",
                                              FLAGS_frames_vsock_port));
   }
@@ -623,8 +610,6 @@
 bool CleanPriorFiles() {
   // Everything on the instance directory
   std::string prior_files = FLAGS_instance_dir + "/*";
-  // The shared memory file
-  prior_files += " " + FLAGS_mempath;
   // The environment file
   prior_files += " " + GetCuttlefishEnvPath();
   // The global link to the config file
diff --git a/host/libs/config/cuttlefish_config.cpp b/host/libs/config/cuttlefish_config.cpp
index 6f66fb3..6d5beab 100644
--- a/host/libs/config/cuttlefish_config.cpp
+++ b/host/libs/config/cuttlefish_config.cpp
@@ -106,11 +106,6 @@
 const char* kLauncherLogPath = "launcher_log_path";
 const char* kLauncherMonitorPath = "launcher_monitor_socket";
 
-const char* kMempath = "mempath";
-const char* kIvshmemQemuSocketPath = "ivshmem_qemu_socket_path";
-const char* kIvshmemClientSocketPath = "ivshmem_client_socket_path";
-const char* kIvshmemVectorCount = "ivshmem_vector_count";
-
 const char* kMobileBridgeName = "mobile_bridge_name";
 const char* kMobileTapName = "mobile_tap_name";
 const char* kWifiTapName = "wifi_tap_name";
@@ -127,7 +122,6 @@
 const char* kQemuBinary = "qemu_binary";
 const char* kCrosvmBinary = "crosvm_binary";
 const char* kConsoleForwarderBinary = "console_forwarder_binary";
-const char* kIvServerBinary = "ivserver_binary";
 const char* kKernelLogMonitorBinary = "kernel_log_monitor_binary";
 
 const char* kEnableVncServer = "enable_vnc_server";
@@ -406,36 +400,6 @@
   (*dictionary_)[kVirtualDiskPaths] = virtual_disks_json_obj;
 }
 
-std::string CuttlefishConfig::mempath() const {
-  return (*dictionary_)[kMempath].asString();
-}
-void CuttlefishConfig::set_mempath(const std::string& mempath) {
-  SetPath(kMempath, mempath);
-}
-
-std::string CuttlefishConfig::ivshmem_qemu_socket_path() const {
-  return (*dictionary_)[kIvshmemQemuSocketPath].asString();
-}
-void CuttlefishConfig::set_ivshmem_qemu_socket_path(
-    const std::string& ivshmem_qemu_socket_path) {
-  SetPath(kIvshmemQemuSocketPath, ivshmem_qemu_socket_path);
-}
-
-std::string CuttlefishConfig::ivshmem_client_socket_path() const {
-  return (*dictionary_)[kIvshmemClientSocketPath].asString();
-}
-void CuttlefishConfig::set_ivshmem_client_socket_path(
-    const std::string& ivshmem_client_socket_path) {
-  SetPath(kIvshmemClientSocketPath, ivshmem_client_socket_path);
-}
-
-int CuttlefishConfig::ivshmem_vector_count() const {
-  return (*dictionary_)[kIvshmemVectorCount].asInt();
-}
-void CuttlefishConfig::set_ivshmem_vector_count(int ivshmem_vector_count) {
-  (*dictionary_)[kIvshmemVectorCount] = ivshmem_vector_count;
-}
-
 std::string CuttlefishConfig::usb_v1_socket_name() const {
   return (*dictionary_)[kUsbV1SocketName].asString();
 }
@@ -659,14 +623,6 @@
   (*dictionary_)[kConsoleForwarderBinary] = binary;
 }
 
-std::string CuttlefishConfig::ivserver_binary() const {
-  return (*dictionary_)[kIvServerBinary].asString();
-}
-
-void CuttlefishConfig::set_ivserver_binary(const std::string& ivserver_binary) {
-  (*dictionary_)[kIvServerBinary] = ivserver_binary;
-}
-
 std::string CuttlefishConfig::kernel_log_monitor_binary() const {
   return (*dictionary_)[kKernelLogMonitorBinary].asString();
 }
@@ -898,10 +854,6 @@
   return (*dictionary_)[kTombstoneReceiverPort].asInt();
 }
 
-bool CuttlefishConfig::enable_ivserver() const {
-  return hardware_name() == "cutf_ivsh";
-}
-
 std::string CuttlefishConfig::touch_socket_path() const {
   return PerInstanceInternalPath("touch.sock");
 }
@@ -1005,10 +957,6 @@
   return cvd::StringFromEnv("HOME", ".") + "/.cuttlefish_config.json";
 }
 
-std::string GetDomain() {
-  return CuttlefishConfig::Get()->ivshmem_client_socket_path();
-}
-
 std::string GetPerInstanceDefault(const char* prefix) {
   std::ostringstream stream;
   stream << prefix << std::setfill('0') << std::setw(2) << GetInstance();
@@ -1022,10 +970,6 @@
   return stream.str();
 }
 
-std::string GetDefaultMempath() {
-  return GetPerInstanceDefault("/var/run/shm/cvd-");
-}
-
 int GetDefaultPerInstanceVsockCid() {
   constexpr int kFirstGuestCid = 3;
   return vsoc::HostSupportsVsock() ? GetPerInstanceDefault(kFirstGuestCid) : 0;
diff --git a/host/libs/config/cuttlefish_config.h b/host/libs/config/cuttlefish_config.h
index 4ec49e7..532900f 100644
--- a/host/libs/config/cuttlefish_config.h
+++ b/host/libs/config/cuttlefish_config.h
@@ -162,20 +162,6 @@
   std::vector<std::string> virtual_disk_paths() const;
   void set_virtual_disk_paths(const std::vector<std::string>& disk_paths);
 
-  std::string mempath() const;
-  void set_mempath(const std::string& mempath);
-
-  std::string ivshmem_qemu_socket_path() const;
-  void set_ivshmem_qemu_socket_path(
-      const std::string& ivshmem_qemu_socket_path);
-
-  std::string ivshmem_client_socket_path() const;
-  void set_ivshmem_client_socket_path(
-      const std::string& ivshmem_client_socket_path);
-
-  int ivshmem_vector_count() const;
-  void set_ivshmem_vector_count(int ivshmem_vector_count);
-
   // The name of the socket that will be used to forward access to USB gadget.
   // This is for V1 of the USB bus.
   std::string usb_v1_socket_name() const;
@@ -259,9 +245,6 @@
   void set_console_forwarder_binary(const std::string& crosvm_binary);
   std::string console_forwarder_binary() const;
 
-  void set_ivserver_binary(const std::string& ivserver_binary);
-  std::string ivserver_binary() const;
-
   void set_kernel_log_monitor_binary(
       const std::string& kernel_log_monitor_binary);
   std::string kernel_log_monitor_binary() const;
@@ -341,8 +324,6 @@
   void set_boot_slot(const std::string& boot_slot);
   std::string boot_slot() const;
 
-  bool enable_ivserver() const;
-
   std::string touch_socket_path() const;
   std::string keyboard_socket_path() const;
 
@@ -370,9 +351,6 @@
 // it easily discoverable regardless of what vm manager is in use
 std::string GetGlobalConfigFileLink();
 
-// Returns the path to the ivserver's client socket.
-std::string GetDomain();
-
 // These functions modify a given base value to make it different accross
 // different instances by appending the instance id in case of strings or adding
 // it in case of integers.
diff --git a/host/libs/vm_manager/qemu_manager.cpp b/host/libs/vm_manager/qemu_manager.cpp
index 138aac4..3ef63fc 100644
--- a/host/libs/vm_manager/qemu_manager.cpp
+++ b/host/libs/vm_manager/qemu_manager.cpp
@@ -145,10 +145,6 @@
                config_->kernel_log_pipe_name());
   LogAndSetEnv("console_path", config_->console_path());
   LogAndSetEnv("logcat_path", config_->logcat_path());
-  LogAndSetEnv("ivshmem_qemu_socket_path",
-               config_->ivshmem_qemu_socket_path());
-  LogAndSetEnv("ivshmem_vector_count",
-               std::to_string(config_->ivshmem_vector_count()));
   LogAndSetEnv("usb_v1_socket_name", config_->usb_v1_socket_name());
   LogAndSetEnv("vsock_guest_cid", std::to_string(config_->vsock_guest_cid()));
   LogAndSetEnv("logcat_mode", config_->logcat_mode());