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)
1181
1181
if (svm -> nested .initialized )
1182
1182
return 0 ;
1183
1183
1184
- vmcb02_page = snp_safe_alloc_page (& svm -> vcpu );
1184
+ vmcb02_page = snp_safe_alloc_page ();
1185
1185
if (!vmcb02_page )
1186
1186
return - ENOMEM ;
1187
1187
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)
3380
3380
}
3381
3381
}
3382
3382
3383
- struct page * snp_safe_alloc_page (struct kvm_vcpu * vcpu )
3383
+ struct page * snp_safe_alloc_page (void )
3384
3384
{
3385
3385
unsigned long pfn ;
3386
3386
struct page * p ;
Original file line number Diff line number Diff line change @@ -703,7 +703,7 @@ static int svm_cpu_init(int cpu)
703
703
int ret = - ENOMEM ;
704
704
705
705
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 ();
707
707
if (!sd -> save_area )
708
708
return ret ;
709
709
@@ -1421,7 +1421,7 @@ static int svm_vcpu_create(struct kvm_vcpu *vcpu)
1421
1421
svm = to_svm (vcpu );
1422
1422
1423
1423
err = - ENOMEM ;
1424
- vmcb01_page = snp_safe_alloc_page (vcpu );
1424
+ vmcb01_page = snp_safe_alloc_page ();
1425
1425
if (!vmcb01_page )
1426
1426
goto out ;
1427
1427
@@ -1430,7 +1430,7 @@ static int svm_vcpu_create(struct kvm_vcpu *vcpu)
1430
1430
* SEV-ES guests require a separate VMSA page used to contain
1431
1431
* the encrypted register state of the guest.
1432
1432
*/
1433
- vmsa_page = snp_safe_alloc_page (vcpu );
1433
+ vmsa_page = snp_safe_alloc_page ();
1434
1434
if (!vmsa_page )
1435
1435
goto error_free_vmcb_page ;
1436
1436
}
@@ -4920,7 +4920,7 @@ static int svm_vm_init(struct kvm *kvm)
4920
4920
4921
4921
static void * svm_alloc_apic_backing_page (struct kvm_vcpu * vcpu )
4922
4922
{
4923
- struct page * page = snp_safe_alloc_page (vcpu );
4923
+ struct page * page = snp_safe_alloc_page ();
4924
4924
4925
4925
if (!page )
4926
4926
return NULL ;
Original file line number Diff line number Diff line change @@ -694,7 +694,7 @@ void sev_guest_memory_reclaimed(struct kvm *kvm);
694
694
int sev_handle_vmgexit (struct kvm_vcpu * vcpu );
695
695
696
696
/* 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 );
698
698
void sev_free_vcpu (struct kvm_vcpu * vcpu );
699
699
void sev_vm_destroy (struct kvm * kvm );
700
700
void __init sev_set_cpu_caps (void );
@@ -704,7 +704,8 @@ int sev_cpu_init(struct svm_cpu_data *sd);
704
704
int sev_dev_get_attr (u32 group , u64 attr , u64 * val );
705
705
extern unsigned int max_sev_asid ;
706
706
#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
+ {
708
709
return alloc_page (GFP_KERNEL_ACCOUNT | __GFP_ZERO );
709
710
}
710
711
You can’t perform that action at this time.
0 commit comments