Re: kvmclock - the host part.

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Glauber de Oliveira Costa <gcosta@...>
Cc: <linux-kernel@...>, <jeremy@...>, <aliguori@...>, <kvm-devel@...>, <hollisb@...>
Date: Wednesday, November 7, 2007 - 1:50 am

Glauber de Oliveira Costa wrote:

Why here and not in __vcpu_run()?  It isn't timer irq related.


It's just a clock source now, right?  so _CLOCK_SOURCE.


No one can actually see this as you're updating a private structure. 
You need to copy it to guestspace.


Just use kvm_write_guest().


What if !dst_vcpu?  What about locking?

Suggest simply using vcpu.  Every guest cpu can register its own
clocksource.


Shift right?  Why?


IIRC gfn_to_page() never returns NULL, need a different check.


kmap() is bad since the page can move due to swapping. 
kvm_write_guest() is your friend.



While it's a static inline, please prefix with kvm_ in case one day it
isn't.

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

-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
KVM paravirt clocksource - Take 3 out of &lt;put your number..., Glauber de Oliveira Costa..., (Tue Nov 6, 6:18 pm)
include files for kvmclock, Glauber de Oliveira Costa..., (Tue Nov 6, 6:18 pm)
Re: [kvm-devel] include files for kvmclock, Akio Takebe, (Wed Nov 7, 4:16 am)
Re: [kvm-devel] include files for kvmclock, Glauber de Oliveira Costa..., (Wed Nov 7, 9:16 am)
Re: [kvm-devel] include files for kvmclock, Akio Takebe, (Wed Nov 7, 9:27 am)
Re: include files for kvmclock, Jeremy Fitzhardinge, (Tue Nov 6, 6:50 pm)
Re: include files for kvmclock, Glauber de Oliveira Costa..., (Tue Nov 6, 6:58 pm)
Re: [kvm-devel] include files for kvmclock, Glauber de Oliveira Costa..., (Tue Nov 6, 5:35 pm)
Re: [kvm-devel] include files for kvmclock, Avi Kivity, (Wed Nov 7, 1:55 am)
Re: [kvm-devel] include files for kvmclock, Jeremy Fitzhardinge, (Wed Nov 7, 1:58 am)
Re: [kvm-devel] include files for kvmclock, Glauber de Oliveira Costa..., (Wed Nov 7, 8:49 am)
kvmclock - the host part., Glauber de Oliveira Costa..., (Tue Nov 6, 6:18 pm)
Re: kvmclock - the host part., Avi Kivity, (Wed Nov 7, 1:50 am)
Re: kvmclock - the host part., Glauber de Oliveira Costa..., (Wed Nov 7, 9:08 am)
Re: kvmclock - the host part., Avi Kivity, (Wed Nov 7, 9:59 am)
kvmclock implementation, the guest part., Glauber de Oliveira Costa..., (Tue Nov 6, 6:18 pm)