Re: [Qemu-devel] [PULL v2 for-2.4 v2 5/7] AioContext: fix broken ctx-dispatching optimization

2015-07-24 Thread Cornelia Huck
On Thu, 23 Jul 2015 21:29:05 +0200 Christian Borntraeger borntrae...@de.ibm.com wrote: Am 23.07.2015 um 21:25 schrieb Paolo Bonzini: On 23/07/2015 21:19, Christian Borntraeger wrote: Am 23.07.2015 um 20:19 schrieb Paolo Bonzini: On 23/07/2015 19:20, Paolo Bonzini wrote: On

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections

2015-07-24 Thread Wen Congyang
On 07/24/2015 02:22 PM, Paolo Bonzini wrote: On 24/07/2015 07:56, Wen Congyang wrote: @@ -115,9 +116,12 @@ static void wait_for_readers(void) } /* Wait for one thread to report a quiescent state and - * try again. + * try again. Release rcu_gp_lock,

Re: [Qemu-devel] [PATCH] arm/virt: Add high MMIO PCI region, 2G in size

2015-07-24 Thread Pavel Fedin
Hello! --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -125,6 +125,7 @@ static const MemMapEntry a15memmap[] = { [VIRT_PCIE_PIO] = { 0x3eff, 0x0001 }, [VIRT_PCIE_ECAM] = { 0x3f00, 0x0100 }, [VIRT_MEM] ={ 0x4000, 30ULL *

Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVMis

2015-07-24 Thread Pavel Fedin
Hello! Sorry, weekend. But I'll test it as soon as possible. Thanks for pointing at it, my guess was correct, i have verified it by myself. Looks like i cannot use KVM definitions outside of KVM-only code. And simple #include linux/kvm.h will not help because this will not compile on

Re: [Qemu-devel] [PATCH] rcu: actually register threads that have RCU read-side critical sections

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 07:56, Wen Congyang wrote: @@ -115,9 +116,12 @@ static void wait_for_readers(void) } /* Wait for one thread to report a quiescent state and - * try again. + * try again. Release rcu_gp_lock, so rcu_(un)register_thread() + * doesn't

Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVMis

2015-07-24 Thread Pavel Fedin
Hello! This Doesn't compile, a problem with KVM_DEV_TYPE_ARM_VGIC_V2. I assume this is include file issue as it exists in linux-headers/linux/kvm.h Note that everything should compile also for TCG only. Damn! I think i know what the problem is... Your host arch != target arch and

Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVMis

2015-07-24 Thread Shlomo Pongratz
Sorry, weekend. But I'll test it as soon as possible. S.P. On Fri, Jul 24, 2015, 10:13 Pavel Fedin p.fe...@samsung.com wrote: Hello! This Doesn't compile, a problem with KVM_DEV_TYPE_ARM_VGIC_V2. I assume this is include file issue as it exists in linux-headers/linux/kvm.h Note that

Re: [Qemu-devel] [RFC PATCH 00/11] aio: Introduce handler type to fix nested aio_poll for dataplane

2015-07-24 Thread Paolo Bonzini
On 23/07/2015 13:43, Fam Zheng wrote: On Thu, 07/23 10:15, Paolo Bonzini wrote: On 23/07/2015 08:32, Fam Zheng wrote: What is realized in this series is similar except the disable, poll, enable method, instead the bit mask of interesting client types is passed to aio_poll() (to be

[Qemu-devel] [PATCH v3] xen/HVM: atomically access pointers in bufioreq handling

2015-07-24 Thread Jan Beulich
The number of slots per page being 511 (i.e. not a power of two) means that the (32-bit) read and write indexes going beyond 2^32 will likely disturb operation. The hypervisor side gets I/O req server creation extended so we can indicate that we're using suitable atomic accesses where needed,

Re: [Qemu-devel] [PATCH 1/4] target-arm: Add the AArch64 view of the Secure physical timer

2015-07-24 Thread Edgar E. Iglesias
On Thu, Jul 16, 2015 at 12:47:26PM +0100, Peter Maydell wrote: On CPUs with EL3, there are two physical timers, one for Secure and one for Non-secure. Implement this extra timer and the AArch64 registers which access it. Signed-off-by: Peter Maydell peter.mayd...@linaro.org ---

Re: [Qemu-devel] [PATCH 0/5] replace qemu_fls() with pow2ceil()/pow2floor()

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 06:10, Paolo Bonzini pbonz...@redhat.com wrote: On 23/07/2015 22:10, Peter Maydell wrote: The series looks good, but I'd prefer (especially for patch 4 which is in a fast path) if pow2ceil and pow2floor were made inline. Yeah, I was wondering if I was going to be asked

Re: [Qemu-devel] [PATCH 0/5] replace qemu_fls() with pow2ceil()/pow2floor()

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 10:39, Peter Maydell wrote: But in patch 4 the call is only in the rare case where l (l - 1) is not zero. True. Any preferences for which header file to put them in? qemu-common.h is where the prototype is currently and where the inline is_power_of_2() is defined... Either

Re: [Qemu-devel] [PATCH v2 7/7] error: On abort, report where the error was created

2015-07-24 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 07/23/2015 08:01 AM, Markus Armbruster wrote: This is particularly useful when we abort in error_propagate(), because there the stack backtrace doesn't lead to where the error was created. Looks like this: Unexpected error in

Re: [Qemu-devel] [PATCH v6 4/6] Introduce irqchip type specification for KVMis

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 08:44, Pavel Fedin p.fe...@samsung.com wrote: Thanks for pointing at it, my guess was correct, i have verified it by myself. Looks like i cannot use KVM definitions outside of KVM-only code. And simple #include linux/kvm.h will not help because this will not compile on

[Qemu-devel] [PATCH v7 3/6] Extract some reusable vGIC code

2015-07-24 Thread Pavel Fedin
These functions are useful also for vGICv3 implementation. Make them accessible from within other modules. Actually kvm_dist_get() and kvm_dist_put() could also be made reusable, but they would require two extra parameters (s-dev_fd and s-num_cpu) as well as lots of typecasts of 's' to

[Qemu-devel] [PATCH v7 4/6] Introduce irqchip type specification for KVM

2015-07-24 Thread Pavel Fedin
This patch introduces kernel_irqchip_type member in Machine class, which is passed to kvm_arch_irqchip_create. Machine models which can use vGIC now use it in order to supply correct GIC type for KVM capability verification. The variable is defined as int in order to be architecture-agnostic for

[Qemu-devel] [PATCH v7 1/6] Merge memory_region_init_reservation() into memory_region_init_io()

2015-07-24 Thread Pavel Fedin
Just speficying ops = NULL in some cases can be more convenient than having two functions. GICv3 code is going to use this. GICv2 code can be refactored in a similar way, killing some code duplication. Signed-off-by: Pavel Fedin p.fe...@samsung.com Acked-by: Paolo Bonzini pbonz...@redhat.com ---

[Qemu-devel] [PATCH v7 5/6] Initial implementation of vGICv3

2015-07-24 Thread Pavel Fedin
Get/put routines are missing, live migration is not possible. Signed-off-by: Pavel Fedin p.fe...@samsung.com --- hw/intc/Makefile.objs | 3 + hw/intc/arm_gicv3_kvm.c | 155 2 files changed, 158 insertions(+) create mode 100644

Re: [Qemu-devel] The QEMU project has joined Software Freedom Conservancy

2015-07-24 Thread Laszlo Ersek
On 07/23/15 22:11, Peter Maydell wrote: I'm happy to be able to announce that the QEMU project has joined Software Freedom Conservancy. This is something we've been wanting to do for a while now (we've talked about it at several previous QEMU Summit meetings). Software Freedom Conservancy

Re: [Qemu-devel] [PATCH v2 7/7] error: On abort, report where the error was created

2015-07-24 Thread Laszlo Ersek
On 07/23/15 16:47, Eric Blake wrote: On 07/23/2015 08:01 AM, Markus Armbruster wrote: This is particularly useful when we abort in error_propagate(), because there the stack backtrace doesn't lead to where the error was created. Looks like this: Unexpected error in

[Qemu-devel] [PATCH v3] pci: allow 0 address for PCI IO/MEM regions

2015-07-24 Thread Laurent Vivier
Some kernels program a 0 address for io regions. PCI 3.0 spec section 6.2.5.1 doesn't seem to disallow this. based on patch by Michael Roth mdr...@linux.vnet.ibm.com Add pci_allow_0_addr in MachineClass to conditionally allow addr 0 for pseries, as this can break other architectures. This patch

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-24 Thread Peter Maydell
On 23 July 2015 at 22:49, Michael Roth mdr...@linux.vnet.ibm.com wrote: I seem to recall Michael suggesting it may have already been fixed on x86. I think we had a TODO to figure out all the architectures that don't use IO windows and figure out if they need a fix as well. If we think we've

[Qemu-devel] [Bug 1477683] Re: FPU in qemu-system-i386 works incorrectly

2015-07-24 Thread Daniel Milewski
** Description changed: FPU bug in qemu-system-i386 makes software which use floating point numbers work incorrectly. For instance, the one included in attachment prints out 0 instead of 2147483648. The same code works ok in qemu- system-x86_64. I have this issue in QEMU 2.3.0 on two

Re: [Qemu-devel] [POC] colo-proxy in qemu

2015-07-24 Thread Yang Hongyang
Hi Jason, On 07/24/2015 10:12 AM, Jason Wang wrote: On 07/24/2015 10:04 AM, Dong, Eddie wrote: Hi Stefan: Thanks for your comments! On Mon, Jul 20, 2015 at 02:42:33PM +0800, Li Zhijian wrote: We are planning to implement colo-proxy in qemu to cache and compare packets. I thought

Re: [Qemu-devel] [Qemu-ppc] [PATCH v2] pci: allow 0 address for PCI IO/MEM regions

2015-07-24 Thread Laurent Vivier
On 24/07/2015 10:46, Peter Maydell wrote: On 23 July 2015 at 22:49, Michael Roth mdr...@linux.vnet.ibm.com wrote: I seem to recall Michael suggesting it may have already been fixed on x86. I think we had a TODO to figure out all the architectures that don't use IO windows and figure out if

Re: [Qemu-devel] [PATCH v2 1/7] error: De-duplicate code creating Error objects

2015-07-24 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 07/23/2015 08:01 AM, Markus Armbruster wrote: Duplicated when commit 680d16d added error_set_errno(), and again when commit 20840d4 added error_set_win32(). Make the original copy in error_set() reusable by factoring out error_setv(), then rewrite

[Qemu-devel] [PATCH v7 0/6] vGICv3 support

2015-07-24 Thread Pavel Fedin
This series introduces support for GICv3 by KVM. Software emulation is currently not supported. Differences from v6: - Wrap own GIC type definitions on top of KVM ones. Fixed build on non-ARM-Linux hosts Differences from v5: - Fixed various checkpatch.pl style warnings - Removed TODO in

[Qemu-devel] [Bug 1477683] Re: FPU in qemu-system-i386 works incorrectly

2015-07-24 Thread Daniel Milewski
Thanks! That patch solves the issue for me. May I ask maintainer to commit the fix? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1477683 Title: FPU in qemu-system-i386 works incorrectly Status

[Qemu-devel] [PATCH v7 2/6] Implement GIC-500 base class

2015-07-24 Thread Pavel Fedin
From: Shlomo Pongratz shlomo.pongr...@huawei.com This class is to be used by both software and KVM implementations of GICv3 Signed-off-by: Shlomo Pongratz shlomo.pongr...@huawei.com Signed-off-by: Pavel Fedin p.fe...@samsung.com --- hw/intc/Makefile.objs | 1 +

[Qemu-devel] [PATCH v7 6/6] Add gicversion option to virt machine

2015-07-24 Thread Pavel Fedin
Set kernel_irqchip_type according to value of the option and pass it around where necessary. Instantiate devices and fdt nodes according to the choice. max_cpus for virt machine increased to 64. GICv2 compatibility check happens inside arm_gic_common_realize(). Signed-off-by: Pavel Fedin

[Qemu-devel] [PATCH v2 3/6] hw/block/nvme.c: Use pow2ceil() rather than hand-calculation

2015-07-24 Thread Peter Maydell
Use pow2ceil() to round up to the next power of 2, rather than an inline calculation. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/block/nvme.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 40d4880..5da41b2 100644 ---

[Qemu-devel] [PATCH v2 4/6] exec.c: Use pow2floor() rather than hand-calculation

2015-07-24 Thread Peter Maydell
Use pow2floor() to round down to the nearest power of 2, rather than an inline calculation. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- exec.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/exec.c b/exec.c index 7d60e15..4710e2d 100644 --- a/exec.c +++

[Qemu-devel] [PATCH v2 2/6] hw/virtio/virtio-pci: Use pow2ceil() rather than hand-calculation

2015-07-24 Thread Peter Maydell
Use the utility function pow2ceil() for rounding up to the next largest power of 2, rather than inline calculation. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- hw/virtio/virtio-pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio/virtio-pci.c

[Qemu-devel] [PATCH v2 5/6] Remove unused qemu_fls function

2015-07-24 Thread Peter Maydell
Nothing uses qemu_fls() any more, so delete it. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- include/qemu-common.h | 1 - util/cutils.c | 5 - 2 files changed, 6 deletions(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 237d654..bc6f8f8 100644 ---

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Daniel P. Berrange
On Wed, Jul 08, 2015 at 04:48:27PM +0100, Peter Maydell wrote: On 8 July 2015 at 16:21, Paolo Bonzini pbonz...@redhat.com wrote: On 08/07/2015 16:46, Peter Maydell wrote: I'm afraid this fails to link on my linux-static build: c++ -I/usr/include/pixman-1-Werror -m64 -D_GNU_SOURCE

[Qemu-devel] [PATCH v2 1/6] hw/pci: Use pow2ceil() rather than hand-calculation

2015-07-24 Thread Peter Maydell
A couple of places in hw/pci use an inline calculation to round a size up to the next largest power of 2. We have a utility routine for this, so use it. (The behaviour of the old code is different if the size value is 0 -- it would leave it as 0 rather than rounding up to 1, but in both cases we

[Qemu-devel] [PATCH v2 6/6] Make pow2ceil() and pow2floor() inline

2015-07-24 Thread Peter Maydell
Since the pow2floor() function is now used in a hot code path, make it inline; for consistency, provide pow2ceil() as an inline function too. Because these functions use ctz64() we have to put the inline versions into host-utils.h, so they have access to ctz64(), and move the inline

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 14:52, Daniel P. Berrange wrote: I'm happy to fix configure to check that gnutls has working static libs, but we do have a much broader pre-existing problem in this respect. So it seems people wanting todo static builds currently have to deal with installing all the correct

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 13:53, Paolo Bonzini pbonz...@redhat.com wrote: On 24/07/2015 14:52, Daniel P. Berrange wrote: I'm happy to fix configure to check that gnutls has working static libs, but we do have a much broader pre-existing problem in this respect. So it seems people wanting todo

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 15:00, Peter Maydell wrote: I'm happy to fix configure to check that gnutls has working static libs, but we do have a much broader pre-existing problem in this respect. So it seems people wanting todo static builds currently have to deal with installing all the correct

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 14:00, Peter Maydell peter.mayd...@linaro.org wrote: On 24 July 2015 at 13:53, Paolo Bonzini pbonz...@redhat.com wrote: Ok, then it looks like a preexisting problem indeed. Well, not entirely. This set of configure flags used to work, and now it does not. That's a

Re: [Qemu-devel] [PATCH 1/4] target-arm: Add the AArch64 view of the Secure physical timer

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 10:48, Edgar E. Iglesias edgar.igles...@gmail.com wrote: On Thu, Jul 16, 2015 at 12:47:26PM +0100, Peter Maydell wrote: +{ .name = CNTPS_CVAL_EL1, .state = ARM_CP_STATE_AA64, + .opc0 = 3, .opc1 = 7, .crn = 14, .crm = 2, .opc2 = 2, + .type = ARM_CP_IO, +

[Qemu-devel] [PULL 00/13] Miscellaneous bugfixes for 2.4.0-rc3

2015-07-24 Thread Paolo Bonzini
The following changes since commit dc94bd9166af5236a56bd5bb06845911915a925c: Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging (2015-07-22 12:52:34 +0100) are available in the git repository at: git://github.com/bonzini/qemu.git tags/for-upstream for you

[Qemu-devel] [PULL 02/13] qemu-char: handle EINTR for TCP character devices

2015-07-24 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-char.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 617e034..3200200 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2797,7 +2797,10 @@ static ssize_t

[Qemu-devel] [PULL 12/13] qemu-doc: fix typos

2015-07-24 Thread Paolo Bonzini
From: Gonglei arei.gong...@huawei.com Signed-off-by: Gonglei arei.gong...@huawei.com Message-Id: 1435917057-9396-1-git-send-email-arei.gong...@huawei.com Reviewed-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- qemu-doc.texi | 2 +-

[Qemu-devel] [PULL 08/13] scsi: Handle no media case for scsi_get_configuration

2015-07-24 Thread Paolo Bonzini
From: Matthew Rosato mjros...@linux.vnet.ibm.com Currently, scsi_get_configuration always returns a current profile (DVD or CD), even when there is actually no media present. By comparison, ide/atapi uses a default profile of 0 (MMC_PROFILE_NONE) for this case and checks for tray_open, so let's

[Qemu-devel] [PULL 13/13] target-i386/FPU: a misprint in helper_fistll_ST0

2015-07-24 Thread Paolo Bonzini
From: Dmitry Poletaev poletaev-q...@yandex.ru There is a cut-and-paste mistake in the patch https://lists.gnu.org/archive/html/qemu-devel/2014-11/msg01657.html . It cause errors in guest work. Here is the bugfix. Signed-off-by: Dmitry Poletaev poletaev-q...@yandex.ru Reported-by: Kirill Batuzov

[Qemu-devel] [PULL 06/13] scsi: fix buffer overflow in scsi_req_parse_cdb (CVE-2015-5158)

2015-07-24 Thread Paolo Bonzini
This is a guest-triggerable buffer overflow present in QEMU 2.2.0 and newer. scsi_cdb_length returns -1 as an error value, but the caller does not check it. Luckily, the massive overflow means that QEMU will just SIGSEGV, making the impact much smaller. Reported-by: Zhu Donghai (朱东海)

Re: [Qemu-devel] [PATCH] main-loop: fix qemu_notify_event for aio_notify optimization

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 11:12, Paolo Bonzini pbonz...@redhat.com wrote: aio_notify can be optimized away, and in fact almost always will. However, qemu_notify_event is used in places where this is incorrect---most notably, when handling SIGTERM. When aio_notify is optimized away, it is possible

[Qemu-devel] [PATCH 8/9] move out net queue structs define

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- include/net/queue.h | 19 +++ net/queue.c | 19 --- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/include/net/queue.h b/include/net/queue.h index fea6c51..3cdd669 100644 ---

Re: [Qemu-devel] [PATCH v2] PAM: make PAM emulation closer to documentation

2015-07-24 Thread Ефимов Василий
22.07.2015 19:37, Kevin O'Connor пишет: Hi, Hi, Is the motivation of this patch to improve the correctness of the hardware emulation or is there some feature that the current QEMU implementation prevents? The motivation is to improve correctness. The current QEMU PAM implementation prevents

Re: [Qemu-devel] [PULL 0/2] vfio-pci fixes for v2.4

2015-07-24 Thread Peter Maydell
On 23 July 2015 at 20:06, Alex Williamson alex.william...@redhat.com wrote: The following changes since commit b69b30532e0a80e25449244c01b0cbed000c99a3: Update version for v2.4.0-rc2 release (2015-07-22 18:17:19 +0100) are available in the git repository at:

[Qemu-devel] [PATCH] main-loop: fix qemu_notify_event for aio_notify optimization

2015-07-24 Thread Paolo Bonzini
aio_notify can be optimized away, and in fact almost always will. However, qemu_notify_event is used in places where this is incorrect---most notably, when handling SIGTERM. When aio_notify is optimized away, it is possible that QEMU enters a blocking ppoll immediately afterwards and stays

[Qemu-devel] [PULL 09/13] vl: Fix compiler warning for builds without VNC

2015-07-24 Thread Paolo Bonzini
From: Stefan Weil s...@weilnetz.de This regression was caused by commit 70b94331. CCvl.o vl.c: In function ‘select_display’: vl.c:2064:12: error: unused variable ‘err’ [-Werror=unused-variable] Error *err = NULL; ^ Reported-by: Claudio Fontana claudio.font...@huawei.com

Re: [Qemu-devel] [PATCH v3] xen/HVM: atomically access pointers in bufioreq handling

2015-07-24 Thread Stefano Stabellini
On Fri, 24 Jul 2015, Jan Beulich wrote: The number of slots per page being 511 (i.e. not a power of two) means that the (32-bit) read and write indexes going beyond 2^32 will likely disturb operation. The hypervisor side gets I/O req server creation extended so we can indicate that we're using

[Qemu-devel] [PATCH 5/9] filter: add netbuffer plugin

2015-07-24 Thread Yang Hongyang
This could be used by VM FT solutions like Macrocheckpointing, to buffer/release packets. Usage: -netdev tap,id=bn0 # you can use whatever backend as needed -netdev filter,id=f0,backend=bn0 -netdev filter-buffer,id=p0,filter=f0 -device e1000,netdev=f0 Will supply a public API to release

[Qemu-devel] [PATCH 0/9] For QEMU 2.5: Add a net filter and a netbuffer plugin based on the filter

2015-07-24 Thread Yang Hongyang
This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. Also implement a netbuffer plugin for example, the netbuffer plugin could be used by VM FT solutions like Macrocheckpointing, to buffer/release packets. Based on this, dump plugin could be

[Qemu-devel] [PATCH 2/9] virtio-net: add filter support

2015-07-24 Thread Yang Hongyang
virtio-net explicity check for tap device, aupport for tap with filter attached. Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- hw/net/virtio-net.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index

[Qemu-devel] [PATCH 7/9] net/queue: export qemu_net_queue_append

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git a/include/net/queue.h b/include/net/queue.h index fc02b33..fea6c51 100644 --- a/include/net/queue.h +++

[Qemu-devel] [PATCH for-2.5 0/5] target-sh4: TCG improvement

2015-07-24 Thread Aurelien Jarno
This patchset improves the code generation for the SH4 target, by using new TCG ops or using some tricks. Aurelien Jarno (5): target-sh4: add flags markups for FP helpers target-sh4: use deposit in swap.b instruction target-sh4: improve cmp/str instruction target-sh4: improve shld

[Qemu-devel] [PATCH for-2.5 4/5] target-sh4: improve shld instruction

2015-07-24 Thread Aurelien Jarno
The SH4 shld instruction can shift in both direction, depending on the sign of the shift. This is currently implemented using branches, which is not really efficient and prevents the optimizer to do its job. In practice it is often used with a constant loaded in a register just before. Simplify

[Qemu-devel] [PATCH for-2.5 2/5] target-sh4: use deposit in swap.b instruction

2015-07-24 Thread Aurelien Jarno
Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- target-sh4/translate.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/target-sh4/translate.c b/target-sh4/translate.c index 3b4a1b5..a6f3f59 100644 --- a/target-sh4/translate.c +++ b/target-sh4/translate.c @@

[Qemu-devel] [PATCH for-2.5 1/5] target-sh4: add flags markups for FP helpers

2015-07-24 Thread Aurelien Jarno
Most floating point helpers can trigger an exception, but don't change the globals. Mark these helpers as TCG_CALL_NO_WG. Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- target-sh4/helper.h | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff

[Qemu-devel] [PULL 01/13] exec.c: Use atomic_rcu_read() to access dispatch in memory_region_section_get_iotlb()

2015-07-24 Thread Paolo Bonzini
From: Peter Maydell peter.mayd...@linaro.org When accessing the dispatch pointer in an AddressSpace within an RCU critical section we should always use atomic_rcu_read(). Fix an access within memory_region_section_get_iotlb() which was incorrectly doing a direct pointer access. Signed-off-by:

[Qemu-devel] [PULL 05/13] vnc: fix memory leak

2015-07-24 Thread Paolo Bonzini
From: Gonglei arei.gong...@huawei.com If vnc's password is configured, it will leak memory which cipher variable pointed on every vnc connection. Cc: Daniel P. Berrange berra...@redhat.com Reviewed-by: Daniel P. Berrange berra...@redhat.com Signed-off-by: Gonglei arei.gong...@huawei.com

[Qemu-devel] [PULL 03/13] qemu-char: Fix missed data on unix socket

2015-07-24 Thread Paolo Bonzini
From: Nils Carlson pyssl...@ludd.ltu.se Commit 812c1057 introduced HUP detection on unix and tcp sockets prior to a read in tcp_chr_read. This unfortunately broke CloudStack 4.2 which relied on the old behaviour where data on a socket was readable even if a HUP was present. A working solution is

[Qemu-devel] [PULL 04/13] crypto: extend unit tests to cover decryption too

2015-07-24 Thread Paolo Bonzini
From: Daniel P. Berrange berra...@redhat.com The current unit test only verifies the encryption API, resulting in us missing a recently introduced bug in the decryption API from commit d3462e3. It was fortunately later discovered fixed by commit bd09594, thanks to the QEMU I/O tests for qcow2

[Qemu-devel] [PULL 10/13] memory: count number of active VGA logging clients

2015-07-24 Thread Paolo Bonzini
For a board that has multiple framebuffer devices, both of them might want to use DIRTY_MEMORY_VGA on the same memory region. The lack of reference counting in memory_region_set_log makes this very awkward to implement. Suggested-by: Peter Maydell peter.mayd...@linaro.org Signed-off-by: Paolo

[Qemu-devel] [PULL 07/13] rcu: actually register threads that have RCU read-side critical sections

2015-07-24 Thread Paolo Bonzini
Otherwise, grace periods are detected too early! Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- cpus.c| 6 ++ iothread.c| 5 + migration/migration.c | 4 tests/test-rcu-list.c | 4 util/rcu.c| 2 ++ 5 files changed, 21 insertions(+)

[Qemu-devel] [PULL 11/13] framebuffer: set DIRTY_MEMORY_VGA on RAM that is used for the framebuffer

2015-07-24 Thread Paolo Bonzini
The MemoryRegionSection contains enough information to access the RAM region underlying the framebuffer, and can be cached inside the display device. By doing this, the new framebuffer_update_memory_section function can enable dirty memory logging on the relevant RAM region. The function must be

[Qemu-devel] [PATCH 9/9] add a public api to release buffer

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- include/net/filter.h | 3 ++ net/filter-buffer.c | 107 ++- 2 files changed, 109 insertions(+), 1 deletion(-) diff --git a/include/net/filter.h b/include/net/filter.h index 44ba10f..f640cf7

[Qemu-devel] [PATCH 3/9] filter: remove plugins when remove filter

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- net/filter.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/net/filter.c b/net/filter.c index 89ee830..7ef7bee 100644 --- a/net/filter.c +++ b/net/filter.c @@ -11,6 +11,7 @@ #include qemu-common.h #include

[Qemu-devel] [PATCH 6/9] introduce qemu_find_net_clients_by_model

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- include/net/net.h | 2 ++ net/net.c | 18 ++ 2 files changed, 20 insertions(+) diff --git a/include/net/net.h b/include/net/net.h index 250f365..10927e1 100644 --- a/include/net/net.h +++ b/include/net/net.h @@

[Qemu-devel] [PATCH 1/9] netdev: Add a net filter

2015-07-24 Thread Yang Hongyang
This patch add a net filter between network backend and NIC devices. All packets will pass by this filter. TODO: multiqueue support. +--+ +-+ +--+ |filter| |frontend(NIC)| | peer+-- | |

[Qemu-devel] [PATCH 4/9] filter: remove filter before remove network backend

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang yan...@cn.fujitsu.com --- net/net.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/net/net.c b/net/net.c index c273981..321362f 100644 --- a/net/net.c +++ b/net/net.c @@ -385,9 +385,20 @@ void qemu_del_net_client(NetClientState *nc) {

Re: [Qemu-devel] [Xen-devel] [Block dev] : Qemu block ide_dma_read call routine

2015-07-24 Thread Kevin Wolf
Am 23.07.2015 um 21:20 hat Shailesh Kumar geschrieben: On Mon, Feb 23, 2015 at 3:25 AM, Kevin Wolf kw...@redhat.com wrote: Am 11.02.2015 um 04:51 hat Shailesh Kumar geschrieben: Hi, I am implementing read equivalent routine in qemu. Can some one help me understand control flow of

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

2015-07-24 Thread Pavel Fedin
This large region is necessary for some devices like ivshmem and video cards Signed-off-by: Pavel Fedin p.fe...@samsung.com --- Changes since v1: - Region address changed to 512G, leaving more space for RAM --- hw/arm/virt.c | 13 - include/hw/arm/virt.h | 1 + 2 files

Re: [Qemu-devel] [PULL for-2.4 0/5] tcg fixes

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 04:43, Richard Henderson r...@twiddle.net wrote: Whee. Back from holidays just in time for -rc3. Three of these four patches attack the truncation problem that Leon pointed out for us affecting mips. The last is a patch that Aurelien asked to be included on IRC. r~

[Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction

2015-07-24 Thread Aurelien Jarno
The SH4 shad instruction can shift in both direction, depending on the sign of the shift. This is currently implemented using branches, which is not really efficient and prevents the optimizer to do its job. In practice it is often used with a constant loaded in a register just before. Simplify

[Qemu-devel] [PATCH for-2.5 3/5] target-sh4: improve cmp/str instruction

2015-07-24 Thread Aurelien Jarno
Instead of testing bytes one by one, we can use the following trick from https://graphics.stanford.edu/~seander/bithacks.html: haszero(v) = (v - 0x01010101) ~v 0x80808080 The subexpression v - 0x01010101, evaluates to a high bit set in any byte whenever the corresponding byte in v is zero or

Re: [Qemu-devel] [PATCH 5/5] target-sh4: improve shad instruction

2015-07-24 Thread Aurelien Jarno
On 2015-07-24 13:14, Aurelien Jarno wrote: The SH4 shad instruction can shift in both direction, depending on the sign of the shift. This is currently implemented using branches, which is not really efficient and prevents the optimizer to do its job. In practice it is often used with a

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 04:15:31PM +0200, Paolo Bonzini wrote: On 24/07/2015 16:14, Daniel P. Berrange wrote: diff --git a/Makefile.objs b/Makefile.objs index f094eff..9d988d9 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -2,7 +2,9 @@ # Common libraries for tools and

[Qemu-devel] [PATCH for-2.4] configure: Drop vnc-ws feature from help text

2015-07-24 Thread Andreas Färber
Commit 8e9b0d2 (ui: convert VNC websockets to use crypto APIs) dropped the --enable-vnc-ws option but forgot to update the help text. Fix this. Cc: Daniel P. Berrange berra...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Andreas Färber afaer...@suse.de --- configure | 1 - 1

Re: [Qemu-devel] [Qemu-block] [PATCH v3] block/ssh: Avoid segfault if inet_connect doesn't set errno.

2015-07-24 Thread Stefan Hajnoczi
On Wed, Jul 22, 2015 at 09:56:41AM -0400, Jeff Cody wrote: On Wed, Jul 22, 2015 at 02:27:47PM +0100, Richard W.M. Jones wrote: Reviewed-by: Jeff Cody jc...@redhat.com Jeff: Are you taking this through your tree like gluster, rbd, sheepdog, etc? $ scripts/get_maintainer.pl -f block/ssh.c

[Qemu-devel] [PATCH 2/5] target-arm: Wire up AArch64 EL2 and EL3 address translation ops

2015-07-24 Thread Peter Maydell
Wire up the AArch64 EL2 and EL3 address translation operations (AT S12E1*, AT S12E0*, AT S1E2*, AT S1E3*), and correct some errors in the ats_write64() function in previously unused code that would have done the wrong kind of lookup for accesses from EL3 when SCR.NS==0. Signed-off-by: Peter

[Qemu-devel] [PATCH for-2.5 05/10] tcg: rename trunc_shr_i32 into trunc_shr_i64_i32

2015-07-24 Thread Aurelien Jarno
The op is sometimes named trunc_shr_i32 and sometimes trunc_shr_i64_i32, and the name in the README doesn't match the name offered to the frontends. Always use the long name to make it clear it is a size changing op. Reviewed-by: Richard Henderson r...@twiddle.net Signed-off-by: Aurelien Jarno

[Qemu-devel] [PATCH for-2.5 00/10] tcg: improve optimizer

2015-07-24 Thread Aurelien Jarno
This patchset improves the optimizer in 3 different ways: - by optimizing temp tracking using a bit array - by allowing constants to have copy - by differentiating 32 - 64 bits conversions from moves in the frontend by using specific instructions The latter change introduces 2 new mandatory

[Qemu-devel] [PATCH for-2.5 07/10] tcg: implement real ext_i32_i64 and extu_i32_i64 ops

2015-07-24 Thread Aurelien Jarno
Implement real ext_i32_i64 and extu_i32_i64 ops. They ensure that a 32-bit value is always converted to a 64-bit value and not propagated through the register allocator or the optimizer. Cc: Andrzej Zaborowski balr...@gmail.com Cc: Alexander Graf ag...@suse.de Cc: Blue Swirl blauwir...@gmail.com

[Qemu-devel] [PATCH for-2.5 02/10] tcg/optimize: add temp_is_const and temp_is_copy functions

2015-07-24 Thread Aurelien Jarno
Add two accessor functions temp_is_const and temp_is_copy, to make the code more readable and make code change easier. Cc: Richard Henderson r...@twiddle.net Signed-off-by: Aurelien Jarno aurel...@aurel32.net --- tcg/optimize.c | 131 ++--- 1

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 03:55:56PM +0200, Paolo Bonzini wrote: On 24/07/2015 15:31, Peter Maydell wrote: Yes, but the set of required static libs for linux-user is pretty tiny, and it doesn't generally change. In particular since we don't want to link gnutls into linux-user we shouldn't

Re: [Qemu-devel] [PATCH v2] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-24 Thread Stefan Hajnoczi
On Mon, Jul 20, 2015 at 5:17 PM, Programmingkid programmingk...@gmail.com wrote: On Jul 20, 2015, at 8:46 AM, Laurent Vivier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/07/2015 12:48, Stefan Hajnoczi wrote: On Fri, Jul 17, 2015 at 03:24:34PM -0400, Programmingkid wrote:

Re: [Qemu-devel] [PATCH v2] raw-posix.c: Make physical devices usable in QEMU under Mac OS X host

2015-07-24 Thread Stefan Hajnoczi
On Fri, Jul 24, 2015 at 3:22 PM, Stefan Hajnoczi stefa...@gmail.com wrote: On Mon, Jul 20, 2015 at 5:17 PM, Programmingkid programmingk...@gmail.com wrote: On Jul 20, 2015, at 8:46 AM, Laurent Vivier wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 20/07/2015 12:48, Stefan

[Qemu-devel] [PATCH for-2.5 09/10] tcg/optimize: do not remember garbage high bits for 32-bit ops

2015-07-24 Thread Aurelien Jarno
Now that we have real size changing ops, we don't need to mark high bits of the destination as garbage. The goal of the optimizer is to predict the value of the temps (and not of the registers) and do simplifications when possible. The problem there is therefore not the fact that those bits are

[Qemu-devel] [PATCH for-2.5 04/10] tcg/optimize: allow constant to have copies

2015-07-24 Thread Aurelien Jarno
Now that copies and constants are tracked separately, we can allow constant to have copies, deferring the choice to use a register or a constant to the register allocation pass. This prevent this kind of regular constant reloading: -OUT: [size=338] +OUT: [size=298] mov-0x4(%r14),%ebp

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 16:14, Daniel P. Berrange wrote: diff --git a/Makefile.objs b/Makefile.objs index f094eff..9d988d9 100644 --- a/Makefile.objs +++ b/Makefile.objs @@ -2,7 +2,9 @@ # Common libraries for tools and emulators stub-obj-y = stubs/ util-obj-y = util/ qobject/ qapi/

[Qemu-devel] [PATCH 3/5] target-arm: Add CP_ACCESS_TRAP_UNCATEGORIZED_EL2, 3

2015-07-24 Thread Peter Maydell
Some coprocessor register access functions need to be able to report trap to EL3 with an 'uncategorized' syndrome; add the necessary CPAccessResult enum and handling for it. I don't currently know of any registers that need to trap to EL2 with the 'uncategorized' syndrome, but adding the _EL2

[Qemu-devel] [PATCH 1/5] target-arm: there is no TTBR1 for 32-bit EL2 stage 1 translations

2015-07-24 Thread Peter Maydell
For EL2 stage 1 translations, there is no TTBR1. We were already handling this for 64-bit EL2; add the code to take the 'no TTBR1' code path for 64-bit EL2 as well. Signed-off-by: Peter Maydell peter.mayd...@linaro.org --- target-arm/helper.c | 5 + 1 file changed, 5 insertions(+) diff

[Qemu-devel] [PATCH 0/5] Wire up various EL2/EL3 address translation ops

2015-07-24 Thread Peter Maydell
This patch series wires up some of the EL2 and EL3 address translation operations which we were missing: * the AArch64 EL2 and EL3 AT ops * the AArch32 ATS12NSO ops * the AArch32 ATS1H ops Most of these are still not accessible or not very interesting because we don't have any CPUs which set

Re: [Qemu-devel] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 14:55, Paolo Bonzini pbonz...@redhat.com wrote: On 24/07/2015 15:31, Peter Maydell wrote: Yes, but the set of required static libs for linux-user is pretty tiny, and it doesn't generally change. In particular since we don't want to link gnutls into linux-user we shouldn't

[Qemu-devel] [PATCH 4/5] target-arm: Enable the AArch32 ATS12NSO ops

2015-07-24 Thread Peter Maydell
Apply the correct conditions in the ats_access() function for the ATS12NSO* address translation operations: * succeed at EL2 or EL3 * normal UNDEF trap from NS EL1 * trap to EL3 from S EL1 (only possible if EL3 is AArch64) (This change means they're now available in our EL3-supporting CPUs

  1   2   >