[PATCH 2/5] lib: sbi_trap: Save mstatus[h].GVA in trap->gva

Andrew Jones ajones at ventanamicro.com
Thu Aug 4 00:51:17 PDT 2022


On Thu, Aug 04, 2022 at 11:17:03AM +0800, Vivian Wang wrote:
> The machine mode GVA field is available if the hypervisor extension is
> implemented, and indicates if mtval is a guest virtual address. Add a
> gva field to sbi_trap_info for this, and in __sbi_expected_trap_hext,
> save mstatus[h].GVA to it, so that gva indicates if tval is a guest
> virtual address. If the hypervisor extension is not implemented, always
> set gva to 0.
> 
> Signed-off-by: Vivian Wang <dramforever at live.com>
> ---
>  include/sbi/sbi_trap.h      |  6 +++++-
>  lib/sbi/sbi_expected_trap.S | 17 +++++++++++++++--
>  2 files changed, 20 insertions(+), 3 deletions(-)
>

Reviewed-by: Andrew Jones <ajones at ventanamicro.com>



More information about the opensbi mailing list