Re: [PATCH] Support for in-kernel mmio handlers

Avi Kivity
2007-04-05T07:46:59Z

Gregory Haskins wrote:
> The MMIO registration code has been broken out as a new patch from the in-kernel APIC work with the following changes per Avi's request:
>
> 1) Supports dynamic registration
> 2) Uses gpa_t addresses
> 3) Explicit per-cpu mappings
>
> In addition, I have added the concept of distinct VCPU and VM level registrations (where VCPU devices will eclipse competing VM registrations (if any). This will be key down the road where LAPICs should use VCPU registration, but IOAPICs should use VM level.
>

> @@ -345,6 +394,7 @@ struct kvm {
> unsigned long rmap_overflow;
> struct list_head vm_list;
> struct file *filp;
> + struct kvm_io_bus mmio_bus;
> };
>

Additionally:

The pit/pic are pio devices, not mmio, so they need their own bus.

--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.