Re: Blank screen for hello world qemu-4.2.0

2021-07-23 Thread Peter Maydell
On Thu, 22 Jul 2021 at 22:27, abhijeet inamdar
 wrote:
>
> Hi,
>
> I downloaded the qemu-6.0.0. When I did ./configure inside qemu-6.0.0 
> directory it say
> ERROR: Cannot find ninja
>
> wherein I did install pip3 install Ninja.
>
> What should I do?

You should install ninja, which is not a Python program. It is
provided by Ubuntu, Debian, RedHat and Centos (and probably other
distros) in a package named 'ninja-build'.

-- PMM



Re: Blank screen for hello world qemu-4.2.0

2021-07-23 Thread abhijeet inamdar
Hi,

What information does this give me and how do I need to sort it out?

after running qemu-system-arm along with -d
in_asm,int,exec,cpu,guest_errors,unimp in the end i get this:
IN: Reset_Handler
0x050c:  f7ff fff0  bl   #0x4f0

Trace 0: 0x7f27e05ce100 [/050c/0x11c1] Reset_Handler
R00= R01= R02= R03=
R04= R05= R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14= R15=050c
XPSR=4100 -Z-- T priv-thread

IN: SystemInit
0x04f0:  4770   bx   lr

Linking TBs 0x7f27e05ce100 [050c] index 0 -> 0x7f27e05ce200 [04f0]
Trace 0: 0x7f27e05ce200 [/04f0/0x11c1] SystemInit
R00= R01= R02= R03=
R04= R05= R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=04f0
XPSR=4100 -Z-- T priv-thread

IN: Reset_Handler
0x0510:  4c19   ldr  r4, [pc, #0x64]
0x0512:  4d1a   ldr  r5, [pc, #0x68]
0x0514:  42ac   cmp  r4, r5
0x0516:  da0a   bge  #0x52e

Trace 0: 0x7f27e05ce340 [/0510/0x11c1] Reset_Handler
R00= R01= R02= R03=
R04= R05= R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=0510
XPSR=4100 -Z-- T priv-thread

IN: Reset_Handler
0x0518:  6821   ldr  r1, [r4]
0x051a:  6862   ldr  r2, [r4, #4]
0x051c:  68a3   ldr  r3, [r4, #8]
0x051e:  009b   lsls r3, r3, #2
0x0520:  3b04   subs r3, #4
0x0522:  bfa2   ittt ge
0x0524:  58c8   ldrger0, [r1, r3]
0x0526:  50d0   strger0, [r2, r3]
0x0528:  e7fa   bge  #0x520

Linking TBs 0x7f27e05ce340 [0510] index 1 -> 0x7f27e05ce580 [0518]
Trace 0: 0x7f27e05ce580 [/0518/0x11c1] Reset_Handler
R00= R01= R02= R03=
R04=23e8 R05=23f4 R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=0518
XPSR=8100 N--- T priv-thread

IN: Reset_Handler
0x0520:  3b04   subs r3, #4
0x0522:  bfa2   ittt ge
0x0524:  58c8   ldrger0, [r1, r3]
0x0526:  50d0   strger0, [r2, r3]
0x0528:  e7fa   bge  #0x520

Linking TBs 0x7f27e05ce580 [0518] index 0 -> 0x7f27e05ce900 [0520]
Trace 0: 0x7f27e05ce900 [/0520/0x11c1] Reset_Handler
R00= R01=23f4 R02=2000 R03=0188
R04=23e8 R05=23f4 R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=0520
XPSR=2100 --C- T priv-thread
Linking TBs 0x7f27e05ce900 [0520] index 0 -> 0x7f27e05ce900 [0520]
Trace 0: 0x7f27e05ce900 [/0520/0x11c1] Reset_Handler
R00=039d R01=23f4 R02=2000 R03=0184
R04=23e8 R05=23f4 R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=0520
XPSR=2100 --C- T priv-thread

IN: Reset_Handler
0x052a:  340c   adds r4, #0xc
0x052c:  e7f2   b#0x514

Linking TBs 0x7f27e05ce900 [0520] index 1 -> 0x7f27e05ceb80 [052a]
Trace 0: 0x7f27e05ceb80 [/052a/0x11c1] Reset_Handler
R00= R01=23f4 R02=2000 R03=fffc
R04=23e8 R05=23f4 R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=052a
XPSR=8100 N--- T priv-thread

IN: Reset_Handler
0x0514:  42ac   cmp  r4, r5
0x0516:  da0a   bge  #0x52e

Linking TBs 0x7f27e05ceb80 [052a] index 0 -> 0x7f27e05cecc0 [0514]
Trace 0: 0x7f27e05cecc0 [/0514/0x11c1] Reset_Handler
R00= R01=23f4 R02=2000 R03=fffc
R04=23f4 R05=23f4 R06= R07=
R08= R09= R10= R11=
R12= R13=20002000 R14=0511 R15=0514
XPSR=0100  T priv-thread

IN: Reset_Handler
0x052e:  4914   ldr  r1, [pc, #0x50]
0x0530:  4a14   ldr  r2, [pc, #0x50]
0x0532:  4b15   ldr  r3, [pc, #0x54]
0x0534:  429a   cmp  r2, r3
0x0536:  bfbe   ittt lt
0x0538:  f851 0b04  ldrltr0, [r1], #4
0x053c:  f842 0b04  strltr0, [r2], #4
0x0540:  e7f8   blt  #0x534

Linking TBs 0x7f27e05cecc0 [0514] index 0 -> 0x7f27e05cee40 [052e]
Trace 0: 0x7f27e05cee40 [/052e/0x11c1] Reset_Handler
R00= R01=23f4 R02=2000 R03=fffc
R04=23f4 R05=23f4 R06= R07=
R08=00

Re: Blank screen for hello world qemu-4.2.0

2021-07-23 Thread Peter Maydell
On Fri, 23 Jul 2021 at 11:41, abhijeet inamdar
 wrote:
>
> Hi,
>
> What information does this give me and how do I need to sort it out?
>
> after running qemu-system-arm along with -d 
> in_asm,int,exec,cpu,guest_errors,unimp in the end i get this:

Adding '-d nochain' and '-singlestep' will make the tracing a bit clearer.
Or you can use the gdbstub.


> Taking exception 4 [Data Abort]
> ...with CFSR.PRECISERR and BFAR 0x7d0
> ...BusFault with BFSR.STKERR
> ...taking pending nonsecure exception 3
> 

Your program has crashed early in its startup because it tried
to dereference an invalid address (0x7d0). You need to
debug it to figure out where it got that address from.

> IN: HardFault_Handler
> 0x0572:  e7fe   b#0x572

Your program's handler for HardFault (the exception you get for
this data abort) is just "branch to self in a tight loop",
so the guest sits there doing nothing further.

-- PMM



Re: Blank screen for hello world qemu-4.2.0

2021-07-23 Thread abhijeet inamdar
Means the memory mapping is not done correctly.

I have added '-d nochain' and '-singlestep' to the command line it gives me
never ending

 Trace 0: 0x7ff207a5eac0 [/0572/0x312000c1] HardFault_Handler
R00=218c R01= R02=2264 R03=2264
R04=23f4 R05=23f4 R06= R07=
R08= R09= R10= R11=
R12= R13=07e0 R14=fff9 R15=0572
XPSR=6103 -ZC- T handler

Until i kill it.


On Fri, Jul 23, 2021 at 12:47 PM Peter Maydell 
wrote:

> On Fri, 23 Jul 2021 at 11:41, abhijeet inamdar
>  wrote:
> >
> > Hi,
> >
> > What information does this give me and how do I need to sort it out?
> >
> > after running qemu-system-arm along with -d
> in_asm,int,exec,cpu,guest_errors,unimp in the end i get this:
>
> Adding '-d nochain' and '-singlestep' will make the tracing a bit clearer.
> Or you can use the gdbstub.
>
>
> > Taking exception 4 [Data Abort]
> > ...with CFSR.PRECISERR and BFAR 0x7d0
> > ...BusFault with BFSR.STKERR
> > ...taking pending nonsecure exception 3
> > 
>
> Your program has crashed early in its startup because it tried
> to dereference an invalid address (0x7d0). You need to
> debug it to figure out where it got that address from.
>
> > IN: HardFault_Handler
> > 0x0572:  e7fe   b#0x572
>
> Your program's handler for HardFault (the exception you get for
> this data abort) is just "branch to self in a tight loop",
> so the guest sits there doing nothing further.
>
> -- PMM
>


Re: Blank screen for hello world qemu-4.2.0

2021-07-23 Thread Peter Maydell
On Fri, 23 Jul 2021 at 13:05, abhijeet inamdar
 wrote:
>
> Means the memory mapping is not done correctly.
>
> I have added '-d nochain' and '-singlestep' to the command line it gives me 
> never ending
>
>  Trace 0: 0x7ff207a5eac0 [/0572/0x312000c1] HardFault_Handler
> R00=218c R01= R02=2264 R03=2264
> R04=23f4 R05=23f4 R06= R07=
> R08= R09= R10= R11=
> R12= R13=07e0 R14=fff9 R15=0572
> XPSR=6103 -ZC- T handler
>
> Until i kill it.

Well, of course it does -- I already told you your guest code goes
into an infinite loop in its HardFault handler. The part of the trace
that will tell you what is going wrong is before that.

-- PMM



How to clean up unused qcow2 clusters

2021-07-23 Thread Jakob Bohm

Hi,

As is well known, qcow2 files contain a large number of
reference counted clusters that correspond roughly to file
system blocks.

As snapshots are deleted, many clusters will become logically
freed (they are no longer referenced by any image or snapshot).

My main question is how to remove, or at least zero out, those
unused host clusters, assuming the qcow2 file is not busy (because
the virtual machine is stopped and the virtual disk is not
being accessed with any other tool)?

My secondary question is why the qcow2 specification (qcow2.txt)
is not installed with the other documentation files, and why there
is no corresponding web page (not even in the qemu Wiki)?

Enjoy

Jakob
--
Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded