Re: [Qemu-devel] Fwd: Problem booting 32 bit guest on 64 bit host using kvm

2013-01-01 Thread Mark Blakeney
Ubuntu 12.04 (precise) kernel is 3.2.0.35.40. Too hard to downgrade kermel. I should mention that I installed current qemu 1.3.0 from source but made no difference. I also had installed 1.3.0 from source on my older ubuntu system (trying to fix a problem which I later solved another way) and it wo

[Qemu-devel] [Bug 1052857] Re: qemu-user compiled static for ppc fails on 64bit hosts

2013-01-01 Thread Samuel Seay
I just submitted a patch to the dev mailing list. Just in case there is an issue with the submitted patch, or if Erik wants it sooner, I attached the patch I submitted. ** Patch added: "0001-Change-to-correct-PowerPC-on-64bit-host.patch" https://bugs.launchpad.net/qemu/+bug/1052857/+attachment

[Qemu-devel] [PATCH] Change to correct PowerPC on a 64bit host

2013-01-01 Thread Samuel Seay
Attached is a patch for fixing bug #1052857. My local tests show it working properly on 32 and 64bit. Signed-off-by: Samuel Seay 0001-Change-to-correct-PowerPC-on-64bit-host.patch Description: Binary data

[Qemu-devel] [PATCH] target-mips: Fix helper and tests for dot/cross-dot product instructions

2013-01-01 Thread Petar Jovanovic
From: Petar Jovanovic Helper function for dpa_w_ph, dpax_w_ph, dps_w_ph and dpsx_w_ph incorrectly defines halfword vector elements as unsigned values. This results in wrong output which is not triggered in the tests as they also follow this logic. Signed-off-by: Petar Jovanovic --- target-mips

Re: [Qemu-devel] [PATCH] linux-user: allow to use sudo in guest

2013-01-01 Thread Peter Maydell
On 20 December 2012 20:56, Laurent Vivier wrote: > When qemu-linux-user is used in a linux container or chroot, > if it needs to load binaries with SUID/SGID bits, it needs to > have root rights to be able to change UID/GID. To do that, we > need to install it with SUID bits and root owner. I sus

Re: [Qemu-devel] [Bug 1052857] Re: qemu-user compiled static for ppc fails

2013-01-01 Thread Peter Maydell
On 1 January 2013 06:56, Samuel Seay wrote: > I ran into this issue also and did a bit of investigating. This is only > an issue when ran on a 64bit host. The actual problem line is > > err |= __put_user(h2g(ka->_sa_handler), &sc->handler); > > inside of linux_user/signal.c. What I am unsure of is

Re: [Qemu-devel] [PATCH] linux-user: correct msgrcv()

2013-01-01 Thread Peter Maydell
On 20 December 2012 21:00, Laurent Vivier wrote: > All parameters must be swapped before the call of do_msgrcv(). > --- a/linux-user/syscall.c > +++ b/linux-user/syscall.c > @@ -2901,7 +2901,7 @@ static inline abi_long do_msgrcv(int msqid, abi_long > msgp, > return -TARGET_EFAULT; > >

Re: [Qemu-devel] [PATCH] linux-user: correct semctl() and shmctl()

2013-01-01 Thread Peter Maydell
On 20 December 2012 20:58, Laurent Vivier wrote: > The parameter "union semun" of semctl() is not a value > but a pointer to the value. > @@ -3161,10 +3163,16 @@ static abi_long do_ipc(unsigned int call, int first, > ret = get_errno(semget(first, second, third)); > break; > > -

Re: [Qemu-devel] [PATCH] linux-user: add string type in rtentry struct

2013-01-01 Thread Peter Maydell
On 20 December 2012 20:56, Laurent Vivier wrote: > This allows to pass the device name. > +static void target_to_host_string (void *dst, const void *src) > +{ > +#if HOST_LONG_BITS == 32 && TARGET_ABI_BITS == 32 > +if (*(uint32_t*)src == 0) { > +*(uint32_t*)dst = 0; > + return;

Re: [Qemu-devel] [PATCH] linux-user: correct msgrcv()

2013-01-01 Thread Laurent Vivier
Ping ! Le jeudi 20 décembre 2012 à 22:00 +0100, Laurent Vivier a écrit : > All parameters must be swapped before the call of do_msgrcv(). > > Allow faked (debian fakeroot daemon) to work properly. > > WITHOUT this patch: > > $ faked-sysv --foreground --debug > using 1723744788 as msg key > msg_

Re: [Qemu-devel] [PATCH] linux-user: correct semctl() and shmctl()

2013-01-01 Thread Laurent Vivier
Ping ! Le jeudi 20 décembre 2012 à 21:58 +0100, Laurent Vivier a écrit : > The parameter "union semun" of semctl() is not a value > but a pointer to the value. > > Moreover, all fields of target_su must be swapped (if needed). > > The third argument of shmctl is a pointer. > > WITHOUT this patc

Re: [Qemu-devel] [PATCH] linux-user: allow to use sudo in guest

2013-01-01 Thread Laurent Vivier
Ping ! Le jeudi 20 décembre 2012 à 21:56 +0100, Laurent Vivier a écrit : > When qemu-linux-user is used in a linux container or chroot, > if it needs to load binaries with SUID/SGID bits, it needs to > have root rights to be able to change UID/GID. To do that, we > need to install it with SUID bit

Re: [Qemu-devel] [PATCH] linux-user: add string type in rtentry struct

2013-01-01 Thread Laurent Vivier
Ping ! Le jeudi 20 décembre 2012 à 21:56 +0100, Laurent Vivier a écrit : > This allows to pass the device name. > > You can test this with the "route" command. > > WITHOUT this patch: > > $ sudo route add -net default gw 10.0.3.1 eth0 > SIOCADDRT: Bad address > $ netstat -nr > Kernel IP routing

Re: [Qemu-devel] [PATCH] linux-user: correctly align types in thunking code

2013-01-01 Thread Laurent Vivier
Ping ! Le jeudi 20 décembre 2012 à 21:55 +0100, Laurent Vivier a écrit : > This is a follow up > of patch: > > commit c2e3dee6e03527baf8698698cce76b1a3174969a > Author: Laurent Vivier > Date: Sun Feb 13 23:37:34 2011 +0100 > > linux-user: Define target alig

Re: [Qemu-devel] [PATCH] linux-user: convert /proc/net/route when endianess differs

2013-01-01 Thread Laurent Vivier
Ping ! Le jeudi 20 décembre 2012 à 21:53 +0100, Laurent Vivier a écrit : > This patch allows to have IP addresses in correct order > in the case of "netstat -nr" when the endianess of the > guest differs from one of the host. > > For instance, an m68k guest on an x86_64 host: > > WITHOUT this p

Re: [Qemu-devel] [PATCH 2/2] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2013-01-01 Thread Peter Maydell
On 1 January 2013 22:12, Laurent Vivier wrote: > Le mardi 01 janvier 2013 à 19:45 +, Peter Maydell a écrit : >> I would encourage you to write some simple test programs >> and check them using strace (both of the native program and >> of qemu running the program). > > OK, I will... but I think

[Qemu-devel] buildbot failure in qemu on default_x86_64_rhel61

2013-01-01 Thread qemu
The Buildbot has detected a new failure on builder default_x86_64_rhel61 while building qemu. Full details are available at: http://buildbot.b1-systems.de/qemu/builders/default_x86_64_rhel61/builds/484 Buildbot URL: http://buildbot.b1-systems.de/qemu/ Buildslave for this Build: kraxel_rhel61 B

Re: [Qemu-devel] [PATCH 2/2] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2013-01-01 Thread Laurent Vivier
Le mardi 01 janvier 2013 à 19:45 +, Peter Maydell a écrit : > On 1 January 2013 18:37, Laurent Vivier wrote: > > Le mardi 01 janvier 2013 à 18:27 +0100, Laurent Vivier a écrit : > >> Le mardi 01 janvier 2013 à 15:03 +, Peter Maydell a écrit : > >> > On 31 December 2012 22:19, Laurent Vivie

Re: [Qemu-devel] [PATCH 2/2] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2013-01-01 Thread Peter Maydell
On 1 January 2013 18:37, Laurent Vivier wrote: > Le mardi 01 janvier 2013 à 18:27 +0100, Laurent Vivier a écrit : >> Le mardi 01 janvier 2013 à 15:03 +, Peter Maydell a écrit : >> > On 31 December 2012 22:19, Laurent Vivier wrote: >> > > works... sometime. In fact, work if target endianess is

[Qemu-devel] [PATCH] target-mips: Replace macros by inline functions

2013-01-01 Thread Stefan Weil
The macros RESTORE_ROUNDING_MODE and RESTORE_FLUSH_MODE silently used variable env from their callers. Using inline functions with env passed as a function argument is more transparent. This modification was proposed by Peter Maydell. Cc: Peter Maydell Signed-off-by: Stefan Weil --- target-mip

Re: [Qemu-devel] [PATCH 2/2] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2013-01-01 Thread Laurent Vivier
Le mardi 01 janvier 2013 à 18:27 +0100, Laurent Vivier a écrit : > Le mardi 01 janvier 2013 à 15:03 +, Peter Maydell a écrit : > > On 31 December 2012 22:19, Laurent Vivier wrote: > > > works... sometime. In fact, work if target endianess is network endianess. > > > > > > Correct me if I'm wro

[Qemu-devel] [PATCH] s390x: Remove inline function ebcdic_put and related data from cpu.h

2013-01-01 Thread Stefan Weil
The function is only used in misc_helper.c, so move it to that file. This reduces the size of debug executables (compiled without optimization) because they get unused code and data for each compilation which includes cpu.h. Executables with optimization don't change their size. ebcdic2ascii is

[Qemu-devel] [PATCH][v2] linux-user: correct setsockopt()

2013-01-01 Thread Laurent Vivier
From: Laurent Vivier SO_SNDTIMEO and SO_RCVTIMEO take a struct timeval, not an int To test this, you can use : QEMU_STRACE= ping localhost 2>&1 |grep TIMEO 568 setsockopt(3,SOL_SOCKET,SO_SNDTIMEO,{1,0},8) = 0 568 setsockopt(3,SOL_SOCKET,SO_RCVTIMEO,{1,0},8) = 0 Signed-off-by: Laurent Vivier -

[Qemu-devel] [PATCH] tci: Fix broken builds with TCG interpreter

2013-01-01 Thread Stefan Weil
TCI no longer compiled after commit 76cad71136b7eb371cf2a2a4e1621cfe8d9c769a. The TCI disassembler depends on data structures which are different for each QEMU target, so it cannot be compiled as a universal-obj today. Signed-off-by: Stefan Weil --- Makefile.target |3 +-- disas/Makefil

[Qemu-devel] [PATCH] configure: Write new file "config-all-disas.mak" when running configure

2013-01-01 Thread Stefan Weil
Incremental builds added new lines to that file each time when configure was run. Now a new file with a comment line is written. Signed-off-by: Stefan Weil --- The file still contains lots of duplicated entries, but they don't cause problems. Regards and happy new year Stefan configure |

Re: [Qemu-devel] [PATCH 2/2] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2013-01-01 Thread Laurent Vivier
Le mardi 01 janvier 2013 à 15:03 +, Peter Maydell a écrit : > On 31 December 2012 22:19, Laurent Vivier wrote: > > Le lundi 31 décembre 2012 à 21:32 +, Peter Maydell a écrit : > >> Also it seems rather involved since we swap things three times and > >> have an entirely new abi_* function.

[Qemu-devel] [Bug 1052857] Re: qemu-user compiled static for ppc fails on 64bit hosts

2013-01-01 Thread Samuel Seay
** Summary changed: - qemu-user compiled static for ppc fails + qemu-user compiled static for ppc fails on 64bit hosts -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1052857 Title: qemu-user compil

Re: [Qemu-devel] [PATCH 2/2] linux-user: SOCK_PACKET uses network endian to encode protocol in socket()

2013-01-01 Thread Peter Maydell
On 31 December 2012 22:19, Laurent Vivier wrote: > Le lundi 31 décembre 2012 à 21:32 +, Peter Maydell a écrit : >> Also it seems rather involved since we swap things three times and >> have an entirely new abi_* function. Either I'm completely confused >> or it should be enough to just have >>

Re: [Qemu-devel] Fwd: Problem booting 32 bit guest on 64 bit host using kvm

2013-01-01 Thread Gleb Natapov
On Tue, Jan 01, 2013 at 10:42:26PM +1000, Mark Blakeney wrote: > As per first post, kvm worked for me on Ubuntu 12.04 32 bit with > whatever 3.* kernel that was. I have upgraded to a new box with newly > installed Ubuntu 12.10 64 bit and now kvm does not work. Same qemu > image. I suspect the archi

Re: [Qemu-devel] Fwd: Problem booting 32 bit guest on 64 bit host using kvm

2013-01-01 Thread Mark Blakeney
As per first post, kvm worked for me on Ubuntu 12.04 32 bit with whatever 3.* kernel that was. I have upgraded to a new box with newly installed Ubuntu 12.10 64 bit and now kvm does not work. Same qemu image. I suspect the architecture change from 32 to 64 bit is the issue here but I guess you are

Re: [Qemu-devel] [PATCH for 1.3] pflash_cfi01: Suppress warning when Linux probes for AMD flash

2013-01-01 Thread Aurelien Jarno
On Sat, Nov 24, 2012 at 11:03:13PM +0100, Stefan Weil wrote: > There are several ARM and MIPS boards which are manufactured with > either Intel (pflash_cfi01.c) or AMD (pflash_cfi02.c) flash memory. > > The Linux kernel supports both and first probes for AMD flash which > resulted in one or two wa

Re: [Qemu-devel] Fwd: Problem booting 32 bit guest on 64 bit host using kvm

2013-01-01 Thread Gleb Natapov
On Tue, Jan 01, 2013 at 09:17:52PM +1000, Mark Blakeney wrote: > Linux pc 3.7.0-7-generic #15-Ubuntu SMP Sat Dec 15 16:34:25 UTC 2012 > x86_64 x86_64 x86_64 GNU/Linux (Ubuntu version 3.7.0.7.11) > > I am using xorg edgers on Ubuntu 12.10 because I have a brand new box > and have been seeing graphi

Re: [Qemu-devel] Fwd: Problem booting 32 bit guest on 64 bit host using kvm

2013-01-01 Thread Mark Blakeney
Linux pc 3.7.0-7-generic #15-Ubuntu SMP Sat Dec 15 16:34:25 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux (Ubuntu version 3.7.0.7.11) I am using xorg edgers on Ubuntu 12.10 because I have a brand new box and have been seeing graphics issues so trying latest drivers. However, I am fairly sure I tried boo

Re: [Qemu-devel] [PATCH 3/3] Fix-gen_HILO-to-make-it-adapt-each-arch-which-use-acc

2013-01-01 Thread Aurelien Jarno
On Tue, Dec 11, 2012 at 10:28:30PM +0800, Dongxue Zhang wrote: > The old gen_HILO was used by many arch, and they use acc[0] only. But now we > know the arch with dsp will have 4 acc reigster. So we need Fix gen_HILO. > > When we add arch mipsdsp, we changed the gen_HILO, but now I found it may >

Re: [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number

2013-01-01 Thread Aurelien Jarno
On Thu, Dec 20, 2012 at 10:14:20AM +0800, 陳韋任 (Wei-Ren Chen) wrote: > Hi Li, > > > > > Signed-off-by: Chen Wei-Ren > > > > --- > > > > target-mips/op_helper.c |6 +++--- > > > > 1 files changed, 3 insertions(+), 3 deletions(-) > > > > > > > > diff --git a/target-mips/op_helper.c b/target-mi

Re: [Qemu-devel] [PATCH] target-mips: Use EXCP_SC rather than a magic number

2013-01-01 Thread Aurelien Jarno
On Tue, Dec 11, 2012 at 12:15:55AM +0800, 陳韋任 (Wei-Ren Chen) wrote: > From the discussion on the ML [1], the exception limit defined by > magic number 0x100 is actually EXCP_SC defined in cpu.h. Replace the > magic number with EXCP_SC. Remove "#if 1 .. #endif" as well. > > [1] http://lists.gnu.o

Re: [Qemu-devel] [PATCH 2/3] Make-repl_ph-to-sign-extended-to-target_long

2013-01-01 Thread aurel...@aurel32.net
On Tue, Dec 11, 2012 at 03:06:35PM +, Jovanovic, Petar wrote: > lgtm, though I wish there was a test for this in repl_ph.c. > > + cc Aurelien J. > > Petar > > From: Dongxue Zhang [elta@gmail.com] > Sent: Tuesday, December 11, 2012 3:28 PM > To: qem

Re: [Qemu-devel] [PATCH] target-mips: Remove semicolon from macro definition

2013-01-01 Thread Aurelien Jarno
On Sat, Dec 22, 2012 at 01:38:19PM +0100, Stefan Weil wrote: > Macro RESTORE_FLUSH_MODE is similar to RESTORE_ROUNDING_MODE > but included a semicolon. > > The code which uses that macro also includes a semicolon, > so the result was an empty statement. > > Remove the superfluous semicolon from t

[Qemu-devel] [Bug 1052857] Re: qemu-user compiled static for ppc fails

2013-01-01 Thread Samuel Seay
I ran into this issue also and did a bit of investigating. This is only an issue when ran on a 64bit host. The actual problem line is err |= __put_user(h2g(ka->_sa_handler), &sc->handler); inside of linux_user/signal.c. What I am unsure of is when the h2g() macro, the cause of the assert, is vali

Re: [Qemu-devel] [PATCH] target-mips: Fix for helpers for EXTR_* instructions

2013-01-01 Thread Aurelien Jarno
On Mon, Dec 10, 2012 at 04:28:17PM +0100, Petar Jovanovic wrote: > From: Petar Jovanovic > > The change removes some unnecessary and incorrect code for EXTR_S.H. > Further, it corrects the mask for shift value in the EXTR_ instructions. It > also > extends the existing tests so they trigger the

Re: [Qemu-devel] [PATCH] target-mips: Fix incorrect reads and writes to DSPControl register

2013-01-01 Thread Aurelien Jarno
On Thu, Dec 06, 2012 at 08:30:35PM +0100, Petar Jovanovic wrote: > From: Petar Jovanovic > > Upper 4 bits of ccond (bits 31..28 ) of DSPControl register are not used in > the MIPS32 architecture. They are used in the MIPS64 architecture. For MIPS32 > these bits must be written as zero, and return

Re: [Qemu-devel] Fwd: Problem booting 32 bit guest on 64 bit host using kvm

2013-01-01 Thread Gleb Natapov
On Tue, Jan 01, 2013 at 11:17:52AM +1000, Mark Blakeney wrote: > Hi, I am inexperienced using QEMU and hoping somebody here can help me. > > Some time ago I cloned a disk image of an old Solaris legacy system and was > able to successfully boot and use it within QEMU. Recently I upgraded my > host