[Qemu-devel] [PATCH 0/7] remove #if defined CONFIG_KVM || !defined NEED_CPU_H

2014-03-06 Thread Xuebing Wang
Hi Community, I am not sure if there is value for this patchset. After the first pach: Size of x86_64-softmmu/qemu-system-x86_64 is unchanged. Size of sh4-softmmu/qemu-system-sh4 increases by about 2.8KB. Xuebing Wang (7): kvm: remove the hack #if defined CONFIG_KVM || !defined NEED_CPU_H

[Qemu-devel] [PATCH 5/7] kvm-ppc: fix build for ppc64-softmmu

2014-03-06 Thread Xuebing Wang
The build issue was caused by the patch of removing #if defined CONFIG_KVM || !defined NEED_CPU_H Signed-off-by: Xuebing Wang xbi...@gmail.com --- target-ppc/kvm_ppc.h | 12 1 file changed, 12 insertions(+) diff --git a/target-ppc/kvm_ppc.h b/target-ppc/kvm_ppc.h index 5f78e4b

[Qemu-devel] [PATCH 3/7] kvm-i386: remove target-i386/kvm-stub.c

2014-03-06 Thread Xuebing Wang
To eliminate kvm-stub for target-i386. Size of text section of x86_64-linux-user/qemu-x86_64 is reduced by 104 bytes by inline these 2 functions. Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/sysemu/kvm.h |3 --- target-i386/Makefile.objs |1 - target-i386/cpu.c

[Qemu-devel] [PATCH 1/7] kvm: remove the hack #if defined CONFIG_KVM || !defined NEED_CPU_H

2014-03-06 Thread Xuebing Wang
is identical to before patch Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/sysemu/kvm.h | 13 - 1 file changed, 13 deletions(-) diff --git a/include/sysemu/kvm.h b/include/sysemu/kvm.h index a02d67c..1829206 100644 --- a/include/sysemu/kvm.h +++ b/include/sysemu/kvm.h @@ -49,7

[Qemu-devel] [PATCH 2/7] kvm-i386: fix build for x86_64-linux-user after applying previous patch

2014-03-06 Thread Xuebing Wang
As explained in previous patch, kvm functions won't be optimized out for non-CONFIG_KVM. Signed-off-by: Xuebing Wang xbi...@gmail.com --- target-i386/kvm-stub.c |6 -- 1 file changed, 6 deletions(-) diff --git a/target-i386/kvm-stub.c b/target-i386/kvm-stub.c index 2b9e801..0ef642d

[Qemu-devel] [PATCH 6/7] kvm-ppc: remove target-ppc/kvm-stub.c

2014-03-06 Thread Xuebing Wang
Size of text section of ppc64-softmmu/qemu-system-ppc64 is reduced by 152 bytes. Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/hw/ppc/openpic.h |1 - target-ppc/Makefile.objs |1 - target-ppc/kvm-stub.c| 18 -- target-ppc/kvm_ppc.h |5 + 4

[Qemu-devel] [PATCH 4/7] kvm: fix build for target sh4-softmmu

2014-03-06 Thread Xuebing Wang
The build issue was caused by the patch of removing #if defined CONFIG_KVM || !defined NEED_CPU_H Signed-off-by: Xuebing Wang xbi...@gmail.com --- kvm-stub.c |1 + 1 file changed, 1 insertion(+) diff --git a/kvm-stub.c b/kvm-stub.c index e979f76..f859249 100644 --- a/kvm-stub.c +++ b/kvm

[Qemu-devel] [PATCH 7/7] kvm-i386: fix build for x86_64-softmmu --disable-kvm

2014-03-06 Thread Xuebing Wang
Probably no one uses disable-kvm for x86_64. Also move 3 kvm-i386 function declarations from sysemu/kvm.h = target-i386/kvm_i386.h - kvm_pc_gsi_handler() - kvm_pc_setup_irq_routing() - kvm_i8259_init() Signed-off-by: Xuebing Wang xbi...@gmail.com --- hw/i386/kvm/i8259.c|2 +- hw

Re: [Qemu-devel] [PATCH v4 00/21] AArch64 system emulation (boots a kernel!)

2014-03-06 Thread Xuebing Wang
On 03/07/2014 03:32 AM, Peter Maydell wrote: This is v4 of the AArch64 system emulation patches, and it's an important milestone -- this is enough to boot a Linux kernel. Does this boot an aarch64 kernel with tcg on x86 host? -- Thanks, Xuebing Wang

Re: [Qemu-devel] [Discussion 01/10] docs: add docs/api-hierarchy.txt

2014-03-04 Thread Xuebing wang
On 03/04/2014 05:42 PM, Stefan Hajnoczi wrote: On Tue, Mar 04, 2014 at 10:47:21AM +0800, Xuebing Wang wrote: Signed-off-by: Xuebing Wang xbi...@gmail.com --- docs/api-hierarchy.txt | 93 1 file changed, 93 insertions(+) create mode 100644

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-04 Thread Xuebing wang
Hi Paolo, thanks for reviewing. On 03/04/2014 06:19 PM, Paolo Bonzini wrote: Hi, in general I agree with this patch. I have a few comments, and I suggest that you split it in multiple patches so that it's easier to get it in when each part is ready. I spent some time trying to reduce it.

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-04 Thread Xuebing wang
diff --git a/include/disas/disas.h b/include/disas/disas.h index c13ca9a..e5cdfd7 100644 --- a/include/disas/disas.h +++ b/include/disas/disas.h @@ -1,9 +1,9 @@ #ifndef _QEMU_DISAS_H #define _QEMU_DISAS_H -#include qemu-common.h - #ifdef NEED_CPU_H +#include cpu.h /* target-xxx/cpu.h,

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-04 Thread Xuebing wang
diff --git a/include/exec/gdbstub.h b/include/exec/gdbstub.h index a608a26..14addcb 100644 --- a/include/exec/gdbstub.h +++ b/include/exec/gdbstub.h @@ -11,6 +11,8 @@ #define GDB_WATCHPOINT_ACCESS4 #ifdef NEED_CPU_H +#include cpu.h /* target-xxx/cpu.h, required for target_ulong, +

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-04 Thread Xuebing wang
index 367eda1..f0157e3 100644 --- a/include/qom/cpu.h +++ b/include/qom/cpu.h @@ -510,18 +510,4 @@ void qemu_init_vcpu(CPUState *cpu); */ void cpu_single_step(CPUState *cpu, int enabled); -#ifdef CONFIG_SOFTMMU -extern const struct VMStateDescription vmstate_cpu_common; -#else -#define

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-04 Thread Xuebing wang
#ifdef CONFIG_KVM #include linux/kvm.h #include linux/kvm_para.h @@ -169,6 +178,7 @@ int kvm_init_vcpu(CPUState *cpu); int kvm_cpu_exec(CPUState *cpu); #ifdef NEED_CPU_H +#include cpu.h /* target-xxx/cpu.h, required for target_ulong */ void kvm_setup_guest_memory(void *start, size_t

Re: [Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-04 Thread Xuebing wang
Hi Peter, Thanks. You are correct, I don't know what I was thinking. :-) On 03/04/2014 08:34 PM, Peter Maydell wrote: On 4 March 2014 12:09, Xuebing wang xbi...@gmail.com wrote: target-*/gdbstub.c implementers only need to know gdbstub hooks (thus gdbstub API), they don't care cpu.h

[Qemu-devel] Using qemu to debug arm64 linux kernel

2014-03-03 Thread Xuebing wang
-aarch64 needs to be reliable. -- Thanks, Xuebing Wang

[Qemu-devel] [Discussion 01/10] docs: add docs/api-hierarchy.txt

2014-03-03 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- docs/api-hierarchy.txt | 93 1 file changed, 93 insertions(+) create mode 100644 docs/api-hierarchy.txt diff --git a/docs/api-hierarchy.txt b/docs/api-hierarchy.txt new file mode 100644 index

[Qemu-devel] [Discussion 00/10] about API hierarchy

2014-03-03 Thread Xuebing Wang
we move exec/def-helper.h = tcg/def-helper.h and exec/spinlock.h = include/qemu/spinlock.h, to reflect the definition of exec is: memory API, translation API and cpu API? After this patchset, cpu-all.h and exec-all.h should ONLY be included from target-xxx/*. Thanks. Xuebing Wang (10

[Qemu-devel] [Discussion 02/10] NEED_CPU_H: remove '#include cpu.h' from include/qemu-common.h

2014-03-03 Thread Xuebing Wang
- TARGET_PHYS_ADDR_SPACE_BITS, TARGET_VIRT_ADDR_SPACE_BITS And constructs that are derived from above, examples are: - target_long, target_ulong Examples of non-architecture-dependent are: - hwaddr - vaddr - ram_addr_t Signed-off-by: Xuebing Wang xbi...@gmail.com --- hw/dma/soc_dma.c|5

[Qemu-devel] [Discussion 05/10] NEED_CPU_H: remove unnecessary inclusion of cpu.h in root

2014-03-03 Thread Xuebing Wang
-all.h too. cpu-all.h is architecture-specific, should ONLY be included from target-xxx/* - 'git grep -nw cpu-all.h' confirms this Signed-off-by: Xuebing Wang xbi...@gmail.com --- arch_init.c |1 - cpu-exec.c |7 ++- cputlb.c |6 +- disas.c |7

[Qemu-devel] [Discussion 07/10] memory: remove file include/exec/address-spaces.h

2014-03-03 Thread Xuebing Wang
Remove '#include exec/address-spaces.h' is done by: git grep -w exec\/address-spaces.h | cut -d: -f1 | xargs sed -i '/exec\/address-spaces.h/d' Signed-off-by: Xuebing Wang xbi...@gmail.com --- arch_init.c |1 - cputlb.c |1

[Qemu-devel] [Discussion 06/10] memory: move contents in include/exec/address-spaces.h = memory.h

2014-03-03 Thread Xuebing Wang
In preparation for removing include/exec/address-spaces.h Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/exec/address-spaces.h | 29 - include/exec/memory.h | 19 +++ include/hw/sh4/sh_intc.h |1 + 3 files changed, 16

[Qemu-devel] [Discussion 08/10] exec: move TranslationBlock API from exec-all.h = translate.h

2014-03-03 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/exec/exec-all.h | 302 + include/exec/translate.h | 306 ++ 2 files changed, 307 insertions(+), 301 deletions(-) create mode 100644 include/exec

[Qemu-devel] [Discussion 10/10] translate: remove file translate-all.h

2014-03-03 Thread Xuebing Wang
This patch does below: - Move the declaration of 2 translate functions from translate-all.h into include/exec/translate.h - remove file translate-all.h Signed-off-by: Xuebing Wang xbi...@gmail.com --- exec.c |2 -- include/exec/translate.h |4 translate

[Qemu-devel] [Discussion 03/10] NEED_CPU_H: remove unnecessary use of NEED_CPU_H

2014-03-03 Thread Xuebing Wang
Note: there is a FIXME to be addressed in this patch. For every appearance of NEED_CPU_H, there must be '#include cpu.h' to include target-xxx/cpu.h, because the code below NEED_CPU_H depends on architecture-specific information. Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/exec/cpu

[Qemu-devel] [Discussion 09/10] exec: remove the unnecessary include of exec-all.h

2014-03-03 Thread Xuebing Wang
include/exec/exec-all.h should ONLY be included in target-xxx/* - 'git grep -nw exec-all.h' confirms this Signed-off-by: Xuebing Wang xbi...@gmail.com --- cputlb.c |1 - tcg/README |2 +- tci.c |2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/cputlb.c b

[Qemu-devel] [Discussion 04/10] memory_mapping: make this architecture-independent

2014-03-03 Thread Xuebing Wang
Use vaddr (instead of target_ulong) for virtual address. See document HACKING for more information about vaddr and target_ulong. Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/sysemu/memory_mapping.h |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include

Re: [Qemu-devel] [Discussion 00/10] about API hierarchy

2014-03-03 Thread Xuebing wang
Hi Andreas, thank you very much for your reply. Would you please help review/correct doc/api-hierarchy too? On 03/04/2014 11:45 AM, Andreas Färber wrote: Hi Xuebing, Am 04.03.2014 03:47, schrieb Xuebing Wang: Q2) Does it make sense to remove NEED_CPU_H from qemu-common.h? IMO

[Qemu-devel] [PULL 2/7] timer: make QEMUTimerList functions private (remove from APIs)

2014-03-02 Thread Xuebing Wang
This patch does below: - Make QEMUTimerList functions private (remove from APIs) - Comment out function QEMUTimerList timerlist_get_clock() in order to fix compile error Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh a...@alex.org.uk --- include/qemu/timer.h | 94

[Qemu-devel] [PULL 0/7] refactor timer

2014-03-02 Thread Xuebing Wang
#include and use minimal required #include Xuebing Wang (7): timer: move QEMUTimerList functions together timer: make QEMUTimerList functions private (remove from APIs) timer: move QEMUClockType related functions

[Qemu-devel] [PULL 1/7] timer: move QEMUTimerList functions together

2014-03-02 Thread Xuebing Wang
: -- There is already information in the header file include/qemu/timer.h -- As above part of the information is wrong /* * As above, but return -1 for no deadline, and do not cap to 2^32 * as we know the result is always positive. */ Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh

[Qemu-devel] [PULL 7/7] timer: clean unnecessary #include and use minimal required #include

2014-03-02 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh a...@alex.org.uk --- qemu-timer.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index e592c14..21aff82 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -22,13 +22,10

[Qemu-devel] [PULL 3/7] timer: move QEMUClockType related functions together

2014-03-02 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh a...@alex.org.uk --- qemu-timer.c | 160 ++ 1 file changed, 82 insertions(+), 78 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 2db87ba..471150c 100644

[Qemu-devel] [PULL 5/7] timer: move QEMUTimer related functions together

2014-03-02 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh a...@alex.org.uk --- qemu-timer.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 6f13a76..c9801da 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -548,6

[Qemu-devel] [PULL 4/7] timer: move QEMUTimerListGroup function to be below QEMUClockType

2014-03-02 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh a...@alex.org.uk --- qemu-timer.c | 86 ++ 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 471150c..6f13a76 100644

[Qemu-devel] [PULL 6/7] timer: move general utility functions together

2014-03-02 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com Reviewed-By: Alex Bligh a...@alex.org.uk --- qemu-timer.c | 97 ++ 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index c9801da..e592c14 100644

Re: [Qemu-devel] QEMU on ARM64

2014-02-28 Thread Xuebing wang
quality. I expect we'll have this done within a month or two, but it won't make it into the QEMU 2.0 release (slightly too late). Hi Peter, Would you please point to me where can I get this work-in-progress code? -- Thanks, Xuebing Wang

Re: [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model

2014-02-27 Thread Xuebing wang
, Xuebing Wang

Re: [Qemu-devel] Debugging aarch64 guest running on Foundationv8 model

2014-02-27 Thread Xuebing wang
seems use 32-bit ARM cpu model whereas I have need to use 64-bit ARM cpu model as I have specified by -cpu host qemu parameter in Foundationv8 model. -Jani 2014-02-27 14:21 GMT+01:00 Xuebing wang xbi...@gmail.com mailto:xbi...@gmail.com: Hi Jani, Is below video similar to what you

[Qemu-devel] [PATCH] translate: remove file translate-all.h

2014-02-26 Thread Xuebing Wang
\/exec-all.h/g' Note: 1) exact whole word match is considered. 2) We may move translate related from include/exec/exec-all.h into include/exec/translate.h later. Signed-off-by: Xuebing Wang xbi...@gmail.com --- exec.c |2 +- include/exec/exec-all.h |4 translate

Re: [Qemu-devel] [PATCH] translate: remove file translate-all.h

2014-02-26 Thread Xuebing wang
Bonzini wrote: Il 26/02/2014 10:55, Peter Maydell ha scritto: On 26 February 2014 09:25, Xuebing Wang xbi...@gmail.com wrote: This patch does below: - Move the declaration of 2 translate functions from translate-all.h into include/exec/exec-all.h - remove file translate-all.h translate

Re: [Qemu-devel] How is address of helper function for slow path calculated ?

2014-02-26 Thread Xuebing wang
]' ...) tcg_out_calli spots that the displacement is too big for a call insn and emits the 0x2aaade72d12c: mov$0x2afd98602c10,%r10 0x2aaade72d136: callq *%r10 // Call helper function thanks -- PMM -- Thanks, Xuebing Wang

[Qemu-devel] [PATCH 1/7] timer: move QEMUTimerList functions together

2014-02-25 Thread Xuebing Wang
: -- There is already information in the header file include/qemu/timer.h -- As above part of the information is wrong /* * As above, but return -1 for no deadline, and do not cap to 2^32 * as we know the result is always positive. */ Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/qemu/timer.h

[Qemu-devel] [PATCH 0/7] timer: move APIs together according to their category

2014-02-25 Thread Xuebing Wang
them private - put QEMUClockType related functions together - move QEMUTimerListGroup function to be below QEMUClockType - put QEMUTimer related functions together - put general utility functions together - clean unnecessary #include and use minimal required #include Xuebing Wang (7): timer: move

[Qemu-devel] [PATCH 3/7] timer: move QEMUClockType related functions together

2014-02-25 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- qemu-timer.c | 160 ++ 1 file changed, 82 insertions(+), 78 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 2db87ba..471150c 100644 --- a/qemu-timer.c +++ b/qemu-timer.c

[Qemu-devel] [PATCH 5/7] timer: move QEMUTimer related functions together

2014-02-25 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- qemu-timer.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 6f13a76..c9801da 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -548,6 +548,9 @@ int qemu_poll_ns(GPollFD *fds

[Qemu-devel] [PATCH 6/7] timer: move general utility functions together

2014-02-25 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- qemu-timer.c | 97 ++ 1 file changed, 50 insertions(+), 47 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index c9801da..e592c14 100644 --- a/qemu-timer.c +++ b/qemu-timer.c

[Qemu-devel] [PATCH 7/7] timer: clean unnecessary #include and use minimal required #include

2014-02-25 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- qemu-timer.c |9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index e592c14..21aff82 100644 --- a/qemu-timer.c +++ b/qemu-timer.c @@ -22,13 +22,10 @@ * THE SOFTWARE. */ -#include

[Qemu-devel] [PATCH 4/7] timer: move QEMUTimerListGroup function to be below QEMUClockType

2014-02-25 Thread Xuebing Wang
Signed-off-by: Xuebing Wang xbi...@gmail.com --- qemu-timer.c | 86 ++ 1 file changed, 45 insertions(+), 41 deletions(-) diff --git a/qemu-timer.c b/qemu-timer.c index 471150c..6f13a76 100644 --- a/qemu-timer.c +++ b/qemu-timer.c

[Qemu-devel] [PATCH 2/7] timer: make QEMUTimerList functions private (remove from APIs)

2014-02-25 Thread Xuebing Wang
This patch does below: - Make QEMUTimerList functions private (remove from APIs) - Comment out function QEMUTimerList timerlist_get_clock() in order to fix compile error Signed-off-by: Xuebing Wang xbi...@gmail.com --- include/qemu/timer.h | 94

[Qemu-devel] Questions about timer

2014-02-22 Thread Xuebing Wang
this? - qemu_clock_warp - timer_get and timer_put - cpu_get_ticks, cpu_enable_ticks, cpu_disable_ticks Q4) Do we need this API qemu_clock_get_main_loop_timerlist? -- Thanks, Xuebing Wang