diff mbox

[bisected] KVM in 3.19-rc1 is completely broken

Message ID 549A781A.6010505@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tiejun Chen Dec. 24, 2014, 8:23 a.m. UTC
On 2014/12/24 5:29, Andy Lutomirski wrote:
> On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>>> I can reproduce it using the same steps on a Sandy Bridge laptop, with
>>> whatever QEMU is packaged in Fedora 21.  I attached the config.
>>>
>>> I also submitted a virtme update for Fedora Rawhide and 21 (20 is
>>> still building) in case it helps.  The build is here:
>>>
>>> http://koji.fedoraproject.org/koji/buildinfo?buildID=600732
>>
>> The other reporter bisected it to
>> 0e60b0799fedc495a5c57dbd669de3c10d72edd2.  Can you try its parent?
>
> That's what I bisected it to.  The parent works.
>
>>
>> Also, does it break with 3.18 host and 3.19-rc1 guest, or with
>> 3.19-rc1 host and 3.18 guest?  (Sorry I should do this myself
>> but I'm a bit swamped due to vacation until Jan 6th).
>>
>
> The breakage is with 3.17.7-something L0 and the same test kernel as
> L1 and L2.  I think it breaks the same way with 3.19-rc1 as host and
> guest without any nesting, but that's awkward to test right now.
>


Andy,

Could you try this?

Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
---
  virt/kvm/kvm_main.c | 3 ++-
  1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Andy Lutomirski Dec. 24, 2014, 5:11 p.m. UTC | #1
On Wed, Dec 24, 2014 at 12:23 AM, Chen, Tiejun <tiejun.chen@intel.com> wrote:
> On 2014/12/24 5:29, Andy Lutomirski wrote:
>>
>> On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini <pbonzini@redhat.com>
>> wrote:
>>>
>>>
>>>> I can reproduce it using the same steps on a Sandy Bridge laptop, with
>>>> whatever QEMU is packaged in Fedora 21.  I attached the config.
>>>>
>>>> I also submitted a virtme update for Fedora Rawhide and 21 (20 is
>>>> still building) in case it helps.  The build is here:
>>>>
>>>> http://koji.fedoraproject.org/koji/buildinfo?buildID=600732
>>>
>>>
>>> The other reporter bisected it to
>>> 0e60b0799fedc495a5c57dbd669de3c10d72edd2.  Can you try its parent?
>>
>>
>> That's what I bisected it to.  The parent works.
>>
>>>
>>> Also, does it break with 3.18 host and 3.19-rc1 guest, or with
>>> 3.19-rc1 host and 3.18 guest?  (Sorry I should do this myself
>>> but I'm a bit swamped due to vacation until Jan 6th).
>>>
>>
>> The breakage is with 3.17.7-something L0 and the same test kernel as
>> L1 and L2.  I think it breaks the same way with 3.19-rc1 as host and
>> guest without any nesting, but that's awkward to test right now.
>>
>
>
> Andy,
>
> Could you try this?
>
> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>

I applied it by hand, and it survives extremely light testing.

Tested-by: Andy Lutomirski <luto@amacapital.net>

Thanks,
Andy

> ---
>  virt/kvm/kvm_main.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index f528343..a2d928c 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -672,6 +672,7 @@ static void update_memslots(struct kvm_memslots *slots,
>         WARN_ON(mslots[i].id != id);
>         if (!new->npages) {
>                 new->base_gfn = 0;
> +               new->flags = 0;
>                 if (mslots[i].npages)
>                         slots->used_slots--;
>         } else {
> @@ -688,7 +689,7 @@ static void update_memslots(struct kvm_memslots *slots,
>                 i++;
>         }
>         while (i > 0 &&
> -              new->base_gfn > mslots[i - 1].base_gfn) {
> +              new->base_gfn >= mslots[i - 1].base_gfn) {
>                 mslots[i] = mslots[i - 1];
>                 slots->id_to_index[mslots[i].id] = i;
>                 i--;
> --
> 1.9.1
>
> Tiejun
Tiejun Chen Dec. 25, 2014, 12:55 a.m. UTC | #2
On 2014/12/25 1:11, Andy Lutomirski wrote:
> On Wed, Dec 24, 2014 at 12:23 AM, Chen, Tiejun <tiejun.chen@intel.com> wrote:
>> On 2014/12/24 5:29, Andy Lutomirski wrote:
>>>
>>> On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini <pbonzini@redhat.com>
>>> wrote:
>>>>
>>>>
>>>>> I can reproduce it using the same steps on a Sandy Bridge laptop, with
>>>>> whatever QEMU is packaged in Fedora 21.  I attached the config.
>>>>>
>>>>> I also submitted a virtme update for Fedora Rawhide and 21 (20 is
>>>>> still building) in case it helps.  The build is here:
>>>>>
>>>>> http://koji.fedoraproject.org/koji/buildinfo?buildID=600732
>>>>
>>>>
>>>> The other reporter bisected it to
>>>> 0e60b0799fedc495a5c57dbd669de3c10d72edd2.  Can you try its parent?
>>>
>>>
>>> That's what I bisected it to.  The parent works.
>>>
>>>>
>>>> Also, does it break with 3.18 host and 3.19-rc1 guest, or with
>>>> 3.19-rc1 host and 3.18 guest?  (Sorry I should do this myself
>>>> but I'm a bit swamped due to vacation until Jan 6th).
>>>>
>>>
>>> The breakage is with 3.17.7-something L0 and the same test kernel as
>>> L1 and L2.  I think it breaks the same way with 3.19-rc1 as host and
>>> guest without any nesting, but that's awkward to test right now.
>>>
>>
>>
>> Andy,
>>
>> Could you try this?
>>
>> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
>
> I applied it by hand, and it survives extremely light testing.
>
> Tested-by: Andy Lutomirski <luto@amacapital.net>
>

Looks good so thanks for your validation.

Tiejun
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Tiejun Chen Dec. 25, 2014, 8:57 a.m. UTC | #3
On 2014/12/25 8:55, Chen, Tiejun wrote:
>
>
> On 2014/12/25 1:11, Andy Lutomirski wrote:
>> On Wed, Dec 24, 2014 at 12:23 AM, Chen, Tiejun <tiejun.chen@intel.com>
>> wrote:
>>> On 2014/12/24 5:29, Andy Lutomirski wrote:
>>>>
>>>> On Tue, Dec 23, 2014 at 1:13 PM, Paolo Bonzini <pbonzini@redhat.com>
>>>> wrote:
>>>>>
>>>>>
>>>>>> I can reproduce it using the same steps on a Sandy Bridge laptop,
>>>>>> with
>>>>>> whatever QEMU is packaged in Fedora 21.  I attached the config.
>>>>>>
>>>>>> I also submitted a virtme update for Fedora Rawhide and 21 (20 is
>>>>>> still building) in case it helps.  The build is here:
>>>>>>
>>>>>> http://koji.fedoraproject.org/koji/buildinfo?buildID=600732
>>>>>
>>>>>
>>>>> The other reporter bisected it to
>>>>> 0e60b0799fedc495a5c57dbd669de3c10d72edd2.  Can you try its parent?
>>>>
>>>>
>>>> That's what I bisected it to.  The parent works.
>>>>
>>>>>
>>>>> Also, does it break with 3.18 host and 3.19-rc1 guest, or with
>>>>> 3.19-rc1 host and 3.18 guest?  (Sorry I should do this myself
>>>>> but I'm a bit swamped due to vacation until Jan 6th).
>>>>>
>>>>
>>>> The breakage is with 3.17.7-something L0 and the same test kernel as
>>>> L1 and L2.  I think it breaks the same way with 3.19-rc1 as host and
>>>> guest without any nesting, but that's awkward to test right now.
>>>>
>>>
>>>
>>> Andy,
>>>
>>> Could you try this?
>>>
>>> Signed-off-by: Tiejun Chen <tiejun.chen@intel.com>
>>
>> I applied it by hand, and it survives extremely light testing.
>>
>> Tested-by: Andy Lutomirski <luto@amacapital.net>
>>
>
> Looks good so thanks for your validation.
>

I refine that I posted that fix in another thread since looks that will 
broken !next case. And I myself already run those test instructions you 
showed previously, now looks good.

Tiejun
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
index f528343..a2d928c 100644
--- a/virt/kvm/kvm_main.c
+++ b/virt/kvm/kvm_main.c
@@ -672,6 +672,7 @@  static void update_memslots(struct kvm_memslots *slots,
         WARN_ON(mslots[i].id != id);
         if (!new->npages) {
                 new->base_gfn = 0;
+               new->flags = 0;
                 if (mslots[i].npages)
                         slots->used_slots--;
         } else {
@@ -688,7 +689,7 @@  static void update_memslots(struct kvm_memslots *slots,
                 i++;
         }
         while (i > 0 &&
-              new->base_gfn > mslots[i - 1].base_gfn) {
+              new->base_gfn >= mslots[i - 1].base_gfn) {
                 mslots[i] = mslots[i - 1];
                 slots->id_to_index[mslots[i].id] = i;
                 i--;