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 CONFIG_

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] ={ 0x40

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 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 everything sh

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 >>>

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 will not help because this will not compile on non-Linux host

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] 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 Conserva

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 parse_block

[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 Add pci_allow_0_addr in MachineClass to conditionally allow addr 0 for pseries, as this can break other architectures. This patch allows to hotplug PCI car

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 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 to do th

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 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 fixed x86, then I think

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

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 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 a

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

2015-07-24 Thread Markus Armbruster
Eric Blake 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 error_set

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

2015-07-24 Thread Markus Armbruster
Eric Blake 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 parse_block_error_action()

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 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 will not help > because this will not compile on non-Linux hosts. I will look fo

[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

[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, allow

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 > --- > target-arm/cpu-qom.h | 1 +

[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 in

[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 gicv3_i

[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 DeviceSta

[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 po

[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 Acked-by: Paolo Bonzini --- include/exec/memory.h | 14 +++

[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 --- hw/intc/Makefile.objs | 3 + hw/intc/arm_gicv3_kvm.c | 155 2 files changed, 158 insertions(+) create mode 100644 hw/intc/arm_gicv3_kvm.c diff --git

[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 --- hw

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

2015-07-24 Thread Pavel Fedin
From: Shlomo Pongratz This class is to be used by both software and KVM implementations of GICv3 Signed-off-by: Shlomo Pongratz Signed-off-by: Pavel Fedin --- hw/intc/Makefile.objs | 1 + hw/intc/arm_gicv3_common.c | 249 + hw/intc/gi

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 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, >> + .accessfn = gt_

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 ex

[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 there,

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 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: > > git://github.com/awilliam/qemu-vfio.git tags/vfi

[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 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: Peter Maydell Message-Id:

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

2015-07-24 Thread Paolo Bonzini
From: Gonglei If vnc's password is configured, it will leak memory which cipher variable pointed on every vnc connection. Cc: Daniel P. Berrange Reviewed-by: Daniel P. Berrange Signed-off-by: Gonglei Message-Id: <1437556133-11268-1-git-send-email-arei.gong...@huawei.com> Signed-off-by: Paolo

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

2015-07-24 Thread Paolo Bonzini
From: Nils Carlson 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 to properly check th

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

2015-07-24 Thread Paolo Bonzini
From: "Daniel P. Berrange" 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 encryption, but we

[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 --- 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 tcp_chr_recv(CharDriverState *chr, char

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

2015-07-24 Thread Paolo Bonzini
From: Stefan Weil 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 Signed-off-by: Stefan Weil Message-Id: <143

[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 Signed-off-by: Paolo Bonzini --- include/exec/m

[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 --- 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(+) diff --git a/cpus.

[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] [PULL 08/13] scsi: Handle no media case for scsi_get_configuration

2015-07-24 Thread Paolo Bonzini
From: Matthew Rosato 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 do the same for scsi. This f

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

2015-07-24 Thread Paolo Bonzini
From: Dmitry Poletaev 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 Reported-by: Kirill Batuzov Message-Id: <2692911436348...@web2m.yandex.ru

[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 (朱东海) Fixes: 189

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

2015-07-24 Thread Paolo Bonzini
From: Gonglei Signed-off-by: Gonglei Message-Id: <1435917057-9396-1-git-send-email-arei.gong...@huawei.com> Reviewed-by: Peter Maydell Signed-off-by: Paolo Bonzini --- qemu-doc.texi | 2 +- qemu-options.hx | 2 +- qemu-tech.texi | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) dif

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 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 that > QEMU enters

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 us

[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 eas

[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 --- 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 304d3dd..59e9707 100644 ---

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

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- 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 +++ b/include/net/queue.h @@

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

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- 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/error-report.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 --- 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 @@ -108,6 +108,8 @@ char *qemu

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

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- 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 100644 --- a/include/n

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 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 the

[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 --- 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) { NetClientState *ncs[MAX_QUEUE_N

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

2015-07-24 Thread Yang Hongyang
Signed-off-by: Yang Hongyang --- 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 --- a/include/net/queue.h +++ b/inc

[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 --- 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 changed, 13 insertions(+

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 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~ > > > The fo

[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 instruct

[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 th

[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 --- 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 @@ -612,15 +612,11 @@ static

[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 --- target-sh4/helper.h | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/target-sh4/help

[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 th

[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 o

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 cons

Re: [Qemu-devel] [PATCH RFC v2 05/47] qapi: Reject -p arguments that break qapi-event.py

2015-07-24 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:21 PM, Markus Armbruster wrote: >> qapi-event.py breaks when you ask for a funny prefix like '@'. >> Protect it. > > Only possible from the command line (not triggered by our makefiles); > but doesn't hurt. > >> >> Signed-off-by: Markus Armbruster >> --- >>

[Qemu-devel] [PATCH v2] 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 there,

Re: [Qemu-devel] [PATCH RFC v2 06/47] qapi: Drop unused and useless parameters and variables

2015-07-24 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:21 PM, Markus Armbruster wrote: >> gen_sync_call()'s parameter indent is useless: gen_sync_call() uses it >> only as optional argument for push_indent() and pop_indent(), their >> default is four, and gen_sync_call()'s only caller passes four. >> >> gen_visi

Re: [Qemu-devel] [PATCH] Add another sanity check to smp_parse() function

2015-07-24 Thread Thomas Huth
On 23/07/15 14:07, Igor Mammedov wrote: > On Wed, 22 Jul 2015 15:59:50 +0200 > Thomas Huth wrote: > >> The code in smp_parse already checks the topology information for >> sockets * cores * threads < cpus and bails out with an error in >> that case. However, it is still possible to supply a bad c

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

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 11:16, Paolo Bonzini wrote: > 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: > >

Re: [Qemu-devel] [PATCH RFC v2 07/47] qapi: Generate a nicer struct for flat unions

2015-07-24 Thread Markus Armbruster
Eric Blake writes: > On 07/01/2015 02:21 PM, Markus Armbruster wrote: >> The struct generated for a flat union is weird: the members of its >> base are at the end, except for the union tag, which is renamed to >> 'kind' and put at the beginning. >> > >> Change to put all base members at the begi

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

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 13:56, Peter Maydell wrote: > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k > --verbose -m=quick tests/test-crypto-cipher > TEST: tests/test-crypto-cipher... (pid=94271) > /crypto/cipher/aes-ecb-128: ** > ERROR:/Users

[Qemu-devel] [PULL v2 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

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

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 02:02:57PM +0200, Paolo Bonzini wrote: > > > On 24/07/2015 13:56, Peter Maydell wrote: > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k > > --verbose -m=quick tests/test-crypto-cipher > > TEST: tests/test-crypto-cipher... (pid=94271) > > /crypto/c

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

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 02:02:57PM +0200, Paolo Bonzini wrote: > > > On 24/07/2015 13:56, Peter Maydell wrote: > > MALLOC_PERTURB_=${MALLOC_PERTURB_:-$((RANDOM % 255 + 1))} gtester -k > > --verbose -m=quick tests/test-crypto-cipher > > TEST: tests/test-crypto-cipher... (pid=94271) > > /crypto/c

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

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 14:24, Daniel P. Berrange wrote: >> > I'll respin without this patch. I can reproduce it with >> > --disable-gnutls. Dan, can you take a look? > So this patch was not actually causing the problem, merely exposing a > latent bug. Yes, that was likely. > I've just sent a fix for t

[Qemu-devel] [PATCH v2 0/6] replace qemu_fls() with pow2ceil()/pow2floor()

2015-07-24 Thread Peter Maydell
We have a qemu_fls() function which is just a silly wrapper around clz32() and which is used in only a handful of places in the codebase. It turns out that all of those are really trying to round up or down to a power of 2, which is something we have utility functions for. This series replaces all

Re: [Qemu-devel] [PATCH v3] tcg/ppc: Improve unaligned load/store handling on 64-bit backend

2015-07-24 Thread Richard Henderson
On 07/20/2015 10:19 PM, Benjamin Herrenschmidt wrote: > Currently, we get to the slow path for any unaligned access in the > backend, because we effectively preserve the bottom address bits > below the alignment requirement when comparing with the TLB entry, > so any non-0 bit there will cause the

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

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 02:30:02PM +0200, Paolo Bonzini wrote: > > > On 24/07/2015 14:24, Daniel P. Berrange wrote: > >> > I'll respin without this patch. I can reproduce it with > >> > --disable-gnutls. Dan, can you take a look? > > So this patch was not actually causing the problem, merely ex

[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 --- 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 --- a/hw/block/nvme.c +++ b/h

[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 --- 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 +++ b/exec.c @@ -2371,9 +2371,7 @@

[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 --- hw/virtio/virtio-pci.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pci.c index

[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 --- 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 --- a/include/qemu-common.h +++

[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 k

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 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 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 is_power_of_2(

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 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 static builds cu

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 t

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 wrote: > On 24 July 2015 at 13:53, Paolo Bonzini 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 regression. In particular, configure --static

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 02:06:44PM +0100, Peter Maydell wrote: > On 24 July 2015 at 14:00, Peter Maydell wrote: > > On 24 July 2015 at 13:53, Paolo Bonzini wrote: > >> Ok, then it looks like a preexisting problem indeed. > > > > Well, not entirely. This set of configure flags used to work, > > an

Re: [Qemu-devel] [PATCH v3 0/3] block: warn about aio=native if libaio is unavailable

2015-07-24 Thread Kevin Wolf
Am 23.07.2015 um 14:48 hat Stefan Hajnoczi geschrieben: > v3: > * Fix Patch 2 commit description because the mention of raw-posix.c ignored >Windows [Markus] > * Drop #ifdef CONFIG_LINUX_AIO from qemu-nbd.c > > v2: > * Banish CONFIG_LINUX_AIO from blockdev.c, that is raw-posix.c's business

[Qemu-devel] [PATCH] crypto: fix built-in AES decrypt function

2015-07-24 Thread Daniel P. Berrange
The qcrypto_cipher_decrypt_aes method was using the wrong key material, and passing the wrong mode. This caused it to incorrectly decrypt ciphertext. Signed-off-by: Daniel P. Berrange --- crypto/cipher-builtin.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crypto/c

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

2015-07-24 Thread Richard Henderson
On 07/24/2015 04:14 AM, Aurelien Jarno wrote: > 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: imp

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:10, Daniel P. Berrange wrote: > On Fri, Jul 24, 2015 at 02:06:44PM +0100, Peter Maydell wrote: >> On 24 July 2015 at 14:00, Peter Maydell wrote: >> > On 24 July 2015 at 13:53, Paolo Bonzini wrote: >> >> Ok, then it looks like a preexisting problem indeed. >> > >> > Well, no

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

2015-07-24 Thread Aurelien Jarno
Someone has posted a similar fix a few weeks ago, and it has just been merged. ** Changed in: qemu Status: New => Fix Committed -- 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:

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

2015-07-24 Thread Stefan Hajnoczi
On Thu, Jul 23, 2015 at 9:11 PM, Peter Maydell wrote: > I'm happy to be able to announce that the QEMU project > has joined Software Freedom Conservancy. I added a wiki page listing the Leadership Committee members and explaining the relationship with Software Freedom Conservancy: http://qemu-pro

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 02:31:12PM +0100, Peter Maydell wrote: > On 24 July 2015 at 14:10, Daniel P. Berrange wrote: > > On Fri, Jul 24, 2015 at 02:06:44PM +0100, Peter Maydell wrote: > >> On 24 July 2015 at 14:00, Peter Maydell wrote: > >> > On 24 July 2015 at 13:53, Paolo Bonzini wrote: > >> >

  1   2   >