@@ -14,9 +14,7 @@ See the License for the specific language governing permissions and
1414limitations under the License.
1515*/
1616
17- #[ cfg( mshv3) ]
1817extern crate mshv_bindings3 as mshv_bindings;
19- #[ cfg( mshv3) ]
2018extern crate mshv_ioctls3 as mshv_ioctls;
2119
2220use std:: fmt:: { Debug , Formatter } ;
@@ -27,7 +25,9 @@ use log::{LevelFilter, error};
2725use mshv_bindings:: {
2826 FloatingPointUnit , SpecialRegisters , StandardRegisters , hv_message_type,
2927 hv_message_type_HVMSG_GPA_INTERCEPT, hv_message_type_HVMSG_UNMAPPED_GPA,
30- hv_message_type_HVMSG_X64_HALT, hv_message_type_HVMSG_X64_IO_PORT_INTERCEPT, hv_register_assoc,
28+ hv_message_type_HVMSG_X64_HALT, hv_message_type_HVMSG_X64_IO_PORT_INTERCEPT,
29+ hv_partition_property_code_HV_PARTITION_PROPERTY_SYNTHETIC_PROC_FEATURES,
30+ hv_partition_synthetic_processor_features, hv_register_assoc,
3131 hv_register_name_HV_X64_REGISTER_RIP, hv_register_value, mshv_user_mem_region,
3232} ;
3333#[ cfg( gdb) ]
@@ -36,11 +36,6 @@ use mshv_bindings::{
3636 hv_intercept_type_HV_INTERCEPT_TYPE_EXCEPTION, hv_message_type_HVMSG_X64_EXCEPTION_INTERCEPT,
3737 mshv_install_intercept,
3838} ;
39- #[ cfg( mshv3) ]
40- use mshv_bindings:: {
41- hv_partition_property_code_HV_PARTITION_PROPERTY_SYNTHETIC_PROC_FEATURES,
42- hv_partition_synthetic_processor_features,
43- } ;
4439use mshv_ioctls:: { Mshv , VcpuFd , VmFd } ;
4540use tracing:: { Span , instrument} ;
4641#[ cfg( feature = "trace_guest" ) ]
@@ -319,7 +314,7 @@ impl HypervLinuxDriver {
319314 ) -> Result < Self > {
320315 let mshv = Mshv :: new ( ) ?;
321316 let pr = Default :: default ( ) ;
322- # [ cfg ( mshv3 ) ]
317+
323318 let vm_fd = {
324319 // It's important to avoid create_vm() and explicitly use
325320 // create_vm_with_args() with an empty arguments structure
@@ -688,7 +683,6 @@ impl Hypervisor for HypervLinuxDriver {
688683 // to interrupt it until `running` is set to false. The `vcpu_fd::run()` call will
689684 // return either normally with an exit reason, or from being "kicked" by out signal handler, with an EINTR error,
690685 // both of which are fine.
691- #[ cfg( mshv3) ]
692686 self . vcpu_fd . run ( )
693687 } ;
694688 // Note: if a `InterruptHandle::kill()` called while this thread is **here**
0 commit comments