[Qemu-devel] qemu/target-mips cpu.h op.c translate.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer ths 07/01/24 18:01:23 Modified files: target-mips: cpu.h op.c translate.c Log message: EBase is limited to KSEG0/KSEG1 even on 64bit CPUs. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/cpu.h?cvsroot=qemur1=1.19r2=1.20 http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/op.c?cvsroot=qemur1=1.21r2=1.22 http://cvs.savannah.gnu.org/viewcvs/qemu/target-mips/translate.c?cvsroot=qemur1=1.31r2=1.32 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] Crashes while emulating x86_64 with kqemu: details and workaround
Hi, I've seen that this issue has been brought up in the past, with little discussion on a resolution. To express that I would be interested in a resolution, and to provide hopefully-useful details, I'm sharing my experiences with emulating x86_64 machines running Linux with kqemu. My host machine runs Debian Etch, with the linux-image-2.6.18-3-amd64 2.6.18-7 kernel package installed. This kernel was compiled with GCC 4.1.2. Prior to trying kqemu, I ran several instances of qemu-system-x86_64 simultaneously without a hitch (besides performance). These were all running Linux 2.6. With kqemu, most of the VMs crash. At least one of them crashed consistently in the same place in its boot process; I've attached a boot log, which includes the exact command used to invoke qemu[1], all standard output and standard error output from qemu, and all console output from the emulated Linux system. The boot script in effect at the point of the crash was modified to echo all commands prior to execution (set -x). Other VMs crashed at unrelated points in the boot process; the systems in these VMs differed greatly in configuration from the reference VM, though. Upon the crash of qemu, the host kernel printed the following message, which seems to be consistent for me whenever qemu crashes under these circumstances: ---8---8--- kqemu: aborting: Unexpected exception 0x0d in monitor space err= CS:EIP=f180:f0002806 SS:SP=:f00c7e60 ---8---8--- I did notice one VM, running an old kernel, is not affected. I've determined that 2.6.15.7 is the latest version of the Linux kernel I can use on a qemu x86_64 VM running with kqemu; 2.6.16-rc1 and later will crash qemu. Therefore, the workaround for those wishing to run Linux on qemu-system-x86_64 with kqemu is to use 2.6.15.7. Also attached is a copy of the .config file for one kernel I built and tried, version 2.6.16.38, in-case it aids in reproducing the problem. Even with kqemu, things aren't tremendously fast: subjectively, things seem faster than without kqemu. I don't have a good benchmark yet, but I do have a highly anecdotal and unscientific example of how bad the performance of my current configuration with kqemu is: a network transfer, received with netcat and written to disk yielded ~800KB/s throughput for the first couple of minutes, which is when I aborted. (After shutting down the VM,) a transfer of the same file, from the same source system, to the same filesystem, with the same tools yielded about 8MB/s (+/- 1MB/s) through the entire transmission. I'm happy to help by providing further details or testing certain configurations or certain patches. Thanks, 1. QEMU_TMPDIR=/tmp is on the environment (not reflected in the log). On my host, /tmp is a large tmpfs filesystem. -- J.P. Larocque: [EMAIL PROTECTED], [EMAIL PROTECTED] 2007-01-21 18:34:23.880508500 vm-bl: ERROR while getting interface flags: No such device 2007-01-21 18:34:23.889790500 ifdown: interface vm-bl not configured 2007-01-21 18:34:24.096941500 qemu_start.py: Starting. 2007-01-21 18:34:24.096985500 qemu_start.py: Acquiring lock. 2007-01-21 18:34:24.097249500 qemu_start.py: Executing: ['qemu-system-x86_64', '-serial', 'stdio', '-nographic', '-monitor', 'pipe:monitor', '-m', '96', '-net', 'nic,model=rtl8139,macaddr=F2:85:2D:E1:DF:B8', '-net', 'tap,fd=3,script=/bin/true', '-hda', 'hda', '-hdb', 'hdb', '-hdc', 'hdc'] 2007-01-21 18:34:24.101251500 ### started child, pid 5238. 2007-01-21 18:34:24.101312500 ### signal handlers installed. 2007-01-21 18:34:24.101341500 ### instantiated monitor. 2007-01-21 18:34:24.101358500 ### child is running loop: 2007-01-21 18:34:24.101376500 ### waiting for child. 2007-01-21 18:34:24.363769500 Press any key to continue. 2007-01-21 18:34:26.021207500 Restarting radvd: Press any key to continue. 2007-01-21 18:34:27.128151500 radvd. 2007-01-21 18:34:27.179877500 Press any key to continue. 2007-01-21 18:34:27.188327500 2007-01-21 18:34:27.188445500 2007-01-21 18:34:27.188537500 GNU GRUB version 0.97 (639K lower / 97280K upper memory) 2007-01-21 18:34:27.191647500 2007-01-21 18:34:27.191775500 --- 2007-01-21 18:34:27.194931500 0: Debian GNU/Linux, kernel 2.6.18-3-amd64 2007-01-21 18:34:27.196909500 1: Debian GNU/Linux, kernel 2.6.18-3-amd64 (single-user mode) 2007-01-21 18:34:27.199923500 --- 2007-01-21 18:34:27.203141500 2007-01-21 18:34:27.203234500 Use the ^ and v keys to select which entry is highlighted. 2007-01-21 18:34:27.205985500 Press enter to boot the selected OS, 'e' to edit the 2007-01-21 18:34:27.208697500 commands before booting, or 'c' for a command-line. 2007-01-21 18:34:27.219204500 2007-01-21 18:34:27.219324500 The selected entry is 0 Entry 0 will be booted automatically in 5 seconds. Entry 0 will be booted automatically in 4 seconds.
[Qemu-devel] [Patch] darwin-user: Fix set_error return value
Hi, This fix set_error return value typo. Pierre.Index: darwin-user/main.c === RCS file: /sources/qemu/qemu/darwin-user/main.c,v retrieving revision 1.1 diff -u -r1.1 main.c --- darwin-user/main.c 18 Jan 2007 20:06:33 - 1.1 +++ darwin-user/main.c 24 Jan 2007 19:48:53 - @@ -478,7 +478,7 @@ } /* ABI convention: after a syscall if there was an error the CF flag is set */ -static inline set_error(CPUX86State *env, int ret) +static inline void set_error(CPUX86State *env, int ret) { if(ret0) env-eflags = env-eflags | 0x1; ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [Patch] siginfo fix for Darwin/Mac OS X
Hi, This patch is an attempt to suppress the anonymous struct siginfo trick, as it doesn't work on darwin since struct siginfo isn't defined, and stay anonymous. Here I use siginfo_t, assuming that it is defined on most platform. But feel free to add a typedef struct siginfo siginfo_t; for your platform if needed, or some other trick. (Variation of this hack is possible as struct __siginfo is valid on darwin. Feel free to use) Pierre. Index: target-sparc/cpu.h === RCS file: /sources/qemu/qemu/target-sparc/cpu.h,v retrieving revision 1.26 diff -u -r1.26 cpu.h --- target-sparc/cpu.h 23 Dec 2006 14:18:40 - 1.26 +++ target-sparc/cpu.h 24 Jan 2007 20:18:37 - @@ -275,8 +275,7 @@ } while (0) #endif -struct siginfo; -int cpu_sparc_signal_handler(int hostsignum, struct siginfo *info, void *puc); +int cpu_sparc_signal_handler(int host_signum, void *pinfo, void *puc); #include cpu-all.h Index: target-sh4/cpu.h === RCS file: /sources/qemu/qemu/target-sh4/cpu.h,v retrieving revision 1.4 diff -u -r1.4 cpu.h --- target-sh4/cpu.h23 Dec 2006 14:18:40 - 1.4 +++ target-sh4/cpu.h24 Jan 2007 20:18:37 - @@ -121,9 +121,8 @@ CPUSH4State *cpu_sh4_init(void); int cpu_sh4_exec(CPUSH4State * s); -struct siginfo; -int cpu_sh4_signal_handler(int hostsignum, struct siginfo *info, - void *puc); +int cpu_sh4_signal_handler(int host_signum, void *pinfo, + void *puc); #include softfloat.h Index: target-ppc/cpu.h === RCS file: /sources/qemu/qemu/target-ppc/cpu.h,v retrieving revision 1.24 diff -u -r1.24 cpu.h --- target-ppc/cpu.h23 Dec 2006 14:18:40 - 1.24 +++ target-ppc/cpu.h24 Jan 2007 20:18:38 - @@ -575,8 +575,7 @@ /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero is returned if the signal was handled by the virtual CPU. */ -struct siginfo; -int cpu_ppc_signal_handler(int host_signum, struct siginfo *info, +int cpu_ppc_signal_handler(int host_signum, void *pinfo, void *puc); void do_interrupt (CPUPPCState *env); Index: target-m68k/cpu.h === RCS file: /sources/qemu/qemu/target-m68k/cpu.h,v retrieving revision 1.2 diff -u -r1.2 cpu.h --- target-m68k/cpu.h 23 Dec 2006 14:18:40 - 1.2 +++ target-m68k/cpu.h 24 Jan 2007 20:18:38 - @@ -97,8 +97,7 @@ /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero is returned if the signal was handled by the virtual CPU. */ -struct siginfo; -int cpu_m68k_signal_handler(int host_signum, struct siginfo *info, +int cpu_m68k_signal_handler(int host_signum, void *pinfo, void *puc); void cpu_m68k_flush_flags(CPUM68KState *, int); Index: target-i386/cpu.h === RCS file: /sources/qemu/qemu/target-i386/cpu.h,v retrieving revision 1.39 diff -u -r1.39 cpu.h --- target-i386/cpu.h 23 Dec 2006 14:18:40 - 1.39 +++ target-i386/cpu.h 24 Jan 2007 20:18:38 - @@ -628,8 +628,7 @@ /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero is returned if the signal was handled by the virtual CPU. */ -struct siginfo; -int cpu_x86_signal_handler(int host_signum, struct siginfo *info, +int cpu_x86_signal_handler(int host_signum, void *pinfo, void *puc); void cpu_x86_set_a20(CPUX86State *env, int a20_state); Index: target-arm/cpu.h === RCS file: /sources/qemu/qemu/target-arm/cpu.h,v retrieving revision 1.18 diff -u -r1.18 cpu.h --- target-arm/cpu.h23 Dec 2006 14:18:40 - 1.18 +++ target-arm/cpu.h24 Jan 2007 20:18:38 - @@ -133,8 +133,7 @@ /* you can call this signal handler from your SIGBUS and SIGSEGV signal handlers to inform the virtual CPU of exceptions. non zero is returned if the signal was handled by the virtual CPU. */ -struct siginfo; -int cpu_arm_signal_handler(int host_signum, struct siginfo *info, +int cpu_arm_signal_handler(int host_signum, void *pinfo, void *puc); #define CPSR_M (0x1f) Index: cpu-exec.c === RCS file: /sources/qemu/qemu/cpu-exec.c,v retrieving revision 1.89 diff -u -r1.89 cpu-exec.c --- cpu-exec.c 24 Jan 2007 01:47:51 - 1.89 +++ cpu-exec.c 24 Jan 2007 20:18:38 - @@ -1280,9 +1280,10 @@ } #endif -int cpu_signal_handler(int host_signum, struct siginfo *info,
[Qemu-devel] strange crash on FreeBSD-current/amd64 (pointer truncation?)
Hi! I got a report of qemu segfaulting here on FreeBSD-current/amd64: #0 main_loop () at /usr/ports-cvs/emulators/qemu/work/qemu-snapshot-2007-01-11_05/vl.c:6125 6125env = env-next_cpu; [New Thread 0x801e10190 (LWP 100214)] (gdb) print env $1 = (CPUX86State *) 0xac1 (gdb) print first_cpu $2 = (CPUX86State *) 0x80ac1 This works on earlier FreeBSD branches, and the build logs, http://pointyhat.freebsd.org/errorlogs/amd64-7-latest-logs/qemu-0.8.2s.20070111.log http://pointyhat.freebsd.org/errorlogs/amd64-6-latest-logs/qemu-0.8.2s.20070111.log (7 is the -current branch and 6 is the branch that the latest release, 6.2, was branched off) show no differences in compiler warnings, so I'm a bit at a loss where to look for the problem. So the qeustion is: Has anyone seen something like this or has a helpful idea? Thanx, Juergen ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] New multiple snapshot support for VMDK.
Hi, Your patch seems OK to me. Fabrice. Igor Lvovsky wrote: Hi Fabrice, What are you think about this patch? Are you have a comments? If you accept it, I'll try to fix the race condition on snapshot writing. Regards Igor Lvovsky * From: * [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] *On Behalf Of * Igor Lvovsky *Sent:* Monday, January 15, 2007 4:51 PM *To:* qemu-devel@nongnu.org *Subject:* [Qemu-devel] New multiple snapshot support for VMDK. Hi all, It's the new patch for the multiple snapshot support for the VMDK format. I rewrote the previous one according to the new multiple snapshots concept, introduced by Fabrice. The snapshots can be created with standard way: qemu-img create –b base-image.vmdk –f vmdk snapshot-img-001.vmdk We can create the snapshots chain in this way. The patch include also the 'CID' protection that defined by the VMDK format. The CID is a value updated on the first write every time the virtual disk is opened. P.S. Fabrice, I used the bdrv_pread() and bdrv_pwrite(), as you advised me. Regards, Igor Lvovsky ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] [RFC] QEMU Live Migration
I looked at your patch and it is OK for me. The 'ssh:' implementation is a nice trick. In order to be usable on win32, it is still needed to implement a more portable system with a TCP connection. The dirty flag 0x04 is unfortunately used by kqemu - I should have documented it ! You can use 0x08 for the live migration. Regards, Fabrice. Anthony Liguori wrote: Howdy, I wanted to post a draft of my QEMU live migration patch. I think there's a lingering memory allocation problem. I also need to implement ARP forwarding and a TCP transport stream. However, I thought I'd post an initial version in case anyone wants to play around with it. Once you apply the patch, make sure you've got it on both machines. For my setup, I've got a common NFS share mounted in /mnt. Then I run: qemu -hda /mnt/win2k.img -monitor telnet:0.0.0.0:1025,server,nowait -vnc :2 Then, I connect to the monitor and execute: (qemu) migrate ssh://woolly When the migration completes, the monitor command will finish and then I can connect to the machine on woolly:2. The ssh command will be derived from argc/argv so it's important to ensure that the -hda path is valid on both machines. All three patches are required and should be applied in order of: qemu-apic-save-restore.diff qemu-file.diff qemu-migration.diff Regards, Anthony Liguori ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw ide.c piix_pci.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer ths 07/01/24 21:35:22 Modified files: hw : ide.c piix_pci.c Log message: Add support for 82371FB (Step A1) and Improved support for 82371SB (Function 1), by Carlo Marcelo Arenas Belon. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/ide.c?cvsroot=qemur1=1.52r2=1.53 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/piix_pci.c?cvsroot=qemur1=1.8r2=1.9 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu Makefile.target sdl.c vl.h x_keymap.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer ths 07/01/24 21:40:21 Modified files: . : Makefile.target sdl.c vl.h Added files: . : x_keymap.c Log message: Split out SDL X keymap, by Bernhard Fischer. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/Makefile.target?cvsroot=qemur1=1.141r2=1.142 http://cvs.savannah.gnu.org/viewcvs/qemu/sdl.c?cvsroot=qemur1=1.33r2=1.34 http://cvs.savannah.gnu.org/viewcvs/qemu/vl.h?cvsroot=qemur1=1.176r2=1.177 http://cvs.savannah.gnu.org/viewcvs/qemu/x_keymap.c?cvsroot=qemurev=1.1 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw mips_malta.c mips_r4k.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer ths 07/01/24 22:00:13 Modified files: hw : mips_malta.c mips_r4k.c Log message: Fix malta emulation for 64bit qemu. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/mips_malta.c?cvsroot=qemur1=1.5r2=1.6 http://cvs.savannah.gnu.org/viewcvs/qemu/hw/mips_r4k.c?cvsroot=qemur1=1.32r2=1.33 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel