Commit 45700a7
committed
RISC-V: KVM: Fix error code returned for Smstateen ONE_REG
Return -ENOENT for Smstateen ONE_REG when:
1) Smstateen is not enabled for a VCPU
2) ONE_REG id is out of range
This will make Smstateen ONE_REG error codes consistent
with other ONE_REG interfaces of KVM RISC-V.
Fixes: c04913f ("RISCV: KVM: Add sstateen0 to ONE_REG")
Signed-off-by: Anup Patel <anup.patel@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20260120080013.2153519-2-anup.patel@oss.qualcomm.com
Signed-off-by: Anup Patel <anup@brainfault.org>1 parent 2dda6a9 commit 45700a7
1 file changed
Lines changed: 8 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
565 | 565 | | |
566 | 566 | | |
567 | 567 | | |
| 568 | + | |
| 569 | + | |
568 | 570 | | |
569 | | - | |
| 571 | + | |
570 | 572 | | |
571 | 573 | | |
572 | 574 | | |
| |||
582 | 584 | | |
583 | 585 | | |
584 | 586 | | |
| 587 | + | |
| 588 | + | |
585 | 589 | | |
586 | | - | |
| 590 | + | |
587 | 591 | | |
588 | 592 | | |
589 | 593 | | |
| |||
615 | 619 | | |
616 | 620 | | |
617 | 621 | | |
618 | | - | |
619 | | - | |
620 | | - | |
621 | | - | |
| 622 | + | |
622 | 623 | | |
623 | 624 | | |
624 | 625 | | |
| |||
660 | 661 | | |
661 | 662 | | |
662 | 663 | | |
663 | | - | |
664 | | - | |
665 | | - | |
666 | | - | |
| 664 | + | |
667 | 665 | | |
668 | 666 | | |
669 | 667 | | |
| |||
0 commit comments