On 23/09/2016 10:51, Herongguang (Stephen) wrote:
On 2016/9/23 15:17, Paolo Bonzini wrote:
On 22/09/2016 15:16, Herongguang (Stephen) wrote:
I have some concern:
1. For example, vhost does not know about as_id, I wonder if guests in
SMM can operate disk or ether card, as in
that case vhost would not logging dirty pages correctly, without knowing
as_id.
In the end memory is logged by ram_addr_t, not by address space. So if
vhost_sync_dirty_bitmap is called on the right region everything works.
Guests in SMM can operate on storage devices, but storage devices cannot
write to 0xA0000-0xBFFFF so that's safe.
You are right, as vhost does not have a smram address space listener. So
is this a qemu's flaw that virtual devices can not write to SMRAM?
No, it's how it works in real hardware. However, it is a (minor) bug
that vhost doesn't have the equivalent of kvm_set_phys_mem's call to
kvm_physical_sync_dirty_bitmap.
Fine, your patch is simpler than I thought and functions right.
Great!
Reviewed-by: He Rongguang <address@hidden>
Also Tested-by?