File tree Expand file tree Collapse file tree 4 files changed +9
-8
lines changed
Expand file tree Collapse file tree 4 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -1181,7 +1181,7 @@ int svm_allocate_nested(struct vcpu_svm *svm)
11811181 if (svm -> nested .initialized )
11821182 return 0 ;
11831183
1184- vmcb02_page = snp_safe_alloc_page (& svm -> vcpu );
1184+ vmcb02_page = snp_safe_alloc_page ();
11851185 if (!vmcb02_page )
11861186 return - ENOMEM ;
11871187 svm -> nested .vmcb02 .ptr = page_address (vmcb02_page );
Original file line number Diff line number Diff line change @@ -3380,7 +3380,7 @@ void sev_vcpu_deliver_sipi_vector(struct kvm_vcpu *vcpu, u8 vector)
33803380 }
33813381}
33823382
3383- struct page * snp_safe_alloc_page (struct kvm_vcpu * vcpu )
3383+ struct page * snp_safe_alloc_page (void )
33843384{
33853385 unsigned long pfn ;
33863386 struct page * p ;
Original file line number Diff line number Diff line change @@ -703,7 +703,7 @@ static int svm_cpu_init(int cpu)
703703 int ret = - ENOMEM ;
704704
705705 memset (sd , 0 , sizeof (struct svm_cpu_data ));
706- sd -> save_area = snp_safe_alloc_page (NULL );
706+ sd -> save_area = snp_safe_alloc_page ();
707707 if (!sd -> save_area )
708708 return ret ;
709709
@@ -1421,7 +1421,7 @@ static int svm_vcpu_create(struct kvm_vcpu *vcpu)
14211421 svm = to_svm (vcpu );
14221422
14231423 err = - ENOMEM ;
1424- vmcb01_page = snp_safe_alloc_page (vcpu );
1424+ vmcb01_page = snp_safe_alloc_page ();
14251425 if (!vmcb01_page )
14261426 goto out ;
14271427
@@ -1430,7 +1430,7 @@ static int svm_vcpu_create(struct kvm_vcpu *vcpu)
14301430 * SEV-ES guests require a separate VMSA page used to contain
14311431 * the encrypted register state of the guest.
14321432 */
1433- vmsa_page = snp_safe_alloc_page (vcpu );
1433+ vmsa_page = snp_safe_alloc_page ();
14341434 if (!vmsa_page )
14351435 goto error_free_vmcb_page ;
14361436 }
@@ -4920,7 +4920,7 @@ static int svm_vm_init(struct kvm *kvm)
49204920
49214921static void * svm_alloc_apic_backing_page (struct kvm_vcpu * vcpu )
49224922{
4923- struct page * page = snp_safe_alloc_page (vcpu );
4923+ struct page * page = snp_safe_alloc_page ();
49244924
49254925 if (!page )
49264926 return NULL ;
Original file line number Diff line number Diff line change @@ -694,7 +694,7 @@ void sev_guest_memory_reclaimed(struct kvm *kvm);
694694int sev_handle_vmgexit (struct kvm_vcpu * vcpu );
695695
696696/* These symbols are used in common code and are stubbed below. */
697- struct page * snp_safe_alloc_page (struct kvm_vcpu * vcpu );
697+ struct page * snp_safe_alloc_page (void );
698698void sev_free_vcpu (struct kvm_vcpu * vcpu );
699699void sev_vm_destroy (struct kvm * kvm );
700700void __init sev_set_cpu_caps (void );
@@ -704,7 +704,8 @@ int sev_cpu_init(struct svm_cpu_data *sd);
704704int sev_dev_get_attr (u32 group , u64 attr , u64 * val );
705705extern unsigned int max_sev_asid ;
706706#else
707- static inline struct page * snp_safe_alloc_page (struct kvm_vcpu * vcpu ) {
707+ static inline struct page * snp_safe_alloc_page (void )
708+ {
708709 return alloc_page (GFP_KERNEL_ACCOUNT | __GFP_ZERO );
709710}
710711
You can’t perform that action at this time.
0 commit comments