FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor


 
 
LinkBack Thread Tools
 
Old 02-11-2009, 12:35 AM
Alok Kataria
 
Default VMI bug fix.

Hi Tim, Stefan,

Below is a patch which i posted on LKML, this fixes a critical bug in
the VMI paravirt code. Without this patch users could see random hangs
or performance drops running a VMI kernel.
Given that Ubuntu has PARAVIRT enabled by default, any 32bit kernel
running on VMware platform will see this problem.

This bug slipped in the kernel in 2.6.25 time frame. So the fix is
needed only for the Ubuntu Intrepid and Jaunty series.
Hardy is good in its current state.

Here is the link to the LKML discussion.
http://lkml.org/lkml/2009/2/5/542

The patch is merged in Ingo's tip tree and should be merged in mainline
in the 29.rc-5 cycle. Commit details are
-----------------------------------------------------------------
commit 55a8ba4b7f76bebd7e8ce3f74c04b140627a1bad
Author: Alok Kataria <akataria@vmware.com>
Date: Fri Feb 6 10:29:35 2009 -0800

x86, vmi: put a missing paravirt_release_pmd in pgd_dtor
-----------------------------------------------------------------

Attaching it below too.
Please apply it to the Intrepid and Jaunty tree.

Thanks,
Alok
--

commit 55a8ba4b7f76bebd7e8ce3f74c04b140627a1bad
Author: Alok Kataria <akataria@vmware.com>
Date: Fri Feb 6 10:29:35 2009 -0800

x86, vmi: put a missing paravirt_release_pmd in pgd_dtor

Commit 6194ba6ff6ccf8d5c54c857600843c67aa82c407 ("x86: don't special-case
pmd allocations as much") made changes to the way we handle pmd allocations,
and while doing that it dropped a call to paravirt_release_pd on the
pgd page from the pgd_dtor code path.

As a result of this missing release, the hypervisor is now unaware of the
pgd page being freed, and as a result it ends up tracking this page as a
page table page.

After this the guest may start using the same page for other purposes, and
depending on what use the page is put to, it may result in various performance
and/or functional issues ( hangs, reboots).

Since this release is only required for VMI, I now release the pgd page from
the (vmi)_pgd_free hook.

Signed-off-by: Alok N Kataria <akataria@vmware.com>
Acked-by: Jeremy Fitzhardinge <jeremy@goop.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Cc: <stable@kernel.org>

diff --git a/arch/x86/kernel/vmi_32.c b/arch/x86/kernel/vmi_32.c
index 1d3302c..bef58b4 100644
--- a/arch/x86/kernel/vmi_32.c
+++ b/arch/x86/kernel/vmi_32.c
@@ -321,6 +321,16 @@ static void vmi_release_pmd(unsigned long pfn)
}

/*
+ * We use the pgd_free hook for releasing the pgd page:
+ */
+static void vmi_pgd_free(struct mm_struct *mm, pgd_t *pgd)
+{
+ unsigned long pfn = __pa(pgd) >> PAGE_SHIFT;
+
+ vmi_ops.release_page(pfn, VMI_PAGE_L2);
+}
+
+/*
* Helper macros for MMU update flags. We can defer updates until a flush
* or page invalidation only if the update is to the current address space
* (otherwise, there is no flush). We must check against init_mm, since
@@ -762,6 +772,7 @@ static inline int __init activate_vmi(void)
if (vmi_ops.release_page) {
pv_mmu_ops.release_pte = vmi_release_pte;
pv_mmu_ops.release_pmd = vmi_release_pmd;
+ pv_mmu_ops.pgd_free = vmi_pgd_free;
}

/* Set linear is needed in all cases */



--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-11-2009, 12:33 PM
Tim Gardner
 
Default VMI bug fix.

Alok Kataria wrote:
> Hi Tim, Stefan,
>
> Below is a patch which i posted on LKML, this fixes a critical bug in
> the VMI paravirt code. Without this patch users could see random hangs
> or performance drops running a VMI kernel.
> Given that Ubuntu has PARAVIRT enabled by default, any 32bit kernel
> running on VMware platform will see this problem.
>
> This bug slipped in the kernel in 2.6.25 time frame. So the fix is
> needed only for the Ubuntu Intrepid and Jaunty series.
> Hardy is good in its current state.
>
> Here is the link to the LKML discussion.
> http://lkml.org/lkml/2009/2/5/542
>
> The patch is merged in Ingo's tip tree and should be merged in mainline
> in the 29.rc-5 cycle. Commit details are

Alok - thanks for the note. We'll pick this up as soon as it is released
as part of the stable update series.

rtg
--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-17-2009, 02:31 AM
Tim Gardner
 
Default VMI bug fix.

Alok Kataria wrote:
> Hi Tim, Stefan,
>
> Below is a patch which i posted on LKML, this fixes a critical bug in
> the VMI paravirt code. Without this patch users could see random hangs
> or performance drops running a VMI kernel.
> Given that Ubuntu has PARAVIRT enabled by default, any 32bit kernel
> running on VMware platform will see this problem.
>
> This bug slipped in the kernel in 2.6.25 time frame. So the fix is
> needed only for the Ubuntu Intrepid and Jaunty series.
> Hardy is good in its current state.
>
> Here is the link to the LKML discussion.
> http://lkml.org/lkml/2009/2/5/542
>
> The patch is merged in Ingo's tip tree and should be merged in mainline
> in the 29.rc-5 cycle. Commit details are
> -----------------------------------------------------------------
> commit 55a8ba4b7f76bebd7e8ce3f74c04b140627a1bad
> Author: Alok Kataria <akataria@vmware.com>
> Date: Fri Feb 6 10:29:35 2009 -0800
>
> x86, vmi: put a missing paravirt_release_pmd in pgd_dtor
> -----------------------------------------------------------------
>
> Attaching it below too.
> Please apply it to the Intrepid and Jaunty tree.
>
> Thanks,
> Alok
> --
>

Cherry picked from Linus tree. Thanks for the note.

Stefan - Is this on your todo list?

--
Tim Gardner tim.gardner@canonical.com

--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 
Old 02-17-2009, 07:00 AM
Stefan Bader
 
Default VMI bug fix.

Tim Gardner wrote:
> Alok Kataria wrote:
>> Hi Tim, Stefan,
>>
>> Below is a patch which i posted on LKML, this fixes a critical bug in
>> the VMI paravirt code. Without this patch users could see random hangs
>> or performance drops running a VMI kernel.
>> Given that Ubuntu has PARAVIRT enabled by default, any 32bit kernel
>> running on VMware platform will see this problem.
>>
>> This bug slipped in the kernel in 2.6.25 time frame. So the fix is
>> needed only for the Ubuntu Intrepid and Jaunty series.
>> Hardy is good in its current state.
>>
>> Here is the link to the LKML discussion.
>> http://lkml.org/lkml/2009/2/5/542
>>
>> The patch is merged in Ingo's tip tree and should be merged in mainline
>> in the 29.rc-5 cycle. Commit details are
>> -----------------------------------------------------------------
>> commit 55a8ba4b7f76bebd7e8ce3f74c04b140627a1bad
>> Author: Alok Kataria <akataria@vmware.com>
>> Date: Fri Feb 6 10:29:35 2009 -0800
>>
>> x86, vmi: put a missing paravirt_release_pmd in pgd_dtor
>> -----------------------------------------------------------------
>>
>> Attaching it below too.
>> Please apply it to the Intrepid and Jaunty tree.
>>
>> Thanks,
>> Alok
>> --
>>
>
> Cherry picked from Linus tree. Thanks for the note.
>
> Stefan - Is this on your todo list?
>

It is on my todo list, yes. Since I had not seen it upstream I was waiting for
it to appear somewhere to pick. I just flew over the patches that will make up
2.6.27.18 (if there are no emergencies in between) and it got queued there. So
I will pick it up when processing that stable update.

Stefan

--

When all other means of communication fail, try words!



--
kernel-team mailing list
kernel-team@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/kernel-team
 

Thread Tools




All times are GMT. The time now is 07:52 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org