@@ -13,9 +13,6 @@ use std::sync::Mutex;
13
13
use std:: sync:: { Arc , Barrier } ;
14
14
use std:: { fmt, io, thread} ;
15
15
16
- #[ cfg( target_arch = "x86_64" ) ]
17
- use acpi_tables:: madt:: LocalAPIC ;
18
- use acpi_tables:: { aml, Aml } ;
19
16
use kvm_bindings:: { KVM_SYSTEM_EVENT_RESET , KVM_SYSTEM_EVENT_SHUTDOWN } ;
20
17
use kvm_ioctls:: VcpuExit ;
21
18
use libc:: { c_int, c_void, siginfo_t} ;
@@ -25,8 +22,6 @@ use utils::errno;
25
22
use utils:: eventfd:: EventFd ;
26
23
use utils:: signal:: { register_signal_handler, sigrtmin, Killable } ;
27
24
use utils:: sm:: StateMachine ;
28
- #[ cfg( target_arch = "x86_64" ) ]
29
- use zerocopy:: AsBytes ;
30
25
31
26
use crate :: cpu_config:: templates:: { CpuConfiguration , GuestConfigError } ;
32
27
use crate :: logger:: { IncMetric , METRICS } ;
@@ -554,38 +549,6 @@ impl Vcpu {
554
549
}
555
550
}
556
551
}
557
-
558
- #[ cfg( target_arch = "x86_64" ) ]
559
- fn generate_acpi_mat ( & self ) -> Vec < u8 > {
560
- LocalAPIC :: new ( self . kvm_vcpu . index ) . as_bytes ( ) . into ( )
561
- }
562
-
563
- #[ cfg( target_arch = "aarch64" ) ]
564
- fn generate_acpi_mat ( & self ) -> Vec < u8 > {
565
- unimplemented ! ( )
566
- }
567
- }
568
-
569
- impl Aml for Vcpu {
570
- fn append_aml_bytes ( & self , bytes : & mut Vec < u8 > ) {
571
- let mat_data: Vec < u8 > = self . generate_acpi_mat ( ) ;
572
- aml:: Device :: new (
573
- format ! ( "C{:03}" , self . kvm_vcpu. index) . as_str ( ) . into ( ) ,
574
- vec ! [
575
- & aml:: Name :: new( "_HID" . into( ) , & "ACPI0007" ) ,
576
- & aml:: Name :: new( "_UID" . into( ) , & self . kvm_vcpu. index) ,
577
- & aml:: Method :: new(
578
- "_STA" . into( ) ,
579
- 0 ,
580
- false ,
581
- // Mark CPU present
582
- vec![ & aml:: Return :: new( & 0xfu8 ) ] ,
583
- ) ,
584
- & aml:: Name :: new( "_MAT" . into( ) , & aml:: Buffer :: new( mat_data) ) ,
585
- ] ,
586
- )
587
- . append_aml_bytes ( bytes) ;
588
- }
589
552
}
590
553
591
554
impl Drop for Vcpu {
0 commit comments