[Qemu-devel] Re: [PATCH] petalogix_ml605_mmu: remove unused variable
On Sun, Mar 20, 2011 at 12:53 AM, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Sat, Mar 19, 2011 at 10:45:34AM +0200, Blue Swirl wrote: Remove a write-only variable, spotted by GCC 4.6.0: /src/qemu/hw/petalogix_ml605_mmu.c: In function 'petalogix_ml605_init': /src/qemu/hw/petalogix_ml605_mmu.c:153:11: error: variable 'serial' set but not used [-Werror=unused-but-set-variable] Thanks, feel free to apply. OK, applied.
[Qemu-devel] [Bug 735752] Re: qemu squeeze crashes BUG: unable to handle kernel NULL pointer dereference at (null)
well, i has downgraded to 2.6.33 and system stable for 3 days yet.. system is halted on 2.6.36, 2,6.37 and 2.6.38 kernels mainhost ~ # uptime 12:38:30 up 3 days, 2:56, 2 users, load average: 0.00, 0.00, 0.04 mainhost ~ # uname -a Linux mainhost 2.6.33-gentoo-r1 #4 SMP Tue Aug 24 09:53:21 MSD 2010 x86_64 Intel(R) Xeon(R) CPU E5405 @ 2.00GHz GenuineIntel GNU/Linux -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/735752 Title: qemu squeeze crashes BUG: unable to handle kernel NULL pointer dereference at (null) Status in QEMU: New Bug description: my virtual machine server (qemu+libvirt) regularly breaks down with such a record in the logs I can not even ping the guest, but i can ping host, but can not do something with it (cannot ssh login for example) And I dont know how to reproduce the problem :( Mar 15 17:58:04 mainhost kernel: [65866.976982] BUG: unable to handle kernel NULL pointer dereference at (null) Mar 15 17:58:04 mainhost kernel: [65866.977422] IP: [8100efbe] 0x8100efbe Mar 15 17:58:04 mainhost kernel: [65866.977663] PGD 7387b7067 PUD 81b723067 PMD 0. Mar 15 17:58:04 mainhost kernel: [65866.977902] Oops: [#1] SMP. Mar 15 17:58:04 mainhost kernel: [65866.978128] last sysfs file: /sys/devices/system/cpu/cpu3/topology/thread_siblings Mar 15 17:58:04 mainhost kernel: [65866.978572] CPU 1. Mar 15 17:58:04 mainhost kernel: [65866.978577] Modules linked in: nfs lockd nfs_acl auth_rpcgss sunrpc ebtable_nat ebtables coretemp bridge stp llc xt_state Mar 15 17:58:04 mainhost kernel: [65866.979737]. Mar 15 17:58:04 mainhost kernel: [65866.979959] Pid: 3369, comm: qemu-system-x86 Not tainted 2.6.37-gentoo-r2 #2 Intel S5000VSA/S5000VSA Mar 15 17:58:04 mainhost kernel: [65866.980085] RIP: 0010:[8100efbe] [8100efbe] 0x8100efbe Mar 15 17:58:04 mainhost kernel: [65866.980085] RSP: 0018:880738767a48 EFLAGS: 00010246 Mar 15 17:58:04 mainhost kernel: [65866.980085] RAX: RBX: f001 RCX: 88081cbeb948 Mar 15 17:58:04 mainhost kernel: [65866.980085] RDX: 0022 RSI: f001 RDI: 88081cbeb000 Mar 15 17:58:04 mainhost kernel: [65866.980085] RBP: 0001 R08: 000fee01 R09: 0022 Mar 15 17:58:04 mainhost kernel: [65866.980085] R10: 0080 R11: ea00 R12: 880818d83490 Mar 15 17:58:04 mainhost kernel: [65866.980085] R13: 155e5000 R14: R15: 0100 Mar 15 17:58:04 mainhost kernel: [65866.980085] FS: 7f5f25e4e700() GS:88009f68() knlGS:f80001175000 Mar 15 17:58:04 mainhost kernel: [65866.980085] CS: 0010 DS: 002b ES: 002b CR0: 8005003b Mar 15 17:58:04 mainhost kernel: [65866.980085] CR2: CR3: 000806be9000 CR4: 000426e0 Mar 15 17:58:04 mainhost kernel: [65866.980085] DR0: 0045 DR1: DR2: Mar 15 17:58:04 mainhost kernel: [65866.980085] DR3: 0005 DR6: 0ff0 DR7: 0400 Mar 15 17:58:04 mainhost kernel: [65866.980085] Process qemu-system-x86 (pid: 3369, threadinfo 880738766000, task 8808203ac360) Mar 15 17:58:04 mainhost kernel: [65866.980085] Stack: Mar 15 17:58:04 mainhost kernel: [65866.980085] 8806a30f3ff8 88075398 8100f06f Mar 15 17:58:04 mainhost kernel: [65866.980085] 0ff8 8807705d6b40 0ff8 810123f0 Mar 15 17:58:04
Re: [Qemu-devel] [PATCH] Fix conversions from pointer to int and vice versa
Am 24.02.2011 20:57, schrieb Stefan Weil: Am 24.02.2011 11:11, schrieb Markus Armbruster: Kevin Wolf kw...@redhat.com writes: Am 24.02.2011 08:21, schrieb Markus Armbruster: Stefan Weil w...@mail.berlios.de writes: Here the int values fds[0], sigfd, s, sock and fd are converted to void pointers which are later converted back to an int value. These conversions should always use intptr_t instead of unsigned long. They are needed for environments where sizeof(long) != sizeof(void *). To be precise: when you want to cast a pointer to a signed integer type and back without loss, intptr_t is the signed integer type to use. But here we're dealing with the opposite case: cast int to pointer and back. Signed-off-by: Stefan Weil w...@mail.berlios.de --- cpus.c | 8 migration-tcp.c | 4 ++-- migration-unix.c | 4 ++-- qemu-char.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cpus.c b/cpus.c index 0f33945..3c4e1b8 100644 --- a/cpus.c +++ b/cpus.c @@ -267,7 +267,7 @@ static void qemu_event_increment(void) static void qemu_event_read(void *opaque) { - int fd = (unsigned long)opaque; + int fd = (intptr_t)opaque; ssize_t len; char buffer[512]; Why can't you cast straight to int? You would get warnings about a pointer being cast to an integer of different size Fair enough. Stop reading here unless you like language-lawyering ;) (the behaviour is undefined if the integer is too small). Correct (I looked it up). The detour via intptr_t makes it implementation-defined. I think you might also get a warning for the opposite direction. Implementation-defined. The standard defines semantics of valid void * - intptr_t, uintptr_t - void *: you get your original pointer back (will compare equal). The standard is silent on converting integer type to pointer type and back. Doesn't matter. No sane implementation screws that up. That's correct. int or long to pointer and back normally works. But the compiler does not know whether the two conversions are ordered integer to pointer - pointer to integer or pointer to integer - integer to pointer. Here is a short example using int instead of long, so it will show the warnings on any linux host: int ptr2int(void *ptr) { return (int)ptr; } void *int2ptr(int i) { return (void *)i; } gcc -Wall -c intptr.c intptr.c: In function ‘ptr2int’: intptr.c:3: warning: cast from pointer to integer of different size intptr.c: In function ‘int2ptr’: intptr.c:8: warning: cast to pointer from integer of different size The same kind of warnings occur with the current qemu code when I cross compile using Debian's amd64-mingw32msvc-gcc. So the patch is needed for w64. For all other currently known host architectures, it is not needed, but nevertheless it will make the intention of the code clearer (as was pointed out in an earlier mail on this subject). Please apply the patch to qemu master. If needed, the patch's subject can be modified (w64: Fix conversions from pointer to int and vice versa) Thanks, Stefan No more comments? There was no nack, and for w64 the patch (or another solution) is needed. What can I do to get this patch committed to QEMU git master? Regards, Stefan W.
[Qemu-devel] Re: [PATCH v3] ui/sdl: Load optional QEMU icon
Am 16.02.2011 21:15, schrieb Stefan Weil: Load an optional QEMU icon file. If there is no icon file named qemu.bmp in QEMU's default search path, QEMU will run with the usual system default icon. A matching icon file will be loaded and used by X Windows managers or MS Windows while a QEMU instance is running. SDL requires icon files in 32x32x4 bmp format. v2: The first version of this patch also included qemu-icon.bmp and rules to handle this file. That part will now be published in a separate patch as soon as the QEMU community has chosen a common QEMU icon. The SDL code here is useful to try different icons. v3: White pixels are now used for transparency. This needs a 16 colour bmp file. Cc: Anthony Liguori aligu...@us.ibm.com Signed-off-by: Stefan Weil w...@mail.berlios.de --- ui/sdl.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/ui/sdl.c b/ui/sdl.c index 47ac49c..f5dbc93 100644 --- a/ui/sdl.c +++ b/ui/sdl.c @@ -816,6 +816,7 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) uint8_t data = 0; DisplayAllocator *da; const SDL_VideoInfo *vi; + char *filename; #if defined(__APPLE__) /* always use generic keymaps */ @@ -848,6 +849,18 @@ void sdl_display_init(DisplayState *ds, int full_screen, int no_frame) vi = SDL_GetVideoInfo(); host_format = *(vi-vfmt); + /* Load a 32x32x4 image. White pixels are transparent. */ + filename = qemu_find_file(QEMU_FILE_TYPE_BIOS, qemu-icon.bmp); + if (filename) { + SDL_Surface *image = SDL_LoadBMP(filename); + if (image) { + uint32_t colorkey = SDL_MapRGB(image-format, 255, 255, 255); + SDL_SetColorKey(image, SDL_SRCCOLORKEY, colorkey); + SDL_WM_SetIcon(image, NULL); + } + qemu_free(filename); + } + dcl = qemu_mallocz(sizeof(DisplayChangeListener)); dcl-dpy_update = sdl_update; dcl-dpy_resize = sdl_resize; Ping. No comments? No commit? Regards, Stefan W.
[Qemu-devel] Re: setting OEM ID in BIOS from qemu?
On Thu, Mar 17, 2011 at 01:43:04PM +0300, Michael Tokarev wrote: Hello. What's the possible way(s) to set OEM identification string in BIOS too, so that it provides ACPI tables with the given identification? A fwcfg entry probably needs to be added to pass the information. Then SeaBIOS could be extended to fill the tables it generates with the given fields. -Kevin
Re: [Qemu-devel] [PATCH] Fix conversions from pointer to int and vice versa
Thanks, applied. On Sun, Mar 20, 2011 at 2:07 PM, Stefan Weil w...@mail.berlios.de wrote: Am 24.02.2011 20:57, schrieb Stefan Weil: Am 24.02.2011 11:11, schrieb Markus Armbruster: Kevin Wolf kw...@redhat.com writes: Am 24.02.2011 08:21, schrieb Markus Armbruster: Stefan Weil w...@mail.berlios.de writes: Here the int values fds[0], sigfd, s, sock and fd are converted to void pointers which are later converted back to an int value. These conversions should always use intptr_t instead of unsigned long. They are needed for environments where sizeof(long) != sizeof(void *). To be precise: when you want to cast a pointer to a signed integer type and back without loss, intptr_t is the signed integer type to use. But here we're dealing with the opposite case: cast int to pointer and back. Signed-off-by: Stefan Weil w...@mail.berlios.de --- cpus.c | 8 migration-tcp.c | 4 ++-- migration-unix.c | 4 ++-- qemu-char.c | 4 ++-- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/cpus.c b/cpus.c index 0f33945..3c4e1b8 100644 --- a/cpus.c +++ b/cpus.c @@ -267,7 +267,7 @@ static void qemu_event_increment(void) static void qemu_event_read(void *opaque) { - int fd = (unsigned long)opaque; + int fd = (intptr_t)opaque; ssize_t len; char buffer[512]; Why can't you cast straight to int? You would get warnings about a pointer being cast to an integer of different size Fair enough. Stop reading here unless you like language-lawyering ;) (the behaviour is undefined if the integer is too small). Correct (I looked it up). The detour via intptr_t makes it implementation-defined. I think you might also get a warning for the opposite direction. Implementation-defined. The standard defines semantics of valid void * - intptr_t, uintptr_t - void *: you get your original pointer back (will compare equal). The standard is silent on converting integer type to pointer type and back. Doesn't matter. No sane implementation screws that up. That's correct. int or long to pointer and back normally works. But the compiler does not know whether the two conversions are ordered integer to pointer - pointer to integer or pointer to integer - integer to pointer. Here is a short example using int instead of long, so it will show the warnings on any linux host: int ptr2int(void *ptr) { return (int)ptr; } void *int2ptr(int i) { return (void *)i; } gcc -Wall -c intptr.c intptr.c: In function ‘ptr2int’: intptr.c:3: warning: cast from pointer to integer of different size intptr.c: In function ‘int2ptr’: intptr.c:8: warning: cast to pointer from integer of different size The same kind of warnings occur with the current qemu code when I cross compile using Debian's amd64-mingw32msvc-gcc. So the patch is needed for w64. For all other currently known host architectures, it is not needed, but nevertheless it will make the intention of the code clearer (as was pointed out in an earlier mail on this subject). Please apply the patch to qemu master. If needed, the patch's subject can be modified (w64: Fix conversions from pointer to int and vice versa) Thanks, Stefan No more comments? There was no nack, and for w64 the patch (or another solution) is needed. What can I do to get this patch committed to QEMU git master? Regards, Stefan W.
[Qemu-devel] [Bug 739088] Re: I/O errors after Save/Restore
** Attachment added: dmesg after restoring https://bugs.launchpad.net/qemu/+bug/739088/+attachment/1925364/+files/restore1.jpg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/739088 Title: I/O errors after Save/Restore Status in QEMU: New Bug description: qemu-kvm commit: b73357ecd2b14c057134cb71d29447b5b988c516 ( Author: Marcelo Tosatti mtosa...@redhat.comDate: Wed Mar 16 17:04:16 2011 -0300) kvm commit: a72e315c509376bbd1e121219c3ad9f23973923f After restoring from saved img, some I/O errors appear in dmesg and file system is read-only. I'm sure that the guest runs normally before saving. See the pictures attached in detail. Reproduce steps: 1.create a guest: qemu-img create -b /share/xvs/img/app/ia32e_SMP.img -f qcow2 /root/test0320.img qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/test0320.img 2.save the guest: on qemu monitor: migrate exec:dd of=/root/test-save.img 3.quit from qemu: q command on qemu monitor 4.restore from img just saved: qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -incoming=/roo/test-save.img 5.see dmesg in restored guest, you'll find some I/O errors. And run some commands such as ps, touch,reboot and so on. Then some I/O errors appear.
[Qemu-devel] [Bug 739088] Re: I/O errors after Save/Restore
** Attachment added: running commands after restoring https://bugs.launchpad.net/qemu/+bug/739088/+attachment/1925365/+files/restore2.jpg -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/739088 Title: I/O errors after Save/Restore Status in QEMU: New Bug description: qemu-kvm commit: b73357ecd2b14c057134cb71d29447b5b988c516 ( Author: Marcelo Tosatti mtosa...@redhat.comDate: Wed Mar 16 17:04:16 2011 -0300) kvm commit: a72e315c509376bbd1e121219c3ad9f23973923f After restoring from saved img, some I/O errors appear in dmesg and file system is read-only. I'm sure that the guest runs normally before saving. See the pictures attached in detail. Reproduce steps: 1.create a guest: qemu-img create -b /share/xvs/img/app/ia32e_SMP.img -f qcow2 /root/test0320.img qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/test0320.img 2.save the guest: on qemu monitor: migrate exec:dd of=/root/test-save.img 3.quit from qemu: q command on qemu monitor 4.restore from img just saved: qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -incoming=/roo/test-save.img 5.see dmesg in restored guest, you'll find some I/O errors. And run some commands such as ps, touch,reboot and so on. Then some I/O errors appear.
[Qemu-devel] [Bug 739088] [NEW] I/O errors after Save/Restore
Public bug reported: qemu-kvm commit: b73357ecd2b14c057134cb71d29447b5b988c516 ( Author: Marcelo Tosatti mtosa...@redhat.comDate: Wed Mar 16 17:04:16 2011 -0300) kvm commit: a72e315c509376bbd1e121219c3ad9f23973923f After restoring from saved img, some I/O errors appear in dmesg and file system is read-only. I'm sure that the guest runs normally before saving. See the pictures attached in detail. Reproduce steps: 1.create a guest: qemu-img create -b /share/xvs/img/app/ia32e_SMP.img -f qcow2 /root/test0320.img qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/test0320.img 2.save the guest: on qemu monitor: migrate exec:dd of=/root/test-save.img 3.quit from qemu: q command on qemu monitor 4.restore from img just saved: qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -incoming=/roo/test-save.img 5.see dmesg in restored guest, you'll find some I/O errors. And run some commands such as ps, touch,reboot and so on. Then some I/O errors appear. ** Affects: qemu Importance: Undecided Status: New ** Tags: error io -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/739088 Title: I/O errors after Save/Restore Status in QEMU: New Bug description: qemu-kvm commit: b73357ecd2b14c057134cb71d29447b5b988c516 ( Author: Marcelo Tosatti mtosa...@redhat.comDate: Wed Mar 16 17:04:16 2011 -0300) kvm commit: a72e315c509376bbd1e121219c3ad9f23973923f After restoring from saved img, some I/O errors appear in dmesg and file system is read-only. I'm sure that the guest runs normally before saving. See the pictures attached in detail. Reproduce steps: 1.create a guest: qemu-img create -b /share/xvs/img/app/ia32e_SMP.img -f qcow2 /root/test0320.img qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/test0320.img 2.save the guest: on qemu monitor: migrate exec:dd of=/root/test-save.img 3.quit from qemu: q command on qemu monitor 4.restore from img just saved: qemu-system-x86_64 -m 256 -net nic,macaddr=00:16:3e:06:8a:08,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -incoming=/roo/test-save.img 5.see dmesg in restored guest, you'll find some I/O errors. And run some commands such as ps, touch,reboot and so on. Then some I/O errors appear.
[Qemu-devel] [Bug 739092] [NEW] guest hangs when using network after live migration
Public bug reported: qemu-kvm commit: b73357ecd2b14c057134cb71d29447b5b988c516 ( Author: Marcelo Tosatti mtosa...@redhat.com Date: Wed Mar 16 17:04:16 2011 -0300) kvm commit: a72e315c509376bbd1e121219c3ad9f23973923f Guest hangs when I run command ssh/netstat using network after live migration. ssh or netstat hangs even if I press Ctrl+C to interrupt. And I cannnot connect the guest using ssh GustIP from the host, though the sshd is still running in the guest. Reproduce steps: 1.start a tcp daemon for migration: qemu-system-x86_64 -m 256 -smp 4 -incoming tcp:localhost: -no-acpi -net nic,macaddr=00:16:3e:63:d5:90,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/lv.img 2.create a guest: qemu-system-x86_64 -m 256 -smp 4 -no-acpi -net nic,macaddr=00:16:3e:63:d5:90,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/lv.img 3.migration: migrate tcp:localhost: 4.run command in guest: ssh root@192.168.1.177 ** Affects: qemu Importance: Undecided Status: New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/739092 Title: guest hangs when using network after live migration Status in QEMU: New Bug description: qemu-kvm commit: b73357ecd2b14c057134cb71d29447b5b988c516 ( Author: Marcelo Tosatti mtosa...@redhat.com Date: Wed Mar 16 17:04:16 2011 -0300) kvm commit: a72e315c509376bbd1e121219c3ad9f23973923f Guest hangs when I run command ssh/netstat using network after live migration. ssh or netstat hangs even if I press Ctrl+C to interrupt. And I cannnot connect the guest using ssh GustIP from the host, though the sshd is still running in the guest. Reproduce steps: 1.start a tcp daemon for migration: qemu-system-x86_64 -m 256 -smp 4 -incoming tcp:localhost: -no-acpi -net nic,macaddr=00:16:3e:63:d5:90,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/lv.img 2.create a guest: qemu-system-x86_64 -m 256 -smp 4 -no-acpi -net nic,macaddr=00:16:3e:63:d5:90,model=rtl8139 -net tap,script=/etc/kvm/qemu-ifup -hda /root/lv.img 3.migration: migrate tcp:localhost: 4.run command in guest: ssh root@192.168.1.177