Re: [Qemu-devel] TCG flow vs dyngen

2011-01-24 Thread Dushyant Bansal
You should see this pdf (www.ecs.syr.edu/faculty/yin/Teaching/TC2010/Proj4.pdf). It talks about tracing the instructions. -- Dushyant Wow thank you! It sounds incredibly interesting!! What we really need is to insert a function call into the translated code, so when each instruction is exec

RE: [Qemu-devel] [PATCH] Correct win32 timers deleting

2011-01-24 Thread Pavel Dovgaluk
> > diff --git a/qemu-timer.c b/qemu-timer.c index 95814af..548f2e5 > 100644 > > --- a/qemu-timer.c > > +++ b/qemu-timer.c > > @@ -972,7 +972,10 @@ static int win32_start_timer(struct > qemu_alarm_timer > > *t) > > Your patch is broken here. I checked the patch file, my "sent items" folder in o

Re: [Qemu-devel] Re: [PATCH 4/7] Get rid of QemuMutex and teach its callers about GStaticMutex

2011-01-24 Thread Jan Kiszka
On 2011-01-25 01:02, Anthony Liguori wrote: > On 01/24/2011 04:24 PM, Jan Kiszka wrote: >> On 2011-01-24 22:00, Anthony Liguori wrote: >> >>> Signed-off-by: Anthony Liguori >>> >>> diff --git a/cpus.c b/cpus.c >>> index 9cf7e6e..0f8e33b 100644 >>> --- a/cpus.c >>> +++ b/cpus.c >>> @@ -321,8 +321

Re: [Qemu-devel] Re: Errors on MMIO read access on VM suspend / resume operations

2011-01-24 Thread Jan Kiszka
On 2011-01-25 04:13, Stefan Berger wrote: > On 01/24/2011 05:34 PM, Jan Kiszka wrote: >> On 2011-01-24 19:27, Stefan Berger wrote: >>> On 01/18/2011 03:53 AM, Jan Kiszka wrote: On 2011-01-18 04:03, Stefan Berger wrote: > On 01/16/2011 09:43 AM, Avi Kivity wrote: >> On 01/14/2011 09:27

[Qemu-devel] [PATCH] Correct win32 timers deleting

2011-01-24 Thread Pavel Dovgaluk
This patch fixes resource leaks caused by quitting qemu with exit() function on win32 host. Timer object should be freed not only at the end of the main function, but by every of the application exits. Signed-off-by: Pavel Dovgalyuk --- qemu-timer.c | 16 +--- vl.c |1 -

Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2011-01-24 Thread Stefan Hajnoczi
On Mon, Jan 24, 2011 at 8:05 PM, Kevin Wolf wrote: > Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: >> On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: >>> Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: > Am 12.12.

Re: [Qemu-devel] [RFC 0/7] Introduce hard dependency on glib

2011-01-24 Thread Edgar E. Iglesias
On Mon, Jan 24, 2011 at 06:24:13PM -0600, Anthony Liguori wrote: > On 01/24/2011 03:00 PM, Anthony Liguori wrote: > > Both the recent I/O loop and threadlet series have me concerned that we're > > digging ourselves deeper into the NIH hole. I think it's time we look at > > something radical to let

[Qemu-devel] [PATCH] target-sh4: fix TLB invalidation code

2011-01-24 Thread Alexandre Courbot
In cpu_sh4_invalidate_tlb, the UTLB was invalidated twice and the ITLB left unchaged, probably because of some unfortunate copy/paste. Signed-off-by: Alexandre Courbot --- target-sh4/helper.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target-sh4/helper.c b/target

[Qemu-devel] [PATCH v2] linux-user/FLAT: allow targets to override FLAT processing

2011-01-24 Thread Mike Frysinger
This brings flatload.c more in line with the current Linux FLAT loader which allows targets to handle various FLAT aspects in their own way. For the common behavior, the new functions get stubbed out. Signed-off-by: Mike Frysinger --- v2 - also add flat_argvp_envp_on_stack() just like Lin

[Qemu-devel] [PATCH] target-sh4: update PTEH upon MMU exception

2011-01-24 Thread Alexandre Courbot
Update the PTEH register to contain the VPN at which an MMU exception occured as specified by the SH4 reference. --- target-sh4/helper.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-sh4/helper.c b/target-sh4/helper.c index 2d76f22..c34d2f5 100644 --- a/target-s

[Qemu-devel] [PATCH] target-sh4: fix index of address read error exception

2011-01-24 Thread Alexandre Courbot
Exception index of address read error should be 0x0e0. --- target-sh4/helper.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/target-sh4/helper.c b/target-sh4/helper.c index 45449ea..2d76f22 100644 --- a/target-sh4/helper.c +++ b/target-sh4/helper.c @@ -479,7 +479,7 @@ i

Re: [Qemu-devel] Re: Errors on MMIO read access on VM suspend / resume operations

2011-01-24 Thread Stefan Berger
On 01/24/2011 05:34 PM, Jan Kiszka wrote: On 2011-01-24 19:27, Stefan Berger wrote: On 01/18/2011 03:53 AM, Jan Kiszka wrote: On 2011-01-18 04:03, Stefan Berger wrote: On 01/16/2011 09:43 AM, Avi Kivity wrote: On 01/14/2011 09:27 PM, Stefan Berger wrote: Can you sprinkle some printfs() aroun

[Qemu-devel] [Bug 706766] Re: [Qemu-kvm] qemu-img fail to create qcow image

2011-01-24 Thread xudong
Patch worked with testing. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/706766 Title: [Qemu-kvm] qemu-img fail to create qcow image Status in QEMU: Confirmed Bug description: On qemu-kvm tre

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Richard Henderson
On 01/24/2011 01:44 PM, Stefano Bonifazi wrote: > Wow wonderful! So you fixed the code for PIC (ET_DYN) support? Yes. > how can I get your sources? I was mistaken -- a later version of the patch set was in fact merged. I simply forgot to delete my working branch afterward. r~

Re: [Qemu-devel] TCG flow vs dyngen

2011-01-24 Thread Rob Landley
On 01/24/2011 03:16 PM, Stefano Bonifazi wrote: > Hi! Thanks for replying me! >> The thing is, the kernel currently _does_ work, so studying the relevant >> kernel code (and possibly the dynamic loader code) is one way to learn >> how it currently works. > Sorry what kernel? Qemu's? Linux's? QEMU

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Anthony Liguori
On 01/24/2011 06:22 PM, Michael Roth wrote: Actually, copyfile is the proposed open/read/write/close interface. getfile is the current interface, and it seems to be a contentious one. I've discussed it quite a bit with Jes here and in the last couple RFCs. I think the current course is that w

Re: [Qemu-devel] [RFC 0/7] Introduce hard dependency on glib

2011-01-24 Thread Anthony Liguori
On 01/24/2011 03:00 PM, Anthony Liguori wrote: Both the recent I/O loop and threadlet series have me concerned that we're digging ourselves deeper into the NIH hole. I think it's time we look at something radical to let us borrow more code from existing projects instead of reinventing everything

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Michael Roth
On 01/24/2011 05:40 PM, Anthony Liguori wrote: On 01/24/2011 04:48 PM, Richard W.M. Jones wrote: On Mon, Jan 24, 2011 at 04:26:09PM -0600, Anthony Liguori wrote: On 01/24/2011 04:20 PM, Richard W.M. Jones wrote: On Mon, Jan 24, 2011 at 10:08:09PM +, Richard W.M. Jones wrote: You might as

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 19:06, Mike Frysinger wrote: > On Mon, Jan 24, 2011 at 11:29, Mulyadi Santosa wrote: >> I wrote an article about understanding ELF years ago, here is the URL: >> http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html > > i also highly recomm

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 11:29, Mulyadi Santosa wrote: > I wrote an article about understanding ELF years ago, here is the URL: > http://www.linuxforums.org/articles/understanding-elf-using-readelf-and-objdump_125.html i also highly recommend Linkers & Loaders: http://linker.iecc.com/ some pie

Re: [Qemu-devel] Re: [PATCH 4/7] Get rid of QemuMutex and teach its callers about GStaticMutex

2011-01-24 Thread Anthony Liguori
On 01/24/2011 04:24 PM, Jan Kiszka wrote: On 2011-01-24 22:00, Anthony Liguori wrote: Signed-off-by: Anthony Liguori diff --git a/cpus.c b/cpus.c index 9cf7e6e..0f8e33b 100644 --- a/cpus.c +++ b/cpus.c @@ -321,8 +321,8 @@ void vm_stop(int reason) #include "qemu-thread.h" -QemuMutex qemu

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 16:52, Stefano Bonifazi wrote: >> but that can happen with the app running natively too, so any app not >> handling MAP_FIXED failures is buggy and not qemu's problem. > > How? For what I learned each process executing on a OS with an mmu sees its > virtual address space, an

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Anthony Liguori
On 01/24/2011 04:48 PM, Richard W.M. Jones wrote: On Mon, Jan 24, 2011 at 04:26:09PM -0600, Anthony Liguori wrote: On 01/24/2011 04:20 PM, Richard W.M. Jones wrote: On Mon, Jan 24, 2011 at 10:08:09PM +, Richard W.M. Jones wrote: You might as well reuse the libguestfs API

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 16:44, Stefano Bonifazi wrote: >>   http://lists.gnu.org/archive/html/qemu-devel/2010-07/msg01626.html > > A noob question, how can I get your sources? Is there a simpler solution > than "copy&paste" all the code from your messages into patches and then > applying them? Can

[Qemu-devel] [PULL 00/23] Block patches

2011-01-24 Thread Kevin Wolf
The following changes since commit 0bfe006c5380c5f8a485a55ded3329fbbc224396: multiboot: Fix upper memory size in multiboot info (2011-01-23 22:44:13 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony Aurelien Jarno (1): qcow2: fix unaligned acces

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Stefano Bonifazi
Yes. Have a look at http://lists.gnu.org/archive/html/qemu-devel/2010-07/msg01626.html where I tried to clean this up last year. The patch never got properly reviewed, however. All that said, unless you have an executable that's been properly prepared for relocation, e.g. an ET_DYN binar

[Qemu-devel] git rm Changelog?

2011-01-24 Thread Paolo Bonzini
... or at least "git mv Changelog Changelog.old"? It only goes back to 0.12.0 so that there is hardly a place in the git repo to look for new features in 0.13 and 0.14. Paolo

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Richard W.M. Jones
On Mon, Jan 24, 2011 at 04:26:09PM -0600, Anthony Liguori wrote: > On 01/24/2011 04:20 PM, Richard W.M. Jones wrote: > >On Mon, Jan 24, 2011 at 10:08:09PM +, Richard W.M. Jones wrote: > >>You might as well reuse the libguestfs API here because you get the > >>benefit of all the code that's been

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Stefano Bonifazi
how can the ldso possibly prevent clashes ? it has no idea what addresses an app will ask for at runtime. plus, if the kernel is employing ASLR (which isnt uncommon nowadays), the load addresses could be anywhere. -mike Well not alone, in my mind ld.so asks the memory manager through calling

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Richard W.M. Jones
On Mon, Jan 24, 2011 at 10:08:09PM +, Richard W.M. Jones wrote: > You might as well reuse the libguestfs API here because you get the > benefit of all the code that's been written, all the tools on top, and > a far more comprehensive API that would take you another 2 years to > implement. To p

[Qemu-devel] Re: [PATCH 2/7] Enable I/O thread and VNC threads by default

2011-01-24 Thread Anthony Liguori
On 01/24/2011 03:00 PM, Anthony Liguori wrote: Leave the disable options for now to help with testing but these will be removed once we're confident in the thread implementations. Disabled code bit rots. These have been in tree long enough that we need to either commit to making them work or ju

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Anthony Liguori
On 01/24/2011 04:20 PM, Richard W.M. Jones wrote: On Mon, Jan 24, 2011 at 10:08:09PM +, Richard W.M. Jones wrote: You might as well reuse the libguestfs API here because you get the benefit of all the code that's been written, all the tools on top, and a far more comprehensive API that w

[Qemu-devel] Re: [PATCH 4/7] Get rid of QemuMutex and teach its callers about GStaticMutex

2011-01-24 Thread Jan Kiszka
On 2011-01-24 22:00, Anthony Liguori wrote: > Signed-off-by: Anthony Liguori > > diff --git a/cpus.c b/cpus.c > index 9cf7e6e..0f8e33b 100644 > --- a/cpus.c > +++ b/cpus.c > @@ -321,8 +321,8 @@ void vm_stop(int reason) > > #include "qemu-thread.h" > > -QemuMutex qemu_global_mutex; > -static

[Qemu-devel] Re: Errors on MMIO read access on VM suspend / resume operations

2011-01-24 Thread Jan Kiszka
On 2011-01-24 19:27, Stefan Berger wrote: > On 01/18/2011 03:53 AM, Jan Kiszka wrote: >> On 2011-01-18 04:03, Stefan Berger wrote: >>> On 01/16/2011 09:43 AM, Avi Kivity wrote: On 01/14/2011 09:27 PM, Stefan Berger wrote: >> Can you sprinkle some printfs() arount kvm_run (in qemu-kvm.c) to

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 17:24, Stefano Bonifazi wrote: >> how can the ldso possibly prevent clashes ?  it has no idea what >> addresses an app will ask for at runtime. >> >> plus, if the kernel is employing ASLR (which isnt uncommon nowadays), >> the load addresses could be anywhere. > > Well not a

[Qemu-devel] Re: KVM call agenda for Jan 25

2011-01-24 Thread Anthony Liguori
On 01/24/2011 07:25 AM, Chris Wright wrote: Please send in any agenda items you are interested in covering. - coroutines for the block layer - glib everywhere Regards, Anthony Liguori thanks, -chris -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a messa

Re: [Qemu-devel] Re: [RFC][PATCH v6 08/23] virtagent: add va.getfile RPC

2011-01-24 Thread Richard W.M. Jones
On Fri, Jan 21, 2011 at 12:23:40PM -0600, Michael Roth wrote: > getfile() is confusingly named however, it's really just a means to > peek at a text file like /proc/meminfo. You might as well reuse the libguestfs API here because you get the benefit of all the code that's been written, all the too

Re: [Qemu-devel] Re: [RFC/PATCH] elfload: add FDPIC support

2011-01-24 Thread Stefano Bonifazi
On 01/24/2011 10:27 PM, Mike Frysinger wrote: On Mon, Jan 24, 2011 at 16:06, Stefano Bonifazi wrote: I don't understand.. what is the difference between pie binary for pcc and for your architecture? as i said, i think this is all irrelevant to what you want to do. but since you asked and i fee

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-24 Thread Jan Kiszka
On 2011-01-24 22:35, Blue Swirl wrote: > On Mon, Jan 24, 2011 at 2:08 PM, Jan Kiszka wrote: >> On 2011-01-21 19:49, Blue Swirl wrote: > I'd add fourth possible class: > - device, CPU and machine configuration, like nographic, > win2k_install_hack, no_hpet, smp_cpus etc. Maybe also >>>

[Qemu-devel] [PATCH 21/23] scsi: Allow scsi_bus_legacy_add_drive() to set removable bit

2011-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi scsi-disk devices may wish to override the removable bit. Add support for a qdev property on SCSI devices. This is will be used by usb-msd. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- hw/pci-hotplug.c |2 +- hw/scsi-bus.c|8 ++-- hw/scs

Re: [Qemu-devel] Re: [RFC 0/7] Introduce hard dependency on glib

2011-01-24 Thread Anthony Liguori
On 01/24/2011 03:28 PM, Paolo Bonzini wrote: On 01/24/2011 10:00 PM, Anthony Liguori wrote: Both the recent I/O loop and threadlet series have me concerned that we're digging ourselves deeper into the NIH hole. I think it's time we look at something radical to let us borrow more code from exis

[Qemu-devel] Re: [PULL 00/23] Block patches

2011-01-24 Thread Anthony Liguori
On 01/24/2011 03:10 PM, Kevin Wolf wrote: The following changes since commit 0bfe006c5380c5f8a485a55ded3329fbbc224396: multiboot: Fix upper memory size in multiboot info (2011-01-23 22:44:13 +0100) are available in the git repository at: git://repo.or.cz/qemu/kevin.git for-anthony

[Qemu-devel] [PATCH 23/23] docs: Document scsi-disk and usb-storage removable parameter

2011-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- docs/qdev-device-use.txt | 13 +++-- 1 files changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/qdev-device-use.txt b/docs/qdev-device-use.txt index f2f9b75..4bb2be8 100644 --- a/docs/qdev-de

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Stefano Bonifazi
but that can happen with the app running natively too, so any app not handling MAP_FIXED failures is buggy and not qemu's problem. -mike How? For what I learned each process executing on a OS with an mmu sees its virtual address space, and normally only its code is loaded there (well I am lear

[Qemu-devel] [PATCH 22/23] usb-msd: Propagate removable bit to SCSI device

2011-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi USB Mass Storage Devices sometimes have the RMB (removable) bit set in the SCSI INQUIRY response. Thumbdrives tend to have the bit set whereas hard disks do not. Operating systems differentiate between removable devices and fixed devices. Under Linux, the anaconda install

Re: [Qemu-devel] [PATCH 28/35] kvm: x86: Introduce kvmclock device to save/restore its state

2011-01-24 Thread Blue Swirl
On Mon, Jan 24, 2011 at 2:08 PM, Jan Kiszka wrote: > On 2011-01-21 19:49, Blue Swirl wrote: I'd add fourth possible class:  - device, CPU and machine configuration, like nographic, win2k_install_hack, no_hpet, smp_cpus etc. Maybe also irqchip_in_kernel could fit here, though it

[Qemu-devel] [PATCH 18/23] blockdev: Fix drive_del not to crash when drive is not in use

2011-01-24 Thread Kevin Wolf
From: Markus Armbruster Watch this: (qemu) drive_add 0 if=none,file=tmp.img OK (qemu) info block none0: type=hd removable=0 file=tmp.img ro=0 drv=raw encrypted=0 (qemu) drive_del none0 Segmentation fault (core dumped) do_drive_del()'s code to clean up the pointer from a

[Qemu-devel] [PATCH 17/23] blockdev: Make drive_init() use error_report()

2011-01-24 Thread Kevin Wolf
From: Markus Armbruster This makes the errors point to the error location, and fixes drive_add to report errors in the monitor instead of stderr. While there, tweak a few error messages for consistency. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf -

Re: [Qemu-devel] Re: [RFC/PATCH] elfload: add FDPIC support

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 16:06, Stefano Bonifazi wrote: > I don't understand.. what is the difference between pie binary for pcc and > for your architecture? as i said, i think this is all irrelevant to what you want to do. but since you asked and i feel like writing ... i have no idea what "pcc"

[Qemu-devel] [PATCH 15/23] Fix block migration when the device size is not a multiple of 1 MB

2011-01-24 Thread Kevin Wolf
From: Pierre Riteau b02bea3a85cc939f09aa674a3f1e4f36d418c007 added a check on the return value of bdrv_write and aborts migration when it fails. However, if the size of the block device to migrate is not a multiple of BLOCK_SIZE (currently 1 MB), the last bdrv_write will fail with -EIO. Fixed by

[Qemu-devel] Re: [RFC 0/7] Introduce hard dependency on glib

2011-01-24 Thread Paolo Bonzini
On 01/24/2011 10:00 PM, Anthony Liguori wrote: Both the recent I/O loop and threadlet series have me concerned that we're digging ourselves deeper into the NIH hole. I think it's time we look at something radical to let us borrow more code from existing projects instead of reinventing everything

[Qemu-devel] [PATCH 13/23] Documentation: Add qemu-img check/rebase

2011-01-24 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- qemu-img.texi | 41 + 1 files changed, 41 insertions(+), 0 deletions(-) diff --git a/qemu-img.texi b/qemu-img.texi index 1b90ddb..ced64a4 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -59,6 +59,13 @@ lists all snapshots

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 15:58, Stefano Bonifazi wrote: >> review the mmap() man page ... MAP_FIXED is always a *suggestion* and >> never a requirement. the app must check the return value to see what >> the kernel actually gave it. > > Sorry, wrong! > > MAP_FIXED > Don't interpret ad

Re: [Qemu-devel] TCG flow vs dyngen

2011-01-24 Thread Stefano Bonifazi
Hi! Thanks for replying me! The thing is, the kernel currently _does_ work, so studying the relevant kernel code (and possibly the dynamic loader code) is one way to learn how it currently works. Sorry what kernel? Qemu's? Linux's?

[Qemu-devel] [PATCH 16/23] blockdev: Fix error message for invalid -drive CHS

2011-01-24 Thread Kevin Wolf
From: Markus Armbruster When cyls, heads or secs are out of range, the error message prints buf, which points to the value of option "if". Bogus, may even be null. Drop that. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- blockdev.c |6 +++--

[Qemu-devel] [PATCH 08/23] ide: kill ide_dma_submit_check

2011-01-24 Thread Kevin Wolf
From: Christoph Hellwig Merge ide_dma_submit_check into it's only caller. Also use tail recursion using a goto instead of a real recursion - this avoid overflowing the stack in the pathological situation of an recurring error that is ignored. We'll still be busy looping in ide_dma_cb, but at lea

[Qemu-devel] [PATCH 19/23] block: Use backing format driver during image creation

2011-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi The backing format should be honored during image creation. For some reason we currently use the image format to open the backing file. This fails when the backing file has a different format than the image being created. Keep the image and backing format drivers complete

[Qemu-devel] [PATCH 12/23] ide: Remove unneeded null pointer check

2011-01-24 Thread Kevin Wolf
From: Stefan Weil With bm == NULL, other code in the same function would crash. This bug was reported by cppcheck: hw/ide/pci.c:280: error: Possible null pointer dereference: bm Cc: Michael S. Tsirkin Signed-off-by: Stefan Weil Signed-off-by: Kevin Wolf --- hw/ide/pci.c |4 +--- 1 files

[Qemu-devel] [PATCH 06/23] ide: factor dma handling helpers

2011-01-24 Thread Kevin Wolf
From: Christoph Hellwig Factor the DMA I/O path that is duplicated between read and write commands, into common helpers using the s->is_read flag added for the macio ATA controller. Signed-off-by: Christoph Hellwig Signed-off-by: Kevin Wolf --- hw/ide/core.c | 103 +--

[Qemu-devel] [PATCH 14/23] qed: Refuse to create images on block devices

2011-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi QED relies on the underlying filesystem to extend the file and maintain its size. Check that images are not created on a block device. Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- block/qed.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-

[Qemu-devel] [PATCH 20/23] scsi-disk: Allow overriding SCSI INQUIRY removable bit

2011-01-24 Thread Kevin Wolf
From: Stefan Hajnoczi Provide the "removable" qdev property bit to override the SCSI INQUIRY removable (RMB) bit for non-CDROM devices. This will be used by USB Mass Storage Devices, which sometimes have this guest-visible bit set and sometimes do not. They therefore requires a means for user c

[Qemu-devel] [PATCH 07/23] ide: also reset io_buffer_index for writes

2011-01-24 Thread Kevin Wolf
From: Christoph Hellwig Currenly the code only resets the io_buffer_index field for reads, but the code seems to expect this for all types of I/O. I guess we simply don't hit large enough transfers that would require this often enough. Signed-off-by: Christoph Hellwig Signed-off-by: Kevin Wolf

[Qemu-devel] [PATCH 05/23] Avoid divide by zero when there is no block device to migrate

2011-01-24 Thread Kevin Wolf
From: Pierre Riteau When block migration is requested and no read-write block device is present, a divide by zero exception is triggered because total_sector_sum equals zero. Signed-off-by: Pierre Riteau Signed-off-by: Kevin Wolf --- block-migration.c |7 ++- 1 files changed, 6 insert

[Qemu-devel] [PATCH 10/23] qcow2: Use QcowCache

2011-01-24 Thread Kevin Wolf
Use the new functions of qcow2-cache.c for everything that works on refcount block and L2 tables. Signed-off-by: Kevin Wolf --- block/qcow2-cache.c| 10 ++ block/qcow2-cluster.c | 208 +- block/qcow2-refcount.c | 260 --

[Qemu-devel] [PATCH 02/23] qemu-img snapshot: Use writeback caching

2011-01-24 Thread Kevin Wolf
None of the other qemu-img subcommands uses writethrough, and there's no reason why snapshot should be special. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi --- qemu-img.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index afd9ed2..

[Qemu-devel] [PATCH 04/23] Make strtosz() return int64_t instead of ssize_t

2011-01-24 Thread Kevin Wolf
From: Jes Sorensen strtosz() needs to return a 64 bit type even on 32 bit architectures. Otherwise qemu-img will fail to create disk images >= 2GB Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- cutils.c |8 monitor.c |2 +- qemu-common.h |4 ++-- qemu-

[Qemu-devel] [PATCH 01/23] qcow2: fix unaligned access

2011-01-24 Thread Kevin Wolf
From: Aurelien Jarno cpu_to_be64w() is called with an obviously non-aligned pointer. Use cpu_to_be64wu() instead. It fixes unaligned accesses errors on IA64 hosts. Cc: Kevin Wolf Signed-off-by: Aurelien Jarno Signed-off-by: Kevin Wolf --- block/qcow2-cluster.c |2 +- 1 files changed, 1 i

[Qemu-devel] [PATCH 11/23] qcow2: Batch flushes for COW

2011-01-24 Thread Kevin Wolf
qcow2 calls bdrv_flush() after performing COW in order to ensure that the L2 table change is never written before the copy is safe on disk. Now that the L2 table is cached, we can wait with flushing until we write out the next L2 table. Signed-off-by: Kevin Wolf --- block/qcow2-cache.c | 20

[Qemu-devel] [RESEND PATCH 3/3] pulseaudio: tweak config

2011-01-24 Thread Gerd Hoffmann
Zap unused divisor field. Raise the buffer size default. Signed-off-by: Gerd Hoffmann --- audio/paaudio.c | 10 +- 1 files changed, 1 insertions(+), 9 deletions(-) diff --git a/audio/paaudio.c b/audio/paaudio.c index 75e3ea0..fb4510e 100644 --- a/audio/paaudio.c +++ b/audio/paaudio.c

[Qemu-devel] [PATCH 09/23] qcow2: Add QcowCache

2011-01-24 Thread Kevin Wolf
This adds some new cache functions to qcow2 which can be used for caching refcount blocks and L2 tables. When used with cache=writethrough they work like the old caching code which is spread all over qcow2, so for this case we have merely a cleanup. The interesting case is with writeback caching (

[Qemu-devel] [RESEND PATCH 2/3] pulseaudio: setup buffer attrs

2011-01-24 Thread Gerd Hoffmann
Request reasonable buffer sizes from pulseaudio. Without this pa_simple_write() can block quite long and lead to dropouts, especially with guests which use small audio ring buffers. Signed-off-by: Gerd Hoffmann --- audio/paaudio.c | 12 +++- 1 files changed, 11 insertions(+), 1 deleti

Re: [Qemu-devel] Re: [RFC/PATCH] elfload: add FDPIC support

2011-01-24 Thread Stefano Bonifazi
On 01/24/2011 08:11 PM, Mike Frysinger wrote: On Mon, Jan 24, 2011 at 08:34, Stefano Bonifazi wrote: Is FDPIC something different than simply PIC code (position independent code)? FDPIC ELF is the ELF PIE format used on NOMMU systems so that both the text and data regions may be located anywher

[Qemu-devel] [RESEND PATCH 1/3] pulseaudio: process 1/4 buffer max at once

2011-01-24 Thread Gerd Hoffmann
Limit the size of data pieces processed by the pulseaudio worker threads. Never ever process more than 1/4 of the buffer at once. Background: The buffer area currently processed by the pulseaudio thread is blocked, i.e. the main thread (or iothread) can't fill in more data there. The buffer proc

[Qemu-devel] [PATCH 03/23] do_snapshot_blkdev() error on missing snapshot_file argument

2011-01-24 Thread Kevin Wolf
From: Jes Sorensen Current code does not support snapshot internally to the running image. Error in case no snapshot_file is specified. Signed-off-by: Jes Sorensen Signed-off-by: Kevin Wolf --- blockdev.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/blockdev.c

[Qemu-devel] [RFC 0/7] Introduce hard dependency on glib

2011-01-24 Thread Anthony Liguori
Both the recent I/O loop and threadlet series have me concerned that we're digging ourselves deeper into the NIH hole. I think it's time we look at something radical to let us borrow more code from existing projects instead of reinventing everything through trial and error. This series introduces

[Qemu-devel] [PATCH 5/7] threads: get rid of QemuCond and teach callers about GCond

2011-01-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/cpu-defs.h b/cpu-defs.h index 8d4bf86..9343824 100644 --- a/cpu-defs.h +++ b/cpu-defs.h @@ -204,7 +204,7 @@ typedef struct CPUWatchpoint { uint32_t stop; /* Stop request */ \ uint32_t stopped; /* Artificially

[Qemu-devel] [PATCH] Fix vnc memory corruption with width = 1400

2011-01-24 Thread Gerd Hoffmann
[ note: found while cleaning up my git branches, must be quite old, rebase worked fine, looks like this one never made it upstream, resubmitting now ... ] vnc assumes that the screen width is a multiple of 16 in several places. If this is not the case vnc will overrun buffers, corr

[Qemu-devel] [PATCH 4/7] Get rid of QemuMutex and teach its callers about GStaticMutex

2011-01-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/cpus.c b/cpus.c index 9cf7e6e..0f8e33b 100644 --- a/cpus.c +++ b/cpus.c @@ -321,8 +321,8 @@ void vm_stop(int reason) #include "qemu-thread.h" -QemuMutex qemu_global_mutex; -static QemuMutex qemu_fair_mutex; +GStaticMutex qemu_global_mutex; +static

[Qemu-devel] [PATCH 1/7] io-thread: make sure to initialize qemu_work_cond and qemu_cpu_cond

2011-01-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/cpus.c b/cpus.c index 0309189..9cf7e6e 100644 --- a/cpus.c +++ b/cpus.c @@ -412,8 +412,10 @@ int qemu_init_main_loop(void) if (ret) return ret; -qemu_cond_init(&qemu_pause_cond); +qemu_cond_init(&qemu_cpu_cond); qemu_cond_in

[Qemu-devel] [PATCH 7/7] Rename QemuThread to QemuSThread to indicate that it is not a generic thread

2011-01-24 Thread Anthony Liguori
This is an abstraction to support signalable threads. Signaling is inheritedly non-portable so this type of thread should only be used when absolutely necessary. I think the current users are the only users that should ever need to exist so strongly discourage future use. Signed-off-by: Anthony

[Qemu-devel] [PATCH 6/7] Teach vnc server to use GThread directly

2011-01-24 Thread Anthony Liguori
Signed-off-by: Anthony Liguori diff --git a/qemu-thread.c b/qemu-thread.c index 748da5e..6d0c51e 100644 --- a/qemu-thread.c +++ b/qemu-thread.c @@ -14,6 +14,31 @@ #include "qemu-common.h" #include "qemu-thread.h" +#ifdef _WIN32 +GThread *q_thread_create_nosignal(GThreadFunc func, +

[Qemu-devel] [PATCH 3/7] Add support for glib based threading and convert qemu thread to use it

2011-01-24 Thread Anthony Liguori
GLib is an extremely common library that has a portable thread implementation along with tons of other goodies. GLib and GObject have a fantastic amount of infrastructure we can leverage in QEMU including an object oriented programming infrastructure. Short term, it has a very nice thread pool im

[Qemu-devel] [PATCH 2/7] Enable I/O thread and VNC threads by default

2011-01-24 Thread Anthony Liguori
Leave the disable options for now to help with testing but these will be removed once we're confident in the thread implementations. Disabled code bit rots. These have been in tree long enough that we need to either commit to making them work or just remove them entirely. Signed-off-by: Anthony

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Stefano Bonifazi
Hi! Thank you for your answer! he is telling you what ELF_START_MMAP is all about. it is the base address that the linux kernel for that architecture will start giving out addresses. so when running Linux on an x86 system, the first mmap() a process does will start at 0x8000 and move up.

Re: [Qemu-devel] [PATCH v4 0/5][RFC] New SPARC machine: Leon3

2011-01-24 Thread Blue Swirl
Thanks, applied all. On Mon, Jan 24, 2011 at 11:56 AM, Fabien Chouteau wrote: > Hello Qemu-devel, > > Here is the fourth version of Leon3 emulation patch-set. > > Modifications since v3: >  - Tracepoints in leon3.c >  - Fix compilation error in user mode (target-sparc/op_helper.c) >  - Remove unu

[Qemu-devel] [Bug 688085] Re: Guest kernel hang during boot when KVM is active on i386 host

2011-01-24 Thread Aaz
Error still can be reproduced on patched 2.6.35-24-generic-pae, amd64, Athlon II X2 220, 4Gb, Maverick. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/688085 Title: Guest kernel hang during boot whe

Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2011-01-24 Thread Kevin Wolf
Am 24.01.2011 20:47, schrieb Michael S. Tsirkin: > On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: >> Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: >>> On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: > Virtqueue notif

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 13:16, Stefano Bonifazi wrote: >> Start address in which address the ELF code section, in reality (not >> under qemu-user) should be mapped. in x86 32 bit it's 08048000, you >> can check it by yourself by executing: >> cat /proc/self/maps > > Wait, like that I don't understa

Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2011-01-24 Thread Michael S. Tsirkin
On Mon, Jan 24, 2011 at 08:48:05PM +0100, Kevin Wolf wrote: > Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: > > On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: > >> Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: > >>> Virtqueue notify is currently handled synchronously in userspace vi

Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2011-01-24 Thread Kevin Wolf
Am 24.01.2011 20:36, schrieb Michael S. Tsirkin: > On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: >> Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: >>> Virtqueue notify is currently handled synchronously in userspace virtio. >>> This >>> prevents the vcpu from executing guest code whi

Re: [Qemu-devel] qemu-user: relocating target code weakness

2011-01-24 Thread Richard Henderson
On 01/24/2011 03:34 AM, Stefano Bonifazi wrote: > I am working on a project based on qemu-user. More exactly it is > qemu-ppc (version 0.13.0) with x86 host. All the project and > documentation about qemu will be open for everybody as it is a > project for my university that is a public one.. I hav

Re: [Qemu-devel] TCG flow vs dyngen

2011-01-24 Thread Stefano Bonifazi
On 01/24/2011 07:02 PM, Dushyant Bansal wrote: On Monday 24 January 2011 08:26 PM, Stefano Bonifazi wrote: On 01/24/2011 03:32 PM, Peter Maydell wrote: Being a JIT doesn't prohibit counting target instructions executed. It just means that counting them generally requires generating code to do

Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2011-01-24 Thread Michael S. Tsirkin
On Mon, Jan 24, 2011 at 07:54:20PM +0100, Kevin Wolf wrote: > Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: > > Virtqueue notify is currently handled synchronously in userspace virtio. > > This > > prevents the vcpu from executing guest code while hardware emulation code > > handles the notify. >

Re: [Qemu-devel] Re: IRC channel movement -> FreeNode to OFTC

2011-01-24 Thread François Revol
Le 24 janv. 2011 à 20:13, Mike Frysinger a écrit : > On Thu, Dec 9, 2010 at 17:44, Brian Jackson wrote: >> A. Must be registered to talk in a channel > > i'm fairly certain that is a per-channel setting Indeed, only on #qemu do I have to identify to talk, other channels don't require it. >> D

Re: [Qemu-devel] Re: IRC channel movement -> FreeNode to OFTC

2011-01-24 Thread Mike Frysinger
On Thu, Dec 9, 2010 at 17:44, Brian Jackson wrote: > A. Must be registered to talk in a channel i'm fairly certain that is a per-channel setting > C. They have strange rules about groups and channel ownership ive never had a problem > D. Their non-profit status in the US was terminated for fail

Re: [Qemu-devel] Re: [RFC/PATCH] elfload: add FDPIC support

2011-01-24 Thread Mike Frysinger
On Mon, Jan 24, 2011 at 08:34, Stefano Bonifazi wrote: > Is FDPIC something different than simply PIC code (position independent > code)? FDPIC ELF is the ELF PIE format used on NOMMU systems so that both the text and data regions may be located anywhere. it is the only ELF format supported under

Re: [Qemu-devel] [PATCH v5 2/4] virtio-pci: Use ioeventfd for virtqueue notify

2011-01-24 Thread Kevin Wolf
Am 12.12.2010 16:02, schrieb Stefan Hajnoczi: > Virtqueue notify is currently handled synchronously in userspace virtio. This > prevents the vcpu from executing guest code while hardware emulation code > handles the notify. > > On systems that support KVM, the ioeventfd mechanism can be used to m

Re: [Qemu-devel] Playing with virtfs.

2011-01-24 Thread Rob Landley
On 01/24/2011 10:15 AM, Aneesh Kumar K. V wrote: > On Sun, 23 Jan 2011 13:33:14 -0600, Rob Landley wrote: >> Using yesterday's -git, following the instructions in >> http://wiki.qemu.org/Documentation/9psetup (which is missing a kernel >> symbol, you need to add CONFIG_VIRTIO_PCI to your kernel to

[Qemu-devel] Re: Errors on MMIO read access on VM suspend / resume operations

2011-01-24 Thread Stefan Berger
On 01/18/2011 03:53 AM, Jan Kiszka wrote: On 2011-01-18 04:03, Stefan Berger wrote: On 01/16/2011 09:43 AM, Avi Kivity wrote: On 01/14/2011 09:27 PM, Stefan Berger wrote: Can you sprinkle some printfs() arount kvm_run (in qemu-kvm.c) to verify this? Here's what I did: interrupt exit reques

Re: [Qemu-devel] TCG flow vs dyngen

2011-01-24 Thread Rob Landley
On 01/24/2011 04:17 AM, Stefano Bonifazi wrote: > I read your post, and yup you also noticed the weird of load_bias.. and > wondered how it can work on x86.. > But I think your work was on qemu-system.. I am working on qemu-user.. My post wasn't on qemu-anything, it was while I was trying to debu

  1   2   3   >