Re: [Qemu-devel] [PATCH] gluster: Abort on AIO completion failure

2013-08-26 Thread Paolo Bonzini
Il 27/08/2013 07:53, Bharata B Rao ha scritto: > Currently if gluster AIO callback thread fails to notify the QEMU thread about > AIO completion, we try graceful recovery by marking the disk drive as > inaccessible. This error recovery code is race-prone as found by Asias and > Stefan. However as f

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-26 Thread Alexey Kardashevskiy
On 08/27/2013 01:29 AM, David Gibson wrote: > On Mon, Aug 26, 2013 at 02:24:49PM +0200, Alexander Graf wrote: >> >> On 23.08.2013, at 13:30, Alexey Kardashevskiy wrote: >> >>> PAPR+ requires two RTAS calls to be supported by the hypervisor in >>> order to allow hotplugging VCPUs from the guest. The

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-26 Thread Sascha Krissler
its in the first sentence. let me rephrase: the (windows) guest can select some screen resolution which SDL cannot provide. what happens is that qemu quits without giving the quest a chance to shut down. thats like having a monitor that crashes windows when it doesnt support the video mode. --

Re: [Qemu-devel] [PATCH v3 6/6] hw: Clean up bogus default boot order

2013-08-26 Thread Michael S. Tsirkin
On Mon, Aug 26, 2013 at 09:12:41AM +0200, Markus Armbruster wrote: > "Michael S. Tsirkin" writes: > > > On Thu, Aug 22, 2013 at 01:24:50PM +0200, Markus Armbruster wrote: > >> "Michael S. Tsirkin" writes: > >> > >> > On Thu, Aug 22, 2013 at 10:39:34AM +0200, Markus Armbruster wrote: > >> >> "Mi

[Qemu-devel] [PATCH] gluster: Abort on AIO completion failure

2013-08-26 Thread Bharata B Rao
Currently if gluster AIO callback thread fails to notify the QEMU thread about AIO completion, we try graceful recovery by marking the disk drive as inaccessible. This error recovery code is race-prone as found by Asias and Stefan. However as found out by Paolo, this kind of error is impossible and

Re: [Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-26 Thread Nikunj A Dadhania
Alexander Graf writes: > On 26.08.2013, at 13:46, Nikunj A Dadhania wrote: > >> Alexander Graf writes: >> >>> On 26.08.2013, at 12:58, Nikunj A Dadhania wrote: >>> This implements capabilities exchange between host and client. As at the moment no capability is supported, put zero fla

Re: [Qemu-devel] [PATCH v3] pci: Introduce helper to retrieve a PCI device's DMA address space

2013-08-26 Thread Michael S. Tsirkin
On Tue, Aug 27, 2013 at 03:01:03PM +1000, Alexey Kardashevskiy wrote: > On 08/12/2013 07:02 PM, Michael S. Tsirkin wrote: > > On Mon, Aug 12, 2013 at 12:36:57AM +1000, Alexey Kardashevskiy wrote: > >> On 08/11/2013 11:58 PM, Michael S. Tsirkin wrote: > >>> On Sat, Aug 10, 2013 at 01:09:08AM +1000,

Re: [Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-26 Thread Nikunj A Dadhania
Alexander Graf writes: +rc = spapr_vio_dma_read(&s->vdev, buffer, &cap, len); +if (rc) { +fprintf(stderr, "vscsi_send_capabilities: DMA read failure !\n"); >>> >>> At this point cap contains random host data, no? >> >> Yes, and we zero it out in this case. > > The

Re: [Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-26 Thread Nikunj A Dadhania
Paolo Bonzini writes: > Il 26/08/2013 11:06, Nikunj A Dadhania ha scritto: +fprintf(stderr, "vscsi_send_capabilities: size out of bound !\n"); +goto error_out; +} >>> >>> I am not 100% familiar with the protocol, could it be that we should >>> just read sizeof(c

Re: [Qemu-devel] [PATCH v3] pci: Introduce helper to retrieve a PCI device's DMA address space

2013-08-26 Thread Alexey Kardashevskiy
On 08/12/2013 07:02 PM, Michael S. Tsirkin wrote: > On Mon, Aug 12, 2013 at 12:36:57AM +1000, Alexey Kardashevskiy wrote: >> On 08/11/2013 11:58 PM, Michael S. Tsirkin wrote: >>> On Sat, Aug 10, 2013 at 01:09:08AM +1000, Alexey Kardashevskiy wrote: A PCI device's DMA address space (possibly an

Re: [Qemu-devel] [PATCH v3 1/8] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-08-26 Thread Benjamin Herrenschmidt
On Tue, 2013-08-27 at 03:48 +0200, Andreas Färber wrote: > Also, QEMU is definitely not the only project that has higher > acceptance > criteria than patch-works-for-the-patch-author. :) There's a difference between high acceptance criteria and systematic bike shed painting including in some case

[Qemu-devel] [PATCH v3 4/4] timer: make qemu_clock_enable sync between disable and timer's cb

2013-08-26 Thread Liu Ping Fan
After disabling the QemuClock, we should make sure that no QemuTimers are still in flight. To implement that with light overhead, we resort to QemuEvent. The caller of disabling will wait on QemuEvent of each timerlist. Note, qemu_clock_enable(foo,false) can _not_ be called from timer's cb. And th

[Qemu-devel] [PATCH v3 2/4] timer: protect timers_state's clock with seqlock

2013-08-26 Thread Liu Ping Fan
The vm_clock may be read outside BQL. This will make timers_state --the foundation of vm_clock exposed to race condition. Using private lock to protect it. Note in tcg mode, vm_clock still read inside BQL, so icount is left without private lock's protection. As for cpu_ticks_* in timers_state, it

[Qemu-devel] [PATCH v3 3/4] qemu-thread: add QemuEvent

2013-08-26 Thread Liu Ping Fan
From: Paolo Bonzini This emulates Win32 manual-reset events using futexes or conditional variables. Typical ways to use them are with multi-producer, single-consumer data structures, to test for a complex condition whose elements come from different threads: for (;;) { qemu_event_re

[Qemu-devel] [PATCH v3 1/4] seqlock: introduce read-write seqlock

2013-08-26 Thread Liu Ping Fan
From: Paolo Bonzini This lets the read-side access run outside the BQL. Signed-off-by: Paolo Bonzini --- include/qemu/seqlock.h | 72 ++ 1 file changed, 72 insertions(+) create mode 100644 include/qemu/seqlock.h diff --git a/include/qemu/seqloc

[Qemu-devel] [PATCH v3 0/4] timers thread-safe stuff

2013-08-26 Thread Liu Ping Fan
Saw the Alex's patches has been merged, rebase mine onto his. v3: 1. rename seqlock_read_check as seqlock_read_retry 2. Document timerlist were protected by BQL, and discard private lock around "qemu_event_wait(tl->ev)". v2: 1. fix comment in commit and code 2. fix race issue for qemu_cl

Re: [Qemu-devel] [RFC] TCG unit testing

2013-08-26 Thread Lei Li
On 08/24/2013 04:42 AM, Stefan Weil wrote: Am 23.08.2013 21:47, schrieb Richard Henderson: I've been thinking for a while about how to reliably test TCG backends, and maybe how to do regression testing on them. Having to begin the test from a guest binary, especially considering the vast cross-

Re: [Qemu-devel] [PATCH] i386: Use #defines instead of magic numbers for CPUID cache information

2013-08-26 Thread li guang
在 2013-08-26一的 19:23 -0300,Eduardo Habkost写道: > This is an attempt to make the CPUID cache topology code clearer, by > replacing the magic numbers in the code with #defines, and moving all > the cache information to the same place in the file. > > I took care of comparing the assembly output of co

[Qemu-devel] questions about the bdrv_co_do_readv()

2013-08-26 Thread Yaodong Yang
In the block-migration period, each chunk of data is read by bdrv_aio_readv(), then bdrv_co_aio_rw_vector() , then bdrv_co_do_rw(). Inside the bdrv_co_do_rw() function, the bdrv_co_do_readv() function is called twice. and exit without finish the execution of the bdrv_co_do_readv() function. Al

[Qemu-devel] [PATCH V2 3/3] qemu-iotests: add tests for runtime fd passing via SCM rights

2013-08-26 Thread Wenchao Xia
This case will test whether the monitor can receive fd at runtime. To verify better, additional monitor is created to see if qemu can handler two monitor instance correctly. Signed-off-by: Wenchao Xia --- tests/qemu-iotests/045 | 37 - tests/qemu-iotests

[Qemu-devel] [PATCH V2 2/3] qemu-iotests: add infrastructure of fd passing via SCM

2013-08-26 Thread Wenchao Xia
This patch make use of the compiled scm helper program to transfer fd via unix socket at runtime. Signed-off-by: Wenchao Xia --- QMP/qmp.py|6 ++ tests/qemu-iotests/check |1 + tests/qemu-iotests/iotests.py | 26 ++ 3 files changed,

[Qemu-devel] [PATCH V2 0/3] qemu-iotests: add test for fd passing via SCM rights

2013-08-26 Thread Wenchao Xia
This series add test case for fd passing with unix socket at runtime. Since getfd and closefd interface will interact with monitor's data, so it will help to do regression test for monitor patches. Since python2 do not support sendmsg(), so a C helper program is added to do the job. v2: 1: add m

[Qemu-devel] [PATCH V2 1/3] qemu-iotests: add unix socket help program

2013-08-26 Thread Wenchao Xia
This program can do a sendmsg call to transfer fd with unix socket, which is not supported in python2. The built binary will not be deleted in clean, but it is a existing issue in ./tests, which should be solved in another patch. Signed-off-by: Wenchao Xia --- configure

Re: [Qemu-devel] [PATCH 0/3] qemu-iotests: add test for fd passing via SCM rights

2013-08-26 Thread Wenchao Xia
于 2013-8-26 11:13, Wenchao Xia 写道: > This series add test case for fd passing with unix socket at runtime. Since > getfd and closefd interface will interact with monitor's data, so it will > help to do regression test for monitor patches. Since python2 do not support > sendmsg(), so a C helper prog

[Qemu-devel] [Bug 1216368] Re: unsupported screen resolution crashes sdl-qemu

2013-08-26 Thread Lei Li
Sorry, a little confusion what's the problem you want to solve? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1216368 Title: unsupported screen resolution crashes sdl-qemu Status in QEMU: New B

Re: [Qemu-devel] [PATCH v3 1/8] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-08-26 Thread Andreas Färber
Am 27.08.2013 02:43, schrieb Benjamin Herrenschmidt: > Am I dreaming ? Those patches were written about a year ago and you guys > are still nitpicking on names ? They should have been merged a LONG time > ago ... [snip] Ben, this patch was first posted to qemu-devel June 4th, this year. If patche

Re: [Qemu-devel] [PATCH V9 00/15] monitor: support sub command group in auto completion and help

2013-08-26 Thread Wenchao Xia
于 2013-8-26 23:55, Luiz Capitulino 写道: On Fri, 23 Aug 2013 16:17:52 +0800 Wenchao Xia wrote: This series make auto completion and help functions works normal for sub command, by using reentrant functions. In order to do that, global variables are not directly used in those functions any more.

Re: [Qemu-devel] [PATCH] spapr: support CPU hotplug

2013-08-26 Thread David Gibson
On Mon, Aug 26, 2013 at 02:24:49PM +0200, Alexander Graf wrote: > > On 23.08.2013, at 13:30, Alexey Kardashevskiy wrote: > > > PAPR+ requires two RTAS calls to be supported by the hypervisor in > > order to allow hotplugging VCPUs from the guest. The "start-cpu" RTAS > > call was already there bu

Re: [Qemu-devel] [PATCH] spapr-vscsi: Report error on unsupported MAD requests

2013-08-26 Thread Benjamin Herrenschmidt
On Mon, 2013-08-26 at 15:43 +0200, Paolo Bonzini wrote: > Il 23/08/2013 11:23, Alexey Kardashevskiy ha scritto: > > The existing driver just dropped unsupported requests. This adds error > > responses to those unhandled requests. > > > > Signed-off-by: Alexey Kardashevskiy > > --- > > hw/scsi/sp

Re: [Qemu-devel] [PATCH] spapr-vscsi: Adding VSCSI capabilities

2013-08-26 Thread Benjamin Herrenschmidt
On Mon, 2013-08-26 at 15:37 +0200, Paolo Bonzini wrote: > There are certainly cases where time-of-check-to-time-of-use > vulnerability could make QEMU access uninitialized memory (or worse, > out-of-bounds arrays). For example, you could try racing the host on > the length of a scatter/gather list

Re: [Qemu-devel] [PATCH v3 1/8] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-08-26 Thread Benjamin Herrenschmidt
On Mon, 2013-08-26 at 15:11 +0200, Alexander Graf wrote: > On 19.08.2013, at 07:55, Alexey Kardashevskiy wrote: > > > From: David Gibson > > > > Recent PowerKVM allows the kernel to intercept some RTAS calls from > the > > guest directly. This is used to implement the more efficient > in-kernel

Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument

2013-08-26 Thread Peter Maydell
On 26 August 2013 22:00, Richard Henderson wrote: > Allow the code that tcg generates to be less obtuse, passing in > the return address directly instead of computing it in the helper. > +uint8_t helper_ret_ldb_mmu(CPUArchState *env, target_ulong addr, > + int mmu_idx, u

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Peter Maydell
On 26 August 2013 23:33, Paolo Bonzini wrote: > Il 26/08/2013 19:30, Richard Henderson ha scritto: >> This isn't the kernel, where non-pagable code size is a concern, so I don't >> see >> how full configuration of machine emulations and devices is helpful. I'd be >> more inclined to go the other

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Richard Henderson
On 08/26/2013 03:33 PM, Paolo Bonzini wrote: > Il 26/08/2013 19:30, Richard Henderson ha scritto: >> This isn't the kernel, where non-pagable code size is a concern, so I don't >> see >> how full configuration of machine emulations and devices is helpful. I'd be >> more inclined to go the other w

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 21:47, Peter Maydell ha scritto: > In general I'm not convinced it's wise to give end-users and distros > even more config options to shoot themselves in the foot with Note that the Kconfig project is about giving end users _less_ config options. default-configs/ does not capture de

Re: [Qemu-devel] [PATCH 21/47] hw/char/Kconfig: Add Kconfig file

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 19:15, Andreas Färber ha scritto: >> > PCI devices are generally configurable, so you need to add prompts to them. > IndustryPack is really misplaced in hw/char/ and I believe I posted > patches to remedy that and let one actually find it in our source tree. > There were no objections

Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument

2013-08-26 Thread Richard Henderson
On 08/26/2013 03:26 PM, Paolo Bonzini wrote: > Something that can be done on top of this patch: what about moving the > "-1" to helper_ret_*? It is common to pretty much all the targets > (except ARM has -2), and it would allow some simplifications. I suppose so, yes. > li rN, retaddr >

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 19:30, Richard Henderson ha scritto: > This isn't the kernel, where non-pagable code size is a concern, so I don't > see > how full configuration of machine emulations and devices is helpful. I'd be > more inclined to go the other way, where all qemu-system-cpu images always > build

Re: [Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 23:00, Richard Henderson ha scritto: > Allow the code that tcg generates to be less obtuse, passing in > the return address directly instead of computing it in the helper. > > Maintain the old entrance point unchanged as an alternate entry point. > > Delete the helper_st*_cmmu proto

Re: [Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs (v2)

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 23:48, Mike Day ha scritto: > > > Mathieu - Thanks for the review! And thanks for the code, I'm working > with it right now. I like the idea of using a flag to provide a form of > atomicity for the doubly-linked list elements. I'm also planning on > running some timing tests to see

[Qemu-devel] [PATCH] i386: Use #defines instead of magic numbers for CPUID cache information

2013-08-26 Thread Eduardo Habkost
This is an attempt to make the CPUID cache topology code clearer, by replacing the magic numbers in the code with #defines, and moving all the cache information to the same place in the file. I took care of comparing the assembly output of compiling target-i386/cpu.c before and after applying this

Re: [Qemu-devel] [RFC PATCH] Introduce RCU-enabled DQs (v2)

2013-08-26 Thread Mike Day
On Sun, Aug 25, 2013 at 3:18 PM, Mathieu Desnoyers < mathieu.desnoy...@efficios.com> wrote: > > I'm not very comfortable with your DQ implementation not providing any > kind of guarantee to a forward traversal followed by backward traversal, > nor for backward followed by forward traversal. If a li

Re: [Qemu-devel] [PATCH] sun4m: Add FCode ROM for TCX framebuffer

2013-08-26 Thread Mark Cave-Ayland
On 24/08/13 18:46, Andreas Färber wrote: Am 21.08.2013 20:52, schrieb Mark Cave-Ayland: On 21/08/13 18:54, Andreas Färber wrote: Shouldn't this blob come in the same patch as an update to some git module, so that we keep track of the sources used to build the blob? I concur. Independent of

[Qemu-devel] [PULL 7/7] tcg-i386: Use new return-argument ld/st helpers

2013-08-26 Thread Richard Henderson
Discontinue the jump-around-jump-to-jump scheme, trading it for a single immediate move instruction. The two extra jumps always consume 7 bytes, whereas the immediate move is either 5 or 7 bytes depending on where the code_gen_buffer gets located. Signed-off-by: Richard Henderson --- include/ex

[Qemu-devel] [PULL 4/7] tcg-i386: Tidy qemu_ld/st slow path

2013-08-26 Thread Richard Henderson
Use existing stack space for arguments; don't push/pop. Use less ifdefs and more C ifs. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 165 ++ 1 file changed, 74 insertions(+), 91 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg

[Qemu-devel] [PULL 6/7] tcg: Tidy softmmu_template.h

2013-08-26 Thread Richard Henderson
Avoid a loop in the tlb_fill path; the fill will either succeed or generate an exception. Inline the slow_ld/st function; it was a complete copy of the main helper except for the actual cross-page unaligned code, and the compiler was inlining it anyway. Add unlikely markers optimizing for the mos

[Qemu-devel] [PULL 3/7] tcg-i386: Try pc-relative lea for constant formation

2013-08-26 Thread Richard Henderson
Use a 7 byte lea before the ultimate 10 byte movq. Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c index 841bd75..8226171 100644 --- a/tcg/i386/

[Qemu-devel] [PULL 0/7] Improve tcg ldst optimization

2013-08-26 Thread Richard Henderson
The following is a rebase of the i386 portion of the v2 patch set. That incorporated the minor comments from Aurelien from v1. This pull request omits the ARM portion of the patch set, as that has yet to receive any review. I'd like to get this patch set pulled, because I have three other patch

[Qemu-devel] [PULL 5/7] tcg: Add mmu helpers that take a return address argument

2013-08-26 Thread Richard Henderson
Allow the code that tcg generates to be less obtuse, passing in the return address directly instead of computing it in the helper. Maintain the old entrance point unchanged as an alternate entry point. Delete the helper_st*_cmmu prototypes; the implementations did not exist. Signed-off-by: Richa

[Qemu-devel] [PULL 2/7] tcg-i386: Add and use tcg_out64

2013-08-26 Thread Richard Henderson
No point in splitting the write into 32-bit pieces. Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- tcg/i386/tcg-target.c | 3 +-- tcg/tcg.c | 7 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tcg/i386/tcg-target.c b/tcg/i386/tcg-target.c ind

[Qemu-devel] [PULL 1/7] tcg: Tidy generated code for tcg_outN

2013-08-26 Thread Richard Henderson
Aliasing was forcing s->code_ptr to be re-read after the store. Keep the pointer in a local variable to help the compiler. Signed-off-by: Richard Henderson --- tcg/tcg.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index dac8224..42c95af 10

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-26 Thread Eduardo Habkost
On Mon, Aug 26, 2013 at 06:45:27PM +0200, Benoît Canet wrote: > > Talk to Eduardo since this is related to cpuid configuration and he is > > an expert. > > I found the following in target-i386/cpu.c > > case 0x8006: > /* cache info (L2 cache) */ > *eax = 0; > *ebx

Re: [Qemu-devel] [PATCH 0/6] Improve getauxval support

2013-08-26 Thread Richard Henderson
Ping. r~ On 08/17/2013 03:38 PM, Richard Henderson wrote: > The getauxval routine was added to glibc for 2.16. In order to > better support qemu on systems prior to 2.16, add a qemu_getauxval > entry point, and add the relevant defines to our own elf.h. > > > r~ > > > Richard Henderson (6):

Re: [Qemu-devel] [PATCH 1/2] alpha-linux-user: Fix umount syscall numbers

2013-08-26 Thread Richard Henderson
Ping. r~ On 08/16/2013 11:24 PM, Richard Henderson wrote: > Ping. > > r~ > > > On 07/24/2013 12:50 PM, Richard Henderson wrote: >> It has been pointed out on LKML that the alpha umount syscall numbers >> are named wrong, and a patch to rectify that has been posted for 3.11. >> >> Glibc works a

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Peter Maydell
On 26 August 2013 19:44, Lluís Vilanova wrote: > Richard Henderson writes: >> This isn't the kernel, where non-pagable code size is a concern, so I don't >> see >> how full configuration of machine emulations and devices is helpful. I'd be >> more inclined to go the other way, where all qemu-sys

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Lluís Vilanova
Richard Henderson writes: > On 08/26/2013 09:59 AM, Paolo Bonzini wrote: >>> I don't understand the point of this. There is one alpha emulation; >>> if you disable it you're left with a program that's not useful. So >>> why the configuration for it at all? >> >> I think this was just for consis

Re: [Qemu-devel] [PATCH] mips_malta: support up to 2GiB RAM

2013-08-26 Thread Richard Henderson
On 08/23/2013 08:09 AM, Yongbok Kim wrote: > +/* alias for pre IO hole access */ > +memory_region_init_alias(ram_low_preio, NULL, "mips_malta_low_preio.ram", > + ram_high, 0, MIN(ram_size, (256 << 20))); > +memory_region_add_subregion(system_memory, 0, ram_lo

Re: [Qemu-devel] [PATCH] target-xtensa: add in_asm logging

2013-08-26 Thread Richard Henderson
On 08/24/2013 12:42 PM, Max Filippov wrote: > Signed-off-by: Max Filippov > --- > target-xtensa/translate.c | 8 > 1 file changed, 8 insertions(+) Reviewed-by: Richard Henderson Excellent, thanks. That was the only target that did not call in for IN_ASM dumping. r~

Re: [Qemu-devel] [PATCH v3] target-i386: Fix segment cache dump

2013-08-26 Thread Richard Henderson
On 08/25/2013 03:20 AM, Tobias Markus wrote: > When in Long Mode, cpu_x86_seg_cache() logs "DS16" because the Default > operation size bit (D/B bit) is not set for Long Mode Data Segments since > there are only Data Segments in Long Mode and no explicit 16/32/64-bit > Descriptors. > This patch fixe

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Richard Henderson
On 08/26/2013 09:59 AM, Paolo Bonzini wrote: >> I don't understand the point of this. There is one alpha emulation; >> if you disable it you're left with a program that's not useful. So >> why the configuration for it at all? > > I think this was just for consistency with other targets. Either

Re: [Qemu-devel] [PATCH 21/47] hw/char/Kconfig: Add Kconfig file

2013-08-26 Thread Andreas Färber
Am 26.08.2013 12:43, schrieb Paolo Bonzini: > Il 26/08/2013 00:58, Ákos Kovács ha scritto: >> Signed-off-by: Ákos Kovács >> --- >> hw/char/Kconfig | 24 >> 1 file changed, 24 insertions(+) >> create mode 100644 hw/char/Kconfig >> >> diff --git a/hw/char/Kconfig b/hw/ch

Re: [Qemu-devel] [PATCH 23/47] hw/cpu/Kconfig: Add Kconfig file

2013-08-26 Thread Andreas Färber
Am 26.08.2013 00:58, schrieb Ákos Kovács: > Signed-off-by: Ákos Kovács > --- > hw/cpu/Kconfig | 11 +++ > 1 file changed, 11 insertions(+) > create mode 100644 hw/cpu/Kconfig > > diff --git a/hw/cpu/Kconfig b/hw/cpu/Kconfig > new file mode 100644 > index 000..d90cbe5 > --- /dev/nu

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 16:41, Richard Henderson ha scritto: > On 08/25/2013 03:58 PM, Ákos Kovács wrote: >> Set CONFIG_CLIPPER as default for default-configs/alpha-softmmu.mak >> >> Signed-off-by: Ákos Kovács >> --- >> default-configs/alpha-softmmu.mak |2 ++ >> hw/alpha/Makefile.objs|

[Qemu-devel] [PULL 12/14] pc: pc_compat_1_4() now can call pc_compat_1_5()

2013-08-26 Thread Michael S. Tsirkin
From: Eduardo Habkost It just needs to set has_pvpanic=false after calling it. This way, it won't be a special case anymore. Signed-off-by: Eduardo Habkost Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletio

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-26 Thread Benoît Canet
> Talk to Eduardo since this is related to cpuid configuration and he is > an expert. I found the following in target-i386/cpu.c case 0x8006: /* cache info (L2 cache) */ *eax = 0; *ebx = 0x42004200; *ecx = 0x02008140; *edx = 0; break; >From

[Qemu-devel] [PULL 14/14] virtio: virtqueue_get_avail_bytes: fix desc_pa when loop over the indirect descriptor table

2013-08-26 Thread Michael S. Tsirkin
From: yinyin virtqueue_get_avail_bytes: when found a indirect desc, we need loop over it. /* loop over the indirect descriptor table */ indirect = 1; max = vring_desc_len(desc_pa, i) / sizeof(VRingDesc); num_bufs = i = 0; desc_pa = vring_desc

[Qemu-devel] [PULL 10/14] pc: Kill pc_init_pci_1_0()

2013-08-26 Thread Michael S. Tsirkin
From: Eduardo Habkost The pc_init_pci_1_2()/pc_init_pci_1_0() split was made on commit 6fd028f64f662c801fd5a54d0e3a1d2baeee93ea, in preparation for commit 9953f8822cc316eec9962f0a2858c3439a80adec. The latter was reverted, so there's no reason to keep two separate functions that do exactly the sam

[Qemu-devel] [PULL 07/14] ppc: Don't duplicate QEMUMachineInitArgs in PPCE500Params

2013-08-26 Thread Michael S. Tsirkin
From: Markus Armbruster Pass on the generic arguments unadulterated, and the machine-specific ones as separate argument. Signed-off-by: Markus Armbruster Acked-by: Alexander Graf Reviewed-by: Laszlo Ersek Signed-off-by: Michael S. Tsirkin --- hw/ppc/e500.c | 35 ++--

[Qemu-devel] [PULL 13/14] pc_piix: Kill pc_init1() memory region args

2013-08-26 Thread Michael S. Tsirkin
From: Eduardo Habkost All callers always use the same values (get_system_memory(), get_system_io()), so the parameters are pointless. If one day we decide to eliminate get_system_memory() and get_system_io(), we will be able to do that more easily by adding the values to struct QEMUMachineInitAr

[Qemu-devel] [PULL 11/14] pc: Create pc_compat_*() functions

2013-08-26 Thread Michael S. Tsirkin
From: Eduardo Habkost Making the older compat functions call the newer compat functions at the beginning allows the older functions undo what's done by newer compat functions. e.g.: pc_compat_1_4() will be able to call pc_compat_1_5() and then set has_pvpanic=false. Signed-off-by: Eduardo Habkos

[Qemu-devel] [PULL 05/14] sun4: Don't prematurely explode QEMUMachineInitArgs

2013-08-26 Thread Michael S. Tsirkin
From: Markus Armbruster Don't explode QEMUMachineInitArgs before passing it to sun4m_hw_init(), sun4uv_init(). Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Signed-off-by: Michael S. Tsirkin --- hw/sparc/sun4m.c | 113 - hw/s

[Qemu-devel] [PULL 09/14] pc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-26 Thread Michael S. Tsirkin
From: Markus Armbruster Don't explode when the variable is used just a few times, and never changed. Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_q35.c | 22 +- 1 file changed, 9

[Qemu-devel] [PULL 08/14] pc: Don't prematurely explode QEMUMachineInitArgs

2013-08-26 Thread Michael S. Tsirkin
From: Markus Armbruster Don't explode QEMUMachineInitArgs before passing it to pc_init1(). Signed-off-by: Markus Armbruster Reviewed-by: Laszlo Ersek Reviewed-by: Eduardo Habkost Signed-off-by: Michael S. Tsirkin --- hw/i386/pc_piix.c | 65 ++-

[Qemu-devel] [PULL 04/14] q35: Add PCIe switch to example q35 configuration

2013-08-26 Thread Michael S. Tsirkin
From: Alex Williamson Signed-off-by: Alex Williamson Signed-off-by: Michael S. Tsirkin --- docs/q35-chipset.cfg | 23 +++ 1 file changed, 23 insertions(+) diff --git a/docs/q35-chipset.cfg b/docs/q35-chipset.cfg index 1b6efc0..e4ddb7d 100644 --- a/docs/q35-chipset.cfg +++

[Qemu-devel] [PULL 06/14] ppc: Don't explode QEMUMachineInitArgs into local variables needlessly

2013-08-26 Thread Michael S. Tsirkin
From: Markus Armbruster Don't explode when the variable is used just once, and never changed. Signed-off-by: Markus Armbruster Acked-by: Alexander Graf Reviewed-by: Laszlo Ersek Signed-off-by: Michael S. Tsirkin --- hw/ppc/e500plat.c | 18 ++ hw/ppc/mpc8544ds.c | 18 ++-

[Qemu-devel] [PULL 02/14] arch_init: align MR size to target page size

2013-08-26 Thread Michael S. Tsirkin
Migration code assumes that each MR is a multiple of TARGET_PAGE_SIZE: MR size is divided by TARGET_PAGE_SIZE, so if it isn't migration never completes. But this isn't really required for regions set up with memory_region_init_ram, since that calls qemu_ram_alloc which aligns size up using TARGET_P

[Qemu-devel] [PULL 01/14] pc: cleanup 1.4 compat support

2013-08-26 Thread Michael S. Tsirkin
Make 1.4 compat code call the 1.6 one, reducing code duplication. Add comment explaining why we can't make 1.4 call 1.5 as usual. Signed-off-by: Michael S. Tsirkin Reviewed-by: Andreas Färber Reviewed-by: Eduardo Habkost --- hw/i386/pc_piix.c | 4 ++-- hw/i386/pc_q35.c | 4 ++-- 2 files chang

[Qemu-devel] [PULL 03/14] loader: store FW CFG ROM files in RAM

2013-08-26 Thread Michael S. Tsirkin
ROM files that are put in FW CFG are copied to guest ram, by BIOS, but they are not backed by RAM so they don't get migrated. Each time we change two bytes in such a ROM this breaks cross-version migration: since we can migrate after BIOS has read the first byte but before it has read the second o

[Qemu-devel] [PULL 00/14] pc,pci,virtio fixes and cleanups

2013-08-26 Thread Michael S. Tsirkin
The following changes since commit ecfe10c9a6f9bc77d0e4b7eb5d0f5d61e8fbaed8: Merge remote-tracking branch 'pmaydell/tags/pull-target-arm-20130820' into staging (2013-08-20 11:23:52 -0500) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_an

Re: [Qemu-devel] [PATCH for-1.6] isapc: disable kvmvapic

2013-08-26 Thread Michael S. Tsirkin
On Mon, Aug 26, 2013 at 05:17:07PM +0200, Andreas Färber wrote: > Am 26.08.2013 17:01, schrieb Paolo Bonzini: > > Il 26/08/2013 16:34, Andreas Färber ha scritto: > >> Am 26.08.2013 14:21, schrieb Paolo Bonzini: > >>> Il 13/08/2013 00:02, Paolo Bonzini ha scritto: > vapic requires the VAPIC ROM

Re: [Qemu-devel] [PATCH V9 00/15] monitor: support sub command group in auto completion and help

2013-08-26 Thread Luiz Capitulino
On Fri, 23 Aug 2013 16:17:52 +0800 Wenchao Xia wrote: > This series make auto completion and help functions works normal for sub > command, by using reentrant functions. In order to do that, global variables > are not directly used in those functions any more. With this series, cmd_table > is a m

Re: [Qemu-devel] [PATCH] monitor: Add missing attributes to local function

2013-08-26 Thread Luiz Capitulino
On Thu, 22 Aug 2013 21:30:09 +0200 Stefan Weil wrote: > Function expr_error gets a format string and variable arguments like printf. > It also never returns. Add the necessary attributes. > > Signed-off-by: Stefan Weil Applied to the qmp branch, thanks. > --- > monitor.c |3 ++- > 1 file

Re: [Qemu-devel] [PATCH for-1.6] isapc: disable kvmvapic

2013-08-26 Thread Andreas Färber
Am 26.08.2013 17:01, schrieb Paolo Bonzini: > Il 26/08/2013 16:34, Andreas Färber ha scritto: >> Am 26.08.2013 14:21, schrieb Paolo Bonzini: >>> Il 13/08/2013 00:02, Paolo Bonzini ha scritto: vapic requires the VAPIC ROM to be mapped into RAM. This is not possible without PAM hardware.

[Qemu-devel] AioContext, IOthread and Block migration thread

2013-08-26 Thread Yaodong Yang
I'm a newer in QEMU, and I have the following questions: 1. Is it true that all the requests to disk images need to go through function bdrv_co_do_readv() or bdrv_co_do_writev()? 2. In block-migration thread, the bdrv_co_do_readv is also called to read blocks from disk images, in order to finis

Re: [Qemu-devel] [PATCH for-1.6] isapc: disable kvmvapic

2013-08-26 Thread Paolo Bonzini
Il 26/08/2013 16:34, Andreas Färber ha scritto: > Am 26.08.2013 14:21, schrieb Paolo Bonzini: >> Il 13/08/2013 00:02, Paolo Bonzini ha scritto: >>> vapic requires the VAPIC ROM to be mapped into RAM. This is not >>> possible without PAM hardware. This fixes a segmentation fault >>> running with -

Re: [Qemu-devel] [Xen-devel] [PATCH for v1.6] pc: Fix initialization of the ram_memory variable.

2013-08-26 Thread Fabio Fantoni
Il 16/08/2013 16:46, Anthony PERARD ha scritto: In some cases (Xen), it will not be initialized before to be used. This leads to segv. Signed-off-by: Anthony PERARD Tested-by: Fabio Fantoni This patch have solved the critical regression of all hvm domUs that prevented domUs starting with qe

[Qemu-devel] [PATCH V6 5/5] block: Add iops_size to do the iops accounting for a given io size.

2013-08-26 Thread Benoît Canet
This feature can be used in case where users are avoiding the iops limit by doing jumbo I/Os hammering the storage backend. Signed-off-by: Benoit Canet --- block/qapi.c |3 +++ blockdev.c | 21 ++--- hmp.c|8 ++-- qapi-schema.json | 10 ++

[Qemu-devel] [PATCH V6 4/5] block: Add support for throttling burst max in QMP and the command line.

2013-08-26 Thread Benoît Canet
The max parameter of the leaky bucket throttling algorithm can be used to allow the guest to do bursts. The max value is a pool of I/O that the guest can use without being throttled at all. Throttling is triggered once this pool is empty. Signed-off-by: Benoit Canet --- block/qapi.c | 26 +

[Qemu-devel] [PATCH V6 3/5] block: Enable the new throttling code in the block layer.

2013-08-26 Thread Benoît Canet
Signed-off-by: Benoit Canet --- block.c | 363 +++-- block/qapi.c | 21 ++- blockdev.c| 100 +++-- include/block/block.h |1 - include/block/block_int.h | 32 +--- 5 files changed, 187 ins

[Qemu-devel] [PATCH V6 1/5] throttle: Add a new throttling API implementing continuous leaky bucket.

2013-08-26 Thread Benoît Canet
Implement the continuous leaky bucket algorithm devised on IRC as a separate module. Signed-off-by: Benoit Canet --- include/qemu/throttle.h | 103 + util/Makefile.objs |1 + util/throttle.c | 390 +++ 3 files changed, 49

Re: [Qemu-devel] [PATCH 06/47] hw/alpha/Makefile.objs: Build objects depending on CLIPPER

2013-08-26 Thread Richard Henderson
On 08/25/2013 03:58 PM, Ákos Kovács wrote: > Set CONFIG_CLIPPER as default for default-configs/alpha-softmmu.mak > > Signed-off-by: Ákos Kovács > --- > default-configs/alpha-softmmu.mak |2 ++ > hw/alpha/Makefile.objs|2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) >

[Qemu-devel] [PATCH V6 0/5] Continuous Leaky Bucket Throttling

2013-08-26 Thread Benoît Canet
This patchset implement continous leaky bucket throttling. It use two requests queue to enable to do silly unbalanced throttling like block_set_io_throttle 0 0 0 0 6000 1 It use two timer to get the timer callbacks and the throttle.c code simple in this version: The throttling core is pretty so

[Qemu-devel] [PATCH V6 2/5] throttle: Add units tests

2013-08-26 Thread Benoît Canet
Signed-off-by: Benoit Canet --- tests/Makefile|2 + tests/test-throttle.c | 481 + 2 files changed, 483 insertions(+) create mode 100644 tests/test-throttle.c diff --git a/tests/Makefile b/tests/Makefile index b0200fd..6d2f3ad 100644

Re: [Qemu-devel] [PATCH for-1.6] isapc: disable kvmvapic

2013-08-26 Thread Andreas Färber
Am 26.08.2013 14:21, schrieb Paolo Bonzini: > Il 13/08/2013 00:02, Paolo Bonzini ha scritto: >> vapic requires the VAPIC ROM to be mapped into RAM. This is not >> possible without PAM hardware. This fixes a segmentation fault >> running with -M isapc. >> >> Cc: qemu-sta...@nongnu.org >> Signed-of

Re: [Qemu-devel] KVM guest cpu L3 cache and cpufreq

2013-08-26 Thread Gleb Natapov
On Mon, Aug 26, 2013 at 02:49:41PM +0200, Benoît Canet wrote: > > Hi, > > Thanks for the answer. > > > On Tue, Aug 13, 2013 at 08:17:13PM +0200, Benoît Canet wrote: > > > > > > Hi, > > > > > > I noticed that the l3 cache size of a guest /proc/cpuinfo is not the same > > > as > > > the l3 cach

Re: [Qemu-devel] [RFC PATCH v4] powerpc: add PVR mask support

2013-08-26 Thread Andreas Färber
Am 26.08.2013 15:04, schrieb Alexander Graf: > > On 19.08.2013, at 06:06, Alexey Kardashevskiy wrote: > >> IBM POWERPC processors encode PVR as a CPU family in higher 16 bits and >> a CPU version in lower 16 bits. Since there is no significant change >> in behavior between versions, there is no p

Re: [Qemu-devel] [PATCH v3 4/8] xics: minor changes and cleanups

2013-08-26 Thread Alexander Graf
On 26.08.2013, at 16:20, Andreas Färber wrote: > Am 26.08.2013 15:36, schrieb Alexander Graf: >> >> On 19.08.2013, at 07:55, Alexey Kardashevskiy wrote: >> >>> Before XICS-KVM comes, it makes sense to clean up the emulated XICS a bit. >>> >>> This does: >>> 1. add assert in ics_realize() >>> 2

Re: [Qemu-devel] [PATCH 0/5] qcow2: Add metadata overlap checks

2013-08-26 Thread Max Reitz
Hi, Okay, so this did arrive after all (albeit 4 h late) – sorry for the duplicate (see the series from 15:18). Kind regards, Max

Re: [Qemu-devel] [PATCH v3 4/8] xics: minor changes and cleanups

2013-08-26 Thread Andreas Färber
Am 26.08.2013 15:36, schrieb Alexander Graf: > > On 19.08.2013, at 07:55, Alexey Kardashevskiy wrote: > >> Before XICS-KVM comes, it makes sense to clean up the emulated XICS a bit. >> >> This does: >> 1. add assert in ics_realize() >> 2. change variable names from "k" to more informative ones >>

Re: [Qemu-devel] [PATCH 0/9] Remove legacy unaligned bswap functions

2013-08-26 Thread Richard Henderson
On 08/25/2013 07:59 AM, Peter Maydell wrote: > Peter Maydell (9): > bswap.h: Remove cpu_to_le16wu() > bswap.h: Remove cpu_to_le32wu() > bswap.h: Remove le16_to_cpupu() > bswap.h: Remove le32_to_cpupu() > bswap.h: Remove be32_to_cpupu() > bswap.h: Remove cpu_to_be16wu() > bswap.h: Remo

  1   2   3   >