Skip to content

Commit b0e2a55

Browse files
committed
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm
Pull KVM fixes from Paolo Bonzini: "Two very simple bugfixes, affecting all supported architectures" [ Two? There's three commits in here. Oh well, I guess Paolo didn't count the preparatory symbol export ] * tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm: KVM: correct null pid check in kvm_vcpu_yield_to() KVM: check for !is_zero_pfn() in kvm_is_mmio_pfn() mm: export symbol dependencies of is_zero_pfn()
2 parents 7c9a373 + 27fbe64 commit b0e2a55

File tree

4 files changed

+6
-2
lines changed

4 files changed

+6
-2
lines changed

arch/mips/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
*/
5454
unsigned long empty_zero_page, zero_page_mask;
5555
EXPORT_SYMBOL_GPL(empty_zero_page);
56+
EXPORT_SYMBOL(zero_page_mask);
5657

5758
/*
5859
* Not static inline because used by IP27 special magic initialization code

arch/s390/mm/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ pgd_t swapper_pg_dir[PTRS_PER_PGD] __attribute__((__aligned__(PAGE_SIZE)));
4343

4444
unsigned long empty_zero_page, zero_page_mask;
4545
EXPORT_SYMBOL(empty_zero_page);
46+
EXPORT_SYMBOL(zero_page_mask);
4647

4748
static void __init setup_zero_pages(void)
4849
{

mm/memory.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ __setup("norandmaps", disable_randmaps);
118118
unsigned long zero_pfn __read_mostly;
119119
unsigned long highest_memmap_pfn __read_mostly;
120120

121+
EXPORT_SYMBOL(zero_pfn);
122+
121123
/*
122124
* CONFIG_MMU architectures set up ZERO_PAGE in their paging_init()
123125
*/

virt/kvm/kvm_main.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ static bool largepages_enabled = true;
110110
bool kvm_is_mmio_pfn(pfn_t pfn)
111111
{
112112
if (pfn_valid(pfn))
113-
return PageReserved(pfn_to_page(pfn));
113+
return !is_zero_pfn(pfn) && PageReserved(pfn_to_page(pfn));
114114

115115
return true;
116116
}
@@ -1725,7 +1725,7 @@ int kvm_vcpu_yield_to(struct kvm_vcpu *target)
17251725
rcu_read_lock();
17261726
pid = rcu_dereference(target->pid);
17271727
if (pid)
1728-
task = get_pid_task(target->pid, PIDTYPE_PID);
1728+
task = get_pid_task(pid, PIDTYPE_PID);
17291729
rcu_read_unlock();
17301730
if (!task)
17311731
return ret;

0 commit comments

Comments
 (0)