Re: [Qemu-devel] Support for new target emulator

2009-10-23 Thread Pablo Virolainen

Boyapati, Anitha kirjoitti:

Hello,

We have a proposal to add support for AVR32 target emulation in Qemu. So far, 
we are able to build qemu from sources on windows using Mingw.

Besides looking at sources for other targets in qemu tar ball, I have gone 
through docs for information on how to start adding support for a new target. I 
will appreciate if someone can give additional pointers on this. Also, kindly 
let me know the rough estimate of adding basic support to a new target like 
AVR32.

There are some threads in Qemu user forums regarding the same. However, link 
for Qemu user forums is currently reporting a lost connection to mysql server 
(for the past 4 days?). I did a basic search on Qemu developer mailing list 
archives and I could not find a relevant thread yet.


The forums are up. (for some reason the database didn't come up 
automatically after reboot)


Pablo





Re: [Qemu-devel] Qemu forum down again

2008-02-26 Thread Pablo Virolainen

Ottavio Caruso wrote:

http://qemu-forum.ipi.fi/


General Error
SQL ERROR [ mysql4 ]

Lost connection to MySQL server during query [2013]

An sql error occurred while fetching this page. Please contact an
administrator if this problem persists.


I have emailed Pablo but to no avail. Has anybody a direct contact
with Pablo and inform him of the incident?

  

mysqld is back on qemu-forum.ipi.fi
The database was corrupted.

Pablo




Re: [Qemu-devel] qemu-forum.ipi.fi down?

2007-12-18 Thread Pablo Virolainen

Robert Nestor wrote:
It seems qemu-forum.ipi.fi is down. Is there an alternate place one 
can obtain source snapshots or browse the user forums?


It should be back online once again (and it has been almost all the 
time). The reason you haven't been able to reach it was my mistake. When 
the server moved, ip-addr wasn't updated to dns. I just edited my 
/etc/hosts to include line 80.64.9.36 qemu-forum.ipi.fi and forget the 
issue.


dns-record is now updated

Pablo





Re: [Qemu-devel] http://qemu-forum.ipi.fi/ is down

2007-07-07 Thread Pablo Virolainen

Even Rouault kirjoitti:

Error message:

phpBB : Critical Error 


Could not connect to the database



Fixed
ps. Thanks for the information

Pablo




Re: [Qemu-devel] Re: clfs arm problem

2007-02-28 Thread Pablo Virolainen

Rodrigo Vivi kirjoitti:

Hi all,

I've just noticed that qemu does not has the at() syscalls support
implemented yet...

Does anyone has a patch that implements these syscalls:

.long sys_openat/* 295 */
.long sys_mkdirat
.long sys_mknodat
.long sys_fchownat
.long sys_futimesat
.long sys_fstatat64 /* 300 */
.long sys_unlinkat
.long sys_renameat
.long sys_linkat
.long sys_symlinkat
.long sys_readlinkat/* 305 */
.long sys_fchmodat
.long sys_faccessat
If I'm correct these *at calls was added to Linux in kernel 2.6.16. So 
setting LD_ASSUME_KERNEL may help.


Pablo


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] Small patch to fix mingw32 build

2007-02-15 Thread Pablo Virolainen
When building windows binary (./configure --enable-mingw32) build fails 
for following error message. Patch in the attachment.


gcc -Wall -O2 -g -fno-strict-aliasing -I. -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE   -o dyngen.exe dyngen.c

dyngen.c: In function `load_object':
dyngen.c:715: parse error before `const'
dyngen.c:718: `p' undeclared (first use in this function)
dyngen.c:718: (Each undeclared identifier is reported only once
dyngen.c:718: for each function it appears in.)
dyngen.c:759: parse error before `int'
dyngen.c:766: `aux_size' undeclared (first use in this function)
dyngen.c:768: `j' undeclared (first use in this function)


Only in qemu-snapshot-2007-02-13_05-patched: arm-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: arm-softmmu
Only in qemu-snapshot-2007-02-13_05-patched: armeb-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: config-host.h
Only in qemu-snapshot-2007-02-13_05-patched: config-host.mak
Only in qemu-snapshot-2007-02-13_05-patched: dyngen.E
diff -ru qemu-snapshot-2007-02-13_05/dyngen.c qemu-snapshot-2007-02-13_05-patched/dyngen.c
--- qemu-snapshot-2007-02-13_05/dyngen.c	2007-02-10 23:31:43.0 +0200
+++ qemu-snapshot-2007-02-13_05-patched/dyngen.c	2007-02-13 09:06:30.0 +0200
@@ -686,6 +686,8 @@
 uint32_t *n_strtab;
 EXE_SYM *sym;
 EXE_RELOC *rel;
+const char *p;
+int aux_size, j;
 	
 fd = open(filename, O_RDONLY 
 #ifdef _WIN32
@@ -712,7 +714,6 @@
 sdata = malloc(sizeof(void *) * fhdr.f_nscns);
 memset(sdata, 0, sizeof(void *) * fhdr.f_nscns);
 
-const char *p;
 for(i = 0;i  fhdr.f_nscns; i++) {
 sec = shdr[i];
 if (!strstart(sec-s_name,  .bss, p))
@@ -756,7 +757,6 @@
 	/* set coff symbol */
 	symtab = malloc(sizeof(struct coff_sym) * nb_syms);
 
-	int aux_size, j;
 	for (i = 0, ext_sym = coff_symtab, sym = symtab; i  nb_syms; i++, ext_sym++, sym++) {
 		memset(sym, 0, sizeof(*sym));
 		sym-st_syment = ext_sym;
Only in qemu-snapshot-2007-02-13_05-patched: dyngen.c.~1.48.~
Only in qemu-snapshot-2007-02-13_05-patched: dyngen.exe
Only in qemu-snapshot-2007-02-13_05-patched: i386-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: i386-softmmu
Only in qemu-snapshot-2007-02-13_05-patched: m68k-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: mips-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: mips-softmmu
Only in qemu-snapshot-2007-02-13_05-patched: mipsel-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: mipsel-softmmu
Only in qemu-snapshot-2007-02-13_05-patched: ppc-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: ppc-softmmu
Only in qemu-snapshot-2007-02-13_05-patched: qemu-doc.html
Only in qemu-snapshot-2007-02-13_05-patched: qemu-img.1
Only in qemu-snapshot-2007-02-13_05-patched: qemu-img.exe
Only in qemu-snapshot-2007-02-13_05-patched: qemu-img.pod
Only in qemu-snapshot-2007-02-13_05-patched: qemu-tech.html
Only in qemu-snapshot-2007-02-13_05-patched: qemu.1
Only in qemu-snapshot-2007-02-13_05-patched: qemu.pod
Only in qemu-snapshot-2007-02-13_05-patched: sparc-linux-user
Only in qemu-snapshot-2007-02-13_05-patched: sparc-softmmu
Only in qemu-snapshot-2007-02-13_05-patched: x86_64-softmmu
___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Re: hosting the forum

2006-10-04 Thread Pablo Virolainen

Ottavio Caruso kirjoitti:

From: Hetz Ben Hamo [EMAIL PROTECTED]

Due to some personal problems (related to financial situations) I'm
no
longer being able to keep paying the server which hosts the QEMU
forum.

Therefore, I'm looking for someone who can host the QEMU forum
(and,
if possible, the nightly snapshots). 



I am sorry that you have to give up on the forum. However I hope
whoever takes over to improve the features of the forum itself (I'd
like to see ssl enabled when I log in) and prevent spamming. The last
month the forum was horribly spammed and I am sure many have
potential good posters have gone for good.

Have you also considered to switch it to a mailing list, ideally
hosted here? A qemu-user mailing list would be nice.

Ottavio
  


Forums have moved to http://qemu-forum.ipi.fi (and it shouldn't be that 
easy for automated spamming engines to register accounts any more)

Qemu snapshot can be found at http://qemu-forum.ipi.fi/qemu-snapshots/

I must thank Nomovok ltd [1] for donating little of my time (yes.. I'm 
beeing paid) for the Qemu forum hassle.


[1] http://nomovok.com/

Pablo Virolainen


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] Small note about qemu/target-sh4/op.c

2006-07-18 Thread Pablo Virolainen

Hello,

I just noticed that op_dec8_rN and op_dec8_rN might have a copy-paste
error. I wonder if it should be like

RCS file: /sources/qemu/qemu/target-sh4/op.c,v
retrieving revision 1.3
diff -u -r1.3 op.c
--- op.c18 Jun 2006 19:12:54 -  1.3
+++ op.c18 Jul 2006 12:22:23 -
@@ -737,7 +737,7 @@

 void OPPROTO op_dec8_rN(void)
 {
-env-gregs[PARAM1] -= 4;
+env-gregs[PARAM1] -= 8;
 RETURN();
 }

@@ -761,7 +761,7 @@

 void OPPROTO op_inc8_rN(void)
 {
-env-gregs[PARAM1] += 4;
+env-gregs[PARAM1] += 8;
 RETURN();
 }

Pablo Virolainen


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


Re: [Qemu-devel] Fix for accept

2006-07-14 Thread Pablo Virolainen
Fabrice Bellard wrote:

 Hi,

 OK for the bug report, but the fix is not correct because the problem
 is generic. [get|put]_user() and the other functions should be used
 everywhere to communicate with the user space and to generate the
 -EFAULT error if the address is not correct. For that purpose the host
 signal SIGSEGV can be catched and asm macros can be used to see if it
 is an expected seg fault (in this case [get|put]_user must return an
 error code) or if it is a QEMU bug. Note that exactly the same system
 is used inside the Linux kernel and I don't think it is necessary to
 invent something else.

 Regards,

 Fabrice.

Hello,

So I should write something like following instead?

if (!get_user(addrlen,target_addrlen)) {
  return -EFAULT
}

The code seems to assume target_sockaddr == sockaddr, so why allocate
temporary buffer and then do copying?
One could implement SOCKOP_[accept|getsockname|getpeername] with same
code. Perhaps something like

static long do_socketcall_helper(target_ulong vptr,
 int (*func)(int,struct sockaddr*,socklen_t*))
{
const int n = sizeof(target_ulong);
if (access_ok(VERIFY_READ,vptr,n*3)) {
int ret;
int sockfd=tgetl(vptr);
target_ulong target_addr = tgetl(vptr + n);
target_ulong target_addrlen = tgetl(vptr + 2 * n);
struct sockaddr *addr=(struct sockaddr *)target_addr;
socklen_t addrlen;
  
if (!get_user(addrlen,target_addrlen) ||
!acces_ok(VERIFY_WRITE,target_addrlen,4)) {
  return -EFAULT;
}
   
ret=get_errno(func(sockfd, addr, addrlen));
if (!is_error(ret)) {
host_to_target_sockaddr(target_addr, addr, addrlen);
tput32(target_addrlen, addrlen);
   }
return ret;
}
return -EFAULT;
}



case SOCKOP_accept:
ret = do_socketcall_helper(vptr,accept);
break;
case SOCKOP_getsockname:
ret = do_socketcall_helper(vptr,getsockname);
break;
case SOCKOP_getpeername:
ret = do_socketcall_helper(vptr,getpeername);
break;


Pablo


___
Qemu-devel mailing list
Qemu-devel@nongnu.org
http://lists.nongnu.org/mailman/listinfo/qemu-devel


[Qemu-devel] [PATCH] for some socket operations and trivial compiler warning fix

2006-07-13 Thread Pablo Virolainen

The patch should add support for SO_LINGER, SO_RCVTIMEO, SO_SNDTIMEO,
SO_PEERCRED and SO_PEERNAME.


Index: linux-user/syscall.c
===
RCS file: /sources/qemu/qemu/linux-user/syscall.c,v
retrieving revision 1.75
diff -u -r1.75 syscall.c
--- linux-user/syscall.c	27 Jun 2006 21:08:10 -	1.75
+++ linux-user/syscall.c	13 Jul 2006 10:00:09 -
@@ -509,20 +509,28 @@
 msgh-msg_controllen = tswapl(space);
 }
 
+static long do_setsockopt_timehelper(int sockfd, int level, int optname, 
+ target_ulong optval, target_ulong optlen)
+{
+  int len;
+  struct timeval tv;
+  if (get_user(len, optlen) ||
+  !access_ok(VERIFY_READ,optval,sizeof(struct target_timeval)))
+return -EFAULT;
+  
+  if (len != sizeof(struct target_timeval))
+return -EINVAL;
+  
+  target_to_host_timeval(tv,optval); 
+  return get_errno(setsockopt(sockfd, level, optname, tv, sizeof(struct timeval)));
+}
+
 static long do_setsockopt(int sockfd, int level, int optname, 
   target_ulong optval, socklen_t optlen)
 {
 int val, ret;
 
 switch(level) {
-case SOL_TCP:
-/* TCP options all take an 'int' value.  */
-if (optlen  sizeof(uint32_t))
-return -EINVAL;
-
-val = tget32(optval);
-ret = get_errno(setsockopt(sockfd, level, optname, val, sizeof(val)));
-break;
 case SOL_IP:
 switch(optname) {
 case IP_TOS:
@@ -606,20 +614,39 @@
 		optname = SO_RCVLOWAT;
 		break;
 case TARGET_SO_RCVTIMEO:
-		optname = SO_RCVTIMEO;
+		ret = do_setsockopt_timehelper(sockfd,level,SO_RCVTIMEO,optval,optlen);
 		break;
 case TARGET_SO_SNDTIMEO:
-		optname = SO_SNDTIMEO;
+		ret = do_setsockopt_timehelper(sockfd,level,SO_SNDTIMEO,optval,optlen);
 		break;
+	case TARGET_SO_LINGER: {
+		struct linger tmp;
+		struct linger *target = (struct linger *) optval;
+		if (optlen == sizeof(struct linger) 
+		get_user(tmp.l_onoff,target-l_onoff) 
+		get_user(tmp.l_linger,target-l_linger)) {
+		  ret = get_errno(setsockopt(sockfd, level, SO_LINGER, tmp, sizeof(struct linger)));
+		} else {
+		  /* Just to make strace look better */
+		  ret = get_errno(setsockopt(sockfd, level, SO_LINGER, optval,optlen));
+		}
+		return ret;
+		break;
+	}
 break;
 default:
 goto unimplemented;
 }
-	if (optlen  sizeof(uint32_t))
-	return -EINVAL;
-
-	val = tget32(optval);
-	ret = get_errno(setsockopt(sockfd, SOL_SOCKET, optname, val, sizeof(val)));
+	goto int_case;
+break;
+case SOL_TCP:
+int_case:
+/* TCP options all take an 'int' value.  */
+if (optlen  sizeof(uint32_t))
+return -EINVAL;
+
+val = tget32(optval);
+ret = get_errno(setsockopt(sockfd, level, optname, val, sizeof(val)));
 break;
 default:
 unimplemented:
@@ -629,6 +656,40 @@
 return ret;
 }
 
+static long do_getsockopt_structhelper(int sockfd, int level, int optname, 
+   target_ulong optval, target_ulong optlen)
+{
+  int ret,len,i;
+  /* Let's assume 32-bit parameters */
+  if (get_user(len, optlen))
+return -EFAULT;
+  if (len  0)
+return -EINVAL;
+  ret = get_errno(getsockopt(sockfd, level, optname, optval, len));
+  for(i = 0; i  len  optval != 0; i += 4) {
+/* This could propably be done more efficiently */
+tput32(optval + i, optval + i);
+  }
+  return ret;
+}
+
+static long do_getsockopt_timehelper(int sockfd, int level, int optname, 
+ target_ulong optval, target_ulong optlen)
+{
+  int ret,len;
+  struct timeval tv;
+  static socklen_t olen=sizeof(struct timeval);
+  if (get_user(len, optlen))
+return -EFAULT;
+  if (len != sizeof(struct target_timeval))
+return -EINVAL;
+  ret = get_errno(getsockopt(sockfd, level, optname, tv, olen));
+  if (ret==0) {
+host_to_target_timeval(optval,tv);
+  }
+  return ret;
+}
+
 static long do_getsockopt(int sockfd, int level, int optname, 
   target_ulong optval, target_ulong optlen)
 {
@@ -638,13 +699,28 @@
 case TARGET_SOL_SOCKET:
 	level = SOL_SOCKET;
 	switch (optname) {
+	  /* These don't just return a single integer */
 	case TARGET_SO_LINGER:
+	  ret = do_getsockopt_structhelper(sockfd,level,SO_LINGER,optval,optlen);
+	  break;
 	case TARGET_SO_RCVTIMEO:
+	  ret = do_getsockopt_timehelper(sockfd,level,SO_RCVTIMEO,optval,optlen);
+	  break;
 	case TARGET_SO_SNDTIMEO:
+	  ret = do_getsockopt_timehelper(sockfd,level,SO_SNDTIMEO,optval,optlen);
+	  break;
 	case TARGET_SO_PEERCRED:
+	  ret = do_getsockopt_structhelper(sockfd,level,SO_PEERCRED,optval,optlen);
+	  break;
 	case TARGET_SO_PEERNAME:
-	/* These don't just return a single integer */
-	goto unimplemented;
+	  if (get_user(len, optlen))
+return -EFAULT;
+	  if (len  0)
+return -EINVAL;
+	  ret = get_errno(getsockopt(sockfd, level, optname, optval, len));
+	  if