@@ -312,7 +312,7 @@ int kvm_get_badinstrp(u32 *opc, struct kvm_vcpu *vcpu, u32 *out)
312
312
*/
313
313
int kvm_mips_count_disabled (struct kvm_vcpu * vcpu )
314
314
{
315
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
315
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
316
316
317
317
return (vcpu -> arch .count_ctl & KVM_REG_MIPS_COUNT_CTL_DC ) ||
318
318
(kvm_read_c0_guest_cause (cop0 ) & CAUSEF_DC );
@@ -384,7 +384,7 @@ static inline ktime_t kvm_mips_count_time(struct kvm_vcpu *vcpu)
384
384
*/
385
385
static u32 kvm_mips_read_count_running (struct kvm_vcpu * vcpu , ktime_t now )
386
386
{
387
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
387
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
388
388
ktime_t expires , threshold ;
389
389
u32 count , compare ;
390
390
int running ;
@@ -444,7 +444,7 @@ static u32 kvm_mips_read_count_running(struct kvm_vcpu *vcpu, ktime_t now)
444
444
*/
445
445
u32 kvm_mips_read_count (struct kvm_vcpu * vcpu )
446
446
{
447
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
447
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
448
448
449
449
/* If count disabled just read static copy of count */
450
450
if (kvm_mips_count_disabled (vcpu ))
@@ -502,7 +502,7 @@ ktime_t kvm_mips_freeze_hrtimer(struct kvm_vcpu *vcpu, u32 *count)
502
502
static void kvm_mips_resume_hrtimer (struct kvm_vcpu * vcpu ,
503
503
ktime_t now , u32 count )
504
504
{
505
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
505
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
506
506
u32 compare ;
507
507
u64 delta ;
508
508
ktime_t expire ;
@@ -603,7 +603,7 @@ int kvm_mips_restore_hrtimer(struct kvm_vcpu *vcpu, ktime_t before,
603
603
*/
604
604
void kvm_mips_write_count (struct kvm_vcpu * vcpu , u32 count )
605
605
{
606
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
606
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
607
607
ktime_t now ;
608
608
609
609
/* Calculate bias */
@@ -649,7 +649,7 @@ void kvm_mips_init_count(struct kvm_vcpu *vcpu, unsigned long count_hz)
649
649
*/
650
650
int kvm_mips_set_count_hz (struct kvm_vcpu * vcpu , s64 count_hz )
651
651
{
652
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
652
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
653
653
int dc ;
654
654
ktime_t now ;
655
655
u32 count ;
@@ -696,7 +696,7 @@ int kvm_mips_set_count_hz(struct kvm_vcpu *vcpu, s64 count_hz)
696
696
*/
697
697
void kvm_mips_write_compare (struct kvm_vcpu * vcpu , u32 compare , bool ack )
698
698
{
699
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
699
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
700
700
int dc ;
701
701
u32 old_compare = kvm_read_c0_guest_compare (cop0 );
702
702
s32 delta = compare - old_compare ;
@@ -779,7 +779,7 @@ void kvm_mips_write_compare(struct kvm_vcpu *vcpu, u32 compare, bool ack)
779
779
*/
780
780
static ktime_t kvm_mips_count_disable (struct kvm_vcpu * vcpu )
781
781
{
782
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
782
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
783
783
u32 count ;
784
784
ktime_t now ;
785
785
@@ -806,7 +806,7 @@ static ktime_t kvm_mips_count_disable(struct kvm_vcpu *vcpu)
806
806
*/
807
807
void kvm_mips_count_disable_cause (struct kvm_vcpu * vcpu )
808
808
{
809
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
809
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
810
810
811
811
kvm_set_c0_guest_cause (cop0 , CAUSEF_DC );
812
812
if (!(vcpu -> arch .count_ctl & KVM_REG_MIPS_COUNT_CTL_DC ))
@@ -826,7 +826,7 @@ void kvm_mips_count_disable_cause(struct kvm_vcpu *vcpu)
826
826
*/
827
827
void kvm_mips_count_enable_cause (struct kvm_vcpu * vcpu )
828
828
{
829
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
829
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
830
830
u32 count ;
831
831
832
832
kvm_clear_c0_guest_cause (cop0 , CAUSEF_DC );
@@ -852,7 +852,7 @@ void kvm_mips_count_enable_cause(struct kvm_vcpu *vcpu)
852
852
*/
853
853
int kvm_mips_set_count_ctl (struct kvm_vcpu * vcpu , s64 count_ctl )
854
854
{
855
- struct mips_coproc * cop0 = vcpu -> arch .cop0 ;
855
+ struct mips_coproc * cop0 = & vcpu -> arch .cop0 ;
856
856
s64 changed = count_ctl ^ vcpu -> arch .count_ctl ;
857
857
s64 delta ;
858
858
ktime_t expire , now ;
0 commit comments