All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH qom-cpu 0/4] memory_mapping: Clean up stubs
@ 2013-05-22 13:09 Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 1/4] memory_mapping: Use hwaddr type for MemoryMapping virt_addr field Andreas Färber
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Andreas Färber @ 2013-05-22 13:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jens Freimann, Vincent Rabin, Qiao Nuohan, Paolo Bonzini,
	Andreas Färber

Hello,

This mini-series cleans up the remaining guest-memory-dump related
-stub.c file in making it compile-once.

The next step would then be to turn some of the per-target functions
into CPUState hooks.

Regards,
Andreas

Cc: Wen Congyang <wency@cn.fujitsu.com>
Cc: Qiao Nuohan <qiaonuohan@cn.fujitsu.com>
Cc: Jens Freimann <jfrei@linux.vnet.ibm.com>
Cc: Vincent Rabin <rabin@rab.in>
Cc: Paolo Bonzini <pbonzini@redhat.com>

Andreas Färber (4):
  memory_mapping: Use hwaddr type for MemoryMapping virt_addr field
  memory_mapping: Change cpu_get_memory_mapping() argument to CPUState
  memory_mapping: Change cpu_paging_enabled() argument to CPUState
  memory_mapping: Move stubs to libqemustub.a

 Makefile.target                                 |  2 --
 include/sysemu/memory_mapping.h                 |  6 +++---
 memory_mapping.c                                |  4 ++--
 stubs/Makefile.objs                             |  1 +
 memory_mapping-stub.c => stubs/memory_mapping.c |  5 +++--
 target-i386/arch_memory_mapping.c               | 12 +++++++++---
 6 files changed, 18 insertions(+), 12 deletions(-)
 rename memory_mapping-stub.c => stubs/memory_mapping.c (85%)

-- 
1.8.1.4

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH qom-cpu 1/4] memory_mapping: Use hwaddr type for MemoryMapping virt_addr field
  2013-05-22 13:09 [Qemu-devel] [PATCH qom-cpu 0/4] memory_mapping: Clean up stubs Andreas Färber
@ 2013-05-22 13:09 ` Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 2/4] memory_mapping: Change cpu_get_memory_mapping() argument to CPUState Andreas Färber
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2013-05-22 13:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jens Freimann, Vincent Rabin, Qiao Nuohan, Paolo Bonzini,
	Andreas Färber

The memory mapping API uses hwaddr, so use it in the struct, too.
This avoids a header dependency on target_ulong type.

Cc: Wen Congyang <wency@cn.fujitsu.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/sysemu/memory_mapping.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index 06a08e9..0a418a7 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -19,7 +19,7 @@
 /* The physical and virtual address in the memory mapping are contiguous. */
 typedef struct MemoryMapping {
     hwaddr phys_addr;
-    target_ulong virt_addr;
+    hwaddr virt_addr;
     ram_addr_t length;
     QTAILQ_ENTRY(MemoryMapping) next;
 } MemoryMapping;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH qom-cpu 2/4] memory_mapping: Change cpu_get_memory_mapping() argument to CPUState
  2013-05-22 13:09 [Qemu-devel] [PATCH qom-cpu 0/4] memory_mapping: Clean up stubs Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 1/4] memory_mapping: Use hwaddr type for MemoryMapping virt_addr field Andreas Färber
@ 2013-05-22 13:09 ` Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 3/4] memory_mapping: Change cpu_paging_enabled() " Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a Andreas Färber
  3 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2013-05-22 13:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jens Freimann, Vincent Rabin, Qiao Nuohan, Paolo Bonzini,
	Andreas Färber

Eliminates an occurrence of CPUArchState from sysemu/memory_mapping.h.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/sysemu/memory_mapping.h   | 2 +-
 memory_mapping.c                  | 2 +-
 target-i386/arch_memory_mapping.c | 5 ++++-
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index 0a418a7..2e2893a 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -30,7 +30,7 @@ typedef struct MemoryMappingList {
     QTAILQ_HEAD(, MemoryMapping) head;
 } MemoryMappingList;
 
-int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env);
+int cpu_get_memory_mapping(MemoryMappingList *list, CPUState *cpu);
 bool cpu_paging_enabled(CPUArchState *env);
 
 /*
diff --git a/memory_mapping.c b/memory_mapping.c
index 4867ae4..fe8e0ff 100644
--- a/memory_mapping.c
+++ b/memory_mapping.c
@@ -138,7 +138,7 @@ int qemu_get_guest_memory_mapping(MemoryMappingList *list)
     first_paging_enabled_cpu = find_paging_enabled_cpu(first_cpu);
     if (first_paging_enabled_cpu) {
         for (env = first_paging_enabled_cpu; env != NULL; env = env->next_cpu) {
-            ret = cpu_get_memory_mapping(list, env);
+            ret = cpu_get_memory_mapping(list, ENV_GET_CPU(env));
             if (ret < 0) {
                 return -1;
             }
diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
index a2eb7e7..187c3df 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -237,8 +237,11 @@ static void walk_pml4e(MemoryMappingList *list,
 }
 #endif
 
-int cpu_get_memory_mapping(MemoryMappingList *list, CPUArchState *env)
+int cpu_get_memory_mapping(MemoryMappingList *list, CPUState *cs)
 {
+    X86CPU *cpu = X86_CPU(cs);
+    CPUX86State *env = &cpu->env;
+
     if (!cpu_paging_enabled(env)) {
         /* paging is disabled */
         return 0;
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH qom-cpu 3/4] memory_mapping: Change cpu_paging_enabled() argument to CPUState
  2013-05-22 13:09 [Qemu-devel] [PATCH qom-cpu 0/4] memory_mapping: Clean up stubs Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 1/4] memory_mapping: Use hwaddr type for MemoryMapping virt_addr field Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 2/4] memory_mapping: Change cpu_get_memory_mapping() argument to CPUState Andreas Färber
@ 2013-05-22 13:09 ` Andreas Färber
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a Andreas Färber
  3 siblings, 0 replies; 8+ messages in thread
From: Andreas Färber @ 2013-05-22 13:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jens Freimann, Vincent Rabin, Qiao Nuohan, Paolo Bonzini,
	Andreas Färber

Removes the last occurrence of CPUArchState from sysemu/memory_mapping.h.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 include/sysemu/memory_mapping.h   | 2 +-
 memory_mapping.c                  | 2 +-
 target-i386/arch_memory_mapping.c | 7 +++++--
 3 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/include/sysemu/memory_mapping.h b/include/sysemu/memory_mapping.h
index 2e2893a..bfffb6b 100644
--- a/include/sysemu/memory_mapping.h
+++ b/include/sysemu/memory_mapping.h
@@ -31,7 +31,7 @@ typedef struct MemoryMappingList {
 } MemoryMappingList;
 
 int cpu_get_memory_mapping(MemoryMappingList *list, CPUState *cpu);
-bool cpu_paging_enabled(CPUArchState *env);
+bool cpu_paging_enabled(CPUState *cpu);
 
 /*
  * add or merge the memory region [phys_addr, phys_addr + length) into the
diff --git a/memory_mapping.c b/memory_mapping.c
index fe8e0ff..8d14ed8 100644
--- a/memory_mapping.c
+++ b/memory_mapping.c
@@ -120,7 +120,7 @@ static CPUArchState *find_paging_enabled_cpu(CPUArchState *start_cpu)
     CPUArchState *env;
 
     for (env = start_cpu; env != NULL; env = env->next_cpu) {
-        if (cpu_paging_enabled(env)) {
+        if (cpu_paging_enabled(ENV_GET_CPU(env))) {
             return env;
         }
     }
diff --git a/target-i386/arch_memory_mapping.c b/target-i386/arch_memory_mapping.c
index 187c3df..44ed886 100644
--- a/target-i386/arch_memory_mapping.c
+++ b/target-i386/arch_memory_mapping.c
@@ -242,7 +242,7 @@ int cpu_get_memory_mapping(MemoryMappingList *list, CPUState *cs)
     X86CPU *cpu = X86_CPU(cs);
     CPUX86State *env = &cpu->env;
 
-    if (!cpu_paging_enabled(env)) {
+    if (!cpu_paging_enabled(cs)) {
         /* paging is disabled */
         return 0;
     }
@@ -274,7 +274,10 @@ int cpu_get_memory_mapping(MemoryMappingList *list, CPUState *cs)
     return 0;
 }
 
-bool cpu_paging_enabled(CPUArchState *env)
+bool cpu_paging_enabled(CPUState *cs)
 {
+    X86CPU *cpu = X86_CPU(cs);
+    CPUX86State *env = &cpu->env;
+
     return env->cr[0] & CR0_PG_MASK;
 }
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a
  2013-05-22 13:09 [Qemu-devel] [PATCH qom-cpu 0/4] memory_mapping: Clean up stubs Andreas Färber
                   ` (2 preceding siblings ...)
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 3/4] memory_mapping: Change cpu_paging_enabled() " Andreas Färber
@ 2013-05-22 13:09 ` Andreas Färber
  2013-05-23 10:08   ` Paolo Bonzini
  3 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2013-05-22 13:09 UTC (permalink / raw)
  To: qemu-devel
  Cc: Jens Freimann, Vincent Rabin, Qiao Nuohan, Paolo Bonzini,
	Andreas Färber

Allows us to drop CONFIG_NO_GET_MEMORY_MAPPING with its indirect
dependency on CONFIG_HAVE_GET_MEMORY_MAPPING in Makefile.target.

Signed-off-by: Andreas Färber <afaerber@suse.de>
---
 Makefile.target                                 | 2 --
 stubs/Makefile.objs                             | 1 +
 memory_mapping-stub.c => stubs/memory_mapping.c | 5 +++--
 3 files changed, 4 insertions(+), 4 deletions(-)
 rename memory_mapping-stub.c => stubs/memory_mapping.c (85%)

diff --git a/Makefile.target b/Makefile.target
index 5b02200..efc0b11 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -63,7 +63,6 @@ all: $(PROGS) stap
 CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
 CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
 CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
-CONFIG_NO_GET_MEMORY_MAPPING = $(if $(subst n,,$(CONFIG_HAVE_GET_MEMORY_MAPPING)),n,y)
 
 #########################################################
 # cpu emulator library
@@ -112,7 +111,6 @@ obj-$(CONFIG_KVM) += kvm-all.o
 obj-y += memory.o savevm.o cputlb.o
 obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o
 obj-y += dump.o memory_mapping_common.o
-obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
 LIBS+=$(libs_softmmu)
 
 # xen support
diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
index 9b701b4..b0bca4d 100644
--- a/stubs/Makefile.objs
+++ b/stubs/Makefile.objs
@@ -10,6 +10,7 @@ stub-obj-y += fdset-remove-fd.o
 stub-obj-y += get-fd.o
 stub-obj-y += get-vm-name.o
 stub-obj-y += iothread-lock.o
+stub-obj-y += memory_mapping.o
 stub-obj-y += migr-blocker.o
 stub-obj-y += mon-is-qmp.o
 stub-obj-y += mon-printf.o
diff --git a/memory_mapping-stub.c b/stubs/memory_mapping.c
similarity index 85%
rename from memory_mapping-stub.c
rename to stubs/memory_mapping.c
index c48ea44..4db2108 100644
--- a/memory_mapping-stub.c
+++ b/stubs/memory_mapping.c
@@ -11,8 +11,9 @@
  *
  */
 
-#include "cpu.h"
-#include "exec/cpu-all.h"
+#include "qemu-common.h"
+#include "exec/cpu-common.h"
+#include "qom/cpu.h"
 #include "sysemu/memory_mapping.h"
 
 int qemu_get_guest_memory_mapping(MemoryMappingList *list)
-- 
1.8.1.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a
  2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a Andreas Färber
@ 2013-05-23 10:08   ` Paolo Bonzini
  2013-05-28  9:39     ` Andreas Färber
  0 siblings, 1 reply; 8+ messages in thread
From: Paolo Bonzini @ 2013-05-23 10:08 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Vincent Rabin, Qiao Nuohan, qemu-devel, Jens Freimann

Il 22/05/2013 15:09, Andreas Färber ha scritto:
> Allows us to drop CONFIG_NO_GET_MEMORY_MAPPING with its indirect
> dependency on CONFIG_HAVE_GET_MEMORY_MAPPING in Makefile.target.
> 
> Signed-off-by: Andreas Färber <afaerber@suse.de>
> ---
>  Makefile.target                                 | 2 --
>  stubs/Makefile.objs                             | 1 +
>  memory_mapping-stub.c => stubs/memory_mapping.c | 5 +++--
>  3 files changed, 4 insertions(+), 4 deletions(-)
>  rename memory_mapping-stub.c => stubs/memory_mapping.c (85%)
> 
> diff --git a/Makefile.target b/Makefile.target
> index 5b02200..efc0b11 100644
> --- a/Makefile.target
> +++ b/Makefile.target
> @@ -63,7 +63,6 @@ all: $(PROGS) stap
>  CONFIG_NO_PCI = $(if $(subst n,,$(CONFIG_PCI)),n,y)
>  CONFIG_NO_KVM = $(if $(subst n,,$(CONFIG_KVM)),n,y)
>  CONFIG_NO_XEN = $(if $(subst n,,$(CONFIG_XEN)),n,y)
> -CONFIG_NO_GET_MEMORY_MAPPING = $(if $(subst n,,$(CONFIG_HAVE_GET_MEMORY_MAPPING)),n,y)
>  
>  #########################################################
>  # cpu emulator library
> @@ -112,7 +111,6 @@ obj-$(CONFIG_KVM) += kvm-all.o
>  obj-y += memory.o savevm.o cputlb.o
>  obj-$(CONFIG_HAVE_GET_MEMORY_MAPPING) += memory_mapping.o
>  obj-y += dump.o memory_mapping_common.o
> -obj-$(CONFIG_NO_GET_MEMORY_MAPPING) += memory_mapping-stub.o
>  LIBS+=$(libs_softmmu)
>  
>  # xen support
> diff --git a/stubs/Makefile.objs b/stubs/Makefile.objs
> index 9b701b4..b0bca4d 100644
> --- a/stubs/Makefile.objs
> +++ b/stubs/Makefile.objs
> @@ -10,6 +10,7 @@ stub-obj-y += fdset-remove-fd.o
>  stub-obj-y += get-fd.o
>  stub-obj-y += get-vm-name.o
>  stub-obj-y += iothread-lock.o
> +stub-obj-y += memory_mapping.o
>  stub-obj-y += migr-blocker.o
>  stub-obj-y += mon-is-qmp.o
>  stub-obj-y += mon-printf.o
> diff --git a/memory_mapping-stub.c b/stubs/memory_mapping.c
> similarity index 85%
> rename from memory_mapping-stub.c
> rename to stubs/memory_mapping.c
> index c48ea44..4db2108 100644
> --- a/memory_mapping-stub.c
> +++ b/stubs/memory_mapping.c
> @@ -11,8 +11,9 @@
>   *
>   */
>  
> -#include "cpu.h"
> -#include "exec/cpu-all.h"
> +#include "qemu-common.h"
> +#include "exec/cpu-common.h"
> +#include "qom/cpu.h"
>  #include "sysemu/memory_mapping.h"
>  
>  int qemu_get_guest_memory_mapping(MemoryMappingList *list)
> 

Patches 1-3 are fine.  But I wonder if a better replacement for stubs is
methods in CPU.

Paolo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a
  2013-05-23 10:08   ` Paolo Bonzini
@ 2013-05-28  9:39     ` Andreas Färber
  2013-05-28  9:53       ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Färber @ 2013-05-28  9:39 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: Vincent Rabin, Qiao Nuohan, qemu-devel, Jens Freimann

Am 23.05.2013 12:08, schrieb Paolo Bonzini:
> Il 22/05/2013 15:09, Andreas Färber ha scritto:
>> Allows us to drop CONFIG_NO_GET_MEMORY_MAPPING with its indirect
>> dependency on CONFIG_HAVE_GET_MEMORY_MAPPING in Makefile.target.
>>
>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>> ---
>>  Makefile.target                                 | 2 --
>>  stubs/Makefile.objs                             | 1 +
>>  memory_mapping-stub.c => stubs/memory_mapping.c | 5 +++--
>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>  rename memory_mapping-stub.c => stubs/memory_mapping.c (85%)
[...]
>> diff --git a/memory_mapping-stub.c b/stubs/memory_mapping.c
>> similarity index 85%
>> rename from memory_mapping-stub.c
>> rename to stubs/memory_mapping.c
>> index c48ea44..4db2108 100644
>> --- a/memory_mapping-stub.c
>> +++ b/stubs/memory_mapping.c
>> @@ -11,8 +11,9 @@
>>   *
>>   */
>>  
>> -#include "cpu.h"
>> -#include "exec/cpu-all.h"
>> +#include "qemu-common.h"
>> +#include "exec/cpu-common.h"
>> +#include "qom/cpu.h"
>>  #include "sysemu/memory_mapping.h"
>>  
>>  int qemu_get_guest_memory_mapping(MemoryMappingList *list)
>>
> 
> Patches 1-3 are fine.

Thanks.

>  But I wonder if a better replacement for stubs is
> methods in CPU.

None of the functions I have moved from *-stub.c to stubs/ operate on a
single CPU, so now that the conflict with the kdump format support has
been resolved I'd like to move them as a step towards dropping
per-target configure changes for guest-memory-dump support.

With my note in the cover letter I was rather referring to
cpu_paging_enabled(), which is mandatory currently without any stub.

Do you have a concrete suggestion what else to do for these stubs?

Andreas

-- 
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a
  2013-05-28  9:39     ` Andreas Färber
@ 2013-05-28  9:53       ` Paolo Bonzini
  0 siblings, 0 replies; 8+ messages in thread
From: Paolo Bonzini @ 2013-05-28  9:53 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Vincent Rabin, Qiao Nuohan, qemu-devel, Jens Freimann

Il 28/05/2013 11:39, Andreas Färber ha scritto:
> Am 23.05.2013 12:08, schrieb Paolo Bonzini:
>> Il 22/05/2013 15:09, Andreas Färber ha scritto:
>>> Allows us to drop CONFIG_NO_GET_MEMORY_MAPPING with its indirect
>>> dependency on CONFIG_HAVE_GET_MEMORY_MAPPING in Makefile.target.
>>>
>>> Signed-off-by: Andreas Färber <afaerber@suse.de>
>>> ---
>>>  Makefile.target                                 | 2 --
>>>  stubs/Makefile.objs                             | 1 +
>>>  memory_mapping-stub.c => stubs/memory_mapping.c | 5 +++--
>>>  3 files changed, 4 insertions(+), 4 deletions(-)
>>>  rename memory_mapping-stub.c => stubs/memory_mapping.c (85%)
> [...]
>>> diff --git a/memory_mapping-stub.c b/stubs/memory_mapping.c
>>> similarity index 85%
>>> rename from memory_mapping-stub.c
>>> rename to stubs/memory_mapping.c
>>> index c48ea44..4db2108 100644
>>> --- a/memory_mapping-stub.c
>>> +++ b/stubs/memory_mapping.c
>>> @@ -11,8 +11,9 @@
>>>   *
>>>   */
>>>  
>>> -#include "cpu.h"
>>> -#include "exec/cpu-all.h"
>>> +#include "qemu-common.h"
>>> +#include "exec/cpu-common.h"
>>> +#include "qom/cpu.h"
>>>  #include "sysemu/memory_mapping.h"
>>>  
>>>  int qemu_get_guest_memory_mapping(MemoryMappingList *list)
>>>
>>
>> Patches 1-3 are fine.
> 
> Thanks.
> 
>>  But I wonder if a better replacement for stubs is
>> methods in CPU.
> 
> None of the functions I have moved from *-stub.c to stubs/ operate on a
> single CPU,

cpu_get_memory_mapping and cpu_paging_enabled can be made methods in
CPU, can't they?

And as far as this patch is concerned, this only leaves out
qemu_get_guest_memory_mapping.  If you make cpu_paging_enabled and
cpu_get_memory_mapping return a different value for "not supported"
(e.g. -ENOSYS), qemu_get_guest_memory_mapping need not be a stub at all.

Paolo

 so now that the conflict with the kdump format support has
> been resolved I'd like to move them as a step towards dropping
> per-target configure changes for guest-memory-dump support.
> 
> With my note in the cover letter I was rather referring to
> cpu_paging_enabled(), which is mandatory currently without any stub.
> 
> Do you have a concrete suggestion what else to do for these stubs?
> 
> Andreas
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-05-28  9:53 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-05-22 13:09 [Qemu-devel] [PATCH qom-cpu 0/4] memory_mapping: Clean up stubs Andreas Färber
2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 1/4] memory_mapping: Use hwaddr type for MemoryMapping virt_addr field Andreas Färber
2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 2/4] memory_mapping: Change cpu_get_memory_mapping() argument to CPUState Andreas Färber
2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 3/4] memory_mapping: Change cpu_paging_enabled() " Andreas Färber
2013-05-22 13:09 ` [Qemu-devel] [PATCH qom-cpu 4/4] memory_mapping: Move stubs to libqemustub.a Andreas Färber
2013-05-23 10:08   ` Paolo Bonzini
2013-05-28  9:39     ` Andreas Färber
2013-05-28  9:53       ` Paolo Bonzini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.