Re: [Qemu-devel] [PATCH]: sh4 delay slot code update

2007-11-29 Thread Magnus Damm
On Nov 29, 2007 2:55 PM, Paul Mundt [EMAIL PROTECTED] wrote:
 The only thing to be careful of is the ordering semantics for the T-bit
 state, which is what I tried to convey in the code snippet.

   You can see an example in arch/sh/kernel/entry-common.S:
  
   syscall_exit_work:
   ! r0: current_thread_info-flags
   ! r8: current_thread_info
   tst #_TIF_SYSCALL_TRACE | _TIF_SINGLESTEP | 
   _TIF_SYSCALL_AUDIT, r0
   bt/swork_pending
tst#_TIF_NEED_RESCHED, r0
  
   
   work_pending:
   ! r0: current_thread_info-flags
   ! r8: current_thread_info
   ! t:  result of tst#_TIF_NEED_RESCHED, r0
   bf/swork_resched
tst#(_TIF_SIGPENDING | _TIF_RESTORE_SIGMASK), r0
  
 So while bt/s is conditional on the first flag test, the T-state is
 relative to the second test by the time the branch happens.

Exactly.

 The T-state check for bt/bf happens _prior_ to execution of the delay
 slot instruction, while any delay-slot resident T-bit modifier is
 executed by the time we enter the branch. I don't know if your code
 handles that or not, but figured it's probably good to make that
 explicit. T-bit modifiers are always a bit hairy..

Yeah, the T flag is indeed a bit hairy. The patch should handle the T
bit exactly as you describe it. As part of the bt/bf instruction the T
flag is evaluated and if true the the DELAY_SLOT_TRUE bit is set. This
bit is later used to decide if we should jump or not after the delay
slot instruction.

Thank you,

/ magnus




Re: [Qemu-devel] [PATCH]: sh4 delay slot code update

2007-11-29 Thread Paul Mundt
On Thu, Nov 29, 2007 at 06:18:32PM +0900, Magnus Damm wrote:
 On Nov 29, 2007 2:55 PM, Paul Mundt [EMAIL PROTECTED] wrote:
  The T-state check for bt/bf happens _prior_ to execution of the delay
  slot instruction, while any delay-slot resident T-bit modifier is
  executed by the time we enter the branch. I don't know if your code
  handles that or not, but figured it's probably good to make that
  explicit. T-bit modifiers are always a bit hairy..
 
 Yeah, the T flag is indeed a bit hairy. The patch should handle the T
 bit exactly as you describe it. As part of the bt/bf instruction the T
 flag is evaluated and if true the the DELAY_SLOT_TRUE bit is set. This
 bit is later used to decide if we should jump or not after the delay
 slot instruction.
 
Ok, I have no objection to these changes then.




[Qemu-devel] AltGR-Key in QEmu-VNC

2007-11-29 Thread Elmar Haneke
When using VNC Server build into qemu the AltGr-Key seems to be ignored.

The alternative Ctrl-Alt seems to work (at least when usind linux based
VNC-client)  but it is less comfortable to press three keys.

The -k de switch is in use.

Any idea how to fix it?

Elmar





[Qemu-devel] multiple virtual network with qemu

2007-11-29 Thread nik600
Hi

i'm trying to set up some virtual network with qemu but i'm
experiencing some problems:

starting the hosted system with dhcp it gets the ip 10.0.2.15 and gw
10.0.2.2, if i activate the forwarding ip on the hosting system all
works fine.

But i'd like to do something like that:


- gw (192.168.1.1)
 | - hosting machine (192.168.1.2)
| - virtual ip (192.168.1.3) - NAT - emulated system 1
(10.0.2.15)
| - virtual ip (192.168.1.4) - NAT - emulated system 2
(10.0.2.16)


Or if it possible


- gw (192.168.1.1)
 | - hosting machine (192.168.1.2)
| - virtual ip (192.168.1.3) - emulated system 1 (192.168.1.3)
| - virtual ip (192.168.1.4) - emulated system 2 (192.168.1.4)


Can i do that?

Thanks
-- 
/*/
nik600
https://sourceforge.net/projects/ccmanager
https://sourceforge.net/projects/reportmaker
https://sourceforge.net/projects/nikstresser




Re: [Qemu-devel] [PATCH 1/2] Add directio parameter to -drive

2007-11-29 Thread Laurent Vivier
Le mercredi 28 novembre 2007 à 14:24 +, Samuel Thibault a écrit :
 Hi,
 
 Laurent Vivier, le Wed 28 Nov 2007 15:02:50 +0100, a écrit :
  +ret = posix_memalign((void**)buf, 0x200, 512);
 
 For making this more easily portable, maybe it should be a new
 qemu_memalign() function?  Also, the alignment may probably be better as
 a global macro, since the alignment requirements depend on the OS.

In fact, I think I should use qemu_vmalloc().
I modify the patch for that.

Laurent
-- 
- [EMAIL PROTECTED]  --
   Any sufficiently advanced technology is
  indistinguishable from magic. - Arthur C. Clarke


signature.asc
Description: Ceci est une partie de message	numériquement signée


[Qemu-devel] [PATCH sh4: system emulator interrupt update

2007-11-29 Thread Magnus Damm
Hi everyone,

This patch updates the interrupt and exception code for the sh4 system
emulator. Together with the delay slot patch posted yesterday this
patch implements working interrupts for the sh4 system emulator. There
are unfortunately no sources that actually hook up to the interrupt
controller yet - will post a patch for sh_timer in the near future.
Changes included in this patch:

- sh_intc now fully emulates intc registers and deliver interrupts
- do_interrupt()  is updated to hook in sh_intc interrupts
- code to call do_interrupt() for sh4 is added in cpu-exec.c
- exception updates for do_interrupt()  - masking etc
- trapa instruction immediate data fix

 cpu-exec.c  |5 +-
 hw/sh7750.c |2
 hw/sh_intc.c|  123 +++
 hw/sh_intc.h|8 ++-
 target-sh4/cpu.h|1
 target-sh4/helper.c |   75 ---
 target-sh4/op.c |2
 7 files changed, 169 insertions(+), 47 deletions(-)

Please apply.

/ magnus


qemu-cvs-20071129-sh-irq.patch
Description: Binary data


[Qemu-devel] PATCH: ide.c: send irq for WIN_DIAGNOSE

2007-11-29 Thread Tristan Gingold

Hi,

according to ATA std:
  The pending interrupt condition shall be set by:
  − the completion of a command; or

This patch sends an irq for WIN_DIAGNOSE (and WIN_SRST)

Tristan.




qemu.diff
Description: Binary data


[Qemu-devel] [PATCH] execve syscall fix

2007-11-29 Thread Magnus Damm
Hi everyone,

The execve syscall currently fails on sh4 with -EFAULT. I tracked it
down to what looks like a generic problem. This patch makes sure that
the two variables guest_argp and guest_envp are set to arg2 and
arg3 instead of the old NULL values from previous get_user_ual()
calls.

Execve now works as expected on sh4 with this fix. Please apply.

/ magnus


qemu-cvs-20071129-execve-fix.patch
Description: Binary data


[Qemu-devel] fstat bug on armeb stll exists!

2007-11-29 Thread Claudio Scordino

Hi all,

  more than one year ago we sent a patch on this mailing list to fix 
a problem of the fstat syscall for armeb. See


http://lists.gnu.org/archive/html/qemu-devel/2006-09/msg00137.html

We found the bug compiling a Linux kernel for armeb on scratchbox.

Qemu seemed to ignore the fact that in big endian systems the fields
st_blocks and its padding are swapped (to allow future expansion of 
the field,) so the fix consisted only in swapping the two fields (only 
in big endian systems, of course).


The patch just changed  qemu/linux-user/syscall_defs.h to

#ifndef TARGET_WORDS_BIGENDIAN
   target_ulongst_blocks;
   target_ulong__pad4;
#else
  target_ulong__pad4;
  target_ulongst_blocks;
#endif

I've just dowloaded a fresh 0.9 Qemu, and I saw that there is still 
the bug...


Do you mind integrate such change, so we don't have to patch Qemu any 
time ?


Regards,

Claudio Scordino



--
=
Claudio Scordino
Software Engineer

Evidence Srl
Embedded Real-Time solutions
http://www.evidence.eu.com
=





Re: [Qemu-devel] PATCH: ide.c: send irq for WIN_DIAGNOSE

2007-11-29 Thread Carlo Marcelo Arenas Belon
On Thu, Nov 29, 2007 at 02:05:36PM +0100, Tristan Gingold wrote:
 according to ATA std:

which ATA std?

   The pending interrupt condition shall be set by:
   ??? the completion of a command; or
 
 This patch sends an irq for WIN_DIAGNOSE (and WIN_SRST)

DEVICE RESET or DEVICE DIAGNOSTIC in T13/1153D revision 18 don't ask for an
irq.

what is the use case you are trying to solve? which guest OS?

Carlo




Re: [Qemu-devel] [PATCH] execve syscall fix

2007-11-29 Thread Kirill A. Shutemov
On [Thu, 29.11.2007 22:42], Magnus Damm wrote:
 Hi everyone,
 
 The execve syscall currently fails on sh4 with -EFAULT. I tracked it
 down to what looks like a generic problem. This patch makes sure that
 the two variables guest_argp and guest_envp are set to arg2 and
 arg3 instead of the old NULL values from previous get_user_ual()
 calls.
 
 Execve now works as expected on sh4 with this fix. Please apply.

I have already post fix for this bug. No responce yet.

http://lists.gnu.org/archive/html/qemu-devel/2007-11/msg00612.html

-- 
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + Velesys LLC, http://www.velesys.com/
 + ALT Linux Team, http://www.altlinux.com/


signature.asc
Description: Digital signature


Re: [Qemu-devel] [PATCH] execve syscall fix

2007-11-29 Thread Kirill A. Shutemov
On [Thu, 29.11.2007 22:42], Magnus Damm wrote:
 Hi everyone,
 
 The execve syscall currently fails on sh4 with -EFAULT. I tracked it
 down to what looks like a generic problem. This patch makes sure that
 the two variables guest_argp and guest_envp are set to arg2 and
 arg3 instead of the old NULL values from previous get_user_ual()
 calls.
 
 Execve now works as expected on sh4 with this fix. Please apply.
 
 / magnus

I have already post fix for this bug. No responce yet.

http://lists.gnu.org/archive/html/qemu-devel/2007-11/msg00612.html

-- 
Regards,  Kirill A. Shutemov
 + Belarus, Minsk
 + Velesys LLC, http://www.velesys.com/
 + ALT Linux Team, http://www.altlinux.com/


signature.asc
Description: Digital signature


Re: [Qemu-devel] PATCH: ide.c: send irq for WIN_DIAGNOSE

2007-11-29 Thread Tristan Gingold


On Nov 29, 2007, at 4:07 PM, Carlo Marcelo Arenas Belon wrote:


On Thu, Nov 29, 2007 at 02:05:36PM +0100, Tristan Gingold wrote:

according to ATA std:


which ATA std?


A rather old one: ATA-3


  The pending interrupt condition shall be set by:
  ??? the completion of a command; or

This patch sends an irq for WIN_DIAGNOSE (and WIN_SRST)


DEVICE RESET or DEVICE DIAGNOSTIC in T13/1153D revision 18 don't  
ask for an

irq.


Well, not just after the command is executed.  But according to 9.5.1  
of 1153D:


l) After completing the above steps, Device 0 shall assert INTRQ if  
nIEN is cleared to zero.


So the IRQ is asserted at the end of diagnostic.


what is the use case you are trying to solve? which guest OS?


The OS timeout during diagnostic.

Tristan.





Re: [Qemu-devel] [PATCH 1/2] Add directio parameter to -drive

2007-11-29 Thread Balazs Attila-Mihaly (Cd-MaN)

Le mercredi 28 novembre 2007 à 14:24 +, Samuel Thibault a écrit :
 Hi,
 
 Laurent Vivier, le Wed 28 Nov 2007 15:02:50 +0100, a écrit :
  +ret = posix_memalign((void**)buf, 0x200, 512);
 
 For making this more easily portable, maybe it should be a new
 qemu_memalign() function?  Also, the alignment may probably be better
 as
 a global macro, since the alignment requirements depend on the OS.

 I think O_DIRECT is linux specific

Windows has something similar (I think). Check out the FILE_FLAG_WRITE_THROUGH 
and FILE_FLAG_NO_BUFFERING flags for the CreateFile API call under Win32 
(http://msdn2.microsoft.com/en-us/library/aa363858.aspx)

Best regards.




  ___
Yahoo! Answers - Got a question? Someone out there knows the answer. Try it
now.
http://uk.answers.yahoo.com/




[Qemu-devel] qemu/target-sparc helper.c

2007-11-29 Thread Blue Swirl
CVSROOT:/cvsroot/qemu
Module name:qemu
Changes by: Blue Swirl blueswir1  07/11/29 17:08:01

Modified files:
target-sparc   : helper.c 

Log message:
 Increase prom size for boot mode

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemu/target-sparc/helper.c?cvsroot=qemur1=1.31r2=1.32




[Qemu-devel] [PATCH] sh4: signal handling for the user space emulator

2007-11-29 Thread Magnus Damm
Hi everyone,

Here comes a patch that implements signal handling for the sh4 user
space emulator. Please apply on top of the recently posted delay slot
patch.

 linux-user/main.c  |   12 +
 linux-user/sh4/target_signal.h |5
 linux-user/signal.c|  321 ++--
 target-sh4/helper.c|6
 4 files changed, 331 insertions(+), 13 deletions(-)

Thanks,

/ magnus


qemu-cvs-20071128-sh-signal.patch
Description: Binary data


Re: [Qemu-devel] [PATCH] Fix for execve syscall

2007-11-29 Thread Magnus Damm
On Nov 19, 2007 10:39 PM, Kirill A. Shutemov [EMAIL PROTECTED] wrote:
 There is error in execve syscall implementation. guest_argp and guest_envp
 should not be altered during argument list checking.

 This bug was introduced by commit suppressed tgetx and tputx (initial
 patch by Thayne Harbaugh).

Works here for the sh4 target. Unbreaks the execve syscall. Please apply.

/ magnus




Re: [Qemu-devel] [PATCH] [RESEND] hw/sh7750.c: use TARGET_FMT_plx to printf target_phys_addr_t

2007-11-29 Thread Magnus Damm
On Nov 19, 2007 6:18 AM, Carlo Marcelo Arenas Belon
[EMAIL PROTECTED] wrote:
 The following patch changes the formatting string from %08x to TARGET_FMT_plx
 to accommodate for compilation in 64bit hosts and that manifests with the
 following warning :

   qemu/hw/sh7750.c: In function `error_access':
   qemu/hw/sh7750.c:186: warning: unsigned int format, different type arg (arg 
 5)
   qemu/hw/sh7750.c: In function `ignore_access':
   qemu/hw/sh7750.c:192: warning: unsigned int format, different type arg (arg 
 5)

This patch works fine on 32 bit x86 hosts. Please apply.

 Index: sh7750.c
 ===
 RCS file: /sources/qemu/qemu/hw/sh7750.c,v
 retrieving revision 1.11
 diff -u -r1.11 sh7750.c
 --- sh7750.c17 Nov 2007 17:14:48 -  1.11
 +++ sh7750.c18 Nov 2007 21:08:37 -

Could you please create the diff from the top level directory next
time? That way it can be applied with patch -p0 or -p1 directly in the
top level directory which makes patch handling much easier. Thanks!

/ magnus