Re: [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 zhanghailiang
On 2015/7/24 18:55, Yang Hongyang wrote: 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 packe

Re: [Qemu-devel] [PATCH v1 1/1] target-microblaze: Set the PC in reset instead of realize

2015-07-24 Thread Edgar E. Iglesias
On Thu, Jul 23, 2015 at 08:13:56AM -0700, Alistair Francis wrote: > Set the Microblaze CPU PC in the reset instead of setting it > in the realize. This is required as the PC is zeroed in the > reset function and causes problems in some situations. > > Signed-off-by: Alistair Francis Looks good:

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 Fri, Jul 24, 2015 at 11:06:01AM +0100, Peter Maydell wrote: > 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

[Qemu-devel] [PATCH for-2.4] tcg: correctly mark dead inputs for mov with a constant

2015-07-24 Thread Aurelien Jarno
When tcg_reg_alloc_mov propagate a constant, we failed to correctly mark a temp as dead if the liveness analysis hints so. This fixes the following assert when configure with --enable-debug-tcg: qemu-x86_64: tcg/tcg.c:1827: tcg_reg_alloc_bb_end: Assertion `ts->val_type == TEMP_VAL_DEAD' failed.

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

2015-07-24 Thread Aurelien Jarno
On 2015-07-24 13:15, Richard Henderson wrote: > On 07/24/2015 09:30 AM, Aurelien Jarno wrote: > > 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 th

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

2015-07-24 Thread Richard Henderson
On 07/24/2015 09:30 AM, Aurelien Jarno wrote: > 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: This appears

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

2015-07-24 Thread Eric Blake
On 07/24/2015 06:23 AM, Daniel P. Berrange wrote: > 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 fi

[Qemu-devel] [PATCH for 2.4 2/3] net/dp8393x: specify memory operations for PROM PROM

2015-07-24 Thread Hervé Poussineau
This fixes a guest-triggerable QEMU crash when guest tries to write to PROM. Signed-off-by: Hervé Poussineau --- hw/net/dp8393x.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x.c index 8fafdb0..55168b5 100644 --- a/hw/net/dp8393

[Qemu-devel] [PATCH for 2.4 0/3] net/dp8393x: misc fixes

2015-07-24 Thread Hervé Poussineau
Hi, Network card dp8393x emulation has been greatly improved during the 2.4 cycle. However, I discovered a few bugs in it which should IMO be fixed before 2.4. Hervé Hervé Poussineau (3): net/dp8393x: disable user creation net/dp8393x: do not crash when trying to write to PROM net/dp8393x:

[Qemu-devel] [PATCH for 2.4 3/3] net/dp8393x: remove check of runt packets

2015-07-24 Thread Hervé Poussineau
Ethernet requires that messages are at least 64 bytes on the wire. This limitation does not exist on emulation (no wire message), so remove the check. Netcard is now able to receive small network packets. Signed-off-by: Hervé Poussineau --- hw/net/dp8393x.c | 5 - 1 file changed, 5 deletions

[Qemu-devel] [PATCH for 2.4 1/3] net/dp8393x: disable user creation

2015-07-24 Thread Hervé Poussineau
Netcard needs an address space to write data to, which can't be specified on command line. This fixes a crash when user starts QEMU with "-device dp8393x" Signed-off-by: Hervé Poussineau --- hw/net/dp8393x.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/net/dp8393x.c b/hw/net/dp8393x

Re: [Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI

2015-07-24 Thread Laszlo Ersek
On 07/24/15 20:16, Laszlo Ersek wrote: > From: Paolo Bonzini > > An SMI should definitely wake up a processor in halted state! > This lets OVMF boot with SMM on multiprocessor systems, although > it halts very soon after that with a "CpuIndex != BspIndex" > assertion failure. > > Signed-off-by:

[Qemu-devel] [PATCH for-2.4-rc3 2/3] hw/acpi/ich9: clean up stale comment about KVM not supporting SMM

2015-07-24 Thread Laszlo Ersek
Commit fba72476c6 ("ich9: add smm_enabled field and arguments") detached SMM availability from kvm_enabled(). However, the comment in pm_reset() was not updated; let's do it now. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: qemu-triv...@nongnu.org Signed-o

[Qemu-devel] [PATCH for-2.4-rc3 1/3] hw/acpi/ich9: clear smi_en on reset

2015-07-24 Thread Laszlo Ersek
Otherwise on reboot firmware might think (due to APMC_EN remaining set from the previous boot) that SMI support is absent. Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Gerd Hoffmann Cc: Paolo Bonzini Cc: qemu-triv...@nongnu.org Signed-off-by: Laszlo Ersek --- hw/acpi/ich9.c | 1 + 1 file c

[Qemu-devel] [PATCH for-2.4-rc3 0/3] a tiny bit late SMM fixups

2015-07-24 Thread Laszlo Ersek
So, I just happened to resume my SMM-for-OVMF work today, with v2.4.0-rc2-2-g12e21eb, and I suddenly realized that these patches never made upstream. The first two are trivial and I kinda "insist" on them :), the last one (from Paolo) doesn't seem that trivial (to me at least), and I don't strictly

[Qemu-devel] [PATCH for-2.4-rc3 3/3] target-i386: wake up processors that receive an SMI

2015-07-24 Thread Laszlo Ersek
From: Paolo Bonzini An SMI should definitely wake up a processor in halted state! This lets OVMF boot with SMM on multiprocessor systems, although it halts very soon after that with a "CpuIndex != BspIndex" assertion failure. Signed-off-by: Paolo Bonzini Cc: Andreas Faerber Cc: Paolo Bonzini

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

2015-07-24 Thread Programmingkid
Mac OS X can be picky when it comes to allowing the user to use physical devices in QEMU. Most mounted volumes appear to be off limits to QEMU. If an issue is detected, a message is displayed showing the user how to unmount a volume. Signed-off-by: John Arbuckle --- Removed a call to snprintf()

Re: [Qemu-devel] [PATCH] configure: Work around broken static pkg-config info for Ubuntu gnutls

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 06:28:08PM +0100, Peter Maydell wrote: > Unfortunately Ubuntu's pkg-config information for gnutls is broken > for the static linking case, and outputs --libs options which the > compiler does not recognize. Work around this problem by testing > that the --cflags/--libs outpu

[Qemu-devel] [PATCH] configure: Work around broken static pkg-config info for Ubuntu gnutls

2015-07-24 Thread Peter Maydell
Unfortunately Ubuntu's pkg-config information for gnutls is broken for the static linking case, and outputs --libs options which the compiler does not recognize. Work around this problem by testing that the --cflags/--libs output will at least allow compilation before enabling gnutls support. Sign

[Qemu-devel] [PATCH] gdbstub: Set current CPU on interruptions

2015-07-24 Thread Jan Kiszka
gdb expects that the thread ID for c and g-class operations is set to the CPU we provide when reporting VM stop conditions. If the stub is still tuned to a different CPU, the wrong information is delivered to the gdb frontend. Signed-off-by: Jan Kiszka --- gdbstub.c | 1 + 1 file changed, 1 inse

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

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 10:55, Pavel Fedin wrote: > 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 defi

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

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 10:55, Pavel Fedin wrote: > From: Shlomo Pongratz > > This class is to be used by both software and KVM implementations of GICv3 > > +++ b/include/hw/intc/arm_gicv3_common.h > @@ -0,0 +1,112 @@ > +/* > + * ARM GIC support > + * > + * Copyright (c) 2012 Linaro Limited > + * Cop

[Qemu-devel] [PATCH for-2.5 01/10] tcg/optimize: optimize temps tracking

2015-07-24 Thread Aurelien Jarno
The tcg_temp_info structure uses 24 bytes per temp. Now that we emulate vector registers on most guests, it's not uncommon to have more than 100 used temps. This means we have initialize more than 2kB at least twice per TB, often more when there is a few goto_tb. Instead used a TCGTempSet bit arra

[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 Signed-off-by: Aurelien Jarno --- tcg/optimize.c | 131 ++--- 1 file changed, 60 insertions(+), 71 del

[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 Signed-off-by: Aurelien Jarno --- tcg/README

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

[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 Cc: Alexander Graf Cc: Blue Swirl Cc: Claudio Fontana Cc: Claudio Fontana Cc: Richa

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

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

[Qemu-devel] [PATCH for-2.5 03/10] tcg/optimize: track const/copy status separately

2015-07-24 Thread Aurelien Jarno
Use two bools to track constants and copies instead of an enum. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/optimize.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index d2b63a4..f16eb1e 1006

[Qemu-devel] [PATCH for-2.5 08/10] tcg/optimize: add optimizations for ext_i32_i64 and extu_i32_i64 ops

2015-07-24 Thread Aurelien Jarno
They behave the same as ext32s_i64 and ext32u_i64 from the constant folding and zero propagation point of view, except that they can't be replaced by a mov, so we don't compute the affected value. Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/optimize.c | 13 + 1 file

[Qemu-devel] [PATCH for-2.5 06/10] tcg: don't abuse TCG type in tcg_gen_trunc_shr_i64_i32

2015-07-24 Thread Aurelien Jarno
The tcg_gen_trunc_shr_i64_i32 function takes a 64-bit argument and returns a 32-bit value. Directly call tcg_gen_op3 with the correct types instead of calling tcg_gen_op3i_i32 and abusing the TCG types. Reviewed-by: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/tcg-op.c | 4 ++-- 1 fi

[Qemu-devel] [PATCH for-2.5 10/10] tcg: update README about size changing ops

2015-07-24 Thread Aurelien Jarno
Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- tcg/README | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/tcg/README b/tcg/README index 61b3899..a22f251 100644 --- a/tcg/README +++ b/tcg/README @@ -466,13 +466,25 @@ On a 32 bit target, all 64 bit

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

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 10:55, Pavel Fedin wrote: > Just speficying ops = NULL in some cases can be more convenient than having "specifying" > 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

Re: [Qemu-devel] [PATCH v3 0/2] block: vpc - prevent overflow

2015-07-24 Thread Kevin Wolf
Am 24.07.2015 um 16:26 hat Jeff Cody geschrieben: > Changes: > > v3: check for INT_MAX / 4 as well, and use ROUND_UP (Thanks Max) > > v2 now also checks that Max Table Entries is < SIZE_MAX / 4 (Thanks Stefan) > > This series fixes a bug found by Richard Jones. > > When we allocate the pagetabl

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

2015-07-24 Thread Programmingkid
On Jul 24, 2015, at 11:00 AM, Stefan Hajnoczi wrote: > On Fri, Jul 17, 2015 at 08:19:16PM -0400, Programmingkid wrote: >> @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIterator, >> char *bsdPath, CFIndex ma >> if ( bsdPathAsCFString ) { >> size_t devPathL

Re: [Qemu-devel] [PATCH 0/4] vhost-user: protocol updates

2015-07-24 Thread Thibaut Collet
On Fri, Jul 17, 2015 at 4:09 PM, Michael S. Tsirkin wrote: > This patchset sets the stage for extending the vhost user > protocol, with full backwards compatibility. > > The approach is to negotiate feature bits queried and > acknowledged during device setup. > > For now, there's no new functional

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

[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 --- target-arm/helper.c | 5 + 1 file changed, 5 insertions(+) diff --git a/target-arm/helper.c b

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

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

[Qemu-devel] [PATCH 5/5] target-arm: Implement AArch32 ATS1H* operations

2015-07-24 Thread Peter Maydell
Implement the AArch32 ATS1H* operations which perform Hyp mode stage 1 translations. Signed-off-by: Peter Maydell --- target-arm/helper.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/target-arm/helper.c b/target-arm/helper.c index 67d108e..b9ce965 100644 --- a/targ

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

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

2015-07-24 Thread Jeff Cody
On Fri, Jul 24, 2015 at 04:08:57PM +0100, Stefan Hajnoczi wrote: > 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 > > Jeff: Are you taking this through your tree like gluster, rbd, sheep

Re: [Qemu-devel] [PATCH] target-mips: fix offset calculation for Interrupts

2015-07-24 Thread Leon Alrae
On 10/07/2015 12:10, Yongbok Kim wrote: > Correct computation of vector offsets for EXCP_EXT_INTERRUPT. > For instance, if Cause.IV is 0 the vector offset should be 0x180. > > Simplify the finding vector number logic for the Vectored Interrupts. I think this message would be much better if it was

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

2015-07-24 Thread Peter Maydell
On 24 July 2015 at 15:25, Peter Maydell wrote: > (b) make sure configure doesn't put the results of > 'pkg-config --libs --static gnutls' into compiler commandlines > (it is: > -R/usr/lib/x86_64-linux-gnu -lgnutls -lgcrypt -lgpg-error -ltasn1 -lz > -lp11-kit FWIW, I've filed an Ubuntu bug: https

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 Jeff: Are you taking this through your tree like gluster, rbd, sheepdog, etc? $ scripts/get_maintainer.pl -f block/ssh.c "Richard W.M. Jones"

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

2015-07-24 Thread Daniel P. Berrange
On Fri, Jul 24, 2015 at 04:47:37PM +0200, Andreas Färber wrote: > 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 > Cc: Paolo Bonzini > Signed-off-by: Andreas Färber Rev

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

2015-07-24 Thread Stefan Hajnoczi
On Fri, Jul 17, 2015 at 08:19:16PM -0400, Programmingkid wrote: > @@ -2014,7 +2015,9 @@ kern_return_t GetBSDPath( io_iterator_t mediaIterator, > char *bsdPath, CFIndex ma > if ( bsdPathAsCFString ) { > size_t devPathLength; > strcpy( bsdPath, _PATH_DEV ); > -

[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 Cc: Paolo Bonzini Signed-off-by: Andreas Färber --- configure | 1 - 1 file changed, 1 deletion(-) diff --git a/configure b/co

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 wrote: > On Mon, Jul 20, 2015 at 5:17 PM, Programmingkid > 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

[Qemu-devel] [PATCH v3 1/2] block: vpc - prevent overflow if max_table_entries >= 0x40000000

2015-07-24 Thread Jeff Cody
When we allocate the pagetable based on max_table_entries, we multiply the max table entry value by 4 to accomodate a table of 32-bit integers. However, max_table_entries is a uint32_t, and the VPC driver accepts ranges for that entry over 0x4000. So during this allocation: s->pagetable = qem

[Qemu-devel] [PATCH v3 2/2] block: qemu-iotests - add check for multiplication overflow in vpc

2015-07-24 Thread Jeff Cody
This checks that VPC is able to successfully fail (without segfault) on an image file with a max_table_entries that exceeds 0x4000. This table entry is within the valid range for VPC (although too large for this sample image). Signed-off-by: Jeff Cody --- tests/qemu-iotests/135

[Qemu-devel] [PATCH v3 0/2] block: vpc - prevent overflow

2015-07-24 Thread Jeff Cody
Changes: v3: check for INT_MAX / 4 as well, and use ROUND_UP (Thanks Max) v2 now also checks that Max Table Entries is < SIZE_MAX / 4 (Thanks Stefan) This series fixes a bug found by Richard Jones. When we allocate the pagetable based on max_table_entries, we multiply the max table entry value

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

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 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] [PULL v3 00/12] Final changes for 2.4-rc0

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 16:19, Daniel P. Berrange wrote: >> > Right... We need to introduce CONFIG_CRYPTO and use it in >> > tests/Makefile too. > Except it was a goal of this work that we do not have such config > parameters leak outside to callers. CONFIG_CRYPTO would disable all of crypto/ if neither

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

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

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 s

Re: [Qemu-devel] [Spice-devel] [PATCH] [RFC] LZ4 compression option for SPICE

2015-07-24 Thread Fabio Fantoni
Il 27/01/2015 09:26, Markus Armbruster ha scritto: > Eric Blake writes: > >> On 01/26/2015 01:48 AM, Javier Celaya wrote: >>> Sorry, I forgot to patch the command-line help. Hope it helps. >>> > Recently, SPICE included the lz4 compression algorithm. This patch adds > a command line option

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

2015-07-24 Thread Paolo Bonzini
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 be requiring > the user to scrape up a static lib of it to keep th

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

2015-07-24 Thread Sandmann
Great, thanks for the information. I was just about to send the patch to the mailing list, but this seems to unnecessary now. -- 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 qem

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

2015-07-24 Thread Paolo Bonzini
On 24/07/2015 15:48, Daniel P. Berrange 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 be requiring > > the user to scrape up a static lib of

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

[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

  1   2   >