Re: [Qemu-devel] [PATCH v2 1/3] scsi-disk: Allow overriding SCSI INQUIRY removable bit

2011-01-21 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.01.2011 11:45, schrieb Stefan Hajnoczi: >> On Tue, Jan 18, 2011 at 12:06 PM, Stefan Hajnoczi wrote: >>> On Tue, Jan 18, 2011 at 11:39 AM, Kevin Wolf wrote: Am 18.01.2011 11:10, schrieb Stefan Hajnoczi: > Provide the "removable" qdev property bit to override t

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

2011-01-21 Thread Daniel P. Berrange
On Fri, Jan 21, 2011 at 05:40:54PM +0100, Jes Sorensen wrote: > On 01/17/11 14:15, Michael Roth wrote: > > Add RPC to retrieve a guest file. This interface is intended > > for smaller reads like peeking at logs and /proc and such. > > > > Signed-off-by: Michael Roth > > --- > > virtagent-server.

[Qemu-devel] Re: [RFC][PATCH v6 07/23] virtagent: base server definitions

2011-01-21 Thread Michael Roth
On 01/21/2011 10:38 AM, Jes Sorensen wrote: diff --git a/virtagent-server.h b/virtagent-server.h new file mode 100644 index 000..9f68921 --- /dev/null +++ b/virtagent-server.h @@ -0,0 +1,34 @@ +/* + * virt-agent - host/guest RPC daemon functions + * + * Copyright IBM Corp. 2010 + * + * Author

Re: [Qemu-devel] [PATCH] target-arm: Set the right overflow bit for neon 32 and 64 bit saturating add/sub.

2011-01-21 Thread Peter Maydell
On 20 January 2011 17:16, Christophe Lyon wrote: > Set the right overflow bit for neon 32 and 64 bit saturating add/sub. > > Also move the neon 64 bit saturating add/sub helpers to neon_helper.c > for consistency with the 32 bits versions. > > There is probably still room for code commonalization

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

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 5:21 PM, Jan Kiszka wrote: > On 2011-01-21 17:37, Blue Swirl wrote: >> On Fri, Jan 21, 2011 at 8:46 AM, Gerd Hoffmann wrote: >>>  Hi, >>> By the way, we don't have a QEMUState but instead use globals. >>> >>> /me wants to underline this. >>> >>> IMO it is absolutely p

[Qemu-devel] checkpatch.pl false positives with HELPER macro

2011-01-21 Thread Peter Maydell
If you run checkpatch on the patch at http://patchwork.ozlabs.org/patch/79735/ then it has a number of false-positive errors like this: ERROR: need consistent spacing around '*' (ctx:WxV) #74: FILE: target-arm/neon_helper.c:201: +uint32_t HELPER(neon_qadd_u32)(CPUState *env, uint32_t a, uint32_t

[Qemu-devel] Re: [PATCH 3/5] blockdev: Reject multiple definitions for the same drive

2011-01-21 Thread Markus Armbruster
Kevin Wolf writes: > Am 21.01.2011 17:58, schrieb Markus Armbruster: >> Kevin Wolf writes: >> >>> Am 17.01.2011 19:31, schrieb Markus Armbruster: For reasons lost in the mist of time, we silently ignore multiple definitions for the same drive: $ qemu-system-x86_64 -nodef

[Qemu-devel] Re: [PATCH 3/5] blockdev: Reject multiple definitions for the same drive

2011-01-21 Thread Kevin Wolf
Am 21.01.2011 18:30, schrieb Markus Armbruster: > Kevin Wolf writes: > >> Am 21.01.2011 17:58, schrieb Markus Armbruster: >>> Kevin Wolf writes: >>> Am 17.01.2011 19:31, schrieb Markus Armbruster: > For reasons lost in the mist of time, we silently ignore multiple > definitions for

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

2011-01-21 Thread Jan Kiszka
On 2011-01-21 19:04, Blue Swirl wrote: > On Fri, Jan 21, 2011 at 5:21 PM, Jan Kiszka wrote: >> On 2011-01-21 17:37, Blue Swirl wrote: >>> On Fri, Jan 21, 2011 at 8:46 AM, Gerd Hoffmann wrote: Hi, > By the way, we don't have a QEMUState but instead use globals. /me wants t

[Qemu-devel] Re: checkpatch.pl false positives with HELPER macro

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 6:05 PM, Peter Maydell wrote: > If you run checkpatch on the patch at > http://patchwork.ozlabs.org/patch/79735/ > > then it has a number of false-positive errors like this: > > ERROR: need consistent spacing around '*' (ctx:WxV) > #74: FILE: target-arm/neon_helper.c:201: >

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

2011-01-21 Thread Michael Roth
On 01/21/2011 11:20 AM, Daniel P. Berrange wrote: On Fri, Jan 21, 2011 at 05:40:54PM +0100, Jes Sorensen wrote: On 01/17/11 14:15, Michael Roth wrote: Add RPC to retrieve a guest file. This interface is intended for smaller reads like peeking at logs and /proc and such. Signed-off-by: Michael

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

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 6:17 PM, Jan Kiszka wrote: > On 2011-01-21 19:04, Blue Swirl wrote: >> On Fri, Jan 21, 2011 at 5:21 PM, Jan Kiszka wrote: >>> On 2011-01-21 17:37, Blue Swirl wrote: On Fri, Jan 21, 2011 at 8:46 AM, Gerd Hoffmann wrote: >  Hi, > >> By the way, we don't hav

Re: [Qemu-devel] [PATCH v3 4/5] SPARC: Emulation of Leon3

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 5:00 PM, Fabien Chouteau wrote: > Leon3 is an open-source VHDL System-On-Chip, well known in space industry > (more > information on http://www.gaisler.com). > > Leon3 is made of multiple components available in the GrLib VHDL library. > Three devices are implemented: uart

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

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 5:00 PM, Fabien Chouteau wrote: > Hello Qemu-devel, > > Here is the third version of Leon3 emulation patch-set. > > Modifications since v2: >  - Tracepoints >  - DEFINE_PROP_* macros >  - New interface to trigger interrupts on Leon3 (set_pil_in:leon3.c) >  - Minor reformati

Re: [Qemu-devel] [PATCH v3 4/5] SPARC: Emulation of Leon3

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 7:02 PM, Blue Swirl wrote: > On Fri, Jan 21, 2011 at 5:00 PM, Fabien Chouteau wrote: >> Leon3 is an open-source VHDL System-On-Chip, well known in space industry >> (more >> information on http://www.gaisler.com). >> >> Leon3 is made of multiple components available in th

[Qemu-devel] Re: [PATCH] audio: consolidate audio_init()

2011-01-21 Thread Blue Swirl
On Fri, Jan 21, 2011 at 10:53 AM, Isaku Yamahata wrote: > consolidate audio_init() and remove references to shoundhw. > > Cc: Blue Swirl > Signed-off-by: Isaku Yamahata Acked-by: Blue Swirl

[Qemu-devel] [PATCH 13/18] kvm: Consolidate must-have capability checks

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka Instead of splattering the code with #ifdefs and runtime checks for capabilities we cannot work without anyway, provide central test infrastructure for verifying their availability both at build and runtime. Signed-off-by: Jan Kiszka --- configure | 39 +

[Qemu-devel] [PATCH 16/18] kvm: Do not use qemu_fair_mutex

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka The imbalance in the hold time of qemu_global_mutex only exists in TCG mode. In contrast to TCG VCPUs, KVM drops the global lock during guest execution. We already avoid touching the fairness lock from the IO-thread in KVM mode, so also stop using it from the VCPU threads. Signe

[Qemu-devel] [PATCH 15/18] kvm: Flush coalesced mmio buffer on IO window exits

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka We must flush pending mmio writes if we leave kvm_cpu_exec for an IO window. Otherwise we risk to loose those requests when migrating to a different host during that window. Signed-off-by: Jan Kiszka --- kvm-all.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)

[Qemu-devel] [PATCH 17/18] kvm: x86: Implicitly clear nmi_injected/pending on reset

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka All CPUX86State variables before CPU_COMMON are automatically cleared on reset. Reorder nmi_injected and nmi_pending to avoid having to touch them explicitly. Signed-off-by: Jan Kiszka --- target-i386/cpu.h |6 -- target-i386/kvm.c |2 -- 2 files changed, 4 inserti

[Qemu-devel] [PATCH 18/18] kvm: x86: Only read/write MSR_KVM_ASYNC_PF_EN if supported

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka If the kernel does not support KVM_CAP_ASYNC_PF, it also does not know about the related MSR. So skip it during state synchronization in that case. Fixes annoying kernel warnings. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 13 +++-- 1 files changed, 11 inserti

[Qemu-devel] [PATCH 03/18] kvm: Improve reporting of fatal errors

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka Report KVM_EXIT_UNKNOWN, KVM_EXIT_FAIL_ENTRY, and KVM_EXIT_EXCEPTION with more details to stderr. The latter two are so far x86-only, so move them into the arch-specific handler. Integrate the Intel real mode warning on KVM_EXIT_FAIL_ENTRY that qemu-kvm carries, but actually rest

[Qemu-devel] [PATCH 10/18] kvm: x86: Reset paravirtual MSRs

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka Make sure to write the cleared MSR_KVM_SYSTEM_TIME, MSR_KVM_WALL_CLOCK, and MSR_KVM_ASYNC_PF_EN to the kernel state so that a freshly booted guest cannot be disturbed by old values. Signed-off-by: Jan Kiszka CC: Glauber Costa --- target-i386/kvm.c |7 +++ 1 files chan

[Qemu-devel] [PATCH 06/18] kvm: x86: Prepare kvm_get_mp_state for in-kernel irqchip

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka This code path will not yet be taken as we still lack in-kernel irqchip support. But qemu-kvm can already make use of it and drop its own mp_state access services. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) dif

[Qemu-devel] [PATCH 01/18] kvm: x86: Swallow KVM_EXIT_SET_TPR

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka This exit only triggers activity in the common exit path, but we should accept it in order to be able to detect unknown exit types. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/target-i386/kvm.c b/ta

[Qemu-devel] [PATCH 12/18] kvm: Drop smp_cpus argument from init functions

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka No longer used. Signed-off-by: Jan Kiszka --- kvm-all.c |4 ++-- kvm-stub.c |2 +- kvm.h |4 ++-- target-i386/kvm.c |2 +- target-ppc/kvm.c |2 +- target-s390x/kvm.c |2 +- vl.c |2 +- 7 files changed,

[Qemu-devel] [PATCH 07/18] kvm: x86: Remove redundant mp_state initialization

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka kvm_arch_reset_vcpu initializes mp_state, and that function is invoked right after kvm_arch_init_vcpu. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 531b69e.

[Qemu-devel] [PATCH 00/18] [uq/master] Rebased patch queue, part I

2011-01-21 Thread Jan Kiszka
In order to make progress with flushing my kvm-upstream queue without overloading the channels (38 further patches are pending), here comes part I against updated uq/master. Changes in this part compared to last postings: - Dropped "kvm: Drop return value of kvm_cpu_exec", we will actually ne

[Qemu-devel] [PATCH 02/18] kvm: Stop on all fatal exit reasons

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka Ensure that we stop the guest whenever we face a fatal or unknown exit reason. If we stop, we also have to enforce a cpu loop exit. Signed-off-by: Jan Kiszka --- kvm-all.c | 15 +++ target-i386/kvm.c |4 target-ppc/kvm.c |4 3 files cha

[Qemu-devel] [PATCH 05/18] kvm: x86: Align kvm_arch_put_registers code with comment

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka The ordering doesn't matter in this case, but better keep it consistent. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/kvm.c b/target-i386/kvm.c index 0ba13fc..9bb34ab 100644 --- a/targ

[Qemu-devel] [PATCH 14/18] kvm: x86: Rework identity map and TSS setup for larger BIOS sizes

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka In order to support loading BIOSes > 256K, reorder the code, adjusting the base if the kernel supports moving the identity map. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 63 +--- 1 files changed, 30 insertions(+), 33 de

[Qemu-devel] [PATCH 08/18] kvm: x86: Fix xcr0 reset mismerge

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka For unknown reasons, xcr0 reset ended up in kvm_arch_update_guest_debug on upstream merge. Fix this and also remove the misleading comment (1 is THE reset value). Signed-off-by: Jan Kiszka --- target-i386/kvm.c |3 +-- 1 files changed, 1 insertions(+), 2 deletions(-) diff

[Qemu-devel] [PATCH 09/18] kvm: x86: Refactor msr_star/hsave_pa setup and checks

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka Simplify kvm_has_msr_star/hsave_pa to booleans and push their one-time initialization into kvm_arch_init. Also handle potential errors of that setup procedure. Signed-off-by: Jan Kiszka --- target-i386/kvm.c | 47 +++ 1 files chang

[Qemu-devel] [PATCH 04/18] x86: Optionally dump code bytes on cpu_dump_state

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka Introduce the cpu_dump_state flag CPU_DUMP_CODE and implement it for x86. This writes out the code bytes around the current instruction pointer. Make use of this feature in KVM to help debugging fatal vm exits. Signed-off-by: Jan Kiszka --- cpu-all.h|2 ++ kvm-

[Qemu-devel] [PATCH 11/18] kvm: x86: Fix !CONFIG_KVM_PARA build

2011-01-21 Thread Jan Kiszka
From: Jan Kiszka If we lack kvm_para.h, MSR_KVM_ASYNC_PF_EN is not defined. The change in kvm_arch_init_vcpu is just for consistency reasons. Signed-off-by: Jan Kiszka --- target-i386/kvm.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target-i386/kvm.c b/targ

[Qemu-devel] [PATCH 1/3] tests: Fix two memory leaks

2011-01-21 Thread Stefan Weil
Although both leaks are not really important, fix them to avoid cppcheck warnings: tests/linux-test.c:433: error: Memory leak: stack1 tests/linux-test.c:433: error: Memory leak: stack2 Signed-off-by: Stefan Weil --- tests/linux-test.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)

[Qemu-devel] [PATCH 2/3] check-qdict: Fix possible crash

2011-01-21 Thread Stefan Weil
This warning is reported by cppcheck: check-qdict.c:270: warning: scanf without field width limits can crash with huge input data Fix it by limiting the field widths to 127 (both key and value take 127 characters + a terminating '\0' byte). Signed-off-by: Stefan Weil --- check-qdict.c |3

[Qemu-devel] [PATCH 3/3] w64: Fix problem with missing sigset_t

2011-01-21 Thread Stefan Weil
MinGW-w64 does not declare sigset_t which is used in compatfd.h. sigset_t is not needed for compilations without CONFIG_IOTHREAD, so it is possible to avoid the problem by using a conditional include. Signed-off-by: Stefan Weil --- cpus.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions

[Qemu-devel] [PATCH 1/3] FVD: Added support for 'qemu-img update'

2011-01-21 Thread Chunqiang Tang
This patch is part of the Fast Virtual Disk (FVD) proposal. See the related discussions at http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg00426.html. This patch adds the 'update' command to qemu-img. FVD stores various image-specific configurable parameters in the image header. A user can

[Qemu-devel] [PATCH 3/3] FVD: Made qemu-io working with simulation (blksim)

2011-01-21 Thread Chunqiang Tang
This patch is part of the Fast Virtual Disk (FVD) proposal. See the related discussions at http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg00426.html. This patch adds the 'sim' command to qemu-io, which works with the blksim driver. With this extension, now a developer can use qemu-io to

[Qemu-devel] [PATCH 2/3] FVD: Added the simulated 'blksim' driver

2011-01-21 Thread Chunqiang Tang
This patch is part of the Fast Virtual Disk (FVD) proposal. See the related discussions at http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg00426.html. This patch adds the 'blksim' block device driver, which is a tool to facilitate testing and debugging. blksim operates on a RAW image, but

[Qemu-devel] Re: [PATCH] audio: consolidate audio_init()

2011-01-21 Thread malc
On Fri, 21 Jan 2011, Blue Swirl wrote: > On Fri, Jan 21, 2011 at 10:53 AM, Isaku Yamahata > wrote: > > consolidate audio_init() and remove references to shoundhw. > > > > Cc: Blue Swirl > > Signed-off-by: Isaku Yamahata Don't see the point of first hunk. No objections otherwise. > > Acked-b

Re: [Qemu-devel] [PATCH 1/5] Fast Virtual Disk (FVD) Proposal Part 1

2011-01-21 Thread Anthony Liguori
On 01/19/2011 04:04 PM, Chunqiang Tang wrote: Part 1 of the block device driver for the proposed FVD image format. Multiple patches are used in order to manage the size of each patch. This patch includes existing files that are modified by FVD. See the related discussions at http://lists.gnu.org

Re: [Qemu-devel] Changing the content of target cpu registers

2011-01-21 Thread Raphaël Lefèvre
On Wed, Jan 19, 2011 at 2:13 AM, Stefano Bonifazi wrote: > On 01/18/2011 06:17 PM, Blue Swirl wrote: >> >> On Tue, Jan 18, 2011 at 9:29 AM, Stefano Bonifazi >>  wrote: >>> >>> Hi all! >>>  I am working on qemu-user (qemu-ppc). >>> I'd like to edit the values of target registers during the executi

[Qemu-devel] [PATCH] ppc: Fix BookE tlb entry reads

2011-01-21 Thread Edgar E. Iglesias
commit 5823947f9f1e55fb6599c9ed769ce25cdec38355 Author: Edgar E. Iglesias Date: Fri Jan 21 23:12:42 2011 +0100 ppc: Correct BookE tlb reads Call the tlb read helper (and not the write helper) for tlb reads. Signed-off-by: Edgar E. Iglesias diff --git a/target-ppc/tra

Re: [Qemu-devel] [PATCH 2/3] FVD: Added the simulated 'blksim' driver

2011-01-21 Thread Anthony Liguori
On 01/21/2011 04:19 PM, Chunqiang Tang wrote: This patch is part of the Fast Virtual Disk (FVD) proposal. See the related discussions at http://lists.gnu.org/archive/html/qemu-devel/2011-01/msg00426.html. This patch adds the 'blksim' block device driver, which is a tool to facilitate testing and

[Qemu-devel] Re: [PATCH] ppc: Fix BookE tlb entry reads

2011-01-21 Thread Alexander Graf
On 21.01.2011, at 23:43, Edgar E. Iglesias wrote: > commit 5823947f9f1e55fb6599c9ed769ce25cdec38355 > Author: Edgar E. Iglesias > Date: Fri Jan 21 23:12:42 2011 +0100 > >ppc: Correct BookE tlb reads > >Call the tlb read helper (and not the write helper) for tlb >reads. > >Si

[Qemu-devel] Re: [PATCH] ppc: Fix BookE tlb entry reads

2011-01-21 Thread Edgar E. Iglesias
On Fri, Jan 21, 2011 at 11:49:41PM +0100, Alexander Graf wrote: > > On 21.01.2011, at 23:43, Edgar E. Iglesias wrote: > > > commit 5823947f9f1e55fb6599c9ed769ce25cdec38355 > > Author: Edgar E. Iglesias > > Date: Fri Jan 21 23:12:42 2011 +0100 > > > >ppc: Correct BookE tlb reads > > > >

Re: [Qemu-devel] [ARM] Contributing tests for Neon

2011-01-21 Thread Peter Maydell
On 21 January 2011 10:07, Christophe Lyon wrote: > I have developed some tests for ARM-Neon in the form of C sources files > calling ARM Neon intrinsics, and comparing the results of the resulting > program with a known reference (eg execution on actual CPU) shows > if the execution engine is foll

Re: [Qemu-devel] [PATCH 1/5] Fast Virtual Disk (FVD) Proposal Part 1

2011-01-21 Thread Chunqiang Tang
> > -void qemu_bh_schedule(QEMUBH *bh) > > -{ > > -bh->cb(bh->opaque); > > -} > > - > > -void qemu_bh_cancel(QEMUBH *bh) > > -{ > > -} > > - > > -void qemu_bh_delete(QEMUBH *bh) > > -{ > > -qemu_free(bh); > > -} > > - > > int qemu_set_fd_handler2(int fd, > >IOC

Re: [Qemu-devel] [PATCH 2/3] FVD: Added the simulated 'blksim' driver

2011-01-21 Thread Chunqiang Tang
> Coding style. > > In general, I like the idea of the simulator but the coding style is off > quite a bit. Please be specific and I would be happy to take suggestions. The header issue should be easy to fix.

[Qemu-devel] [PATCH/RFC] vmstate: add VMSTATE_ macro for pointer to array of structures

2011-01-21 Thread Dmitry Eremin-Solenikov
While working on cleaning up pxa2xx_timer, I stumbled upon storing array of structures, which is referenced via a pointer. Thus I had to add this macro. Signed-off-by: Dmitry Eremin-Solenikov --- hw/hw.h | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/hw.h b

<    1   2