Patchwork [06/10] kvm: remove explicit kvm_arch_reset_vcpu from kvm_init_vcpu

login
register
mail settings
Submitter Marcelo Tosatti
Date April 26, 2010, 5:59 p.m.
Message ID <1e7180606d206cc9882d4545cbf1aed29fad8088.1272304746.git.mtosatti@redhat.com>
Download mbox | patch
Permalink /patch/50992/
State New
Headers show

Comments

Marcelo Tosatti - April 26, 2010, 5:59 p.m.
This is now done via the initialization's qemu_system_reset call.

Signed-off-by: Avi Kivity <avi@redhat.com>
---
 kvm-all.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
Anthony Liguori - April 28, 2010, 3:39 p.m.
On 04/26/2010 12:59 PM, Marcelo Tosatti wrote:
> This is now done via the initialization's qemu_system_reset call.
>
> Signed-off-by: Avi Kivity<avi@redhat.com>
> ---
>   kvm-all.c |    1 -
>   1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 9c8aa7d..eabb097 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -208,7 +208,6 @@ int kvm_init_vcpu(CPUState *env)
>       ret = kvm_arch_init_vcpu(env);
>       if (ret == 0) {
>           qemu_register_reset(kvm_reset_vcpu, env);
> -        kvm_arch_reset_vcpu(env);
>       }
>   err:
>       return ret;
>    

This breaks -enable-kvm in upstream qemu.  No progress is ever made in 
the guest.

Regards,

Anthony Liguori
Marcelo Tosatti - April 28, 2010, 4:22 p.m.
On Wed, Apr 28, 2010 at 10:39:06AM -0500, Anthony Liguori wrote:
> On 04/26/2010 12:59 PM, Marcelo Tosatti wrote:
> >This is now done via the initialization's qemu_system_reset call.
> >
> >Signed-off-by: Avi Kivity<avi@redhat.com>
> >---
> >  kvm-all.c |    1 -
> >  1 files changed, 0 insertions(+), 1 deletions(-)
> >
> >diff --git a/kvm-all.c b/kvm-all.c
> >index 9c8aa7d..eabb097 100644
> >--- a/kvm-all.c
> >+++ b/kvm-all.c
> >@@ -208,7 +208,6 @@ int kvm_init_vcpu(CPUState *env)
> >      ret = kvm_arch_init_vcpu(env);
> >      if (ret == 0) {
> >          qemu_register_reset(kvm_reset_vcpu, env);
> >-        kvm_arch_reset_vcpu(env);
> >      }
> >  err:
> >      return ret;
> 
> This breaks -enable-kvm in upstream qemu.  No progress is ever made
> in the guest.

These patches have been autotested, and just confirmed manually that    
this patch does not break -enable-kvm (as the reset handler is now 
called through the notifier).

What is your qemu command line?
Marcelo Tosatti - April 28, 2010, 4:42 p.m.
On Wed, Apr 28, 2010 at 01:22:14PM -0300, Marcelo Tosatti wrote:
> On Wed, Apr 28, 2010 at 10:39:06AM -0500, Anthony Liguori wrote:
> > On 04/26/2010 12:59 PM, Marcelo Tosatti wrote:
> > >This is now done via the initialization's qemu_system_reset call.
> > >
> > >Signed-off-by: Avi Kivity<avi@redhat.com>
> > >---
> > >  kvm-all.c |    1 -
> > >  1 files changed, 0 insertions(+), 1 deletions(-)
> > >
> > >diff --git a/kvm-all.c b/kvm-all.c
> > >index 9c8aa7d..eabb097 100644
> > >--- a/kvm-all.c
> > >+++ b/kvm-all.c
> > >@@ -208,7 +208,6 @@ int kvm_init_vcpu(CPUState *env)
> > >      ret = kvm_arch_init_vcpu(env);
> > >      if (ret == 0) {
> > >          qemu_register_reset(kvm_reset_vcpu, env);
> > >-        kvm_arch_reset_vcpu(env);
> > >      }
> > >  err:
> > >      return ret;
> > 
> > This breaks -enable-kvm in upstream qemu.  No progress is ever made
> > in the guest.
> 
> These patches have been autotested, and just confirmed manually that    
> this patch does not break -enable-kvm (as the reset handler is now 
> called through the notifier).
> 
> What is your qemu command line?

Just drop it please.
Anthony Liguori - April 28, 2010, 4:46 p.m.
On 04/28/2010 11:22 AM, Marcelo Tosatti wrote:
> On Wed, Apr 28, 2010 at 10:39:06AM -0500, Anthony Liguori wrote:
>    
>> On 04/26/2010 12:59 PM, Marcelo Tosatti wrote:
>>      
>>> This is now done via the initialization's qemu_system_reset call.
>>>
>>> Signed-off-by: Avi Kivity<avi@redhat.com>
>>> ---
>>>   kvm-all.c |    1 -
>>>   1 files changed, 0 insertions(+), 1 deletions(-)
>>>
>>> diff --git a/kvm-all.c b/kvm-all.c
>>> index 9c8aa7d..eabb097 100644
>>> --- a/kvm-all.c
>>> +++ b/kvm-all.c
>>> @@ -208,7 +208,6 @@ int kvm_init_vcpu(CPUState *env)
>>>       ret = kvm_arch_init_vcpu(env);
>>>       if (ret == 0) {
>>>           qemu_register_reset(kvm_reset_vcpu, env);
>>> -        kvm_arch_reset_vcpu(env);
>>>       }
>>>   err:
>>>       return ret;
>>>        
>> This breaks -enable-kvm in upstream qemu.  No progress is ever made
>> in the guest.
>>      
> These patches have been autotested, and just confirmed manually that
> this patch does not break -enable-kvm (as the reset handler is now
> called through the notifier).
>
> What is your qemu command line?
>    

x86_64-softmmu/qemu-system-x86_64 -hda ~/images/linux.img -snapshot 
-enable-kvm -L ~/git/qemu/pc-bios

This is with the very latest tip.  I can publish a branch if that's 
helpful.  If you have an old tree, I wouldn't be surprised if it didn't 
show up.

Regards,

Anthony Liguori

Patch

diff --git a/kvm-all.c b/kvm-all.c
index 9c8aa7d..eabb097 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -208,7 +208,6 @@  int kvm_init_vcpu(CPUState *env)
     ret = kvm_arch_init_vcpu(env);
     if (ret == 0) {
         qemu_register_reset(kvm_reset_vcpu, env);
-        kvm_arch_reset_vcpu(env);
     }
 err:
     return ret;