File tree Expand file tree Collapse file tree 7 files changed +21
-0
lines changed
Expand file tree Collapse file tree 7 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,13 @@ DEFINE_vec(
120120 " Frame socket path to use when launching a VM "
121121 " For example, \" --frames_socket_path=${XDG_RUNTIME_DIR}/wayland-0\" " );
122122
123+
123124DEFINE_vec (use_allocd, CF_DEFAULTS_USE_ALLOCD?" true" :" false" ,
124125 " Acquire static resources from the resource allocator daemon." );
126+
127+ DEFINE_vec (use_cvdalloc, CF_DEFAULTS_USE_CVDALLOC? " true" : " false" ,
128+ " Acquire static resources with cvdalloc." );
129+
125130DEFINE_vec (
126131 enable_minimal_mode, CF_DEFAULTS_ENABLE_MINIMAL_MODE ? " true" : " false" ,
127132 " Only enable the minimum features to boot a cuttlefish device and "
Original file line number Diff line number Diff line change @@ -61,6 +61,7 @@ DECLARE_vec(guest_vulkan_driver);
6161DECLARE_vec (frames_socket_path );
6262
6363DECLARE_vec (use_allocd );
64+ DECLARE_vec (use_cvdalloc );
6465DECLARE_vec (enable_minimal_mode );
6566DECLARE_vec (pause_in_bootloader );
6667DECLARE_bool (enable_host_bluetooth );
Original file line number Diff line number Diff line change @@ -519,6 +519,7 @@ Result<CuttlefishConfig> InitializeCuttlefishConfiguration(
519519 std::vector<bool > use_random_serial_vec = CF_EXPECT (GET_FLAG_BOOL_VALUE (
520520 use_random_serial));
521521 std::vector<bool > use_allocd_vec = CF_EXPECT (GET_FLAG_BOOL_VALUE (use_allocd));
522+ std::vector<bool > use_cvdalloc_vec = CF_EXPECT (GET_FLAG_BOOL_VALUE (use_cvdalloc));
522523 std::vector<bool > use_sdcard_vec = CF_EXPECT (GET_FLAG_BOOL_VALUE (use_sdcard));
523524 std::vector<bool > pause_in_bootloader_vec = CF_EXPECT (GET_FLAG_BOOL_VALUE (
524525 pause_in_bootloader));
@@ -786,6 +787,7 @@ Result<CuttlefishConfig> InitializeCuttlefishConfiguration(
786787 auto const_instance =
787788 const_cast <const CuttlefishConfig&>(tmp_config_obj).ForInstance (num);
788789
790+ instance.set_use_cvdalloc (use_cvdalloc_vec[instance_index]);
789791 instance.set_crosvm_use_balloon (use_balloon_vec[instance_index]);
790792 instance.set_crosvm_use_rng (use_rng_vec[instance_index]);
791793 instance.set_crosvm_simple_media_device (simple_media_device_vec[instance_index]);
Original file line number Diff line number Diff line change 5555#define CF_DEFAULTS_SETUPWIZARD_MODE "DISABLED"
5656#define CF_DEFAULTS_SMT false
5757#define CF_DEFAULTS_USE_ALLOCD false
58+ #define CF_DEFAULTS_USE_CVDALLOC false
5859#define CF_DEFAULTS_USE_SDCARD true
5960#define CF_DEFAULTS_UUID \
6061 cuttlefish::ForCurrentInstance(cuttlefish::kDefaultUuidPrefix)
Original file line number Diff line number Diff line change @@ -158,6 +158,7 @@ const std::unordered_set<std::string>& BoolFlags() {
158158 " start_gnss_proxy" ,
159159 " start_webrtc" ,
160160 " use_allocd" ,
161+ " use_cvdalloc" ,
161162 " use_random_serial" ,
162163 " use_sdcard" ,
163164 " vhost_net" ,
Original file line number Diff line number Diff line change @@ -324,6 +324,7 @@ class CuttlefishConfig {
324324 std::string ethernet_ipv6 () const ;
325325 uint32_t session_id () const ;
326326 bool use_allocd () const ;
327+ bool use_cvdalloc () const ;
327328 int vsock_guest_cid () const ;
328329 std::string vsock_guest_group () const ;
329330 std::string uuid () const ;
@@ -673,6 +674,7 @@ class CuttlefishConfig {
673674 void set_ethernet_ipv6 (const std::string& ip);
674675 void set_session_id (uint32_t session_id);
675676 void set_use_allocd (bool use_allocd);
677+ void set_use_cvdalloc (bool use_cvdalloc);
676678 void set_vsock_guest_cid (int vsock_guest_cid);
677679 void set_vsock_guest_group (const std::string& vsock_guest_group);
678680 void set_uuid (const std::string& uuid);
Original file line number Diff line number Diff line change @@ -1596,6 +1596,15 @@ void CuttlefishConfig::MutableInstanceSpecific::set_use_allocd(
15961596 (*Dictionary ())[kUseAllocd ] = use_allocd;
15971597}
15981598
1599+ static constexpr char kUseCvdalloc [] = " use_cvdalloc" ;
1600+ bool CuttlefishConfig::InstanceSpecific::use_cvdalloc () const {
1601+ return (*Dictionary ())[kUseCvdalloc ].asBool ();
1602+ }
1603+ void CuttlefishConfig::MutableInstanceSpecific::set_use_cvdalloc (
1604+ bool use_cvdalloc) {
1605+ (*Dictionary ())[kUseCvdalloc ] = use_cvdalloc;
1606+ }
1607+
15991608static constexpr char kSessionId [] = " session_id" ;
16001609uint32_t CuttlefishConfig::InstanceSpecific::session_id () const {
16011610 return (*Dictionary ())[kSessionId ].asUInt ();
You can’t perform that action at this time.
0 commit comments