On 10/29/08, Avi Kivity <[EMAIL PROTECTED]> wrote: > Hollis Blanchard wrote: > > > On Tue, Oct 28, 2008 at 6:36 PM, Anthony Liguori <[EMAIL PROTECTED]> > wrote: > > > > > > > Something I was thinking about this morning, and I think the first place > > > where we'll definitely need a hook, is how to deal with > > > kvm_load_registers(). I think there's overlap between KVM and the IO > thread > > > here. > > > > > > There are two reasons (I can think of) that most of the device model > code > > > can't run in conjunction with TCG. The first is that TCG may modify > > > CPUState in a non-atomic way. The device model may need to access > CPUState > > > although there are very few places that it does. > > > > > > > > > > Out of curiosity, where are those places? > > > > > > local apic -- needs to access interrupt disable flag > acpi sleep -- halts the current processor, so tied to cpustate
It should be possible to avoid these, just use a qemu_irq for per-CPU interrupt lines and halt signals. > vmport -- bad ABI requires access to registers Ugly. Maybe there could be two parts, one in pc.c which registers the ioport and checks EAX/ECX, maybe using a CPU specific helper, and second part, generic port in vmport.c, which does not know about CPU state. I don't know if this would solve the original atomicity problem, though. -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
