@@ -399,22 +399,22 @@ static bool trap_bvr(struct kvm_vcpu *vcpu,
399
399
struct sys_reg_params * p ,
400
400
const struct sys_reg_desc * rd )
401
401
{
402
- u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> reg ];
402
+ u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> CRm ];
403
403
404
404
if (p -> is_write )
405
405
reg_to_dbg (vcpu , p , rd , dbg_reg );
406
406
else
407
407
dbg_to_reg (vcpu , p , rd , dbg_reg );
408
408
409
- trace_trap_reg (__func__ , rd -> reg , p -> is_write , * dbg_reg );
409
+ trace_trap_reg (__func__ , rd -> CRm , p -> is_write , * dbg_reg );
410
410
411
411
return true;
412
412
}
413
413
414
414
static int set_bvr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
415
415
const struct kvm_one_reg * reg , void __user * uaddr )
416
416
{
417
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> reg ];
417
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> CRm ];
418
418
419
419
if (copy_from_user (r , uaddr , KVM_REG_SIZE (reg -> id )) != 0 )
420
420
return - EFAULT ;
@@ -424,7 +424,7 @@ static int set_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
424
424
static int get_bvr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
425
425
const struct kvm_one_reg * reg , void __user * uaddr )
426
426
{
427
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> reg ];
427
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> CRm ];
428
428
429
429
if (copy_to_user (uaddr , r , KVM_REG_SIZE (reg -> id )) != 0 )
430
430
return - EFAULT ;
@@ -434,29 +434,29 @@ static int get_bvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
434
434
static void reset_bvr (struct kvm_vcpu * vcpu ,
435
435
const struct sys_reg_desc * rd )
436
436
{
437
- vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> reg ] = rd -> val ;
437
+ vcpu -> arch .vcpu_debug_state .dbg_bvr [rd -> CRm ] = rd -> val ;
438
438
}
439
439
440
440
static bool trap_bcr (struct kvm_vcpu * vcpu ,
441
441
struct sys_reg_params * p ,
442
442
const struct sys_reg_desc * rd )
443
443
{
444
- u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> reg ];
444
+ u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> CRm ];
445
445
446
446
if (p -> is_write )
447
447
reg_to_dbg (vcpu , p , rd , dbg_reg );
448
448
else
449
449
dbg_to_reg (vcpu , p , rd , dbg_reg );
450
450
451
- trace_trap_reg (__func__ , rd -> reg , p -> is_write , * dbg_reg );
451
+ trace_trap_reg (__func__ , rd -> CRm , p -> is_write , * dbg_reg );
452
452
453
453
return true;
454
454
}
455
455
456
456
static int set_bcr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
457
457
const struct kvm_one_reg * reg , void __user * uaddr )
458
458
{
459
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> reg ];
459
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> CRm ];
460
460
461
461
if (copy_from_user (r , uaddr , KVM_REG_SIZE (reg -> id )) != 0 )
462
462
return - EFAULT ;
@@ -467,7 +467,7 @@ static int set_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
467
467
static int get_bcr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
468
468
const struct kvm_one_reg * reg , void __user * uaddr )
469
469
{
470
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> reg ];
470
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> CRm ];
471
471
472
472
if (copy_to_user (uaddr , r , KVM_REG_SIZE (reg -> id )) != 0 )
473
473
return - EFAULT ;
@@ -477,30 +477,30 @@ static int get_bcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
477
477
static void reset_bcr (struct kvm_vcpu * vcpu ,
478
478
const struct sys_reg_desc * rd )
479
479
{
480
- vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> reg ] = rd -> val ;
480
+ vcpu -> arch .vcpu_debug_state .dbg_bcr [rd -> CRm ] = rd -> val ;
481
481
}
482
482
483
483
static bool trap_wvr (struct kvm_vcpu * vcpu ,
484
484
struct sys_reg_params * p ,
485
485
const struct sys_reg_desc * rd )
486
486
{
487
- u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> reg ];
487
+ u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> CRm ];
488
488
489
489
if (p -> is_write )
490
490
reg_to_dbg (vcpu , p , rd , dbg_reg );
491
491
else
492
492
dbg_to_reg (vcpu , p , rd , dbg_reg );
493
493
494
- trace_trap_reg (__func__ , rd -> reg , p -> is_write ,
495
- vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> reg ]);
494
+ trace_trap_reg (__func__ , rd -> CRm , p -> is_write ,
495
+ vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> CRm ]);
496
496
497
497
return true;
498
498
}
499
499
500
500
static int set_wvr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
501
501
const struct kvm_one_reg * reg , void __user * uaddr )
502
502
{
503
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> reg ];
503
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> CRm ];
504
504
505
505
if (copy_from_user (r , uaddr , KVM_REG_SIZE (reg -> id )) != 0 )
506
506
return - EFAULT ;
@@ -510,7 +510,7 @@ static int set_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
510
510
static int get_wvr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
511
511
const struct kvm_one_reg * reg , void __user * uaddr )
512
512
{
513
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> reg ];
513
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> CRm ];
514
514
515
515
if (copy_to_user (uaddr , r , KVM_REG_SIZE (reg -> id )) != 0 )
516
516
return - EFAULT ;
@@ -520,29 +520,29 @@ static int get_wvr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
520
520
static void reset_wvr (struct kvm_vcpu * vcpu ,
521
521
const struct sys_reg_desc * rd )
522
522
{
523
- vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> reg ] = rd -> val ;
523
+ vcpu -> arch .vcpu_debug_state .dbg_wvr [rd -> CRm ] = rd -> val ;
524
524
}
525
525
526
526
static bool trap_wcr (struct kvm_vcpu * vcpu ,
527
527
struct sys_reg_params * p ,
528
528
const struct sys_reg_desc * rd )
529
529
{
530
- u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> reg ];
530
+ u64 * dbg_reg = & vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> CRm ];
531
531
532
532
if (p -> is_write )
533
533
reg_to_dbg (vcpu , p , rd , dbg_reg );
534
534
else
535
535
dbg_to_reg (vcpu , p , rd , dbg_reg );
536
536
537
- trace_trap_reg (__func__ , rd -> reg , p -> is_write , * dbg_reg );
537
+ trace_trap_reg (__func__ , rd -> CRm , p -> is_write , * dbg_reg );
538
538
539
539
return true;
540
540
}
541
541
542
542
static int set_wcr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
543
543
const struct kvm_one_reg * reg , void __user * uaddr )
544
544
{
545
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> reg ];
545
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> CRm ];
546
546
547
547
if (copy_from_user (r , uaddr , KVM_REG_SIZE (reg -> id )) != 0 )
548
548
return - EFAULT ;
@@ -552,7 +552,7 @@ static int set_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
552
552
static int get_wcr (struct kvm_vcpu * vcpu , const struct sys_reg_desc * rd ,
553
553
const struct kvm_one_reg * reg , void __user * uaddr )
554
554
{
555
- __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> reg ];
555
+ __u64 * r = & vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> CRm ];
556
556
557
557
if (copy_to_user (uaddr , r , KVM_REG_SIZE (reg -> id )) != 0 )
558
558
return - EFAULT ;
@@ -562,7 +562,7 @@ static int get_wcr(struct kvm_vcpu *vcpu, const struct sys_reg_desc *rd,
562
562
static void reset_wcr (struct kvm_vcpu * vcpu ,
563
563
const struct sys_reg_desc * rd )
564
564
{
565
- vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> reg ] = rd -> val ;
565
+ vcpu -> arch .vcpu_debug_state .dbg_wcr [rd -> CRm ] = rd -> val ;
566
566
}
567
567
568
568
static void reset_amair_el1 (struct kvm_vcpu * vcpu , const struct sys_reg_desc * r )
0 commit comments