Re: Xenner design and kvm msr handling

From: Gerd Hoffmann
Date: Tue Apr 21 2009 - 08:47:35 EST


On 04/21/09 14:27, Avi Kivity wrote:
Gerd Hoffmann wrote:
(1) cpuid 0x40000000, check vmm signature
(2) cpuid 0x40000002 -> returns # of pages (eax) and msr (ebx)
(3) allocate pages (normal ram)
(4) foreach page (wrmsr "guest physical address | pageno")

Xen uses msr 0x40000000. Due to the msr being queried via cpuid it
should be possible to use another one. Modulo guest bugs of course ...

Is there an interface to forget a page? (if not, how do you unload a
driver? presumably Xen remembers the page address so it can patch it)

Not sure, have to dig into the xen code to figure.

Could be xen doesn't remember the page in the first place. They might let the illegal instruction fault handler patch the opcode. At least I vaguely remember some discussions about that.

Could be there isn't a interface to forgot the page. "reboot" in xen land is "destroy guest, restart it".

If you load each driver, do you run this multiple times, or does the
first driver run this once and the others reuse the same pages?

There is one driver (xen-platform-pci) which does this once at load time, then provides xenish services (event channels, ...) to the actual frontend drivers. So for the actual frontend drivers there isn't a big difference between pure-pv and pv-on-hvm.

Sure, but later on, we may want to take advantage of kernel netback.

Agree. But right now I have more important stuff to worry about ;)

cheers,
Gerd

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/