Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-09-10 Thread Chen Gang
On 2015年08月12日 17:00, gchen gchen wrote:
> 
>  - At present, x86_64 laptop run arm linux-user run i386 linux-user run
>wine run Windows i386 graphic programs are OK, the performance is
>acceptable! the qemu code keeps no touch -- our qemu is very good!!!.
> 

Oh, sorry, wine will use execve(), then qemu will use host execve(),
under x86_64, the i386 wine will be executed directly.

But I guess, at present, the performance is still OK, I have let i386
xcalc run successfully under sw_64. It looks very good. :-)

Next, I shall have to analyze wine, too, so can let wine and qemu work
together correctly.

Welcome any ideas, suggestions, and completions.

Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed



Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread Richard Henderson
On 08/12/2015 12:59 AM, gchen gchen wrote:
 Nack.  There's 99 problems with host page size guest page size.  This
 solves none of them, and in the hackiest way possible.

 
 Under alpha virtual machine, if set i386 guest page size 8KB, it will
 cause failure directly (any dynamically linked binaries can not work).

Yes, I know.  The same thing happens when running i386 guests on other
(non-virtual) hosts.  E.g. Sparc64's 8kB page, PowerPC64's 64kB page.

 Do you have any other ideas for solving this issue?

The only complete solution that I see is to use softmmu with linux-user, so
that we properly emulate the guest pages.  Yes, it will cause quite some
slow-down in emulation, but I believe it's the only reliable way.


r~



Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread Alexander Graf


 Am 13.08.2015 um 04:45 schrieb gchen gchen xili_gchen_5...@hotmail.com:
 
 On 2015年08月12日 23:06, Richard Henderson wrote:
 On 08/12/2015 12:59 AM, gchen gchen wrote:
 Nack.  There's 99 problems with host page size guest page size.  This
 solves none of them, and in the hackiest way possible.
 
 Under alpha virtual machine, if set i386 guest page size 8KB, it will
 cause failure directly (any dynamically linked binaries can not work).
 
 Yes, I know.  The same thing happens when running i386 guests on other
 (non-virtual) hosts.  E.g. Sparc64's 8kB page, PowerPC64's 64kB page.
 
 Yes. The reason why I am only focus on Alpha is the machine which I am
 working for is almost the same as Alpha. But this machine is very slow,
 its performance maybe like 10 years ago's x86_64 laptop.

What does Almost the same as Alpha mean? Does it use 8k or 4k page size?

 
 Do you have any other ideas for solving this issue?
 
 The only complete solution that I see is to use softmmu with linux-user, so
 that we properly emulate the guest pages.  Yes, it will cause quite some
 slow-down in emulation, but I believe it's the only reliable way.
 
 I have tried softmmu, for me, the performance is not acceptable, we can
 not use this way.

Softmmu but without system emulation. Performance should be about half of 
today's linux-user.


Alex




Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
On 2015年08月12日 23:06, Richard Henderson wrote:brgt; On 08/12/2015 12:59 AM, 
gchen gchen wrote:brgt;gt;gt; Nack.  There's 99 problems with host page 
sizegt; guest page size.  Thisbrgt;gt;gt; solves none of them, and in the 
hackiest way possible.brgt;gt;gt;brgt;gt;brgt;gt; Under alpha 
virtual machine, if set i386 guest page size 8KB, it willbrgt;gt; cause 
failure directly (any dynamically linked binaries can not 
work).brgt;brgt; Yes, I know.  The same thing happens when running i386 
guests on otherbrgt; (non-virtual) hosts.  E.g. Sparc64's 8kB page, 
PowerPC64's 64kB page.brgt;brbrYes. The reason why I am only focus on 
Alpha is the machine which I ambrworking for is almost the same as Alpha. 
But this machine is very slow,brits performance maybe like 10 years ago's 
x86_64 laptop.brbrgt;gt; Do you have any other ideas for solving this 
issue?brgt;brgt; The only complete solution that I see is to use softmmu 
with linux-user, sobrgt; that we properly emulate the guest pages.  Yes, it 
will cause quite somebrgt; slow-down in emulation, but I believe it's the 
only reliable way.brgt;brbrI have tried softmmu, for me, the performance 
is not acceptable, we canbrnot use this way.brbrOur main goal is let 
most of Windows XP graphic free programs (but notbropen source), can be used 
by user under Alpha like machine, also itsbrperformance and stability are 
acceptable.brbrbrThanks.br--brChen GangbrbrOpen, share, and 
attitude like air, water, and life which God blessedbr


Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
On 2015年08月12日 23:06, Richard Henderson wrote:
 On 08/12/2015 12:59 AM, gchen gchen wrote:
 Nack.  There's 99 problems with host page size guest page size.  This
 solves none of them, and in the hackiest way possible.


 Under alpha virtual machine, if set i386 guest page size 8KB, it will
 cause failure directly (any dynamically linked binaries can not work).

 Yes, I know.  The same thing happens when running i386 guests on other
 (non-virtual) hosts.  E.g. Sparc64's 8kB page, PowerPC64's 64kB page.


Yes. The reason why I am only focus on Alpha is the machine which I am
working for is almost the same as Alpha. But this machine is very slow,
its performance maybe like 10 years ago's x86_64 laptop.

 Do you have any other ideas for solving this issue?

 The only complete solution that I see is to use softmmu with linux-user, so
 that we properly emulate the guest pages.  Yes, it will cause quite some
 slow-down in emulation, but I believe it's the only reliable way.


I have tried softmmu, for me, the performance is not acceptable, we can
not use this way.

Our main goal is let most of Windows XP graphic free programs (but not
open source), can be used by user under Alpha like machine, also its
performance and stability are acceptable.


Thanks.
--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
  

[Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
Under Alpha host, for ubuntu12.04.5 i386 guest, it will cause failure:
Invalid ELF image for this architecture.

The related issue commit is a70daba linux-user: Tell guest about big
host page sizes.

Signed-off-by: Chen Gang gang.chen.5...@gmail.com
---
 linux-user/elfload.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index 1788368..f4cf9b6 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -1614,7 +1614,11 @@ static abi_ulong create_elf_tables(abi_ulong p, int 
argc, int envc,
 NEW_AUX_ENT(AT_PHDR, (abi_ulong)(info-load_addr + exec-e_phoff));
 NEW_AUX_ENT(AT_PHENT, (abi_ulong)(sizeof (struct elf_phdr)));
 NEW_AUX_ENT(AT_PHNUM, (abi_ulong)(exec-e_phnum));
+#ifdef TARGET_I386
+NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)TARGET_PAGE_SIZE);
+#else
 NEW_AUX_ENT(AT_PAGESZ, (abi_ulong)(MAX(TARGET_PAGE_SIZE, getpagesize(;
+#endif
 NEW_AUX_ENT(AT_BASE, (abi_ulong)(interp_info ? interp_info-load_addr : 
0));
 NEW_AUX_ENT(AT_FLAGS, (abi_ulong)0);
 NEW_AUX_ENT(AT_ENTRY, info-entry);
--
1.9.1
  

Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread Richard Henderson

On 08/11/2015 11:03 PM, gchen gchen wrote:

Under Alpha host, for ubuntu12.04.5 i386 guest, it will cause failure:
Invalid ELF image for this architecture.

The related issue commit is a70daba linux-user: Tell guest about big
host page sizes.

Signed-off-by: Chen Ganggang.chen.5...@gmail.com
---
  linux-user/elfload.c | 4 
  1 file changed, 4 insertions(+)


Nack.  There's 99 problems with host page size  guest page size.  This solves 
none of them, and in the hackiest way possible.



r~



Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
On 2015年08月12日 14:45, Richard Henderson wrote:
 On 08/11/2015 11:03 PM, gchen gchen wrote:
 Under Alpha host, for ubuntu12.04.5 i386 guest, it will cause failure:
 Invalid ELF image for this architecture.

 The related issue commit is a70daba linux-user: Tell guest about big
 host page sizes.

 Signed-off-by: Chen Ganggang.chen.5...@gmail.com
 ---
   linux-user/elfload.c | 4 
   1 file changed, 4 insertions(+)

 Nack.  There's 99 problems with host page size guest page size.  This
 solves none of them, and in the hackiest way possible.


Under alpha virtual machine, if set i386 guest page size 8KB, it will
cause failure directly (any dynamically linked binaries can not work).

This fix can let i386 bash/cp/vi/ls run under alpha virtual machine,
although there maybe be many other issues (which I did not meet, now).

Do you have any other ideas for solving this issue?  e.g. can we rebuild
all i386 programs with segment alignment to 8KB? I am not quite sure,
but some i386 programs (which are interested in) have no source code!
:-(.


Thanks.
--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed
  

Re: [Qemu-devel] [PATCH] linux-user: elfload: Still use TARGET_PAGE_SIZE for i386 guest

2015-08-12 Thread gchen gchen
On 2015年08月12日 15:59, gchen gchen wrote:
 On 2015年08月12日 14:45, Richard Henderson wrote:
 On 08/11/2015 11:03 PM, gchen gchen wrote:
 Under Alpha host, for ubuntu12.04.5 i386 guest, it will cause failure:
 Invalid ELF image for this architecture.

 The related issue commit is a70daba linux-user: Tell guest about big
 host page sizes.

 Signed-off-by: Chen Ganggang.chen.5...@gmail.com
 ---
   linux-user/elfload.c | 4 
   1 file changed, 4 insertions(+)

 Nack.  There's 99 problems with host page size guest page size.  This
 solves none of them, and in the hackiest way possible.


 Under alpha virtual machine, if set i386 guest page size 8KB, it will
 cause failure directly (any dynamically linked binaries can not work).

 This fix can let i386 bash/cp/vi/ls run under alpha virtual machine,
 although there maybe be many other issues (which I did not meet, now).

 Do you have any other ideas for solving this issue?  e.g. can we rebuild
 all i386 programs with segment alignment to 8KB? I am not quite sure,
 but some i386 programs (which are interested in) have no source code!
 :-(.


By the way, the patches about the alpha are my current work, I can do
it during my work time, it will have no any negative effect with my
tilegx linux-user development in my free time. :-)

One of my current work contents are: run ubuntu12.04.5 (no graphic)
under alpha virtual machine, and run wine under ubuntu12.04.5 i386
guest under ubuntu alpha vm, and wine will run Win32 graphic programs.

 - I want to x86_64 laptop run Alpha linux-user run i386 linux-user run
   wine run Win32 graphic programs. I guess, I need build X libs under
   ubuntu Alpha vm (which nographic) -- use them for alpha linux-user.

 - At present, x86_64 laptop run arm linux-user run i386 linux-user run
   wine run Windows i386 graphic programs are OK, the performance is
   acceptable! the qemu code keeps no touch -- our qemu is very good!!!.


Welcome any ideas, suggestions and completions.

Thanks.
--
Chen Gang

Open, share, and attitude like air, water, and life which God blessed