[Qemu-devel] qemu configure
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/02/11 15:02:17 Modified files: . : configure Log message: Fix typo, and some reformatting. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/configure?cvsroot=qemu&r1=1.122&r2=1.123 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu block.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/02/11 15:06:09 Modified files: . : block.c Log message: Use PATH_MAX for name lengths, by Sergey Vlasov. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/block.c?cvsroot=qemu&r1=1.42&r2=1.43 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] [ARM] Fix C-flag for ASR when shift==0
There is a bug in the ARM emulation of data-processing instructions with ASR when the shift==0. The current QEMU CVS incorrectly modifies the C-flag, when it should be preserved. The attached patch corrects this. Matthew Index: target-arm/op.c === RCS file: /sources/qemu/qemu/target-arm/op.c,v retrieving revision 1.21 diff -u -r1.21 op.c --- target-arm/op.c 26 Jun 2006 19:55:19 - 1.21 +++ target-arm/op.c 11 Feb 2007 16:08:22 - @@ -667,7 +667,7 @@ if (shift >= 32) { env->CF = (T1 >> 31) & 1; T1 = (int32_t)T1 >> 31; -} else { +} else if (shift != 0) { env->CF = (T1 >> (shift - 1)) & 1; T1 = (int32_t)T1 >> shift; } ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] [PATCH] Remove bash-ism from configure
Hi, On Sat, 10 Feb 2007, Anthony Liguori wrote: > This is one I introduced in the gcc-3.x autodetect. It's against CVS > from a little while ago so hopefully it's just fuzz. AFAICT "which" is not really portable, either. But then, I always have a bash, so I really don't care. Ciao, Dscho ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] [PATCH] Remove bash-ism from configure
Johannes Schindelin wrote: Hi, On Sat, 10 Feb 2007, Anthony Liguori wrote: This is one I introduced in the gcc-3.x autodetect. It's against CVS from a little while ago so hopefully it's just fuzz. AFAICT "which" is not really portable, either. But then, I always have a bash, so I really don't care. On my system, which is an executable, not a shell command so it's outside the scope of bashism. It's also used elsewhere within configure. We claim to use /bin/sh so we should not be using bashism. Regards, Anthony Liguori Ciao, Dscho ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/linux-user syscall.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/02/11 18:26:54 Modified files: linux-user : syscall.c Log message: Linux userland emulation of syslog, from Debian patchset. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemu&r1=1.83&r2=1.84 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] qemu/linux-user syscall.c
On Sunday 11 February 2007 18:26, Thiemo Seufer wrote: > CVSROOT: /sources/qemu > Module name: qemu > Changes by: Thiemo Seufer 07/02/11 18:26:54 > > Modified files: > linux-user : syscall.c > > Log message: > Linux userland emulation of syslog, from Debian patchset. > > CVSWeb URLs: > http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemu&; >r1=1.83&r2=1.84 > ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3)); This is wrong. It should use lock_user_string or similar. Please fix or revert. Paul ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/linux-user syscall.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/02/11 18:36:44 Modified files: linux-user : syscall.c Log message: Linux userland emulation of prctl, from Debian patchset. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemu&r1=1.84&r2=1.85 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [patch] -no-frame option for sdl
Hi, I have made a small patch that add a -no-frame option to qemu. It makes SDL open the window without a frame allowing qemu to use the entire screen without entering full-screen mode. When this is combined with the tablet usb device it allows changing to other workspaces without first toggling from full-screen and potentially ungrab the mouse afterwards. If your window manager does not allow you to move windows without frames the SDL_VIDEO_WINDOW_POS environment variable can be used to place the window where you want it like this: export SDL_VIDEO_WINDOW_POS=0,0 There is a screenshot of this change in action here: http://borderworlds.dk/~xi/qemu-noframe.png I hope this is worthy of being committed to the official qemu. -- Christian Laursen diff -urN qemu-0.9.0.orig/sdl.c qemu-0.9.0/sdl.c --- qemu-0.9.0.orig/sdl.c Tue Feb 6 00:01:54 2007 +++ qemu-0.9.0/sdl.c Sun Feb 11 17:17:44 2007 @@ -34,6 +34,7 @@ static int last_vm_running; static int gui_saved_grab; static int gui_fullscreen; +static int gui_noframe; static int gui_key_modifier_pressed; static int gui_keysym; static int gui_fullscreen_initial_grab; @@ -59,6 +60,8 @@ flags = SDL_HWSURFACE|SDL_ASYNCBLIT|SDL_HWACCEL; if (gui_fullscreen) flags |= SDL_FULLSCREEN; +if (gui_noframe) +flags |= SDL_NOFRAME; width = w; height = h; @@ -469,7 +472,7 @@ SDL_Quit(); } -void sdl_display_init(DisplayState *ds, int full_screen) +void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) { int flags; uint8_t data = 0; @@ -484,6 +487,9 @@ if (!kbd_layout) exit(1); } + +if (no_frame) +gui_noframe = 1; flags = SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE; if (SDL_Init (flags)) { diff -urN qemu-0.9.0.orig/vl.c qemu-0.9.0/vl.c --- qemu-0.9.0.orig/vl.c Tue Feb 6 00:01:54 2007 +++ qemu-0.9.0/vl.c Sun Feb 11 19:21:46 2007 @@ -148,6 +148,7 @@ #endif int graphic_depth = 15; int full_screen = 0; +int no_frame = 0; int no_quit = 0; CharDriverState *serial_hds[MAX_SERIAL_PORTS]; CharDriverState *parallel_hds[MAX_PARALLEL_PORTS]; @@ -6024,6 +6025,7 @@ "-boot [a|c|d|n] boot on floppy (a), hard disk (c), CD-ROM (d), or network (n)\n" "-snapshot write to temporary files instead of disk image files\n" #ifdef CONFIG_SDL + "-no-frame open SDL window without a frame and window decorations\n" "-no-quitdisable SDL window close capability\n" #endif #ifdef TARGET_I386 @@ -6192,6 +6194,7 @@ QEMU_OPTION_parallel, QEMU_OPTION_loadvm, QEMU_OPTION_full_screen, +QEMU_OPTION_no_frame, QEMU_OPTION_no_quit, QEMU_OPTION_pidfile, QEMU_OPTION_no_kqemu, @@ -6274,6 +6277,7 @@ { "loadvm", HAS_ARG, QEMU_OPTION_loadvm }, { "full-screen", 0, QEMU_OPTION_full_screen }, #ifdef CONFIG_SDL +{ "no-frame", 0, QEMU_OPTION_no_frame }, { "no-quit", 0, QEMU_OPTION_no_quit }, #endif { "pidfile", HAS_ARG, QEMU_OPTION_pidfile }, @@ -6894,6 +6898,9 @@ full_screen = 1; break; #ifdef CONFIG_SDL +case QEMU_OPTION_no_frame: +no_frame = 1; +break; case QEMU_OPTION_no_quit: no_quit = 1; break; @@ -7157,7 +7164,7 @@ vnc_display_init(ds, vnc_display); } else { #if defined(CONFIG_SDL) -sdl_display_init(ds, full_screen); +sdl_display_init(ds, full_screen, no_frame); #elif defined(CONFIG_COCOA) cocoa_display_init(ds, full_screen); #else diff -urN qemu-0.9.0.orig/vl.h qemu-0.9.0/vl.h --- qemu-0.9.0.orig/vl.h Tue Feb 6 00:01:54 2007 +++ qemu-0.9.0/vl.h Sun Feb 11 17:22:28 2007 @@ -902,7 +902,7 @@ unsigned long vga_ram_offset, int vga_ram_size); /* sdl.c */ -void sdl_display_init(DisplayState *ds, int full_screen); +void sdl_display_init(DisplayState *ds, int full_screen, int no_frame); /* cocoa.m */ void cocoa_display_init(DisplayState *ds, int full_screen); ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/hw usb-hid.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Fabrice Bellard07/02/11 19:01:48 Modified files: hw : usb-hid.c Log message: increase USB table poll interval CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/hw/usb-hid.c?cvsroot=qemu&r1=1.7&r2=1.8 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] qemu/linux-user syscall.c
On [Sun, 11.02.2007 18:35], Paul Brook wrote: > On Sunday 11 February 2007 18:26, Thiemo Seufer wrote: > > CVSROOT:/sources/qemu > > Module name:qemu > > Changes by: Thiemo Seufer 07/02/11 18:26:54 > > > > Modified files: > > linux-user : syscall.c > > > > Log message: > > Linux userland emulation of syslog, from Debian patchset. > > > > CVSWeb URLs: > > http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemu&; > >r1=1.83&r2=1.84 > > > ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3)); > > This is wrong. It should use lock_user_string or similar. Please fix or > revert. Patch in the attachment. Imported only two syscall from Debian patchset. What about others(mount, mount, uselib, mincore, clock_gettime)? Should I split it in several patches? Index: linux-user/syscall.c === RCS file: /sources/qemu/qemu/linux-user/syscall.c,v retrieving revision 1.85 diff -u -r1.85 syscall.c --- linux-user/syscall.c11 Feb 2007 18:36:44 - 1.85 +++ linux-user/syscall.c11 Feb 2007 19:23:28 - @@ -2952,7 +2952,9 @@ #endif case TARGET_NR_syslog: -ret = get_errno(sys_syslog((int)arg1, (char*)arg2, (int)arg3)); +p = lock_user_string(arg2); +ret = get_errno(sys_syslog((int)arg1, p, (int)arg3)); +unlock_user(p, arg2, 0); break; case TARGET_NR_setitimer: signature.asc Description: Digital signature ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] qemu/linux-user syscall.c
CVSROOT:/sources/qemu Module name:qemu Changes by: Thiemo Seufer 07/02/11 20:03:13 Modified files: linux-user : syscall.c Log message: Fix previous Linux userland emulation breakage. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/qemu/linux-user/syscall.c?cvsroot=qemu&r1=1.85&r2=1.86 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
Re: [Qemu-devel] qemu/linux-user syscall.c
Kirill A. Shutemov wrote: > Patch in the attachment. Already changed. :-) > Imported only two syscall from Debian patchset. What about others(mount, > mount, uselib, mincore, clock_gettime)? Uselib is obsolete AFAICS. > Should I split it in several patches? This would help, yes. Thiemo ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] allow disabling IDE block mode
Greetings, the following patch changes the logic for the processing of WIN_SETMULT so that setting it to 0 (off) is a valid operation as shown by (running Linux on qemu) # hdparm -m0 /dev/hda /dev/hda: setting multcount to 0 multcount= 0 (off) this is specially visible while running Ubuntu Linux 6.06 (dapper) on qemu as it by default disables multmode at boot resulting in the following error : hda: set_multmode: status=0x41 { DriveReady Error } hda: set_multmode: error=0x04 { DriveStatusError } ide: failed opcode was: 0xef Carlo Index: hw/ide.c === RCS file: /sources/qemu/qemu/hw/ide.c,v retrieving revision 1.53 diff -u -r1.53 ide.c --- hw/ide.c24 Jan 2007 21:35:22 - 1.53 +++ hw/ide.c11 Feb 2007 20:32:24 - @@ -1631,9 +1631,8 @@ ide_set_irq(s); break; case WIN_SETMULT: -if (s->nsector > MAX_MULT_SECTORS || -s->nsector == 0 || -(s->nsector & (s->nsector - 1)) != 0) { +if (s->nsector != 0 && (s->nsector > MAX_MULT_SECTORS || +(s->nsector & (s->nsector - 1)) != 0)) { ide_abort_command(s); } else { s->mult_sectors = s->nsector; ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] [PATCH] add "support" for enable/disable reverting to power-on defaults
Greetings, the following patch adds subcommands 0xCC and 0x66 for enabling/disabling reverting to power-on defaults after a soft reset as invoked by the following command (running under Linux) : # hdparm -K1 /dev/hda /dev/hda: setting drive keep features to 1 (on) this is specially visible in OpenSolaris that locks the drive configuration at boot as shown by (line 1366): http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/intel/io/dktp/controller/ata/ata_common.c and therefore will complain with the following error when booted in qemu : ata_set_feature: (0x66,0x0) failed the proposed implementation just ignores the flag but is consistent with the current behavior for the other IDE feature flags (read look-ahead and write cache) a complete implementation for all SET_FEATURES subcommands as spelled in section 8.37 of the ATA/ATAPI 5 (T13/1321D revision 3) standard will be provided later if the increase in complexity size is worth the added functionality (to be debated) Carlo Index: hw/ide.c === RCS file: /sources/qemu/qemu/hw/ide.c,v retrieving revision 1.53 diff -u -r1.53 ide.c --- hw/ide.c24 Jan 2007 21:35:22 - 1.53 +++ hw/ide.c11 Feb 2007 20:32:24 - @@ -1729,6 +1728,8 @@ goto abort_cmd; /* XXX: valid for CDROM ? */ switch(s->feature) { +case 0xcc: /* reverting to power-on defaults enable */ +case 0x66: /* reverting to power-on defaults disable*/ case 0x02: /* write cache enable */ case 0x82: /* write cache disable */ case 0xaa: /* read look-ahead enable */ ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] RFC: No write zero patch with new AIO
This is not a real patch, it's been hand edited and badly whitespace damaged to remove some of my braindamaged/commented out debugging code that just muddies things up. Simply posted for comment. I've tested it with WinXP and Ubuntu 6.06 and it appears to do what it's supposed to with no ill effects. I'd like someone familiar with the AIO system to comment if you have time.. particularly the way I'm skipping clusters and ending the AIO transaction. It has been *heavily* tested though. This is a very loose "adaption" of the zero-wipe patch by [EMAIL PROTECTED] Index: block-qcow2.c === RCS file: /cvsroot/qemu/qemu/block-qcow2.c,v retrieving revision 1.4 diff -u -r1.4 block-qcow2.c --- block-qcow2.c 7 Aug 2006 02:38:06 - 1.4 +++ block-qcow2.c 12 Feb 2007 05:25:14 - @@ -756,23 +756,58 @@ return 0; } + +static int is_not_zero(const uint8_t *data, int len) +{ +int left; +while (len && (((unsigned int) data) & 3) != 0) { +if (*data++) +return 1; +--len; +} +left = len & 3; +len >>= 2; +while (len) { +if (*((uint32_t *)data) != 0) +return 1; +data += 4; +--len; +} +while (left) { +if (*data++) +return 1; +--left; +} +return 0; +} + + @@ -928,6 +964,7 @@ int index_in_cluster; uint64_t cluster_offset; const uint8_t *src_buf; +int not_zero; acb->hd_aiocb = NULL; @@ -937,29 +974,42 @@ qemu_aio_release(acb); return; } - +next: acb->nb_sectors -= acb->n; acb->sector_num += acb->n; acb->buf += acb->n * 512; if (acb->nb_sectors == 0) { /* request completed */ acb->common.cb(acb->common.opaque, 0); qemu_aio_release(acb); return; } index_in_cluster = acb->sector_num & (s->cluster_sectors - 1); acb->n = s->cluster_sectors - index_in_cluster; if (acb->n > acb->nb_sectors) acb->n = acb->nb_sectors; -cluster_offset = get_cluster_offset(bs, acb->sector_num << 9, 1, 0, + +not_zero = is_not_zero(acb->buf, acb->n * 512); +cluster_offset = get_cluster_offset(bs, acb->sector_num << 9, not_zero, 0, index_in_cluster, index_in_cluster + acb->n); + if (!cluster_offset || (cluster_offset & 511) != 0) { -ret = -EIO; +if (not_zero) + ret = -EIO; + else + if (acb->nb_sectors - acb->n == 0) { + acb->common.cb(acb->common.opaque, 0); + qemu_aio_release(acb); + return; + } + goto next; goto fail; } + if (s->crypt_method) { if (!acb->cluster_data) { acb->cluster_data = qemu_mallocz(s->cluster_size); -- "Human beings, who are almost unique in having the ability to learn from the experience of others, are also remarkable for their apparent disinclination to do so." -- Douglas Adams ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel
[Qemu-devel] Help with gdb on Mac OS
I am trying to step through i386-darwin-user/qemu-i386 in gdb but I am getting a KERN_PROTECTION_FAILURE fairly early in the run: (gdb) run /bin/ls Starting program: /Users/ilya/tmp/feb11/qemu-0.9.0/i386-darwin-user/qemu-i386 /bin/ls Reading symbols for shared libraries . done Starting /bin/ls with qemu Program received signal EXC_BAD_ACCESS, Could not access memory. Reason: KERN_PROTECTION_FAILURE at address: 0x2115eaf5 helper_cmpxchg8b () at ../cpu-all.h:344 344 ((uint32_t *)ptr)[0] = x.p[0]; (gdb) The offending value of ptr is misalligned, can this indicate a problem? Reducing optimization or setting -g3 doesn't change this behavior. Strangely, the same example runs fine without gdb. Is there any way to correct the gdb problem? I am using gdb 6.3 on Mac OS Intel with QEMU 0.9.0 and patches for gcc4/Mac posted by Mike Kronenberg. Thanks for your help, Ilya Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 ___ Qemu-devel mailing list Qemu-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/qemu-devel