[lkml]   [2019]   [Sep]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH v7 10/21] RISC-V: KVM: Handle MMIO exits for VCPU

On 04.09.19 18:15, Anup Patel wrote:
> We will get stage2 page faults whenever Guest/VM access SW emulated
> MMIO device or unmapped Guest RAM.
> This patch implements MMIO read/write emulation by extracting MMIO
> details from the trapped load/store instruction and forwarding the
> MMIO read/write to user-space. The actual MMIO emulation will happen
> in user-space and KVM kernel module will only take care of register
> updates before resuming the trapped VCPU.
> The handling for stage2 page faults for unmapped Guest RAM will be
> implemeted by a separate patch later.
> Signed-off-by: Anup Patel <>
> Acked-by: Paolo Bonzini <>
> Reviewed-by: Paolo Bonzini <>

This version is indeed much better. I would not mind a bit more
documentation when it comes to implicit register value assumptions (a0,
a1 in the trap handler), but the code is small enough that someone who
cares can figure it out quickly enough.

Reviewed-by: Alexander Graf <>


Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Ralf Herbrich
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879

 \ /
  Last update: 2019-09-23 08:51    [W:0.374 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site