[Qemu-devel] [Bug 1465935] Re: kvm_irqchip_commit_routes: Assertion `ret == 0' failed

2015-08-12 Thread Stefan Bader
Marking as incomplete while waiting for test feedback. ** Changed in: qemu (Ubuntu) Status: Confirmed = Incomplete -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1465935 Title:

[Qemu-devel] [PATCH 08/10] tcg: add memory barriers in page_find_alloc accesses

2015-08-12 Thread Paolo Bonzini
page_find is reading the radix tree outside all locks, so it has to use the RCU primitives. It does not need RCU critical sections because the PageDescs are never removed, so there is never a need to wait for the end of code sections that use a PageDesc. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 05/10] cpu-exec: elide more icount code if CONFIG_USER_ONLY

2015-08-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpu-exec.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/cpu-exec.c b/cpu-exec.c index 599e64d..bde5fd1 100644 --- a/cpu-exec.c +++ b/cpu-exec.c @@ -228,6 +228,7 @@ static inline tcg_target_ulong cpu_tb_exec(CPUState *cpu, uint8_t

[Qemu-devel] [PATCH 03/10] replace spinlock by QemuMutex.

2015-08-12 Thread Paolo Bonzini
From: KONRAD Frederic fred.kon...@greensocs.com spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode so better using QemuMutex directly in this case. It allows as

[Qemu-devel] [PATCH 11/10] tcg: comment on which functions have to be called with tb_lock held

2015-08-12 Thread Paolo Bonzini
softmmu requires more functions to be thread-safe, because translation blocks can be invalidated from e.g. notdirty callbacks. Probably the same holds for user-mode emulation, it's just that no one has ever tried to produce a coherent locking there. This patch will guide the introduction of more

[Qemu-devel] [PATCH 09/10] exec: make mmap_lock/mmap_unlock globally available

2015-08-12 Thread Paolo Bonzini
There is some iffy lock hierarchy going on in translate-all.c. To fix it, we need to take the mmap_lock in cpu-exec.c. Make the functions globally available. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- bsd-user/qemu.h | 2 -- include/exec/exec-all.h | 7 ++-

[Qemu-devel] [Bug 1321028] Re: qemu-system-ppc : file systems are not shutting down clean

2015-08-12 Thread Serge Hallyn
*** This bug is a duplicate of bug 1317603 *** https://bugs.launchpad.net/bugs/1317603 ** This bug has been marked a duplicate of bug 1317603 qemu-system-ppc does not terminate on VM exit -- You received this bug notification because you are a member of qemu- devel-ml, which is

Re: [Qemu-devel] [PATCH for-2.5 18/30] m68k: addq/subq can work with all the data sizes.

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Improve TCG constant use by creating only once for several uses. Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/translate.c | 46 +++--- 1 file changed, 27 insertions(+), 19 deletions(-)

[Qemu-devel] [Bug 1463172] Re: destination arm board hangs after migration from x86 source

2015-08-12 Thread Serge Hallyn
I'm going to mark this invalid as I don't believe this is a supported case. If someone can vouch for the fact that this is supposed to work, please leave a comment. ** Changed in: qemu (Ubuntu) Status: New = Invalid -- You received this bug notification because you are a member of qemu-

[Qemu-devel] [PATCH 06/10] tcg: code_bitmap is not used by user-mode emulation

2015-08-12 Thread Paolo Bonzini
More #ifdefs are not nice, but this clarifies why its usage is not protected by tb_lock. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- translate-all.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/translate-all.c b/translate-all.c index a6bff72..7aa5664

[Qemu-devel] [PATCH 07/10] tcg: comment on which functions have to be called with mmap_lock held

2015-08-12 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- translate-all.c | 29 ++--- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/translate-all.c b/translate-all.c index 7aa5664..7727091 100644 --- a/translate-all.c +++ b/translate-all.c @@ -172,11 +172,13 @@

[Qemu-devel] [Bug 1321028] Re: qemu-system-ppc : file systems are not shutting down clean

2015-08-12 Thread Serge Hallyn
** Changed in: qemu (Ubuntu) Status: Incomplete = New -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1321028 Title: qemu-system-ppc : file systems are not shutting down clean Status in

[Qemu-devel] [PATCH 12/10] tcg: protect TBContext with tb_lock.

2015-08-12 Thread Paolo Bonzini
From: KONRAD Frederic fred.kon...@greensocs.com This protects TBContext with tb_lock to make tb_* thread safe. We can still have issue with tb_flush in case of multithread TCG: another CPU can be executing code during a flush. This can be fixed later by making all other TCG thread exiting

Re: [Qemu-devel] [PATCH for-2.5 16/30] m68k: Add all access modes and data sizes to some 680x0 instructions

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: -SRC_EA(env, tmp, OS_LONG, 0, addr); +SRC_EA(env, tmp, opsize, -1, addr); Oh, I'm also wondering why you changed all of the inputs from unsigned to signed. It appears to be unrelated to updating the modes, and unnecessary. I'm all

[Qemu-devel] [PATCH 00/10] translate-all.c thread-safety

2015-08-12 Thread Paolo Bonzini
Hi, this is my attempt at 1) extracting upstreamable parts out of Fred's MTTCG, and 2) documenting what's going on in user-mode MTTCG 3) fix one bug in the process. I couldn't find any other locking problem from reading the code. The final two patches are not really upstreamable because they add

[Qemu-devel] [PATCH 10/10] cpu-exec: fix lock hierarchy for user-mode emulation

2015-08-12 Thread Paolo Bonzini
tb_lock has to be taken inside the mmap_lock (example: tb_invalidate_phys_range is called by target_mmap), but tb_link_page is taking the mmap_lock and it is called with the tb_lock held. To fix this, take the mmap_lock in tb_find_slow, not in tb_link_page. Signed-off-by: Paolo Bonzini

[Qemu-devel] [PATCH 04/10] exec-all: remove non-TCG stuff from exec-all.h header.

2015-08-12 Thread Paolo Bonzini
The header is included from basically everywhere, thanks to cpu.h. It should be moved to the (TCG only) files that actually need it. As a start, remove non-TCG stuff. While adding a #ifndef CONFIG_USER_ONLY include section to cpu-exec.c, move memory API files under it. Signed-off-by: Paolo

[Qemu-devel] [Bug 685096] Re: USB Passthrough not working for Windows 7 guest

2015-08-12 Thread Serge Hallyn
** Changed in: qemu (Ubuntu) Importance: Medium = Low -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/685096 Title: USB Passthrough not working for Windows 7 guest Status in QEMU: Confirmed

Re: [Qemu-devel] [PATCH for-2.5 21/30] m68k: add bkpt

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/translate.c | 6 ++ 1 file changed, 6 insertions(+) Reviewed-by: Richard Henderson r...@twiddle.net r~

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Pavel Fedin
Hello! I still think this is the wrong approach -- see my remarks in the previous round of patch review. Christoffer did not reply anything to your question back then. So - what to do? Probe for all possible GICs? Remove the probe at all? Kind regards, Pavel Fedin Expert Engineer Samsung

Re: [Qemu-devel] [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Denis V. Lunev
On 07/07/2015 01:20 PM, Paolo Bonzini wrote: On 03/07/2015 14:01, Denis V. Lunev wrote: Windows 2012 guests can notify hypervisor about occurred guest crash (Windows bugcheck(BSOD)) by writing specific Hyper-V msrs. This patch does handling of this MSR's by KVM and sending notification to user

Re: [Qemu-devel] [RFC PATCH V7 09/19] Drop global lock during TCG code execution

2015-08-12 Thread Frederic Konrad
On 12/08/2015 11:58, Paolo Bonzini wrote: On 11/08/2015 23:34, Frederic Konrad wrote: Also if qemu_cond_broadcast(qemu_io_proceeded_cond) is being dropped there is no point keeping the guff around in qemu_tcg_wait_io_event. Yes good point. BTW this leads to high consumption of host CPU eg:

Re: [Qemu-devel] [RFC v4 3/9] softmmu: Add helpers for a new slowpath

2015-08-12 Thread alvise rigo
Yes, it could. However, it's really unlikely that a vCPU, after issuing a LL to the virtual address x, it stores to the same phys address using the virtual address y. I'm not really sure If we really need to handle these cases. alvise On Wed, Aug 12, 2015 at 2:43 PM, Paolo Bonzini

[Qemu-devel] [PATCH 2/3] monitor: remove target-specific code from monitor.c

2015-08-12 Thread Denis V. Lunev
From: Pavel Butsykin pbutsy...@virtuozzo.com Move target-specific code out of /monitor.c to /target-*/monitor.c, this will avoid code cluttering and using random ifdeffery. The solution is quite simple, but solves the issue of the separation of target-specific code from monitor Signed-off-by:

[Qemu-devel] [PATCH 1/3] hmp-commands-info: move info_cmds content out of monitor.c

2015-08-12 Thread Denis V. Lunev
From: Pavel Butsykin pbutsy...@virtuozzo.com For moving target- and device-specific code from monitor.c, to beginning we move info_cmds content to hmp-commands-info.hx Signed-off-by: Pavel Butsykin pbutsy...@virtuozzo.com Signed-off-by: Denis V. Lunev d...@openvz.org CC: Luiz Capitulino

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Peter Maydell
On 12 August 2015 at 13:27, Pavel Fedin p.fe...@samsung.com wrote: Hello! I still think this is the wrong approach -- see my remarks in the previous round of patch review. You know... I thought a little bit... So far, test = true in KVM_CREATE_DEVICE means that we just want to know

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Christoffer Dall
On Wed, Aug 12, 2015 at 1:44 PM, Pavel Fedin p.fe...@samsung.com wrote: Hello! I still think this is the wrong approach -- see my remarks in the previous round of patch review. Christoffer did not reply anything to your question back then. So - what to do? Probe for all possible GICs?

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 09:31, alvise rigo wrote: I think that tlb_flush_entry is not enough, since in theory another vCPU could have a different TLB address referring the same phys address. You're right, this is a TLB so it's virtually-indexed. :( I'm not sure what happens on ARM, since it has a

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread Peter Maydell
On 12 August 2015 at 13:36, Paolo Bonzini pbonz...@redhat.com wrote: On 12/08/2015 09:31, alvise rigo wrote: I think that tlb_flush_entry is not enough, since in theory another vCPU could have a different TLB address referring the same phys address. You're right, this is a TLB so it's

[Qemu-devel] [PATCH 3/3] monitor: added generation of documentation for hmp-commands-info.hx

2015-08-12 Thread Denis V. Lunev
From: Pavel Butsykin pbutsy...@virtuozzo.com It will be easier if you need to add info-commands to edit only hmp-commands-info.hx, before this had to edit monitor.c and hmp-commands.hx Signed-off-by: Pavel Butsykin pbutsy...@virtuozzo.com Signed-off-by: Denis V. Lunev d...@openvz.org CC: Luiz

[Qemu-devel] [PATCH v2 for 2.5 0/3] Move target- and device specific code from monitor

2015-08-12 Thread Denis V. Lunev
The monivation of this set is simple. Recently we have proposed patch to monitor.c with specific x86 APIC HMP commands. The patchset was denied with the main motivation No more arch specific code in monitor.c This patchset is the first step to move arch specific code from monitor.c targets. So,

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Pavel Fedin
Hello! I still think this is the wrong approach -- see my remarks in the previous round of patch review. You know... I thought a little bit... So far, test = true in KVM_CREATE_DEVICE means that we just want to know whether this type is supported. No actual actions is done by the kernel.

Re: [Qemu-devel] [RFC v4 3/9] softmmu: Add helpers for a new slowpath

2015-08-12 Thread Paolo Bonzini
On 07/08/2015 19:03, Alvise Rigo wrote: + +/* For this vCPU, just update the TLB entry, no need to flush. */ +env-tlb_table[mmu_idx][index].addr_write |= TLB_EXCL; Couldn't this vCPU also have two aliasing entries in the TLB? Paolo

[Qemu-devel] [PATCH v6] hw/arm/virt: Add high MMIO PCI region, 512G in size

2015-08-12 Thread Pavel Fedin
This large region is necessary for some devices like ivshmem and video cards 32-bit kernels can be built without LPAE support. In this case such a kernel will not be able to use PCI controller which has windows in high addresses. In order to work around the problem, highmem option is introduced.

Re: [Qemu-devel] [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 13:54, Denis V. Lunev wrote: guys? we are going to move forward with other HyperV bits. Wait a second, 2.4 was released only a few hours ago... Paolo

Re: [Qemu-devel] [PATCH v6 0/12] HyperV equivalent of pvpanic driver

2015-08-12 Thread Denis V. Lunev
On 08/12/2015 03:47 PM, Paolo Bonzini wrote: On 12/08/2015 13:54, Denis V. Lunev wrote: guys? we are going to move forward with other HyperV bits. Wait a second, 2.4 was released only a few hours ago... Paolo sure :)

[Qemu-devel] [PATCH v3 0/7] Extract TLS handling code from VNC server

2015-08-12 Thread Daniel P. Berrange
This small patch series is a formal submission of another part of my previous series v1: https://lists.gnu.org/archive/html/qemu-devel/2015-04/msg02038.html v2: https://lists.gnu.org/archive/html/qemu-devel/2015-08/msg01267.html Now we have the basic crypto module defined for hash/cipher APIs,

Re: [Qemu-devel] [PATCH] Makefile.target: include top level build dir in vpath

2015-08-12 Thread Paolo Bonzini
On 09/08/2015 09:02, Michael Marineau wrote: Using ccache with CCACHE_BASEDIR set to $(SRC_PATH) or a parent will rewrite all absolute paths to relative paths. This interacts poorly with QEMU's two-level build directory scheme. For example, lets say BUILD_DIR=$(SRC_PATH)/build so

[Qemu-devel] [PULL 02/20] scsi-disk: fix cmd.mode field typo

2015-08-12 Thread Paolo Bonzini
From: Stefan Hajnoczi stefa...@redhat.com The cmd.xfer field is the data length. The cmd.mode field is the data transfer direction. scsi_handle_rw_error() was using the wrong error policy for read requests. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com Message-Id:

[Qemu-devel] [PULL 00/20] SCSI, build, TCG, RCU, misc patches for 2015-08-12

2015-08-12 Thread Paolo Bonzini
The following changes since commit cb48f67ad8c7b33c617d4f8144a27706e69fd688: bsd-user: Fix operand to cpu_x86_exec (2015-07-30 12:38:49 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you to fetch changes up to

[Qemu-devel] [PULL 08/20] cpu_defs: Simplify CPUTLB padding logic

2015-08-12 Thread Paolo Bonzini
From: Peter Crosthwaite crosthwaitepe...@gmail.com There was a complicated subtractive arithmetic for determining the padding on the CPUTLBEntry structure. Simplify this with a union. Signed-off-by: Peter Crosthwaite crosthwaite.pe...@gmail.com Message-Id:

[Qemu-devel] [PULL 18/20] scsi-generic: identify AIO callbacks more clearly

2015-08-12 Thread Paolo Bonzini
Functions that are not callbacks should assert that aiocb is NULL and have a SCSIGenericReq argument. AIO callbacks should assert that aiocb is not NULL. They also have an opaque argument. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com ---

[Qemu-devel] [PULL 11/20] rcu: Allow calling rcu_(un)register_thread() during synchronize_rcu()

2015-08-12 Thread Paolo Bonzini
From: Wen Congyang we...@cn.fujitsu.com If rcu_(un)register_thread() is called together with synchronize_rcu(), it will wait for the synchronize_rcu() to finish. But when synchronize_rcu() waits for some events, we can modify the list registry. We also use the lock rcu_gp_lock to assume that

[Qemu-devel] [PULL 12/20] exec: use macro ROUND_UP for alignment

2015-08-12 Thread Paolo Bonzini
From: Chen Hanxiao chenhanx...@cn.fujitsu.com Use ROUND_UP instead. Signed-off-by: Chen Hanxiao chenhanx...@cn.fujitsu.com Message-Id: 1437707523-4910-1-git-send-email-chenhanx...@cn.fujitsu.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- exec.c | 2 +- 1 file changed, 1 insertion(+),

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread alvise rigo
On Wed, Aug 12, 2015 at 2:36 PM, Paolo Bonzini pbonz...@redhat.com wrote: On 12/08/2015 09:31, alvise rigo wrote: I think that tlb_flush_entry is not enough, since in theory another vCPU could have a different TLB address referring the same phys address. You're right, this is a TLB so it's

[Qemu-devel] [PULL 13/20] vhost-scsi: Clarify vhost_virtqueue_mask argument

2015-08-12 Thread Paolo Bonzini
From: Lu Lina lina.lul...@huawei.com vhost_virtqueue_mask takes an absolute virtqueue index, while the code looks like it's passing an index that is relative to s-dev.vq_index. In reality, s-dev.vq_index is always zero, so this patch does not make any difference, but the code is clearer.

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-12 Thread Paolo Bonzini
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: From: KONRAD Frederic fred.kon...@greensocs.com tb_flush is not thread safe we definitely need to exit VCPUs to do that. This introduces tb_flush_safe which just creates an async safe work which will do a tb_flush later.

Re: [Qemu-devel] [RFC PATCH V7 16/19] translate-all: introduces tb_flush_safe.

2015-08-12 Thread Frederic Konrad
On 12/08/2015 16:09, Paolo Bonzini wrote: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: From: KONRAD Frederic fred.kon...@greensocs.com tb_flush is not thread safe we definitely need to exit VCPUs to do that. This introduces tb_flush_safe which just creates an async safe work which

[Qemu-devel] [PATCH v3 1/7] crypto: introduce new base module for TLS credentials

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSCreds class to act as the base class for storing TLS credentials. This will be later subclassed to provide handling of anonymous and x509 credential types. The subclasses will be user creatable objects, so instances can be created deleted via 'object-add' and 'object-del'

[Qemu-devel] [PATCH v3 3/7] crypto: introduce new module for TLS x509 credentials

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSCredsX509 class which is used to manage x509 certificate TLS credentials. This will be the preferred credential type offering strong security characteristics Example CLI configuration: $QEMU -object tls-creds-x509,id=tls0,endpoint=server,\

[Qemu-devel] [PATCH v3 2/7] crypto: introduce new module for TLS anonymous credentials

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSCredsAnon class which is used to manage anonymous TLS credentials. Use of this class is generally discouraged since it does not offer strong security, but it is required for backwards compatibility with the current VNC server implementation. Simple example CLI configuration:

[Qemu-devel] [PULL 03/20] tests: virtio-scsi: clear unit attention after reset

2015-08-12 Thread Paolo Bonzini
From: Stefan Hajnoczi stefa...@redhat.com The unit attention after reset (power on) prevents normal commands from running. The unaligned WRITE SAME test never executed its command! Signed-off-by: Stefan Hajnoczi stefa...@redhat.com Message-Id:

[Qemu-devel] [PATCH] qemu-thread: add a fast path to the Win32 QemuEvent

2015-08-12 Thread Paolo Bonzini
QemuEvents are used heavily by call_rcu. We do not want them to be slow, but the current implementation does a kernel call on every invocation of qemu_event_* and won't cut it. So, wrap a Win32 manual-reset event with a fast userspace path. The states and transitions are the same as for the

[Qemu-devel] [PULL 04/20] scsi-disk: Fix assertion failure on WRITE SAME

2015-08-12 Thread Paolo Bonzini
From: Fam Zheng f...@redhat.com The last portion of an unaligned WRITE SAME command could fail the assertion in bdrv_aligned_pwritev: assert(!qiov || bytes == qiov-size); Because we updated data-iov.iov_len right above this if block, but data-qiov still has the old size. Reinitialize the

[Qemu-devel] [PULL 15/20] configure: only add CONFIG_RDMA to config-host.h once

2015-08-12 Thread Paolo Bonzini
From: Daniel P. Berrange berra...@redhat.com For unknown reasons (probably a git rebase merge mistake) commit 2da776db4846eadcb808598a5d3484d149773c05 Author: Michael R. Hines mrhi...@us.ibm.com Date: Mon Jul 22 10:01:54 2013 -0400 rdma: core logic Adds CONFIG_RDMA to config-host.h

[Qemu-devel] [PULL 09/20] configure: Default to enable module build

2015-08-12 Thread Paolo Bonzini
From: Fam Zheng f...@redhat.com We have module build support around for a while, but also had it bitrot several times. It probably makes sense to enable it by default so that people can notice and use it. Add --disable-modules as a counterpart to --enable-modules, which is now turned on by

[Qemu-devel] [PULL 06/20] vhost/scsi: call vhost_dev_cleanup() at unrealize() time

2015-08-12 Thread Paolo Bonzini
From: Igor Mammedov imamm...@redhat.com vhost-scsi calls vhost_dev_init() at realize() time but forgets to call it's counterpart vhost_dev_cleanup() at unrealize() time. Calling it should fix leaking of memory table and mem_sections table in vhost device. And also unregister vhost's memory

[Qemu-devel] [PULL 19/20] hw: fix mask for ColdFire UART command register

2015-08-12 Thread Paolo Bonzini
The miscellaneous commands part of the register is 3 bits wide. Spotted by Coverity and confirmed in the datasheet, downloadable from http://cache.freescale.com/files/32bit/doc/ref_manual/MCF5307BUM.pdf (figure 14-6). Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/char/mcf_uart.c | 2 +-

[Qemu-devel] [PATCH] ioapic: fix contents of arbitration register

2015-08-12 Thread Paolo Bonzini
The arbitration register should read to the same value as the IOAPIC id register. Fixes kvm-unit-tests ioapic.flat. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/intc/ioapic.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/intc/ioapic.c b/hw/intc/ioapic.c

Re: [Qemu-devel] [PATCH v8 3/5] Introduce irqchip type specification for KVM

2015-08-12 Thread Christoffer Dall
On Wed, Aug 12, 2015 at 2:59 PM, Peter Maydell peter.mayd...@linaro.org wrote: On 12 August 2015 at 13:27, Pavel Fedin p.fe...@samsung.com wrote: Hello! I still think this is the wrong approach -- see my remarks in the previous round of patch review. You know... I thought a little bit...

[Qemu-devel] [PATCH v3 5/7] crypto: introduce new module for handling TLS sessions

2015-08-12 Thread Daniel P. Berrange
Introduce a QCryptoTLSSession object that will encapsulate all the code for setting up and using a client/sever TLS session. This isolates the code which depends on the gnutls library, avoiding #ifdefs in the rest of the codebase, as well as facilitating any possible future port to other TLS

[Qemu-devel] [PATCH v3 7/7] ui: convert VNC server to use QCryptoTLSSession

2015-08-12 Thread Daniel P. Berrange
Switch VNC server over to using the QCryptoTLSSession object for the TLS session. This removes the direct use of gnutls from the VNC server code. It also removes most knowledge about TLS certificate handling from the VNC server code. This has the nice effect that all the CONFIG_VNC_TLS

[Qemu-devel] [PATCH v3 6/7] ui: fix return type for VNC I/O functions to be ssize_t

2015-08-12 Thread Daniel P. Berrange
Various VNC server I/O functions return 'long' and then also pass this to a method accepting 'int'. All these should be ssize_t to match the signature of read/write APIs and thus avoid potential for integer truncation / wraparound. Signed-off-by: Daniel P. Berrange berra...@redhat.com ---

[Qemu-devel] [PULL 10/20] exec: drop cpu_can_do_io, just read cpu-can_do_io

2015-08-12 Thread Paolo Bonzini
After commit 626cf8f (icount: set can_do_io outside TB execution, 2014-12-08), can_do_io is set to 1 if not executing code. It is no longer necessary to make this assumption in cpu_can_do_io. It is also possible to remove the use_icount test, simply by never setting cpu-can_do_io to 0 unless

[Qemu-devel] [PULL 17/20] scsi-disk: identify AIO callbacks more clearly

2015-08-12 Thread Paolo Bonzini
Functions that are not callbacks should assert that aiocb is NULL and have a non-opaque argument (usually a pointer to SCSIDiskReq). AIO callbacks should assert that aiocb is not NULL and take care of calling block_acct done. They also have an opaque argument. Reviewed-by: Fam Zheng

[Qemu-devel] [PULL 16/20] scsi: create restart bottom half in the right AioContext

2015-08-12 Thread Paolo Bonzini
This matches commit 4407c1c (virtio-blk: Schedule BH in the right context, 2014-06-17), which did the same thing for virtio-blk. Reviewed-by: Fam Zheng f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- hw/scsi/scsi-bus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)

Re: [Qemu-devel] [RFC v4 3/9] softmmu: Add helpers for a new slowpath

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 15:09, alvise rigo wrote: Yes, it could. However, it's really unlikely that a vCPU, after issuing a LL to the virtual address x, it stores to the same phys address using the virtual address y. I'm not really sure If we really need to handle these cases. Ok, if we had to it's

[Qemu-devel] [PATCH v3 4/7] crypto: add sanity checking of TLS x509 credentials

2015-08-12 Thread Daniel P. Berrange
If the administrator incorrectly sets up their x509 certificates, the errors seen at runtime during connection attempts are very obscure and difficult to diagnose. This has been a particular problem for people using openssl to generate their certificates instead of the gnutls certtool, because the

[Qemu-devel] [PULL 01/20] virtio-scsi: use virtqueue_map_sg() when loading requests

2015-08-12 Thread Paolo Bonzini
From: Stefan Hajnoczi stefa...@redhat.com The VirtQueueElement struct is serialized during migration but the in_sg[]/out_sg[] iovec arrays are not usable on the destination host because the pointers are meaningless. Use virtqueue_map_sg() to refresh in_sg[]/out_sg[] to valid pointers based on

[Qemu-devel] [PULL 07/20] cpu-exec: Do not invalidate original TB in cpu_exec_nocache()

2015-08-12 Thread Paolo Bonzini
From: Sergey Fedorov serge.f...@gmail.com Instead of invalidating an original TB in cpu_exec_nocache() prematurely, just save a link to it in the temporary generated TB. If cpu_io_recompile() is raised subsequently from the temporary TB, invalidate the original one as well. That allows reusing

[Qemu-devel] [PULL 05/20] virtio-scsi-test: Add test case for tail unaligned WRITE SAME

2015-08-12 Thread Paolo Bonzini
From: Fam Zheng f...@redhat.com Signed-off-by: Fam Zheng f...@redhat.com Message-Id: 1438159512-3871-3-git-send-email-f...@redhat.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- tests/virtio-scsi-test.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PULL 20/20] disas: Defeature print_target_address

2015-08-12 Thread Paolo Bonzini
From: Peter Crosthwaite crosthwaitepe...@gmail.com It does not work in multi-arch as it requires the CPU specific TARGET_VIRT_ADDR_SPACE_BITS global define. Just use the generic version that does no masking. Targets should be responsible for passing in a sane virtual address. Signed-off-by:

[Qemu-devel] [PULL 14/20] qemu-nbd: remove unnecessary qemu_notify_event()

2015-08-12 Thread Paolo Bonzini
This was needed when qemu-nbd was using qemu_set_fd_handler2. It is not needed anymore now that nbd_update_server_fd_handler is called whenever nbd_can_accept() can change from false to true. nbd_update_server_fd_handler will call qemu_set_fd_handler(), which will call qemu_notify_event().

Re: [Qemu-devel] [RFC v4 1/9] exec.c: Add new exclusive bitmap to ram_list

2015-08-12 Thread Paolo Bonzini
On 12/08/2015 16:04, alvise rigo wrote: clear algorithm: if bytemap[vaddr] == 254 bytemap[vaddr] = CPU_ID Isn't this also required for the clear algorithm? if bytemap[vaddr] 254 /* this can happen for the TLB_EXCL slow path effect */ bytemap[vaddr] = 255

Re: [Qemu-devel] [PATCH for-2.5 22/30] m68k: add cas instruction

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: +gen_logic_cc(s, res, opsize); + +l1 = gen_new_label(); +l2 = gen_new_label(); + +gen_jmpcc(s, 6 /* !Z */, l1); +gen_store(s, opsize, addr, update); +tcg_gen_br(l2); +gen_set_label(l1); +tcg_gen_mov_i32(cmp,

Re: [Qemu-devel] [PATCH for-2.5 23/30] m68k: add linkl

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/translate.c | 21 +++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index 9a7558a..95d58d1

[Qemu-devel] [Bug 1463172] Re: destination arm board hangs after migration from x86 source

2015-08-12 Thread Peter Maydell
I think it is in theory supposed to work, but possibly in practice it doesn't... -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1463172 Title: destination arm board hangs after migration from x86

[Qemu-devel] [Bug 1448985] Re: llvmpipe i386 crashes when running on qemu64 cpu

2015-08-12 Thread Ubuntu QA Website
This bug has been reported on the Ubuntu ISO testing tracker. A list of all reports related to this bug can be found here: http://iso.qa.ubuntu.com/qatracker/reports/bugs/1448985 ** Tags added: iso-testing -- You received this bug notification because you are a member of qemu- devel-ml, which

Re: [Qemu-devel] [PATCH for-2.5 28/30] m68k: shift/rotate bytes and words

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: +#define HELPER_SHL(type, bits) \ +uint32_t HELPER(glue(glue(shl, bits), _cc))(CPUM68KState *env, \ +uint32_t val, uint32_t shift) \ +{ \ +type result; \ +uint32_t cf; \ +shift = 63; \ +

Re: [Qemu-devel] [PATCH for-2.5 26/30] m68k: add mull/divl

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/cpu.h | 3 + target-m68k/helper.h| 6 ++ target-m68k/op_helper.c | 143 target-m68k/qregs.def | 1 +

Re: [Qemu-devel] [PATCH for-2.5 27/30] m68k: add addx/subx/negx

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: +return (op1 ~((1UL bits) - 1)) | res; \ deposit32(op1, res, bits, 0) Otherwise, Reviewed-by: Richard Henderson r...@twiddle.net r~

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-12 Thread Frederic Konrad
On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: From: KONRAD Frederic fred.kon...@greensocs.com This protects TBContext with tb_lock to make tb_* thread safe. We can still have issue with tb_flush in case of multithread TCG: An other CPU can be executing code during a flush. This can

Re: [Qemu-devel] [PATCH for-2.5 25/30] m68k: add abcd, sbcd, nbcd instructions

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/helper.c| 91 + target-m68k/helper.h| 3 ++ target-m68k/translate.c | 82 3

[Qemu-devel] [Bug 1463172] Re: destination arm board hangs after migration from x86 source

2015-08-12 Thread Serge Hallyn
Hm, ok, thanks - sadly i don't have any board I can test this on with me. Wonder whether a rpi2 (which I have but not with me) would work. ** Changed in: qemu (Ubuntu) Status: Invalid = New -- You received this bug notification because you are a member of qemu- devel-ml, which is

[Qemu-devel] [Bug 1448985] Re: llvmpipe i386 crashes when running on qemu64 cpu

2015-08-12 Thread Stefan Bader
Since a simple work-around exists I think the importance can be lowered. ** Summary changed: - Ubuntu 14.04 LTS, 14.10, 15.04, 15.10 guests do not boot to Unity from QEMU-KVM Ubuntu 14.04 LTS, 14.10, 15.04 hosts + llvmpipe i386 crashes when running on qemu64 cpu ** Description changed:

Re: [Qemu-devel] [PATCH for-2.5 20/30] m68k: add exg

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/translate.c | 34 +- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/target-m68k/translate.c b/target-m68k/translate.c index

Re: [Qemu-devel] [PATCH for-2.5 24/30] m68k: add DBcc and Scc (memory operand)

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: +DISAS_INSN(scc_mem) +{ +TCGLabel *l1; +int cond; +TCGv dest; + +l1 = gen_new_label(); +cond = (insn 8) 0xf; +dest = tcg_temp_local_new(); +tcg_gen_movi_i32(dest, 0); +gen_jmpcc(s, cond ^ 1, l1); +

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-12 Thread Paolo Bonzini
Are you likely to push a v8 this week (or a temp branch?) with this and any other obvious fixes? I appreciate Paolo has given you a not-so-small pile of review comments as well so I wasn't looking for a complete new patch set! FWIW, reviews of the patches I posted a hour or two ago are

Re: [Qemu-devel] [RFC PATCH V7 07/19] protect TBContext with tb_lock.

2015-08-12 Thread Alex Bennée
Frederic Konrad fred.kon...@greensocs.com writes: On 10/08/2015 17:27, fred.kon...@greensocs.com wrote: From: KONRAD Frederic fred.kon...@greensocs.com This protects TBContext with tb_lock to make tb_* thread safe. We can still have issue with tb_flush in case of multithread TCG: An

Re: [Qemu-devel] [PATCH for-2.5 29/30] m68k: add rol/rox/ror/roxr

2015-08-12 Thread Richard Henderson
On 08/09/2015 01:13 PM, Laurent Vivier wrote: Signed-off-by: Laurent Vivier laur...@vivier.eu --- target-m68k/helper.c| 212 target-m68k/helper.h| 14 target-m68k/translate.c | 207 ++

[Qemu-devel] [RFC 2/3] monitor: throttle QAPI_EVENT_VSERPORT_CHANGE by id

2015-08-12 Thread marcandre . lureau
From: Marc-André Lureau marcandre.lur...@redhat.com Use a hash table to lookup the pending event corresponding to the id field. The hash table may grow without limit here, the following patch will add some cleaning. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com --- monitor.c |

[Qemu-devel] [RFC 3/3] monitor: remove old entries from event hash table

2015-08-12 Thread marcandre . lureau
From: Marc-André Lureau marcandre.lur...@redhat.com Do not let the hash table grow without limit, schedule a cleanup for outdated event. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com --- monitor.c | 51 --- 1 file changed, 48

[Qemu-devel] [RFC 1/3] monitor: split MonitorQAPIEventState

2015-08-12 Thread marcandre . lureau
From: Marc-André Lureau marcandre.lur...@redhat.com Create a seperate pending event structure MonitorQAPIEventPending. Use a MonitorQAPIEventDelay callback to handle the delaying. This allows other implementations of throttling. Signed-off-by: Marc-André Lureau marcandre.lur...@redhat.com ---

[Qemu-devel] [RFC 0/3] monitor: throttle VSERPORT_CHANGED by id

2015-08-12 Thread marcandre . lureau
From: Marc-André Lureau marcandre.lur...@redhat.com QAPI_EVENT_VSERPORT_CHANGE reports changes of a virtio serial port state. However, the events may be for different ports, but the throttle mechanism may replace the event for a different port, since it only checks the event type. The following

Re: [Qemu-devel] [RFC 1/3] monitor: split MonitorQAPIEventState

2015-08-12 Thread Laszlo Ersek
On 08/12/15 21:46, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau marcandre.lur...@redhat.com Create a seperate pending event structure MonitorQAPIEventPending. Use a MonitorQAPIEventDelay callback to handle the delaying. This allows other implementations of throttling.

<    1   2