Re: [PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-29 Thread Jason Wang
- "Glauber Costa" wrote: > On Fri, Aug 27, 2010 at 01:49:45PM +0800, Jason Wang wrote: > > +#define unlikely(x)__builtin_expect(!!(x), 0) > > + > > +struct pvclock_vcpu_time_info hv_clock[MAX_CPU]; > this structure have to be 4-byte aligned. Let the compiler > help you guaranteeing i

Re: [PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-27 Thread Glauber Costa
On Fri, Aug 27, 2010 at 01:49:45PM +0800, Jason Wang wrote: > +#define unlikely(x) __builtin_expect(!!(x), 0) > + > +struct pvclock_vcpu_time_info hv_clock[MAX_CPU]; this structure have to be 4-byte aligned. Let the compiler help you guaranteeing it here. > +#define MAX_CPU 4 > + Any particular r

[PATCH kvm-unit-test 5/6] Add a simple kvmclock driver

2010-08-26 Thread Jason Wang
Most of the codes were borrowed from arxh/x86/kernel/kvmclock.c. A special bit: PV_CLOCK_CYCLE_RAW_TEST_BIT is used to notify the driver to return unadjusted cycles. Signed-off-by: Jason Wang --- x86/kvmclock.c | 166 x86/kvmclock.h | 5