mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-03-16 05:37:04 -04:00
Merge branch 'linus' into sched/new-API-sched_setscheduler
This commit is contained in:
@@ -69,6 +69,8 @@ extern unsigned long __per_cpu_offset[NR_CPUS];
|
||||
#define __get_cpu_var(var) per_cpu_var(var)
|
||||
#define __raw_get_cpu_var(var) per_cpu_var(var)
|
||||
|
||||
#define PER_CPU_ATTRIBUTES
|
||||
|
||||
#endif /* SMP */
|
||||
|
||||
#define DECLARE_PER_CPU(type, name) extern __typeof__(type) per_cpu_var(name)
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <linux/kvm_para.h>
|
||||
#include <linux/kvm_types.h>
|
||||
|
||||
#include <asm/pvclock-abi.h>
|
||||
#include <asm/desc.h>
|
||||
|
||||
#define KVM_MAX_VCPUS 16
|
||||
@@ -282,7 +283,8 @@ struct kvm_vcpu_arch {
|
||||
struct x86_emulate_ctxt emulate_ctxt;
|
||||
|
||||
gpa_t time;
|
||||
struct kvm_vcpu_time_info hv_clock;
|
||||
struct pvclock_vcpu_time_info hv_clock;
|
||||
unsigned int hv_clock_tsc_khz;
|
||||
unsigned int time_offset;
|
||||
struct page *time_page;
|
||||
};
|
||||
|
||||
@@ -48,24 +48,6 @@ struct kvm_mmu_op_release_pt {
|
||||
#ifdef __KERNEL__
|
||||
#include <asm/processor.h>
|
||||
|
||||
/* xen binary-compatible interface. See xen headers for details */
|
||||
struct kvm_vcpu_time_info {
|
||||
uint32_t version;
|
||||
uint32_t pad0;
|
||||
uint64_t tsc_timestamp;
|
||||
uint64_t system_time;
|
||||
uint32_t tsc_to_system_mul;
|
||||
int8_t tsc_shift;
|
||||
int8_t pad[3];
|
||||
} __attribute__((__packed__)); /* 32 bytes */
|
||||
|
||||
struct kvm_wall_clock {
|
||||
uint32_t wc_version;
|
||||
uint32_t wc_sec;
|
||||
uint32_t wc_nsec;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
|
||||
extern void kvmclock_init(void);
|
||||
|
||||
|
||||
|
||||
42
include/asm-x86/pvclock-abi.h
Normal file
42
include/asm-x86/pvclock-abi.h
Normal file
@@ -0,0 +1,42 @@
|
||||
#ifndef _ASM_X86_PVCLOCK_ABI_H_
|
||||
#define _ASM_X86_PVCLOCK_ABI_H_
|
||||
#ifndef __ASSEMBLY__
|
||||
|
||||
/*
|
||||
* These structs MUST NOT be changed.
|
||||
* They are the ABI between hypervisor and guest OS.
|
||||
* Both Xen and KVM are using this.
|
||||
*
|
||||
* pvclock_vcpu_time_info holds the system time and the tsc timestamp
|
||||
* of the last update. So the guest can use the tsc delta to get a
|
||||
* more precise system time. There is one per virtual cpu.
|
||||
*
|
||||
* pvclock_wall_clock references the point in time when the system
|
||||
* time was zero (usually boot time), thus the guest calculates the
|
||||
* current wall clock by adding the system time.
|
||||
*
|
||||
* Protocol for the "version" fields is: hypervisor raises it (making
|
||||
* it uneven) before it starts updating the fields and raises it again
|
||||
* (making it even) when it is done. Thus the guest can make sure the
|
||||
* time values it got are consistent by checking the version before
|
||||
* and after reading them.
|
||||
*/
|
||||
|
||||
struct pvclock_vcpu_time_info {
|
||||
u32 version;
|
||||
u32 pad0;
|
||||
u64 tsc_timestamp;
|
||||
u64 system_time;
|
||||
u32 tsc_to_system_mul;
|
||||
s8 tsc_shift;
|
||||
u8 pad[3];
|
||||
} __attribute__((__packed__)); /* 32 bytes */
|
||||
|
||||
struct pvclock_wall_clock {
|
||||
u32 version;
|
||||
u32 sec;
|
||||
u32 nsec;
|
||||
} __attribute__((__packed__));
|
||||
|
||||
#endif /* __ASSEMBLY__ */
|
||||
#endif /* _ASM_X86_PVCLOCK_ABI_H_ */
|
||||
13
include/asm-x86/pvclock.h
Normal file
13
include/asm-x86/pvclock.h
Normal file
@@ -0,0 +1,13 @@
|
||||
#ifndef _ASM_X86_PVCLOCK_H_
|
||||
#define _ASM_X86_PVCLOCK_H_
|
||||
|
||||
#include <linux/clocksource.h>
|
||||
#include <asm/pvclock-abi.h>
|
||||
|
||||
/* some helper functions for xen and kvm pv clock sources */
|
||||
cycle_t pvclock_clocksource_read(struct pvclock_vcpu_time_info *src);
|
||||
void pvclock_read_wallclock(struct pvclock_wall_clock *wall,
|
||||
struct pvclock_vcpu_time_info *vcpu,
|
||||
struct timespec *ts);
|
||||
|
||||
#endif /* _ASM_X86_PVCLOCK_H_ */
|
||||
@@ -150,13 +150,9 @@ static inline pte_t __pte_ma(pteval_t x)
|
||||
return (pte_t) { .pte = x };
|
||||
}
|
||||
|
||||
#ifdef CONFIG_X86_PAE
|
||||
#define pmd_val_ma(v) ((v).pmd)
|
||||
#define pud_val_ma(v) ((v).pgd.pgd)
|
||||
#define __pmd_ma(x) ((pmd_t) { (x) } )
|
||||
#else /* !X86_PAE */
|
||||
#define pmd_val_ma(v) ((v).pud.pgd.pgd)
|
||||
#endif /* CONFIG_X86_PAE */
|
||||
|
||||
#define pgd_val_ma(x) ((x).pgd)
|
||||
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#define KVM_REQ_REPORT_TPR_ACCESS 2
|
||||
#define KVM_REQ_MMU_RELOAD 3
|
||||
#define KVM_REQ_TRIPLE_FAULT 4
|
||||
#define KVM_REQ_PENDING_TIMER 5
|
||||
|
||||
struct kvm_vcpu;
|
||||
extern struct kmem_cache *kvm_vcpu_cache;
|
||||
|
||||
@@ -27,8 +27,7 @@
|
||||
* This routine is called by the kernel to write a series of
|
||||
* characters to the tty device. The characters may come from
|
||||
* user space or kernel space. This routine will return the
|
||||
* number of characters actually accepted for writing. This
|
||||
* routine is mandatory.
|
||||
* number of characters actually accepted for writing.
|
||||
*
|
||||
* Optional: Required for writable devices.
|
||||
*
|
||||
@@ -134,7 +133,7 @@
|
||||
* This routine notifies the tty driver that it should hangup the
|
||||
* tty device.
|
||||
*
|
||||
* Required:
|
||||
* Optional:
|
||||
*
|
||||
* void (*break_ctl)(struct tty_stuct *tty, int state);
|
||||
*
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define __XEN_PUBLIC_XEN_H__
|
||||
|
||||
#include <asm/xen/interface.h>
|
||||
#include <asm/pvclock-abi.h>
|
||||
|
||||
/*
|
||||
* XEN "SYSTEM CALLS" (a.k.a. HYPERCALLS).
|
||||
@@ -336,7 +337,7 @@ struct vcpu_info {
|
||||
uint8_t evtchn_upcall_mask;
|
||||
unsigned long evtchn_pending_sel;
|
||||
struct arch_vcpu_info arch;
|
||||
struct vcpu_time_info time;
|
||||
struct pvclock_vcpu_time_info time;
|
||||
}; /* 64 bytes (x86) */
|
||||
|
||||
/*
|
||||
@@ -384,9 +385,7 @@ struct shared_info {
|
||||
* Wallclock time: updated only by control software. Guests should base
|
||||
* their gettimeofday() syscall on this wallclock-base value.
|
||||
*/
|
||||
uint32_t wc_version; /* Version counter: see vcpu_time_info_t. */
|
||||
uint32_t wc_sec; /* Secs 00:00:00 UTC, Jan 1, 1970. */
|
||||
uint32_t wc_nsec; /* Nsecs 00:00:00 UTC, Jan 1, 1970. */
|
||||
struct pvclock_wall_clock wc;
|
||||
|
||||
struct arch_shared_info arch;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user