mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 09:06:41 +07:00
Merge branch 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'x86-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: x86: use the right protections for split-up pagetables x86, vmi: TSC going backwards check in vmi clocksource
This commit is contained in:
commit
be71cb5b52
@ -283,10 +283,13 @@ void __devinit vmi_time_ap_init(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/** vmi clocksource */
|
/** vmi clocksource */
|
||||||
|
static struct clocksource clocksource_vmi;
|
||||||
|
|
||||||
static cycle_t read_real_cycles(void)
|
static cycle_t read_real_cycles(void)
|
||||||
{
|
{
|
||||||
return vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
|
cycle_t ret = (cycle_t)vmi_timer_ops.get_cycle_counter(VMI_CYCLES_REAL);
|
||||||
|
return ret >= clocksource_vmi.cycle_last ?
|
||||||
|
ret : clocksource_vmi.cycle_last;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct clocksource clocksource_vmi = {
|
static struct clocksource clocksource_vmi = {
|
||||||
|
@ -508,18 +508,13 @@ static int split_large_page(pte_t *kpte, unsigned long address)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Install the new, split up pagetable. Important details here:
|
* Install the new, split up pagetable.
|
||||||
*
|
*
|
||||||
* On Intel the NX bit of all levels must be cleared to make a
|
* We use the standard kernel pagetable protections for the new
|
||||||
* page executable. See section 4.13.2 of Intel 64 and IA-32
|
* pagetable protections, the actual ptes set above control the
|
||||||
* Architectures Software Developer's Manual).
|
* primary protection behavior:
|
||||||
*
|
|
||||||
* Mark the entry present. The current mapping might be
|
|
||||||
* set to not present, which we preserved above.
|
|
||||||
*/
|
*/
|
||||||
ref_prot = pte_pgprot(pte_mkexec(pte_clrhuge(*kpte)));
|
__set_pmd_pte(kpte, address, mk_pte(base, __pgprot(_KERNPG_TABLE)));
|
||||||
pgprot_val(ref_prot) |= _PAGE_PRESENT;
|
|
||||||
__set_pmd_pte(kpte, address, mk_pte(base, ref_prot));
|
|
||||||
base = NULL;
|
base = NULL;
|
||||||
|
|
||||||
out_unlock:
|
out_unlock:
|
||||||
|
Loading…
Reference in New Issue
Block a user