Re: [PATCH 6/9] move kvm_cpu_register_memory_area into qemu's

Anthony Liguori
2008-08-13T14:12:32Z

Glauber Costa wrote:
> Turn the explicit calls to kvm_cpu_register_memoy_area()
> an empty function. Provide a __kvm_cpu_register_memory_area()
> that is called from within cpu_register_memory_area().
> To avoid registering mmio regions to the hypervisor, since we depend on
> them faulting, we keep track of what regions are mmio regions too.
>
> This is to be bisection friendly. Direct calls are to be removed
> in a later commit.
>
> diff --git a/qemu/exec.c b/qemu/exec.c
> index 7a68062..14c3852 100644
> --- a/qemu/exec.c
> +++ b/qemu/exec.c
> @@ -2196,6 +2196,9 @@ void cpu_register_physical_memory(target_phys_addr_t start_addr,
> kqemu_set_phys_mem(start_addr, size, phys_offset);
> }
> #endif
> +
> + __kvm_cpu_register_physical_memory(start_addr, size, phys_offset);
>
>

This is a great place to add a callback of some sort (like QEMUAccel).
Then it can be shared by both kqemu and kvm.

Regards,

Anthony Liguori