[Qemu-devel] Re: GSoC 2010 - Device state visualization

2010-04-05 Thread Jan Kiszka
Hi Ionat, Ionut Cristian Paraschiv wrote: > Hello! > >My name is Ionut Cristian Paraschiv, and I am from Romania. I am a > student in the 2nd year at Politehnica University of Bucharest, Faculty of > Automatic Control and Computers, Computer Science Department. I like to > program in C, Java,

[Qemu-devel] KVM call agenda for Apr 6

2010-04-05 Thread Chris Wright
Please send in any agenda items you are interested in covering. thanks, -chris

[Qemu-devel] Semantic meaning of "stop" command?

2010-04-05 Thread Jun Koi
Hi, I always thought that the "stop" command provided by the monitor interface would pause the VM completely, but it doesnt seem so? I checked this by issuing the "stop" command on my VM, and noted its clock. Few minutes later, I resumed the VM (with "cont" command). The clock is immediately upda

Re: [Qemu-devel] Question about KVM integration in vanilla Qemu.

2010-04-05 Thread Stefan Kamien
My question was not an april fools' day joke. You are developers and answer to this question may seem obvious to you, but it is not obvious to me. Please answer. Thanks

Re: [Qemu-devel] s390 - No 'PCI' bus found for device 'virtio-serial-pci'

2010-04-05 Thread Amit Shah
On (Mon) Apr 05 2010 [19:58:35], Alexander Graf wrote: > > On 05.04.2010, at 17:30, Bastian Blank wrote: > > > On Mon, Apr 05, 2010 at 08:14:00PM +0530, Amit Shah wrote: > >> On (Mon) Apr 05 2010 [16:34:13], Bastian Blank wrote: > >>> | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-05 Thread Amit Shah
On (Mon) Apr 05 2010 [17:33:38], Paul Brook wrote: > > There might be cases where a few bytes would have been sent out to char > > devices and some not. Currently the return values from qemu_chr_write() > > to char devs are only -1, indicating an error, or the complete length > > of the string pass

Re: [Qemu-devel] full dynamic instruction trace for MIPS target

2010-04-05 Thread Vince Weaver
> I think the correct way to get the full instruction trace on a MIPS > emulated processor is: the way you describe is slow because you are constantly re-generating the TBs. The best way to do this is to add your instrumentation to the TBs. I have code that does that for a recent version of Q

[Qemu-devel] [PATCH v2 5/6] Use cpu_physical_memory_set_dirty_range() to update phys_ram_dirty.

2010-04-05 Thread Yoshiaki Tamura
Modifies kvm_physical_sync_dirty_bitmap to use cpu_physical_memory_set_dirty_range() to update the row of the bit-based phys_ram_dirty bitmap at once. Signed-off-by: OHMURA Kei Signed-off-by: Yoshiaki Tamura --- bswap.h |2 ++ kvm-all.c | 33 +++-- 2 files ch

[Qemu-devel] [PATCH v2 1/6] Modify DIRTY_FLAG value to use as indexes of bit-based phys_ram_dirty.

2010-04-05 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- cpu-all.h | 10 -- 1 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index f8bfa66..c409fad 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -853,7 +853,6 @@ target_phys_addr_t cpu_get_phys_page_de

[Qemu-devel] [PATCH v2 4/6] Introduce cpu_physical_memory_get_dirty_range().

2010-04-05 Thread Yoshiaki Tamura
Introduces cpu_physical_memory_get_dirty_range(). It checks the first row and puts dirty addr in the array. If the first row is empty, it skips to the first non-dirty row or the end addr, and put the length in the first entry of the array. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei

[Qemu-devel] [PATCH v2 3/6] Modifies wrapper functions for byte-based phys_ram_dirty bitmap to bit-based phys_ram_dirty bitmap.

2010-04-05 Thread Yoshiaki Tamura
Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- cpu-all.h | 81 ++-- 1 files changed, 67 insertions(+), 14 deletions(-) diff --git a/cpu-all.h b/cpu-all.h index c409fad..0f5bfbe 100644 --- a/cpu-all.h +++ b/cpu-all.h @@ -891

[Qemu-devel] [PATCH v2 2/6] Introduce bit-based phys_ram_dirty for VGA, CODE, MIGRATION and MASTER.

2010-04-05 Thread Yoshiaki Tamura
Replaces byte-based phys_ram_dirty bitmap with three bit-based phys_ram_dirty bitmap. On allocation, it sets all bits in the bitmap. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- exec.c | 32 +++- 1 files changed, 27 insertions(+), 5 deletions(-) d

[Qemu-devel] [PATCH v2 6/6] Use cpu_physical_memory_get_dirty_range() to check multiple dirty pages.

2010-04-05 Thread Yoshiaki Tamura
Modifies ram_save_block() and ram_save_remaining() to use cpu_physical_memory_get_dirty_range() to check multiple dirty and non-dirty pages at once. Signed-off-by: Yoshiaki Tamura Signed-off-by: OHMURA Kei --- arch_init.c | 54 +- 1 files ch

[Qemu-devel] [PATCH v2 0/6] Introduce bit-based phys_ram_dirty, and bit-based dirty page checker.

2010-04-05 Thread Yoshiaki Tamura
The dirty and non-dirty pages are checked one by one. When most of the memory is not dirty, checking the dirty and non-dirty pages by multiple page size should be much faster than checking them one by one. We introduced bit-based phys_ram_dirty for VGA, CODE, MIGRATION, MASTER, and cpu_physical_m

[Qemu-devel] Re: [PATCH 0/4] Remove duplicate CPU logging

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > Generic code handles -d cpu in cpu_exec, amidst the horde of ifdefs. > These duplicates simply double the amount of output produced with no > extra information emitted. > > Maintainers for mips, ppc and sh4 cc'd. Fine by me, though i'm maintaining n

Res: [Qemu-devel] full dynamic instruction trace for MIPS target

2010-04-05 Thread Boris Cámara
I need the PC and the executated instruction to extract a complete trace of the execution in a file. I found since the translation block is cached the "-d in_asm" option with not output a complete execution trace. Only when the TB is cached is logged. What does -singlestep means? thanks, _

Re: [Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-05 Thread Aurelien Jarno
On Mon, Apr 05, 2010 at 03:45:23PM -0700, Richard Henderson wrote: > The Problem: > > CONFIG_USER_ONLY kinda sorta tries to manage the distinction between > qemu memory and guest memory. This can be seen in the PAGE_RESERVED > frobbing and qemu_malloc etc. However, it doesn't handle random malloc

[Qemu-devel] [PATCH 4/4] target-sh4: Remove duplicate CPU log.

2010-04-05 Thread Richard Henderson
Logging for -d cpu is done in generic code. Signed-off-by: Richard Henderson --- target-sh4/translate.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/target-sh4/translate.c b/target-sh4/translate.c index bff3188..391b762 100644 --- a/target-sh4/translate.c +++ b/t

[Qemu-devel] [PATCH 2/4] target-mips: Remove duplicate CPU log.

2010-04-05 Thread Richard Henderson
Logging for -d cpu is done in generic code. Signed-off-by: Richard Henderson --- target-mips/translate.c |6 -- 1 files changed, 0 insertions(+), 6 deletions(-) diff --git a/target-mips/translate.c b/target-mips/translate.c index 0ade3bd..b796b4f 100644 --- a/target-mips/translate.c +++

[Qemu-devel] [PATCH 3/4] target-ppc: Remove duplicate cpu log.

2010-04-05 Thread Richard Henderson
Logging for -d cpu is done in generic code. Signed-off-by: Richard Henderson --- target-ppc/translate.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/target-ppc/translate.c b/target-ppc/translate.c index 0af7e4f..3a6146a 100644 --- a/target-ppc/translate.c +++ b/targe

[Qemu-devel] [PATCH 1/4] target-i386: Remove duplicate CPU log.

2010-04-05 Thread Richard Henderson
The proper logging for -d cpu is done in generic code. Signed-off-by: Richard Henderson --- target-i386/translate.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/target-i386/translate.c b/target-i386/translate.c index 28d9940..66d8e75 100644 --- a/target-i386/translate

[Qemu-devel] [PATCH 0/4] Remove duplicate CPU logging

2010-04-05 Thread Richard Henderson
Generic code handles -d cpu in cpu_exec, amidst the horde of ifdefs. These duplicates simply double the amount of output produced with no extra information emitted. Maintainers for mips, ppc and sh4 cc'd. r~ Richard Henderson (4): target-i386: Remove duplicate CPU log. target-mips: Remove

[Qemu-devel] [RFC] Host vs Guest memory allocation

2010-04-05 Thread Richard Henderson
The Problem: CONFIG_USER_ONLY kinda sorta tries to manage the distinction between qemu memory and guest memory. This can be seen in the PAGE_RESERVED frobbing and qemu_malloc etc. However, it doesn't handle random malloc calls eg from libc itself or other libraries in use. Possible solutions: Th

Re: [Qemu-devel] [Applied PATCH] Split TLB addend and target_phys_addr_t

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Alexander Graf wrote: > > On 05.04.2010, at 14:41, malc wrote: > > > On Mon, 5 Apr 2010, Paul Brook wrote: > > > >> I think I got all the tcg backend bits right, but can't test most of them. > >> Please test and report any problems. > >> > >> Historically the qemu tlb "add

Re: [Qemu-devel] full dynamic instruction trace for MIPS target

2010-04-05 Thread Richard Henderson
On 04/05/2010 03:09 PM, Boris Cámara wrote: > I think the correct way to get the full instruction trace on a MIPS > emulated processor is: -singlestep -d exec That gives you the address of each instruction executed. I'm not sure what else you want than this, as you havn't said. r~

[Qemu-devel] Re: libvirt vs. in-qemu management

2010-04-05 Thread Alexander Graf
On 06.04.2010, at 00:14, Avi Kivity wrote: > On 04/06/2010 12:11 AM, Alexander Graf wrote: >> Howdy, >> >> I've been thinking a bit further on the whole issue around libvirt and why >> the situation as is isn't satisfying. I came to the following points that >> currently hurt building ease of

[Qemu-devel] Re: libvirt vs. in-qemu management

2010-04-05 Thread Avi Kivity
On 04/06/2010 12:11 AM, Alexander Graf wrote: Howdy, I've been thinking a bit further on the whole issue around libvirt and why the situation as is isn't satisfying. I came to the following points that currently hurt building ease of use for KVM: 1) Brand This is one of the major issues we h

[Qemu-devel] full dynamic instruction trace for MIPS target

2010-04-05 Thread Boris Cámara
Hi, I think the correct way to get the full instruction trace on a MIPS emulated processor is: -Disabling the tb cache: I did this by modifying the tb_find_slow() and tb_find_fast() functions to ever go to "not_found" label where the code is translated with no cache searches. -Loggin th

[Qemu-devel] [PATCH 03/21] Add qerror message if the 'change' target filename can't be opened

2010-04-05 Thread Luiz Capitulino
From: Ryan Harper Currently when using the change command to switch the file in the cd drive the command doesn't complain if the file doesn't exit or can't be opened and the drive keeps the existing image. This patch adds a qerror_report call to print a message out indicating the failure. This

Re: [Qemu-devel] [Applied PATCH] Split TLB addend and target_phys_addr_t

2010-04-05 Thread Alexander Graf
On 05.04.2010, at 14:41, malc wrote: > On Mon, 5 Apr 2010, Paul Brook wrote: > >> I think I got all the tcg backend bits right, but can't test most of them. >> Please test and report any problems. >> >> Historically the qemu tlb "addend" field was used for both RAM and IO >> accesses, >> so n

[Qemu-devel] Re: [PATCH] win32: Fix compiler errors from u_int64_t

2010-04-05 Thread Michael S. Tsirkin
On Mon, Apr 05, 2010 at 08:01:16PM +0200, Stefan Weil wrote: > Michael S. Tsirkin schrieb: > > On Thu, Apr 01, 2010 at 11:56:25PM +0200, Stefan Weil wrote: > >> u_int64_t raises compiler error messages: > >> > >> CC libhw32/virtio.o > >> /qemu/ar7/hw/virtio.c: In function ‘virtio_queue_get_avail_si

[Qemu-devel] libvirt vs. in-qemu management

2010-04-05 Thread Alexander Graf
Howdy, I've been thinking a bit further on the whole issue around libvirt and why the situation as is isn't satisfying. I came to the following points that currently hurt building ease of use for KVM: 1) Brand This is one of the major issues we have ourselves when it comes to appliances. We c

[Qemu-devel] [PATCH 10/21] error: Use QERR_INVALID_PARAMETER_VALUE instead of QERR_INVALID_PARAMETER

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- hw/qdev.c |2 +- monitor.c |6 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 5ca126b..d3bf0fa 100644 --- a/hw/qdev.c +++ b/hw/qdev.c @@ -207,7

[Qemu-devel] [PATCH 18/21] monitor: Convert do_set_link() to QObject, QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- net.c |7 --- net.h |2 +- qemu-monitor.hx |3 ++- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/net.c b/net.c index e625614..d7d76eb 100644 --- a/ne

[Qemu-devel] [PATCH 21/21] Monitor: Convert do_screen_dump() to QObject

2010-04-05 Thread Luiz Capitulino
Trivial, as it never fails, doesn't have output nor return any data. Note that it's also available under QMP, as kvm-autotest needs this. Signed-off-by: Luiz Capitulino --- monitor.c |3 ++- qemu-monitor.hx |3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mon

[Qemu-devel] [PATCH 00/21][PULL]: QMP/Monitor queue

2010-04-05 Thread Luiz Capitulino
Hi Anthony, I was going to nag you to apply patches from the list, but as I'm maintaining a QMP/Monitor queue to test them, I thought it would be a good idea to nag you in the form of a git pull :) All the patches in there have been posted to the list already and, to make it convenient to revi

[Qemu-devel] [PATCH 19/21] virtio-blk: Fix use after free in error case

2010-04-05 Thread Luiz Capitulino
From: Kevin Wolf virtio_blk_req_complete frees the request, so we can't access it any more when calling bdrv_mon_event. Use the pointer that was copied earlier. Signed-off-by: Kevin Wolf Signed-off-by: Luiz Capitulino --- hw/virtio-blk.c |6 +++--- 1 files changed, 3 insertions(+), 3 dele

[Qemu-devel] [PATCH 11/21] error: Convert qemu_opts_validate() to QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qemu-option.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 394c763..1ffc497 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -877,8 +87

[Qemu-devel] [PATCH 13/21] error: New QERR_DEVICE_IN_USE

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 97e8d4a..8d885cd 100644 --- a/qerror.c +++ b/qerror.c @@ -69,6 +69,10

[Qemu-devel] [PATCH 14/21] monitor: New commands netdev_add, netdev_del

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Monitor commands to go with -netdev. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- net.c | 55 +++ net.h |2 ++ qemu-monitor.hx | 30 ++ 3

[Qemu-devel] [PATCH 16/21] monitor: New argument type 'b'

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster This is a boolean value. Human monitor accepts "on" or "off". Consistent with option parsing (see parse_option_bool()). Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- monitor.c | 31 +++ 1 files changed, 31 insertions

[Qemu-devel] [PATCH 09/21] error: Drop extra messages after qemu_opts_set() and qemu_opts_parse()

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Both functions report errors nicely enough now, no need for additional messages. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- hw/pci-hotplug.c |2 -- net.c|2 -- qemu-config.c|1 - vl.c |5 - 4 file

[Qemu-devel] [PATCH 05/21] error: New QERR_DUPLICATE_ID

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 4520b0d..9fb817e 100644 --- a/qerror.c +++ b/qerror.c @@ -97,6 +97,10

[Qemu-devel] [PATCH 15/21] monitor: Rename argument type 'b' to 'f'

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster To make 'b' available for boolean argument. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- monitor.c |8 qemu-monitor.hx |2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/monitor.c b/monitor.c index 792c8c

[Qemu-devel] [PATCH 08/21] error: Convert qemu_opts_set() to QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qemu-option.c | 17 +++-- 1 files changed, 7 insertions(+), 10 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index 12ce322..394c763 100644 --- a/qemu-option.c +++ b/qemu-option.

[Qemu-devel] [PATCH 02/21] monitor: convert do_device_del() to QObject, QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- hw/qdev.c |8 hw/qdev.h |2 +- qemu-monitor.hx |3 ++- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c index 0612dc0..5ca126b 100644

[Qemu-devel] [PATCH 17/21] monitor: Use argument type 'b' for set_link

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Second argument is now "on" or "off" instead of "up" or "down". Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- net.c | 10 ++ qemu-monitor.hx |8 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/net.c

[Qemu-devel] [PATCH 20/21] QMP: Improve RTC_CHANGE event description

2010-04-05 Thread Luiz Capitulino
Some people might think that this event is emitted whenever the time changes, be more specific. Signed-off-by: Luiz Capitulino --- QMP/qmp-events.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/QMP/qmp-events.txt b/QMP/qmp-events.txt index a94e9b4..c084a47 100644 --

[Qemu-devel] [PATCH 12/21] error: Convert net_client_init() to QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster The conversion is shallow: client type init() methods aren't converted. Converting them is a big job for relatively little practical benefit, so leave it for later. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- net.c | 38 ++

[Qemu-devel] [PATCH 06/21] error: Convert qemu_opts_create() to QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Fixes device_add to report duplicate ID properly in QMP, as DuplicateId instead of UndefinedError. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qemu-option.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/qemu-option.

[Qemu-devel] [PATCH 04/21] error: Put error definitions back in alphabetical order

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Add suitable comments to help keerp them in order. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c | 12 qerror.h |8 +--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/qerror.c b/qerror.c index eaa1

[Qemu-devel] [PATCH 07/21] error: New QERR_INVALID_PARAMETER_VALUE

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- qerror.c |4 qerror.h |3 +++ 2 files changed, 7 insertions(+), 0 deletions(-) diff --git a/qerror.c b/qerror.c index 9fb817e..97e8d4a 100644 --- a/qerror.c +++ b/qerror.c @@ -121,6 +121,1

[Qemu-devel] [PATCH 01/21] qdev: Convert qdev_unplug() to QError

2010-04-05 Thread Luiz Capitulino
From: Markus Armbruster Note: our device unplug methods don't need conversion work, because they can't currently fail. Signed-off-by: Markus Armbruster Signed-off-by: Luiz Capitulino --- hw/qdev.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff --git a/hw/qdev.c b/hw/qdev.c

Re: [Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-05 Thread Richard Henderson
On 04/05/2010 11:14 AM, malc wrote: >> +} >> +interp_name = malloc(eppnt->p_filesz); > > malloc can fail > >> + >> +if (eppnt->p_offset + eppnt->p_filesz <= BPRM_BUF_SIZE) { >> +memcpy(interp_name, bprm_buf + eppnt->p_offset, >> +

Re: [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > On 04/05/2010 11:15 AM, malc wrote: > > Please do not use double leading underscore. > > In contrast to the existing use in: > > >> #define h2g_valid(x) ({ \ > >> unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \ > > What do you sugg

Re: [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread Richard Henderson
On 04/05/2010 11:15 AM, malc wrote: > Please do not use double leading underscore. In contrast to the existing use in: >> #define h2g_valid(x) ({ \ >> unsigned long __guest = (unsigned long)(x) - GUEST_BASE; \ What do you suggest instead? Trailing underscores? r~

Re: [Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > To be used by userspace emulation to verify that the memory > range defined by [start, start+len) is valid for the guest, > taking into account TARGET_VIRT_ADDR_SPACE_BITS. > > Signed-off-by: Richard Henderson > --- > cpu-all.h | 10 ++ >

Re: [Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-05 Thread malc
On Mon, 5 Apr 2010, Richard Henderson wrote: > This requires moving the PT_INTERP extraction and GUEST_BASE > handling into load_elf_image. Key this off a non-null pointer > argument to receive the interpreter name. > > Signed-off-by: Richard Henderson > --- > linux-user/elfload.c | 269 > ++

Re: [Qemu-devel] s390 - Parts of console output lost

2010-04-05 Thread Alexander Graf
On 05.04.2010, at 16:45, Bastian Blank wrote: > Hi > > 116348def2bb446d972bdc2f44bd77ff631f85de works on s390/kvm, but on startup > parts of the console output is lost. The used kernel is a standard Debian > distribution kernel. > > | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -

[Qemu-devel] Re: [PATCH] win32: Fix compiler errors from u_int64_t

2010-04-05 Thread Stefan Weil
Michael S. Tsirkin schrieb: > On Thu, Apr 01, 2010 at 11:56:25PM +0200, Stefan Weil wrote: >> u_int64_t raises compiler error messages: >> >> CC libhw32/virtio.o >> /qemu/ar7/hw/virtio.c: In function ‘virtio_queue_get_avail_size’: >> /qemu/ar7/hw/virtio.c:776: error: ‘u_int64_t’ undeclared (first u

Re: [Qemu-devel] s390 - No 'PCI' bus found for device 'virtio-serial-pci'

2010-04-05 Thread Alexander Graf
On 05.04.2010, at 17:30, Bastian Blank wrote: > On Mon, Apr 05, 2010 at 08:14:00PM +0530, Amit Shah wrote: >> On (Mon) Apr 05 2010 [16:34:13], Bastian Blank wrote: >>> | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -kernel >>> /boot/vmlinuz-2.6.32-4-s390x >>> | qemu-system-s390x: N

[Qemu-devel] [PATCH 4/7] linux-user: Use guest_start_len_valid in mremap.

2010-04-05 Thread Richard Henderson
Also properly signal error for non-page aligned inputs and zero sized outputs. Signed-off-by: Richard Henderson --- linux-user/mmap.c | 44 1 files changed, 24 insertions(+), 20 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index

[Qemu-devel] [PATCH 5/7] linux-user: Use guest_start_len_valid in mmap.

2010-04-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/mmap.c |8 ++-- 1 files changed, 2 insertions(+), 6 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 463679d..085030b 100644 --- a/linux-user/mmap.c +++ b/linux-user/mmap.c @@ -494,12 +494,8 @@ abi_long target_mmap(abi_

[Qemu-devel] [PATCH 6/7] Fix zero-length write(2).

2010-04-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- exec.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/exec.c b/exec.c index 33854e1..d69194c 100644 --- a/exec.c +++ b/exec.c @@ -2461,6 +2461,9 @@ int page_check_range(target_ulong start, target_ulong len, int flags) assert(s

[Qemu-devel] [PATCH 2/7] Add guest_start_len_valid function.

2010-04-05 Thread Richard Henderson
To be used by userspace emulation to verify that the memory range defined by [start, start+len) is valid for the guest, taking into account TARGET_VIRT_ADDR_SPACE_BITS. Signed-off-by: Richard Henderson --- cpu-all.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git

[Qemu-devel] [PATCH 3/7] linux-user: Use guest_start_len_valid in msync.

2010-04-05 Thread Richard Henderson
Make sure to properly handle len = 0 first. Signed-off-by: Richard Henderson --- linux-user/mmap.c | 13 - 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/linux-user/mmap.c b/linux-user/mmap.c index 46923c7..f4d44a8 100644 --- a/linux-user/mmap.c +++ b/linux-user/mma

[Qemu-devel] [PATCH 7/7] Use guest_start_len_valid in page_check_range.

2010-04-05 Thread Richard Henderson
Also remove an assertion on start being in range. The values here can come directly from the guest via a syscall, and so very well may be out of range via plain bug or DoS attack. Signed-off-by: Richard Henderson --- exec.c |9 + 1 files changed, 1 insertions(+), 8 deletions(-) dif

[Qemu-devel] [PATCH 0/7] Fix tests for start+len address valid for guest

2010-04-05 Thread Richard Henderson
The first patch in the series fixes a major think-o in the sparc port. The 64 and 32-bit constants were reversed. Fixing these are required to avoid a build error in later patches. For the actual problem, introduce a guest_start_len_valid macro similar to the existing h2g_valid macro, where we co

[Qemu-devel] [PATCH 1/7] target-sparc: Fix TARGET_{PHYS, VIRT}_ADDR_SPACE_BITS.

2010-04-05 Thread Richard Henderson
The 32 and 64-bit definitions were swapped in the ifdef. Signed-off-by: Richard Henderson --- target-sparc/cpu.h | 12 ++-- 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target-sparc/cpu.h b/target-sparc/cpu.h index 580f4d4..0e7f390 100644 --- a/target-sparc/cpu.h +++

[Qemu-devel] Re: [PATCH] net: Convert do_info_network() to QObject

2010-04-05 Thread Luiz Capitulino
On Sat, 3 Apr 2010 18:32:01 -0300 Miguel Di Ciurcio Filho wrote: > Each device is represented by a QDict. The returned QObject is a QList > of all devices. > > This commit should not change user output. > > Signed-off-by: Miguel Di Ciurcio Filho > --- > > This is my initial contribution, aim

[Qemu-devel] [PATCH 12/14] linux-user: Re-use load_elf_image for the main binary.

2010-04-05 Thread Richard Henderson
This requires moving the PT_INTERP extraction and GUEST_BASE handling into load_elf_image. Key this off a non-null pointer argument to receive the interpreter name. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 269 ++ 1 files chang

[Qemu-devel] [PATCH 07/14] linux-user: Load symbols from the interpreter.

2010-04-05 Thread Richard Henderson
First, adjust load_symbols to accept a load_bias parameter. At the same time, read the entire section header table in one go, use pread instead f lseek+read for the symbol and string tables, and properly free allocated structures on error exit paths. Second, adjust load_elf_interp to compute load

[Qemu-devel] [PATCH 09/14] linux-user: Put the stack guard page at the top.

2010-04-05 Thread Richard Henderson
There are no supported stack-grows-up targets. We were putting the guard page at the highest address, i.e. the bottom of the stack. Use the maximum of host and guest page size for the guard size. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 29 - 1 f

[Qemu-devel] [PATCH 11/14] linux-user: Extract load_elf_image from load_elf_interp.

2010-04-05 Thread Richard Henderson
Moving toward a single copy of the elf binary loading code. Fill in the details of the loaded image into a struct image_info. Adjust create_elf_tables to read from such structures instead of from a collection of passed arguments. Don't return error values from load_elf_interp; always exit(-1) wit

[Qemu-devel] [PATCH 04/14] linux-user: Reduce lseek+reads while loading elf files.

2010-04-05 Thread Richard Henderson
Define BPRM_BUF_SIZE to 4k and read that amount initially. If the data we want from the binary is in this buffer, use it instead of reading from the file again. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 105 --- linux-user/linuxlo

[Qemu-devel] [PATCH 13/14] linux-user: Build vdso for x64.

2010-04-05 Thread Richard Henderson
... Well, sortof. The Makefile bits are broken. Patch to load the vdso into the running program to follow. Signed-off-by: Richard Henderson --- Makefile |3 +- pc-bios/Makefile |5 ++ pc-bios/vdso-linux-x64.S | 102

[Qemu-devel] [PATCH 10/14] linux-user: Remove partial support for a.out interpreters.

2010-04-05 Thread Richard Henderson
At the bottom of the a.out support was the unimplemented load_aout_interp function. There were other portions of the support that didn't look right; when I went to look in the Linux kernel for clarification, I found that the support for such interpreters has been removed from binfmt_elf. There doe

[Qemu-devel] [PATCH 05/14] linux-user: Fix ELF_DATA for Alpha.

2010-04-05 Thread Richard Henderson
Alpha is little-endian on Linux. Signed-off-by: Richard Henderson --- linux-user/elfload.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 962f9ba..5814702 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@

[Qemu-devel] [PATCH 06/14] linux-user: Clean up byte-swapping in elfload.c.

2010-04-05 Thread Richard Henderson
Remove ifdefs from code by defining empty inline functions when byte swapping isn't needed. Push loops over swapping arrays of structures into the swapping functions. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 119 -- 1 files cha

[Qemu-devel] [PATCH 02/14] Add more DT_* and AT_* constants to qemu's copy of elf.h.

2010-04-05 Thread Richard Henderson
Moving some PPC AT_* constants from elfload.c at the same time. Signed-off-by: Richard Henderson --- elf.h| 44 linux-user/elfload.c |9 - 2 files changed, 44 insertions(+), 9 deletions(-) diff --git a/elf.h b/elf.h inde

[Qemu-devel] [PATCH 14/14] linux-user: Load a VDSO for x86-64.

2010-04-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/elfload.c | 201 -- 1 files changed, 193 insertions(+), 8 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 100efdc..7b854e2 100644 --- a/linux-user/elfload.c +++ b/linux-us

[Qemu-devel] [PATCH 08/14] linux-user: Improve consistency checking in elf headers.

2010-04-05 Thread Richard Henderson
Validate more fields of the elf header. Extract those checks into two common functions to be used in both load_elf_interp and load_elf_binary. Signed-off-by: Richard Henderson --- linux-user/elfload.c | 57 +- 1 files changed, 33 insertions(+),

[Qemu-devel] [PATCH 03/14] linux-user: Reindent elfload.c.

2010-04-05 Thread Richard Henderson
Signed-off-by: Richard Henderson --- linux-user/elfload.c | 594 +- 1 files changed, 301 insertions(+), 293 deletions(-) diff --git a/linux-user/elfload.c b/linux-user/elfload.c index ead22fc..ab741fd 100644 --- a/linux-user/elfload.c +++ b/linux-

[Qemu-devel] [PATCH 01/14] linux-user: Handle filesz < memsz for any PT_LOAD segment.

2010-04-05 Thread Richard Henderson
I caught padzero not properly initializing the .bss segment on a statically linked Alpha program. Rather than a minimal patch, replace the gross code with a single mmap+memset. Share more code between load_elf_interp and load_elf_binary. Legally, an ELF program need not have just a single .bss;

[Qemu-devel] [PATCH 00/14] Implement VDSO for x86_64-linux-user

2010-04-05 Thread Richard Henderson
To do this in any clean sort of way, I rewrote a substantial portion of elfload.c. Doing otherwise would have wound up with 3 entirely separate bits of code to load an elf image. The first patch seems out of order, since I did this work on a branch that already contained some previously submitted

Re: [Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-05 Thread Paul Brook
> There might be cases where a few bytes would have been sent out to char > devices and some not. Currently the return values from qemu_chr_write() > to char devs are only -1, indicating an error, or the complete length > of the string passed. > > Make 'len' a pointer instead, and indicate how muc

Re: [Qemu-devel] s390 - No 'PCI' bus found for device 'virtio-serial-pci'

2010-04-05 Thread Bastian Blank
On Mon, Apr 05, 2010 at 08:14:00PM +0530, Amit Shah wrote: > On (Mon) Apr 05 2010 [16:34:13], Bastian Blank wrote: > > | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -kernel > > /boot/vmlinuz-2.6.32-4-s390x > > | qemu-system-s390x: No 'PCI' bus found for device 'virtio-serial-pci' >

Re: [Qemu-devel] s390 - Parts of console output lost

2010-04-05 Thread Amit Shah
On (Mon) Apr 05 2010 [16:45:21], Bastian Blank wrote: > Hi > > 116348def2bb446d972bdc2f44bd77ff631f85de works on s390/kvm, but on startup > parts of the console output is lost. The used kernel is a standard Debian > distribution kernel. > > | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable

[Qemu-devel] [PATCH]: block: get rid of the BDRV_O_FILE flag

2010-04-05 Thread Christoph Hellwig
BDRV_O_FILE is only used to communicate between bdrv_file_open and bdrv_open. It affects two things: first bdrv_open only searches for protocols using find_protocol instead of all image formats and host drivers. We can easily move that to the caller and pass the found driver to bdrv_open. Second

Re: [Qemu-devel] s390 - No 'PCI' bus found for device 'virtio-serial-pci'

2010-04-05 Thread Amit Shah
On (Mon) Apr 05 2010 [16:34:13], Bastian Blank wrote: > Hi > > 116348def2bb446d972bdc2f44bd77ff631f85de fails on s390 with the > following error: > > | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -kernel > /boot/vmlinuz-2.6.32-4-s390x > | qemu-system-s390x: No 'PCI' bus found for

[Qemu-devel] s390 - Parts of console output lost

2010-04-05 Thread Bastian Blank
Hi 116348def2bb446d972bdc2f44bd77ff631f85de works on s390/kvm, but on startup parts of the console output is lost. The used kernel is a standard Debian distribution kernel. | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -kernel /boot/vmlinuz-2.6.32-4-s390x -initrd /boot/initrd.img-

[Qemu-devel] s390 - No 'PCI' bus found for device 'virtio-serial-pci'

2010-04-05 Thread Bastian Blank
Hi 116348def2bb446d972bdc2f44bd77ff631f85de fails on s390 with the following error: | $ ./s390x-softmmu/qemu-system-s390x -nographic -enable-kvm -kernel /boot/vmlinuz-2.6.32-4-s390x | qemu-system-s390x: No 'PCI' bus found for device 'virtio-serial-pci' After patching the pci virtio drivers away

[Qemu-devel] [PATCH] block: split raw_getlength

2010-04-05 Thread Christoph Hellwig
Split up the raw_getlength into separate generic, solaris and BSD versions to reduce the ifdef maze a bit. The BSD variant still is a complete maze, but to clean it up properly we'd need some people using the BSD variants to figure out what code is used for what variant. Signed-off-by: Christoph

[Qemu-devel] [PATCH] cleanup block driver option handling in vl.c

2010-04-05 Thread Christoph Hellwig
Assign directly to the bdrv_flags variable instead of using magic numbers before translating to the BDRV_O_* options. Signed-off-by: Christoph Hellwig Index: qemu/vl.c === --- qemu.orig/vl.c 2010-04-05 11:05:39.042010326 +0200

[Qemu-devel] d6f4ade214a9f74dca9495b83a24ff9c113e4f9a

2010-04-05 Thread malc
Hello, d6f4ade214a9f74dca9495b83a24ff9c113e4f9a: disentangle tcg and deadline calculation introduces following regression(s): 100% cpu utilization when QEMU is invoked like: qemu -S -s ... ditto when gdb takes control over the session via gdb-stub (i.e. the breakpoint is hit or C-c is pressed i

[Qemu-devel] [PATCH 5/5] virtio-console: Throttle virtio-serial-bus if we can't consume any more guest data

2010-04-05 Thread Amit Shah
If the char device we're connected to is overwhelmed with data and it can't accept any more, signal to the virtio-serial-bus to stop sending us more data till we tell otherwise. If the current buffer being processed hasn't been completely written out to the char device, we have to keep it around a

[Qemu-devel] [PATCH 4/5] virtio-console: Factor out common init between console and generic ports

2010-04-05 Thread Amit Shah
The initialisation for generic ports and console ports is similar. Factor out the parts that are the same in a different function that can be called from each of the initfns. Signed-off-by: Amit Shah --- hw/virtio-console.c | 31 ++- 1 files changed, 14 insertions(+

[Qemu-devel] [PATCH 3/5] char: unix: For files that are nonblocking, report -EAGAIN to calling functions

2010-04-05 Thread Amit Shah
If the chardev we're writing to is nonblocking, just report -EAGAIN to the caller so that the caller can take any further action as it may see fit. Modify poll call for polling for a timeout of 10ms instead of waiting indefinitely for POLLOUT to get set. Signed-off-by: Amit Shah --- qemu-char.c

[Qemu-devel] [PATCH 2/5] char: unix write: Add some sleep to ease off spinning in a tight loop

2010-04-05 Thread Amit Shah
When the other end of a chardev connection isn't picking up data as fast as we're sending, we just used to keep spinning in a tight loop till all the data was sent out. Polling for POLLOUT indefinitely gives the other end a chance to catch up and also saves us CPU cycles. Signed-off-by: Amit Shah

[Qemu-devel] [PATCH 1/5] char: Let the caller know how many bytes were written in case of incomplete writes

2010-04-05 Thread Amit Shah
There might be cases where a few bytes would have been sent out to char devices and some not. Currently the return values from qemu_chr_write() to char devs are only -1, indicating an error, or the complete length of the string passed. Make 'len' a pointer instead, and indicate how much of the str

  1   2   >