Message ID | 1370794247-28267-15-git-send-email-afaerber@suse.de |
---|---|
State | New |
Headers | show |
On Sun, 9 Jun 2013 18:10:43 +0200 Andreas Färber <afaerber@suse.de> wrote: > Instead of calling cpu_synchronize_state() for each CPU, call the > existing cpu_synchronize_all_states() helper. > > Signed-off-by: Andreas Färber <afaerber@suse.de> Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> > --- > dump.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/dump.c b/dump.c > index b44dafc..44a1339 100644 > --- a/dump.c > +++ b/dump.c > @@ -21,6 +21,7 @@ > #include "sysemu/dump.h" > #include "sysemu/sysemu.h" > #include "sysemu/memory_mapping.h" > +#include "sysemu/cpus.h" > #include "qapi/error.h" > #include "qmp-commands.h" > > @@ -732,12 +733,12 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter, > * If the target architecture is not supported, cpu_get_dump_info() will > * return -1. > * > - * if we use kvm, we should synchronize the register before we get dump > + * If we use KVM, we should synchronize the registers before we get dump > * info. > */ > + cpu_synchronize_all_states(); > nr_cpus = 0; > for (env = first_cpu; env != NULL; env = env->next_cpu) { > - cpu_synchronize_state(env); > nr_cpus++; > } >
Am 11.06.2013 17:55, schrieb Luiz Capitulino: > On Sun, 9 Jun 2013 18:10:43 +0200 > Andreas Färber <afaerber@suse.de> wrote: > >> Instead of calling cpu_synchronize_state() for each CPU, call the >> existing cpu_synchronize_all_states() helper. >> >> Signed-off-by: Andreas Färber <afaerber@suse.de> > > Reviewed-by: Luiz Capitulino <lcapitulino@redhat.com> Thanks, applied to qom-cpu: https://github.com/afaerber/qemu-cpu/commits/qom-cpu Andreas
diff --git a/dump.c b/dump.c index b44dafc..44a1339 100644 --- a/dump.c +++ b/dump.c @@ -21,6 +21,7 @@ #include "sysemu/dump.h" #include "sysemu/sysemu.h" #include "sysemu/memory_mapping.h" +#include "sysemu/cpus.h" #include "qapi/error.h" #include "qmp-commands.h" @@ -732,12 +733,12 @@ static int dump_init(DumpState *s, int fd, bool paging, bool has_filter, * If the target architecture is not supported, cpu_get_dump_info() will * return -1. * - * if we use kvm, we should synchronize the register before we get dump + * If we use KVM, we should synchronize the registers before we get dump * info. */ + cpu_synchronize_all_states(); nr_cpus = 0; for (env = first_cpu; env != NULL; env = env->next_cpu) { - cpu_synchronize_state(env); nr_cpus++; }
Instead of calling cpu_synchronize_state() for each CPU, call the existing cpu_synchronize_all_states() helper. Signed-off-by: Andreas Färber <afaerber@suse.de> --- dump.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)