Re: [Qemu-devel] [PATCH v5 10/11] spapr-vfio: add spapr-pci-vfio-host-bridge to support vfio

2014-03-31 Thread Alexey Kardashevskiy
On 04/01/2014 07:09 AM, Alex Williamson wrote: > On Fri, 2014-03-28 at 17:01 +1100, Alexey Kardashevskiy wrote: >> On 03/20/2014 06:57 AM, Alex Williamson wrote: >>> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: The patch adds a spapr-pci-vfio-host-bridge device type whic

Re: [Qemu-devel] [PATCH v2] input: mouse_set should check input device type.

2014-03-31 Thread Gerd Hoffmann
On Mo, 2014-03-31 at 23:09 +0100, Hani Benhabiles wrote: > Otherwise, the index of an input device like a usb-kbd is silently > accepted. > > (qemu) info mice > Mouse #2: QEMU PS/2 Mouse > * Mouse #3: QEMU HID Mouse > (qemu) mouse_set 1 > (qemu) info mice > Mouse #2: QEMU PS/2 Mouse > * Mouse

Re: [Qemu-devel] [PATCH v4 24/30] usb: sanity check setup_index+setup_len in post_load

2014-03-31 Thread Gerd Hoffmann
> > +if (dev->setup_index >= sizeof(dev->data_buf) || > > +dev->setup_len >= sizeof(dev->data_buf)) { > > +return -EINVAL; > > +} > > return 0; > > } > > (2) Shouldn't we be checking for setup_index and setup_len > being negative as well? Oops, they are signed, so y

Re: [Qemu-devel] [PATCH v6] e1000: add interrupt mitigation support

2014-03-31 Thread Alexey Kardashevskiy
On 03/31/2014 06:52 PM, Alexey Kardashevskiy wrote: > On Sat, Aug 3, 2013 at 2:30 AM, Vincenzo Maffione wrote: > >> This patch partially implements the e1000 interrupt mitigation mechanisms. >> Using a single QEMUTimer, it emulates the ITR register (which is the newer >> mitigation register, recom

Re: [Qemu-devel] When are register values committed to CPUARMState

2014-03-31 Thread Gaurav Sharma
Seems, I am bit confused. So if i have to dump the target cpu registers, where would be the corresponding code to look into On Tue, Apr 1, 2014 at 12:47 AM, Peter Maydell wrote: > [put qemu-devel back on CC] > On 31 March 2014 20:13, Gaurav Sharma wrote: > > On Mon, Mar 31, 2014 at 11:35 PM, Pe

[Qemu-devel] [PATCH for-2.0 v1 1/1] timer: cadence_ttc: Fix match register write logic

2014-03-31 Thread Peter Crosthwaite
This switch logic should not fall through. Fix. Signed-off-by: Peter Crosthwaite --- Spotted by Coverity (via PMM) hw/timer/cadence_ttc.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/timer/cadence_ttc.c b/hw/timer/cadence_ttc.c index a279bce..28cb328 100644 --- a/hw/timer/cadence_tt

Re: [Qemu-devel] [PATCH v5 09/37] target-arm: Fix VFP enables for AArch32 EL0 under AArch64 EL1

2014-03-31 Thread Peter Crosthwaite
On Sat, Mar 29, 2014 at 2:09 AM, Peter Maydell wrote: > The current A32/T32 decoder bases its "is VFP/Neon enabled?" check > on the FPSCR.EN bit. This is correct if EL1 is AArch32, but for > an AArch64 EL1 the logic is different: it must act as if FPSCR.EN > is always set. Instead, trapping must h

Re: [Qemu-devel] [PATCH v5 08/37] target-arm: A64: Add assertion that FP access was checked

2014-03-31 Thread Peter Crosthwaite
On Sat, Mar 29, 2014 at 2:09 AM, Peter Maydell wrote: > Because unallocated encodings generate different exception syndrome > information from traps due to FP being disabled, we can't do a single > "is fp access disabled" check at a high level in the decode tree. > To help in catching bugs where t

Re: [Qemu-devel] [PATCH v5 06/37] target-arm: Provide syndrome information for MMU faults

2014-03-31 Thread Peter Crosthwaite
On Sat, Mar 29, 2014 at 2:09 AM, Peter Maydell wrote: > From: Rob Herring > > Set up the required syndrome information when we detect an MMU fault. > > Signed-off-by: Rob Herring > [PMM: split out from exception handling patch, tweaked to bring > in line with how we create other kinds of syndro

Re: [Qemu-devel] [PATCH] Fix for qemu-img info to supply FORMAT values for SPARSE extents

2014-03-31 Thread Fam Zheng
On Mon, 03/31 12:05, Shwetha Mathangi Chandra Choodamani wrote: > This patch fixes the qemu-img info bug to return the right format of an > extent. Changes applicable to both VMDK3 and VMDK4 type headers. > Signed-off-by: Shwetha Mathangi Chandra Choodamani > > --- > block/vmdk.c | 42 +++

Re: [Qemu-devel] [PATCH] rdma: Fix block during rdma migration

2014-03-31 Thread Gonglei (Arei)
> > If the networking break or there's something wrong with rdma > > device(ib0 with no IP) during rdma migration, the main_loop of > > qemu will be blocked in rdma_destroy_id. I add rdma_ack_cm_event > > to fix this bug. > > > > Signed-off-by: Mo Yuxiang > > Signed-off-by: Gonglei > > --- > >

Re: [Qemu-devel] Massive read only kvm guests when backing file was missing

2014-03-31 Thread Alejandro Comisario
Thanks Stefan and thanks Michael also. That situation regarding the IRC was very special, since i didnt wanted to tell Michael "hey, everyone in the mailing list got it and im here chatting with you and you didn't" so i assumed the IRC was 9 times more pro than the mailing list so i de

Re: [Qemu-devel] [PATCH] rdma: Fix block during rdma migration

2014-03-31 Thread Michael R. Hines
On 03/29/2014 03:39 PM, arei.gong...@huawei.com wrote: From: Mo Yuxiang If the networking break or there's something wrong with rdma device(ib0 with no IP) during rdma migration, the main_loop of qemu will be blocked in rdma_destroy_id. I add rdma_ack_cm_event to fix this bug. Signed-off-by: M

Re: [Qemu-devel] [PATCH trival] vl.c: clean up code

2014-03-31 Thread Chen Gang
On 03/31/2014 11:49 PM, Markus Armbruster wrote: > Chen Gang writes: > >> in get_boot_device() >> >> - remove 'res' to simplify code >> >> in main(): >> >> - remove useless 'continue'. >> >> - in main switch(): >> >>- remove or adjust all useless 'break'. >> >>- remove useless '{' and

Re: [Qemu-devel] [PATCH] vl.c: use 'break' instead of 'continue' in configure_accelerator()

2014-03-31 Thread Chen Gang
On 03/31/2014 09:33 PM, Peter Maydell wrote: > On 31 March 2014 14:26, Chen Gang wrote: >> Next, when I send trivial patches, I will only send to qemu-trivial (not >> send/cc to qemu-devel again), that will be more efficient. :-) > > No, please always send to qemu-devel; just also cc qemu-triv

[Qemu-devel] [Bug 1299858] Re: qemu all apps crash on OS X 10.6.8

2014-03-31 Thread Peter Maydell
My test system is OS X 10.8.5 built with clang "Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)", and QEMU works fine there, which suggests a problem either with that version of GCC or that version of MacOSX. You might try building with clang rather than gcc; otherwise since I don't

[Qemu-devel] [PATCH] net: Report error when device / hub combo is not found.

2014-03-31 Thread Hani Benhabiles
Also convert nearby monitor_printf() call to error_report(). Signed-off-by: Hani Benhabiles --- net/net.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/net/net.c b/net/net.c index e3ef1e4..d319f49 100644 --- a/net/net.c +++ b/net/net.c @@ -952,10 +952,12 @@ void net_host

[Qemu-devel] [PULL for-2.0 15/16] tmp105-test: Add a second sensor and test that one

2014-03-31 Thread Andreas Färber
From: Paolo Bonzini This will make it easier to reach the device under test via QOM. Signed-off-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/tmp105-test.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/tmp105-test.c b/tests/tmp105-test

[Qemu-devel] [PULL for-2.0 02/16] qtest: Keep list of qtest instances for SIGABRT handler

2014-03-31 Thread Andreas Färber
From: Stefan Hajnoczi Keep track of active qtest instances so we can kill them when the test aborts. This ensures no QEMU processes are left running after test failure. Signed-off-by: Stefan Hajnoczi Reviewed-by: Marcel Apfelbaum Signed-off-by: Andreas Färber --- tests/libqtest.c | 47 +

[Qemu-devel] [PULL for-2.0 14/16] tmp105-test: Wrap simple building blocks for testing

2014-03-31 Thread Andreas Färber
From: Paolo Bonzini The next patches will add more reads and writes. Add a simple testing API for this. Signed-off-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/tmp105-test.c | 54 +++-- 1 file changed, 36 insertions(+), 18 deletion

[Qemu-devel] [PULL for-2.0 10/16] qtest: Factor out qtest_qmp_receive()

2014-03-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- tests/libqtest.c | 15 ++- tests/libqtest.h | 18 ++ 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/tests/libqtest.c b/tests/libqtest.c index d9e3a33..8155695 100644 --- a/tests/libqtest.c +++ b/tests/libqtest.c @@ -34

[Qemu-devel] [V2 PATCH 3/9] target-ppc: Define Endian-Correct Accessors for VSR Field Acess

2014-03-31 Thread Tom Musta
This change defines accessors for VSR doubleword and word fields that are correct from a host Endian perspective. This allows code to use the Power ISA indexing numbers in code. For example, the xscvdpsxws instruction has a target VSR that looks like this: 0 32 64

Re: [Qemu-devel] [V2 PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero

2014-03-31 Thread Peter Maydell
On 31 March 2014 22:03, Tom Musta wrote: > This change adds the float32_to_uint64_round_to_zero function to the softfloat > library. This function fills out the complement of float32 to INT > round-to-zero > conversion rountines, where INT is {int32_t, uint32_t, int64_t, uint64_t}. > > This cont

[Qemu-devel] [PULL for-2.0 00/16] QOM devices patch queue 2014-03-31

2014-03-31 Thread Andreas Färber
Hello Peter, This is my QOM (devices) patch queue. Please pull. Regards, Andreas Cc: Peter Maydell Cc: Anthony Liguori Cc: Stefan Hajnoczi Cc: Stefan Weil Cc: Keith Busch Cc: Paolo Bonzini The following changes since commit 58b590148ca1b19f64f533d40e32b5acce5c21e7: pci: Fix clearing I

Re: [Qemu-devel] [PATCH] input: mouse_set should check input device type.

2014-03-31 Thread Hani Benhabiles
On Mon, Mar 31, 2014 at 02:45:49PM +0200, Markus Armbruster wrote: > Gerd Hoffmann writes: > > >> +if (!(s->handler->mask & (INPUT_EVENT_MASK_REL | > >> + INPUT_EVENT_MASK_ABS))) { > >> +monitor_printf(mon, "Input device '%s' is not a mouse", >

[Qemu-devel] [PATCH v2] input: mouse_set should check input device type.

2014-03-31 Thread Hani Benhabiles
Otherwise, the index of an input device like a usb-kbd is silently accepted. (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse (qemu) mouse_set 1 (qemu) info mice Mouse #2: QEMU PS/2 Mouse * Mouse #3: QEMU HID Mouse Also replace monitor_printf() call in do_mouse_set() with

[Qemu-devel] [V2 PATCH 9/9] target-ppc: Correct VSX Integer to FP Conversion

2014-03-31 Thread Tom Musta
This patch corrects the VSX integer to floating point conversion instructions by using the endian correct accessors. The auxiliary "j" index used by the existing macros is now obsolete and is removed. The JOFFSET preprocessor macro is also obsolete and removed. Signed-off-by: Tom Musta Tested-b

Re: [Qemu-devel] [PATCH for-2.0 0/7] SMBus and tmp105 fixes

2014-03-31 Thread Andreas Färber
Hi, Am 31.03.2014 18:26, schrieb Paolo Bonzini: > This is a resend of the I2C patches I posted a while ago. > Patches 1-3 are just a rebase. > > Patch 4 is the same as before, patches 5-7 make the tmp105 > testcase more complete in order to test that change. > > Paolo Bonzini (7): > smbus: all

[Qemu-devel] [PULL for-2.0 16/16] tmp105-test: Test QOM property and precision

2014-03-31 Thread Andreas Färber
From: Paolo Bonzini This adds a regression test for commit efdf6a56a7c73753dd135ed085a223a119b5d805 (tmp105: Read temperature in milli-celsius). Signed-off-by: Paolo Bonzini Signed-off-by: Andreas Färber --- tests/tmp105-test.c | 79 +++-- 1 fil

[Qemu-devel] [PULL for-2.0 06/16] nvme: Permit zero-length block devices

2014-03-31 Thread Andreas Färber
It may not be sensible for normal use cases, but it allows to use /dev/null in QTest. Acked-by: Keith Busch Signed-off-by: Andreas Färber --- hw/block/nvme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 2882ffe..5fd8f89 100644 -

[Qemu-devel] [PULL for-2.0 04/16] tests: Skip POSIX-only tests on Windows

2014-03-31 Thread Andreas Färber
From: Stefan Hajnoczi test-rfifolock and test-vmstate only build on POSIX hosts. Exclude them if building for Windows. Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefan Weil Signed-off-by: Andreas Färber --- tests/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --g

Re: [Qemu-devel] [PATCH for-2.0 3/7] pm_smbus: correctly report unclaimed cycles

2014-03-31 Thread Andreas Färber
Am 31.03.2014 18:26, schrieb Paolo Bonzini: > Without this patch, i2cdetect will report all addresses as present. > With it, only 0x50..0x57 are present. > > Before: > > 0 1 2 3 4 5 6 7 8 9 a b c d e f > 00: 03 04 05 06 07 08 09 0a 0b 0c 0d 0e 0f > 10: 10

[Qemu-devel] [V2 PATCH 8/9] target-ppc: Correct VSX FP to Integer Conversion

2014-03-31 Thread Tom Musta
This patch corrects the VSX floating point to integer conversion instructions by using the endian correct accessors. The auxiliary "j" index used by the existing macros is now obsolete and is removed. Signed-off-by: Tom Musta Tested-by: Tom Musta --- target-ppc/fpu_helper.c | 36

Re: [Qemu-devel] [Bug 1278977] Re: qemu-system-sparc64 crash when initializing disk

2014-03-31 Thread Artyom Tarasenko
Hi Waldemar, can you try launching QEMU with -monitor telnet::4442,server,nowait (or any other port), and check if the monitor is available when the suspected deadlock occurs? If connecting works, try info block and blockstats, this may give some further clues, whether the hang happens in host or

Re: [Qemu-devel] [PATCH for-2.0 2/7] smbus: return -1 if nothing found at the given address

2014-03-31 Thread Andreas Färber
Am 31.03.2014 18:26, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > hw/i2c/smbus.c | 62 > +++--- > include/hw/i2c/smbus.h | 12 +- > 2 files changed, 50 insertions(+), 24 deletions(-) > > diff --git a/hw/i2c/smbus.c b/h

Re: [Qemu-devel] [PATCH v4 13/30] stellaris_enet: avoid buffer overrun on incoming migration

2014-03-31 Thread Peter Maydell
On 31 March 2014 21:49, Michael S. Tsirkin wrote: > On Mon, Mar 31, 2014 at 06:11:22PM +0100, Dr. David Alan Gilbert wrote: >> * Michael S. Tsirkin (m...@redhat.com) wrote: >> > CVE-2013-4532 >> > >> > s->next_packet is read from wire as an index into s->rx[]. If >> > s->next_packet exceeds the le

[Qemu-devel] [PULL for-2.0 12/16] tests: Add i82801b11 qtest

2014-03-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- tests/Makefile | 3 +++ tests/i82801b11-test.c | 33 + 2 files changed, 36 insertions(+) create mode 100644 tests/i82801b11-test.c diff --git a/tests/Makefile b/tests/Makefile index e4f7c07..6086f68 100644 --- a/tests/Ma

[Qemu-devel] [PULL for-2.0 03/16] tests: Remove unsupported tests for MinGW

2014-03-31 Thread Andreas Färber
From: Stefan Weil test_timer_schedule and test_source_timer_schedule don't compile for MinGW because some functions are not implemented for MinGW (qemu_pipe, aio_set_fd_handler). Signed-off-by: Stefan Weil Signed-off-by: Stefan Hajnoczi Signed-off-by: Andreas Färber --- tests/test-aio.c | 16

Re: [Qemu-devel] [PATCH for-2.0 1/7] smbus: allow returning an error from reads

2014-03-31 Thread Andreas Färber
Am 31.03.2014 18:26, schrieb Paolo Bonzini: > Signed-off-by: Paolo Bonzini > --- > hw/i2c/smbus.c | 6 +++--- > include/hw/i2c/smbus.h | 6 +++--- > 2 files changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Andreas Färber Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409

[Qemu-devel] [PULL for-2.0 09/16] tests: Add pvpanic qtest

2014-03-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- tests/Makefile | 3 +++ tests/pvpanic-test.c | 38 ++ 2 files changed, 41 insertions(+) create mode 100644 tests/pvpanic-test.c diff --git a/tests/Makefile b/tests/Makefile index 843429b..e4f7c07 100644 --- a/tests/Mak

[Qemu-devel] [PULL for-2.0 13/16] tmp105: Read temperature in milli-celsius

2014-03-31 Thread Andreas Färber
From: Paolo Bonzini Right now, the temperature property must be written in milli-celsius, but it reads back the value in 8.8 fixed point. Fix this by letting the property read back the original value (possibly rounded). Also simplify the code that does the conversion. Before: (QEMU) qom-s

[Qemu-devel] [PULL for-2.0 11/16] pvpanic-test: Assert pause event

2014-03-31 Thread Andreas Färber
Signed-off-by: Andreas Färber --- tests/pvpanic-test.c | 9 + 1 file changed, 9 insertions(+) diff --git a/tests/pvpanic-test.c b/tests/pvpanic-test.c index 7bb4d06..a7ad6b3 100644 --- a/tests/pvpanic-test.c +++ b/tests/pvpanic-test.c @@ -15,11 +15,20 @@ static void test_panic(void) {

[Qemu-devel] [PULL for-2.0 05/16] tests: Correctly skip qtest on non-POSIX hosts

2014-03-31 Thread Andreas Färber
From: Stefan Hajnoczi qtest test cases only work on POSIX hosts. The following line only defines dependencies for qtest binaries on POSIX hosts: check-qtest-$(CONFIG_POSIX)=$(foreach TARGET,$(TARGETS),$(check-qtest-$(TARGET)-y)) But the QTEST_TARGETS definition earlier in the Makefile fails

[Qemu-devel] [PULL for-2.0 01/16] Revert "qtest: Fix crash if SIGABRT during qtest_init()"

2014-03-31 Thread Andreas Färber
From: Stefan Hajnoczi It turns out there are test cases that use multiple libqtest instances. We cannot use a global qtest instance in the SIGABRT handler. This reverts commit cb201b4872f16dfbce63f8648b2584631e2e965f. Signed-off-by: Stefan Hajnoczi Reviewed-by: Marcel Apfelbaum Signed-off-by:

[Qemu-devel] [PULL for-2.0 08/16] tests: Add virtio-9p qtest

2014-03-31 Thread Andreas Färber
Make it conditional to 9p availability. Create a temporary directory to share. Signed-off-by: Andreas Färber --- MAINTAINERS| 1 + tests/Makefile | 6 ++ tests/virtio-9p-test.c | 46 ++ 3 files changed, 53 insertions(+) creat

[Qemu-devel] [PULL for-2.0 07/16] tests: Add nvme qtest

2014-03-31 Thread Andreas Färber
Acked-by: Keith Busch Signed-off-by: Andreas Färber --- MAINTAINERS | 1 + tests/Makefile| 3 +++ tests/nvme-test.c | 34 ++ 3 files changed, 38 insertions(+) create mode 100644 tests/nvme-test.c diff --git a/MAINTAINERS b/MAINTAINERS index 7d17f83..

[Qemu-devel] [V2 PATCH 0/9] target-ppc: VSX Bug Fixes

2014-03-31 Thread Tom Musta
This patch series addresses bugs in the recently added VSX instructions. Two general defects are fixed: (1) The VSX Convert to Integer instructions truncate the source floating point number to an integer value and hence should use a round-to-zero rounding algorithm. The existing i

[Qemu-devel] [V2 PATCH 5/9] target-ppc: Correct Simple VSR LE Host Inversions

2014-03-31 Thread Tom Musta
A common pattern in the VSX helper code macros is the use of "x.fld[i]" where "x" is a VSR and "fld" is an argument to a macro ("f64" or "f32" is passed). This is not always correct on LE hosts. This change addresses all instances of this pattern to be "x.fld" where "fld" is: - "VsrD(0)" for s

[Qemu-devel] [V2 PATCH 7/9] target-ppc: Correct VSX FP to FP Conversions

2014-03-31 Thread Tom Musta
This change corrects the VSX double precision to single precision and single precision to double precisions conversion routines. The endian correct accessors are now used. The auxiliary "j" index is no longer necessary and is eliminated. Signed-off-by: Tom Musta Tested-by: Tom Musta --- targe

[Qemu-devel] [V2 PATCH 6/9] target-ppc: Correct VSX Scalar Compares

2014-03-31 Thread Tom Musta
This change fixes the VSX scalar compare instructions. The existing usage of "x.f64[0]" is changed to "x.VsrD(0)". Signed-off-by: Tom Musta Tested-by: Tom Musta --- target-ppc/fpu_helper.c | 13 +++-- 1 files changed, 7 insertions(+), 6 deletions(-) diff --git a/target-ppc/fpu_help

[Qemu-devel] [V2 PATCH 4/9] target-ppc: Correct LE Host Inversion of Lower VSRs

2014-03-31 Thread Tom Musta
This change properly orders the doublewords of the VSRs 0-31. Because these registers are constructed from separate doublewords, they must be inverted on Little Endian hosts. The inversion is performed both when the VSR is read and when it is written. Signed-off-by: Tom Musta Tested-by: Tom Mus

[Qemu-devel] [V2 PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero

2014-03-31 Thread Tom Musta
This change adds the float32_to_uint64_round_to_zero function to the softfloat library. This function fills out the complement of float32 to INT round-to-zero conversion rountines, where INT is {int32_t, uint32_t, int64_t, uint64_t}. This contribution can be licensed under either the softfloat-2a

[Qemu-devel] [V2 PATCH 2/9] target-ppc: Bug: VSX Convert to Integer Should Truncate

2014-03-31 Thread Tom Musta
The various VSX Convert to Integer instructions should truncate the floating point number to an integer value, which is equivalent to a round-to-zero rounding mode. The existing VSX floating point to integer conversion helpers are erroneously using the rounding mode set int the PowerPC Floating Po

Re: [Qemu-devel] [PATCH v2 1/2] xbzrle: don't check the value in the vm ram repeatedly

2014-03-31 Thread Paolo Bonzini
Il 31/03/2014 16:00, Dr. David Alan Gilbert ha scritto: * arei.gong...@huawei.com (arei.gong...@huawei.com) wrote: From: ChenLiang xbzrle_encode_buffer checks the value in the vm ram repeatedly. It is risk if runs xbzrle_encode_buffer on changing data. And it is not necessary. Reported-by: Dr

Re: [Qemu-devel] [PATCH for-2.0 6/7] tmp105-test: add a second sensor and test that one

2014-03-31 Thread Andreas Färber
Am 31.03.2014 18:26, schrieb Paolo Bonzini: > This will make it easier to reach the device under test via QOM. > > Signed-off-by: Paolo Bonzini > --- > tests/tmp105-test.c | 17 + > 5 files changed, 13 insertions(+), 12 deletions(-) > > diff --git a/tests/tmp105-test.c b/tests/t

Re: [Qemu-devel] [PATCH for-2.0] configure: add option to disable -fstack-protector flags

2014-03-31 Thread Peter Maydell
On 28 March 2014 16:19, Paolo Bonzini wrote: > From: Steven Noonan > > The -fstack-protector flag family is useful for ensuring safety and for > debugging, but has a performance impact. Here are some boot time comparisons > of > the various versions of -fstack-protector using qemu-system-arm on

Re: [Qemu-devel] [PATCH v4 13/30] stellaris_enet: avoid buffer overrun on incoming migration

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 06:11:22PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > CVE-2013-4532 > > > > s->next_packet is read from wire as an index into s->rx[]. If > > s->next_packet exceeds the length of s->rx[], the buffer can be > > subsequently overr

Re: [Qemu-devel] [PATCH v3 0/3] tests: mingw32 make check fixes

2014-03-31 Thread Andreas Färber
Am 31.03.2014 10:04, schrieb Andreas Färber: > Am 31.03.2014 09:26, schrieb Stefan Hajnoczi: >> On Fri, Mar 28, 2014 at 10:55:51AM +0100, Stefan Hajnoczi wrote: >>> v3: >>> * Add Stefan Weil's test-aio fix patch [Stefan Weil] >>> * Patch 3 commit description s/The causes targets/This causes make

Re: [Qemu-devel] E820 (Re: [v4 PATCH 00/12] SMBIOS: build full tables in QEMU)

2014-03-31 Thread Gabriel L. Somlo
On Wed, Mar 26, 2014 at 06:36:10PM -0400, Kevin O'Connor wrote: > On Wed, Mar 26, 2014 at 03:58:50PM -0400, Gabriel L. Somlo wrote: > > - SeaBIOS is still in charge of providing the smbios_entry_point > > structure, and it's unlikely we can reasonably expect it to > > bump the version to 2.5 (n

Re: [Qemu-devel] [PATCH v6 4/4] qapi: Add tests for the "include" directive

2014-03-31 Thread Eric Blake
On 03/31/2014 01:16 PM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > tests/Makefile|4 +++- > tests/qapi-schema/include-cycle-b.json|1 + ... > tests/qapi-schema/include-simple.out |3 +++ Hmm, no tests of cross-directory inclusion

Re: [Qemu-devel] [PATCH v4 28/30] vmxnet3: validate interrupt indices read on migration

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 05:33:44PM +0100, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > From: Dmitry Fleytman > > > > CVE-2013-4544 > > > > Signed-off-by: Dmitry Fleytman > > Reported-by: Michael S. Tsirkin > > Signed-off-by: Michael S. Tsirkin > > --- > >

Re: [Qemu-devel] [PATCH v5 10/11] spapr-vfio: add spapr-pci-vfio-host-bridge to support vfio

2014-03-31 Thread Alex Williamson
On Fri, 2014-03-28 at 17:01 +1100, Alexey Kardashevskiy wrote: > On 03/20/2014 06:57 AM, Alex Williamson wrote: > > On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > >> The patch adds a spapr-pci-vfio-host-bridge device type > >> which is a PCI Host Bridge with VFIO support. The new

Re: [Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-03-31 Thread Eric Blake
On 03/31/2014 01:16 PM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > docs/qapi-code-gen.txt | 11 +++ > scripts/qapi.py| 39 ++- > 2 files changed, 45 insertions(+), 5 deletions(-) I would consider squashing 3 and 4 togethe

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-31 Thread Alex Williamson
On Fri, 2014-03-28 at 16:12 +1100, Alexey Kardashevskiy wrote: > On 03/20/2014 04:25 PM, David Gibson wrote: > > On Wed, Mar 19, 2014 at 01:57:41PM -0600, Alex Williamson wrote: > >> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > >>> From: David Gibson > > [snip] > >>> +if (!

Re: [Qemu-devel] [PATCH v2] target-ppc: improve "info registers" by printing SPRs

2014-03-31 Thread Stuart Brady
On Mon, Mar 24, 2014 at 05:24:35PM +1100, Alexey Kardashevskiy wrote: > On 03/23/2014 01:43 AM, Stuart Brady wrote: > > This would leave the output without a trailing newline if the last spr > > doesn't have a name registered. Is it necessary to handle unnamed sprs > > at all (maybe add an assert

Re: [Qemu-devel] KVM call agenda for 2014-04-01

2014-03-31 Thread Michael Roth
Quoting Andreas Färber (2014-03-31 09:46:45) > Am 31.03.2014 16:32, schrieb Peter Maydell: > > On 31 March 2014 15:28, Paolo Bonzini wrote: > >> I think it would be a good idea to separate the committer and release > >> manager roles. Peter is providing the community with a wonderful service, > >

Re: [Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-31 Thread Alex Williamson
On Fri, 2014-03-28 at 15:49 +1100, Alexey Kardashevskiy wrote: > On 03/22/2014 01:17 AM, Alex Williamson wrote: > > On Fri, 2014-03-21 at 18:59 +1100, Alexey Kardashevskiy wrote: > >> On 03/20/2014 06:57 AM, Alex Williamson wrote: > >>> On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote:

Re: [Qemu-devel] [PATCH v6 2/4] qapi: Use an explicit input file

2014-03-31 Thread Eric Blake
On 03/31/2014 01:16 PM, Lluís Vilanova wrote: > Use an explicit input file on the command-line instead of reading from > standard input > > Signed-off-by: Lluís Vilanova > --- > +++ b/Makefile > @@ -238,33 +238,33 @@ qapi-py = $(SRC_PATH)/scripts/qapi.py > $(SRC_PATH)/scripts/ordereddict.py >

Re: [Qemu-devel] [PATCH] savevm: Ignore minimum_version_id_old if there is no load_state_old

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 05:37:06PM +0100, Peter Maydell wrote: > At the moment we require vmstate definitions to set minimum_version_id_old > to the same value as minimum_version_id if they do not provide a > load_state_old handler. Since the load_state_old functionality is > required only for a ha

Re: [Qemu-devel] [PATCH v4 04/30] virtio-net: fix buffer overflow on invalid state load

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 07:21:30PM +0200, Laszlo Ersek wrote: > On 03/31/14 16:16, Michael S. Tsirkin wrote: > > CVE-2013-4148 QEMU 1.0 integer conversion in > > virtio_net_load()@hw/net/virtio-net.c > > > > Deals with loading a corrupted savevm image. > > > >> n->mac_table.in_use = qemu_

Re: [Qemu-devel] [PATCH v6 1/4] qapi: [trivial] Break long command lines

2014-03-31 Thread Eric Blake
On 03/31/2014 01:16 PM, Lluís Vilanova wrote: > Signed-off-by: Lluís Vilanova > --- > Makefile | 24 ++-- > tests/Makefile | 12 +--- > 2 files changed, 27 insertions(+), 9 deletions(-) Reviewed-by: Eric Blake -- Eric Blake eblake redhat com+1-919-30

[Qemu-devel] [PATCH v6 3/4] qapi: Add a primitive to include other files from a QAPI schema file

2014-03-31 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- docs/qapi-code-gen.txt | 11 +++ scripts/qapi.py| 39 ++- 2 files changed, 45 insertions(+), 5 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index 824f6e5..70b4eeb 100644 --- a/d

Re: [Qemu-devel] [PATCH for-2.0] pci: Fix clearing IRQs on reset

2014-03-31 Thread Peter Maydell
On 31 March 2014 19:53, Michael S. Tsirkin wrote: > On Mon, Mar 31, 2014 at 02:31:44PM -0400, Cole Robinson wrote: >> irq_state is cleared before calling pci_device_deassert_intx, but the >> latter misbehaves if the former isn't accurate. In this case, any raised >> IRQs are not cleared, which hit

Re: [Qemu-devel] When are register values committed to CPUARMState

2014-03-31 Thread Peter Maydell
[put qemu-devel back on CC] On 31 March 2014 20:13, Gaurav Sharma wrote: > On Mon, Mar 31, 2014 at 11:35 PM, Peter Maydell > wrote: >> On 31 March 2014 18:59, Gaurav Sharma wrote: >> > I want to know, when are the register values committed to CPUARMState >> > structure ? >> >> When they need to

[Qemu-devel] [PATCH v6 1/4] qapi: [trivial] Break long command lines

2014-03-31 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- Makefile | 24 ++-- tests/Makefile | 12 +--- 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index ec74039..84345ee 100644 --- a/Makefile +++ b/Makefile @@ -237,23 +237,35 @@ qapi-py = $(S

[Qemu-devel] [PATCH v6 4/4] qapi: Add tests for the "include" directive

2014-03-31 Thread Lluís Vilanova
Signed-off-by: Lluís Vilanova --- tests/Makefile|4 +++- tests/qapi-schema/include-cycle-b.json|1 + tests/qapi-schema/include-cycle-c.json|1 + tests/qapi-schema/include-cycle.err |1 + tests/qapi-schema/include-cycle.exit |1 +

[Qemu-devel] [PATCH v6 2/4] qapi: Use an explicit input file

2014-03-31 Thread Lluís Vilanova
Use an explicit input file on the command-line instead of reading from standard input Signed-off-by: Lluís Vilanova --- Makefile | 12 ++-- docs/qapi-code-gen.txt |4 ++-- scripts/qapi-commands.py

[Qemu-devel] [PATCH v6 0/4] qapi: Allow modularization of QAPI schema files

2014-03-31 Thread Lluís Vilanova
Adds an include primitive to the syntax of QAPI schema files, allowing these to be modularized into multiple per-topic files in the future. Signed-off-by: Lluís Vilanova --- Changes in v6: * Split changes for long-line breaking in makefiles. * Put documentation on a separate section; reference

Re: [Qemu-devel] [PATCH v5 05/11] vfio: Introduce VFIO address spaces

2014-03-31 Thread Alex Williamson
On Fri, 2014-03-28 at 14:42 +1100, Alexey Kardashevskiy wrote: > On 03/20/2014 06:57 AM, Alex Williamson wrote: > > On Wed, 2014-03-12 at 16:52 +1100, Alexey Kardashevskiy wrote: > >> From: David Gibson > >> > >> The only model so far supported for VFIO passthrough devices is the model > >> usuall

[Qemu-devel] [PATCH] configure: Fix indentation of help for --enable/disable-debug-info

2014-03-31 Thread Peter Maydell
The help text for the --enable-debug-info and --disable-debug-info command line options was misindented: delete the stray extra space and bring it in to line with everything else. Signed-off-by: Peter Maydell --- configure | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/c

Re: [Qemu-devel] [PATCH for-2.0] pci: Fix clearing IRQs on reset

2014-03-31 Thread Michael S. Tsirkin
On Mon, Mar 31, 2014 at 02:31:44PM -0400, Cole Robinson wrote: > irq_state is cleared before calling pci_device_deassert_intx, but the > latter misbehaves if the former isn't accurate. In this case, any raised > IRQs are not cleared, which hits an assertion in pcibus_reset: > > qemu-system-x86_64:

Re: [Qemu-devel] [PULL for-2.0 0/2] QOM CPUState patch queue 2014-03-31

2014-03-31 Thread Peter Maydell
On 31 March 2014 18:37, Andreas Färber wrote: > Hello Peter, > > This is my current QOM CPU patch queue. Please pull. > > Regards, > Andreas > > Cc: Peter Maydell > Cc: Anthony Liguori > > The following changes since commit 8648fcd52a9bcc2aa415cbe87b7c636e545acb38: > > make-release: Record Sea

Re: [Qemu-devel] [PATCH for-2.0] pci: Fix clearing IRQs on reset

2014-03-31 Thread Paolo Bonzini
Il 31/03/2014 20:31, Cole Robinson ha scritto: irq_state is cleared before calling pci_device_deassert_intx, but the latter misbehaves if the former isn't accurate. In this case, any raised IRQs are not cleared, which hits an assertion in pcibus_reset: qemu-system-x86_64: hw/pci/pci.c:250: pcibu

[Qemu-devel] [PATCH for-2.0] pci: Fix clearing IRQs on reset

2014-03-31 Thread Cole Robinson
irq_state is cleared before calling pci_device_deassert_intx, but the latter misbehaves if the former isn't accurate. In this case, any raised IRQs are not cleared, which hits an assertion in pcibus_reset: qemu-system-x86_64: hw/pci/pci.c:250: pcibus_reset: Assertion `bus->irq_count[i] == 0' faile

Re: [Qemu-devel] 2.0 regression: loadvm assertion with ehci + tablet

2014-03-31 Thread Paolo Bonzini
Il 31/03/2014 20:14, Cole Robinson ha scritto: irq_state is cleared before pci_device_deassert_intx. But tries to clear all irqs via pci_irq_handler, but that function will exit without taking any action if the requested irq level matches what we already track in irq_state. Since irq_state is 0,

Re: [Qemu-devel] [PATCHv50/3] qapi: Allow modularization of QAPI schema files

2014-03-31 Thread Lluís Vilanova
Benoît Canet writes: [...] > The selling point of mine is that I can iterate fast on it. > Do you think you will have time to work on yours during the next weeks ? Sure, I can change mine. The suggested changes are quite small. Lluis

Re: [Qemu-devel] 2.0 regression: loadvm assertion with ehci + tablet

2014-03-31 Thread Cole Robinson
On 03/30/2014 06:25 PM, Andreas Färber wrote: > Hi, > > Am 30.03.2014 22:27, schrieb Cole Robinson: >> With git master, loadvm hits an assert failure if using ehci and usb tablet. >> Steps to reproduce: >> >> $ qemu-img create -f qcow2 foo.qcow2 10G >> $ ./x86_64-softmmu/qemu-system-x86_64 \ >>

Re: [Qemu-devel] [PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero

2014-03-31 Thread Peter Maydell
On 31 March 2014 19:07, Tom Musta wrote: > On 3/31/2014 12:48 PM, Peter Maydell wrote: >> So, float64_to_uint64_round_to_zero() works by temporarily >> fiddling with the rounding mode and then calling >> float64_to_uint64(). Is there a reason for doing this >> function like this rather than in the

Re: [Qemu-devel] [PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero

2014-03-31 Thread Tom Musta
On 3/31/2014 12:48 PM, Peter Maydell wrote: > On 26 March 2014 20:45, Tom Musta wrote: >> This change adds the float32_to_uint64_round_to_zero function to the >> softfloat >> library. This function fills out the complement of float32 to INT >> round-to-zero >> conversion rountines, where INT is

Re: [Qemu-devel] When are register values committed to CPUARMState

2014-03-31 Thread Peter Maydell
On 31 March 2014 18:59, Gaurav Sharma wrote: > I am trying to build a register trace for ARM target. > I am trying to just log the register values, for that I added TCG ops to > generate a helper function that dumps the register values in CPUARMState. > This helper function i have called at the en

[Qemu-devel] When are register values committed to CPUARMState

2014-03-31 Thread Gaurav Sharma
I am trying to build a register trace for ARM target. I am trying to just log the register values, for that I added TCG ops to generate a helper function that dumps the register values in CPUARMState. This helper function i have called at the end of disas_arm_state function, so that if enabled i ge

Re: [Qemu-devel] [PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero

2014-03-31 Thread Peter Maydell
On 26 March 2014 20:45, Tom Musta wrote: > This change adds the float32_to_uint64_round_to_zero function to the softfloat > library. This function fills out the complement of float32 to INT > round-to-zero > conversion rountines, where INT is {int32_t, uint32_t, int64_t, uint64_t}. > > This cont

[Qemu-devel] [PULL for-2.0 1/2] target-i386: x86_cpu_get_phys_page_debug(): support 1GB page translation

2014-03-31 Thread Andreas Färber
From: Luiz Capitulino Linux guests, when using more than 4GB of RAM, may end up using 1GB pages to store (kernel) data. When this happens, we're unable to debug a running Linux kernel with GDB: (gdb) p node_data[0]->node_id Cannot access memory at address 0x88013fffd3a0 (gdb) GDB returns th

[Qemu-devel] [PULL for-2.0 2/2] cpu: Avoid QOM casts for CPU()

2014-03-31 Thread Andreas Färber
CPU address spaces touching load and store helpers as well as the movement of (almost) all fields from CPU_COMMON to CPUState have led to a noticeable increase of CPU() usage in "hot" paths for both TCG and KVM. While CPU()'s OBJECT_CHECK() might help detect development errors, i.e. in form of cra

[Qemu-devel] [PULL for-2.0 0/2] QOM CPUState patch queue 2014-03-31

2014-03-31 Thread Andreas Färber
Hello Peter, This is my current QOM CPU patch queue. Please pull. Regards, Andreas Cc: Peter Maydell Cc: Anthony Liguori The following changes since commit 8648fcd52a9bcc2aa415cbe87b7c636e545acb38: make-release: Record SeaBIOS version (2014-03-31 15:02:04 +0100) are available in the git r

Re: [Qemu-devel] [Qemu-ppc] [PATCH 1/9] softfloat: Introduce float32_to_uint64_round_to_zero

2014-03-31 Thread Alexander Graf
On 03/26/2014 09:45 PM, Tom Musta wrote: This change adds the float32_to_uint64_round_to_zero function to the softfloat library. This function fills out the complement of float32 to INT round-to-zero conversion rountines, where INT is {int32_t, uint32_t, int64_t, uint64_t}. This contribution ca

Re: [Qemu-devel] [PATCH v4 19/30] pxa2xx: avoid buffer overrun on incoming migration

2014-03-31 Thread Don Koch
On Mon, 31 Mar 2014 17:17:08 +0300 "Michael S. Tsirkin" wrote: > CVE-2013-4533 > > s->rx_level is read from the wire and used to determine how many bytes > to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the > length of s->rx_fifo[] the buffer can be overrun with arbitrary data >

Re: [Qemu-devel] [PATCH v4 04/30] virtio-net: fix buffer overflow on invalid state load

2014-03-31 Thread Laszlo Ersek
On 03/31/14 16:16, Michael S. Tsirkin wrote: > CVE-2013-4148 QEMU 1.0 integer conversion in > virtio_net_load()@hw/net/virtio-net.c > > Deals with loading a corrupted savevm image. > >> n->mac_table.in_use = qemu_get_be32(f); > > in_use is int so it can get negative when assigned 32bit u

[Qemu-devel] [PATCH for-2.0 7/7] tmp105-test: test QOM property and precision

2014-03-31 Thread Paolo Bonzini
This lets us add a regression test for the first commit in this series. Signed-off-by: Paolo Bonzini --- tests/tmp105-test.c | 79 +++-- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/tests/tmp105-test.c b/tests/tmp105-test.c index

Re: [Qemu-devel] [PATCH qom-cpu for-2.0] cpu: Avoid QOM casts for CPU()

2014-03-31 Thread Andreas Färber
Am 28.03.2014 18:10, schrieb Andreas Färber: > Am 28.03.2014 16:52, schrieb Peter Maydell: >> On 28 March 2014 15:49, Andreas Färber wrote: >>> diff --git a/include/qom/cpu.h b/include/qom/cpu.h >>> index f99885a..0aa1bdc 100644 >>> --- a/include/qom/cpu.h >>> +++ b/include/qom/cpu.h >>> @@ -53,7

  1   2   3   >