@@ -317,7 +317,7 @@ int vmx_wrmsr_pat(struct vcpu *vcpu, uint64_t value)
317
317
(PAT_FIELD_RSV_BITS & field ) != 0U )) {
318
318
pr_err ("invalid guest IA32_PAT: 0x%016llx" , value );
319
319
vcpu_inject_gp (vcpu , 0U );
320
- return - EINVAL ;
320
+ return 0 ;
321
321
}
322
322
}
323
323
@@ -365,7 +365,7 @@ int vmx_write_cr0(struct vcpu *vcpu, uint64_t cr0)
365
365
if ((cr0 & (cr0_always_off_mask | CR0_RESERVED_MASK )) != 0U ) {
366
366
pr_err ("Not allow to set always off / reserved bits for CR0" );
367
367
vcpu_inject_gp (vcpu , 0U );
368
- return - EINVAL ;
368
+ return 0 ;
369
369
}
370
370
371
371
/* TODO: Check all invalid guest statuses according to the change of
@@ -376,7 +376,7 @@ int vmx_write_cr0(struct vcpu *vcpu, uint64_t cr0)
376
376
if ((context -> cr4 & CR4_PAE ) == 0U ) {
377
377
pr_err ("Can't enable long mode when PAE disabled" );
378
378
vcpu_inject_gp (vcpu , 0U );
379
- return - EINVAL ;
379
+ return 0 ;
380
380
}
381
381
/* Enable long mode */
382
382
pr_dbg ("VMM: Enable long mode" );
@@ -403,7 +403,7 @@ int vmx_write_cr0(struct vcpu *vcpu, uint64_t cr0)
403
403
if ((cr0 & CR0_CD ) == 0U && ((cr0 & CR0_NW ) != 0U )) {
404
404
pr_err ("not allow to set CR0.NW while clearing CR0.CD" );
405
405
vcpu_inject_gp (vcpu , 0U );
406
- return - EINVAL ;
406
+ return 0 ;
407
407
}
408
408
409
409
/* No action if only CR0.NW is changed */
@@ -500,14 +500,14 @@ int vmx_write_cr4(struct vcpu *vcpu, uint64_t cr4)
500
500
if ((cr4 & cr4_always_off_mask ) != 0U ) {
501
501
pr_err ("Not allow to set reserved/always off bits for CR4" );
502
502
vcpu_inject_gp (vcpu , 0U );
503
- return - EINVAL ;
503
+ return 0 ;
504
504
}
505
505
506
506
/* Do NOT support nested guest */
507
507
if ((cr4 & CR4_VMXE ) != 0U ) {
508
508
pr_err ("Nested guest not supported" );
509
509
vcpu_inject_gp (vcpu , 0U );
510
- return - EINVAL ;
510
+ return 0 ;
511
511
}
512
512
513
513
/* Aways off bits and reserved bits has been filtered above */
0 commit comments