On 13/09/2016 16:49, Brijesh Singh wrote: > > + /* Register SEV read/write ops for the guest RAM */ > + if (kvm_sev_enabled()) > + memory_region_set_ram_ops(ram, kvm_sev_get_ram_ops());
If you don't actually need this one except for -kernel it would be very nice, because then the hooks could be limited to cpu_memory_rw_debug. address_space_write and address_space_read are the central entry point for device DMA, and calling mr->ram_ops->write from there seems very wrong. I'd rather make those hooks *ROM* read/write ops rather than RAM read/write ops. Paolo