Re: [PATCH] Don't call cpu_synchronize_state() in apic_init_reset()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 09/23/2009 06:45 PM, Jan Kiszka wrote:
Functions calling each other in the same subsystem can rely on callers
calling cpu_synchronize_state().  Across subsystems, that's another
matter, exported functions should try not to rely on implementation
details of their callers.

(You might argue that the apic is not separate subsystem wrt an x86 cpu,
and I'm not sure I have a counterargument)

I do accept this argument. It's just that my feeling is that we are
lacking proper review of the required call sites of cpu_sychronize_state
and rather put it where some regression popped up (and that only in
qemu-kvm...).

That's life...

The new rule is: Synchronize the states before accessing registers (or
in-kernel devices) the first time after a vmexit to user space.

No, the rule is: synchronize state before accessing registers. Extra synchronization is cheap, while missing synchronization is very expensive.

But,
e.g., I do not see where we do this on CPU reset.

That's a bug.

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

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux