Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Anthony Liguori
Zachary Amsden wrote: For software-reliant paravirtualization, it is difficult to atomically switch from natural instructions to simulated para-instructions on the fly; you would need stop_machine_run that also holds off NMIs (so as to keep IF flag state intact across a window where

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: I don't agree that having paravirt_ops within a normal module is all that useful. By the time modules can be loaded, the kernel has completely booted. There should only be a handful of paravirt_ops implementations and they aren't large so I don't think there's a big

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: For a VMM which supports both full emulation and para-virtualization, testing CPUID leaves is not sufficient to determine applicability of a paravirt device driver. This only indicates the presence of the functionality, not the fact that the functionality has been

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Anthony Liguori
Zachary Amsden wrote: Jeremy Fitzhardinge wrote: Anthony Liguori wrote: I don't agree that having paravirt_ops within a normal module is all that useful. By the time modules can be loaded, the kernel has completely booted. There should only be a handful of paravirt_ops implementations

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Zachary Amsden
Anthony Liguori wrote: Zachary Amsden wrote: Jeremy Fitzhardinge wrote: Anthony Liguori wrote: I don't agree that having paravirt_ops within a normal module is all that useful. By the time modules can be loaded, the kernel has completely booted. There should only be a handful of

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: Basically, it just makes it easier on distributors and allows any old kernel with paravirt-ops module support to run on any modern, new hypervisor - that might not have even existed at the time the distro was created. Hey, isn't that what VMI's for? ;) I'd been

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Zachary Amsden wrote: Basically, it just makes it easier on distributors and allows any old kernel with paravirt-ops module support to run on any modern, new hypervisor - that might not have even existed at the time the distro was created. Hey, isn't that what

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: I've been thinking about this wrt the hypercall page in KVM. The problem is that in a model like KVM (or presumably VMI), migration gets really difficult if you have anything but a trivial hypercall page since the hypercall page will change after migration. If you

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Zachary Amsden
Anthony Liguori wrote: Zachary Amsden wrote: Anthony Liguori wrote: But what's the value in having it not in the kernel? Let's take Xen and lhype out of the picture because it clearly has to be there for them. You have a little less in the kernel now but then your kernel boots more

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Zachary Amsden
Anthony Liguori wrote: I've been thinking about this wrt the hypercall page in KVM. The problem is that in a model like KVM (or presumably VMI), migration gets really difficult if you have anything but a trivial hypercall page since the hypercall page will change after migration. If you

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Zachary Amsden
Jeremy Fitzhardinge wrote: Hm, you need to quiesce the kernel in some way when you do a migrate, so making sure it isn't in a hypercall would be just part of that. In general you'd make sure all but one CPU is parked somewhere, and the remaining CPU is doing the suspend, right? The

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: Unless you also migrate the hypercall page itself and impose migration restrictions on compatible hypercall pages. Seems unreasonable, especially if you support migration between VT and SVM machines. The whole point of a hypercall page is to give you a point of

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: You only need to quiesce if you have guest-visible data-structures that have details about the underlying hardware. So Xen needs to quiesce, but I don't know of any other VMM that would. VMI, KVM and lhype should be capable of transparent migration without guest

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: Yes, but if we want to stay with that forward compatibility story, we need a way to allow paravirt device probing to be completely orthogonal to paravirt-ops probing. Either the VMware hypervisor needs to NOT implement a CPUID leaf, keeping the same ROM based

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Zachary Amsden
Jeremy Fitzhardinge wrote: Zachary Amsden wrote: Unless you also migrate the hypercall page itself and impose migration restrictions on compatible hypercall pages. Seems unreasonable, especially if you support migration between VT and SVM machines. The whole point of a hypercall page is

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread ron minnich
On 6/20/07, Jeremy Fitzhardinge [EMAIL PROTECTED] wrote: I'm not wildly happy about the idea of using PCI for probing for otherwise completely non-PCI devices, Good :-) Xen deals with it with Xenbus, but I figure I'm unlikely to convince everyone to adopt that. Especially those of us who

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread H. Peter Anvin
Jeremy Fitzhardinge wrote: The completely identical device model is of course ideal, but the implementation and consolidation of that is a long term prospect to move towards, not something that will happen immediately. We at least emulate physical hardware devices already, and will continue

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Zachary Amsden wrote: If I had a gentoo install, Yes, but then you'd be a gentoo user. ;) I would probably go so far as to want to recompile everything after migration across CPU vendors; things like NMIs, MSRs, thermal controls and sleep states are also vendor dependent and either need to

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Anthony Liguori wrote: I've been thinking about this wrt the hypercall page in KVM. The problem is that in a model like KVM (or presumably VMI), migration gets really difficult if you have anything but a trivial hypercall page since the hypercall page will

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: The real trick is doing it without the guest being involved at all. Right now, it won't be a problem in KVM since the hypercall page only differs by a single instruction across platforms. In the future, we'll have to be smarter and wait for all VCPUs to leave the

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-20 Thread Anthony Liguori
Zachary Amsden wrote: Anthony Liguori wrote: I've been thinking about this wrt the hypercall page in KVM. The problem is that in a model like KVM (or presumably VMI), migration gets really difficult if you have anything but a trivial hypercall page since the hypercall page will change

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-19 Thread Zachary Amsden
Anthony Liguori wrote: I don't see a compelling reason to paravirtualize earlier although I also don't see a compelling reason not too. I noticed that VMI hooks setup.c. It wasn't immediately obvious why it was hooking there but perhaps it worthwhile to have a common hook? I suspect VMI

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-19 Thread Zachary Amsden
Jeremy Fitzhardinge wrote: Well, I was suggesting we could print the banner later rather than forcing an earlier init. The important part is that you set your pv_ops before patching occurs, since that will bake the function calls into the rest of the kernel, and it will ignore any further

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-18 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Anthony Liguori wrote: Hi Jeremy, Jeremy Fitzhardinge wrote: Anthony Liguori wrote: 1) Not really sure what is needed for CONFIG_PREEMPT support. I'm not sure which paravirt_ops calls are actually re-entrant. I'm not sure

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-18 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: Perhaps we can just print the banner before batching occurs? Then it's being printed at the last possible moment. s/batching/patching/? Yes, that would work. J - This SF.net email is sponsored

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-18 Thread Anthony Liguori
Jeremy Fitzhardinge wrote: Anthony Liguori wrote: Perhaps we can just print the banner before batching occurs? Then it's being printed at the last possible moment. s/batching/patching/? Yes, that would work. Yeah, sorry :-) I'll add another patch to the series. Regards,

[kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-17 Thread Anthony Liguori
Hi, This patch series is an update of my previous paravirt_ops patches. They are loosely based on Ingo's original paravirt_ops implementation for KVM. Some of the changes since the last series include: 1) Switch to using CPUID 0x4000 instead of using MSR writes to discover shared memory

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-17 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: 1) Not really sure what is needed for CONFIG_PREEMPT support. I'm not sure which paravirt_ops calls are actually re-entrant. I'm not sure that has specifically come up. The main issue is whether a particular call can be preempted and whether that matters. I guess the

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-17 Thread Anthony Liguori
Hi Jeremy, Jeremy Fitzhardinge wrote: Anthony Liguori wrote: 1) Not really sure what is needed for CONFIG_PREEMPT support. I'm not sure which paravirt_ops calls are actually re-entrant. I'm not sure that has specifically come up. The main issue is whether a particular call can

Re: [kvm-devel] [PATCH 0/5] KVM paravirt_ops implementation

2007-06-17 Thread Jeremy Fitzhardinge
Anthony Liguori wrote: Hi Jeremy, Jeremy Fitzhardinge wrote: Anthony Liguori wrote: 1) Not really sure what is needed for CONFIG_PREEMPT support. I'm not sure which paravirt_ops calls are actually re-entrant. I'm not sure that has specifically come up. The main issue is whether