[Qemu-devel] [PATCH 14/34] scripts/kvm/kvm_stat: Set sensible no. files rlimit

2015-12-10 Thread Janosch Frank
As num cpus * 1000 is NOT a sensible rlimit, we need to calculate a more accurate rlimit. The number of open files is directly dependent on the cpu count and on the number of trace points per cpu. A additional constant works as a buffer for files that are needed by python or do get opened when

[Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-10 Thread Chen Gang
It passes gcc testsuite. Signed-off-by: Chen Gang --- target-tilegx/helper-fsingle.c | 212 + 1 file changed, 212 insertions(+) create mode 100644 target-tilegx/helper-fsingle.c diff --git a/target-tilegx/helper-fsingle.c

[Qemu-devel] [PATCH v3 1/4] target-tilegx: Add floating point shared functions

2015-12-10 Thread Chen Gang
They are used by fsingle and fdouble helpers. Signed-off-by: Chen Gang --- target-tilegx/helper-fshared.c | 53 ++ 1 file changed, 53 insertions(+) create mode 100644 target-tilegx/helper-fshared.c diff --git

[Qemu-devel] [PATCH 16/34] scripts/kvm/kvm_stat: Make cpu detection a function

2015-12-10 Thread Janosch Frank
The online cpus detection method is in the Stats class but does not use any class variables. Moving it out of the class to the platform detection function makes the Stats class more readable. --- scripts/kvm/kvm_stat | 30 +++--- 1 file changed, 15 insertions(+), 15

[Qemu-devel] [PATCH 28/34] scripts/kvm/kvm_stat: Fix output formatting

2015-12-10 Thread Janosch Frank
The key names in log mode were capped to 10 characters which is not enough for distinguishing between keys. Capping was therefore removed. In batch mode the spacing between keys and values was too narrow and therefore had to be extended to 42. --- scripts/kvm/kvm_stat | 4 ++-- 1 file changed, 2

Re: [Qemu-devel] [PATCH 4/4] hw/s390x: Rename local variables Error *l_err to just err

2015-12-10 Thread Cornelia Huck
On Thu, 10 Dec 2015 18:23:52 +0100 Markus Armbruster wrote: > Let's follow established naming practice here as well. > > Cc: David Hildenbrand > Signed-off-by: Markus Armbruster > --- > hw/s390x/ipl.c | 12 ++-- >

[Qemu-devel] [PATCH 04/34] scripts/kvm/kvm_stat: Removed unneeded PERF constants

2015-12-10 Thread Janosch Frank
Only two of the constants are actually needed to set up the events, so the others were removed. All variables that used them were also removed. --- scripts/kvm/kvm_stat | 28 ++-- 1 file changed, 2 insertions(+), 26 deletions(-) diff --git a/scripts/kvm/kvm_stat

Re: [Qemu-devel] [PATCH] hw/i386: fill in the CENTURY field of the FADT (FACP) ACPI table

2015-12-10 Thread Igor Mammedov
On Thu, 10 Dec 2015 18:25:34 +0100 Laszlo Ersek wrote: > The ACPI specification (minimally versions 1.0b through 6.0) define > the FADT.CENTURY field as: > > The RTC CMOS RAM index to the century of data value (hundred and > thousand year decimals). If this field contains

Re: [Qemu-devel] [PATCH v2 2/2] hw: Inline the qdev_prop_set_drive_nofail() wrapper

2015-12-10 Thread Peter Maydell
On 10 December 2015 at 16:29, Markus Armbruster wrote: > Signed-off-by: Markus Armbruster > --- > hw/arm/nseries.c | 4 ++-- > hw/block/fdc.c | 15 ++- > hw/block/nand.c | 2 +- >

[Qemu-devel] [PATCH 3/4] error: Clean up errors with embedded newlines (again), part 2

2015-12-10 Thread Markus Armbruster
The arguments of error_setg() & friends should yield a short error string without newlines. A few places try to append additional help to the error message by embedding newlines in the error string. That's nice, but let's do it the right way, with error_append_hint(). Offenders tracked down

Re: [Qemu-devel] [PATCH 1/4] error: Strip trailing '\n' from error string arguments (again)

2015-12-10 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Commit 6daf194d, be62a2eb and 312fd5f got rid of a bunch, but they > keep coming back. Tracked down with the Coccinelle semantic patch > from commit 312fd5f. Reviewed-by: Dr. David Alan Gilbert > Cc: Fam Zheng

[Qemu-devel] [PATCH 21/34] scripts/kvm/kvm_stat: Encapsulate filters variable

2015-12-10 Thread Janosch Frank
The variable was only used in one class but still was defined globally. Additionaly the detect_platform routine which prepares the data that goes into the variable was called on each start of the script, no matter if the class was needed. To make the variable local to the TracepointProvider

[Qemu-devel] [PATCH 23/34] scripts/kvm/kvm_stat: Cleanup of Groups class

2015-12-10 Thread Janosch Frank
Introduced separating newlines for readability and removed special treatment/variable of the group leader. Renamed fmt to read_format. The group leader's file descriptor will not be turned into a file object anymore, instead os.read is used to read from the descriptor. --- scripts/kvm/kvm_stat |

[Qemu-devel] [PATCH 09/34] scripts/kvm/kvm_stat: Introduce main function

2015-12-10 Thread Janosch Frank
The main function should be the main location for initialization and helps encapsulating variables into a scope. This way they don't have to be global and might be mistaken for local ones. As the providers variable is scoped now it can't be accessed from within the Stats class. Hence, the global

Re: [Qemu-devel] [PATCH v4 2/8] ARM: ACPI: Add GPIO controller in ACPI DSDT table

2015-12-10 Thread Wei Huang
On 12/10/2015 07:22 AM, Igor Mammedov wrote: > On Mon, 7 Dec 2015 15:39:46 +0800 > Shannon Zhao wrote: > >> From: Shannon Zhao >> >> Add GPIO controller in ACPI DSDT table. It can be used for gpio event. >> >> Signed-off-by: Shannon Zhao

Re: [Qemu-devel] [PATCH v4 4/8] ACPI: Add GPIO Connection Descriptor

2015-12-10 Thread Igor Mammedov
On Mon, 7 Dec 2015 15:39:48 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > Tested-by: Wei Huang Reviewed-by:

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-10 Thread Richard Henderson
On 12/10/2015 09:15 AM, Richard Henderson wrote: > d = (uint64_t)sign << 63; > d = deposit64(d, 53, 11, exp); > d = deposit64(d, 21, 32, man); > return float64_to_float32(d, fp_status); Hmm. Actually, this incorrectly adds the implicit bit. We'd actually need to steal portions of

Re: [Qemu-devel] [PATCH v4 5/8] ACPI: Add aml_gpio_int() wrapper for GPIO Interrupt Connection

2015-12-10 Thread Igor Mammedov
On Mon, 7 Dec 2015 15:39:49 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao > Tested-by: Wei Huang Reviewed-by:

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-10 Thread Alexander Duyck
On Thu, Dec 10, 2015 at 8:11 AM, Michael S. Tsirkin wrote: > On Thu, Dec 10, 2015 at 10:38:32PM +0800, Lan, Tianyu wrote: >> >> >> On 12/10/2015 7:41 PM, Dr. David Alan Gilbert wrote: >> >>Ideally, it is able to leave guest driver unmodified but it requires the >> >>>hypervisor

Re: [Qemu-devel] [PATCH] tcg/arm: improve direct jump

2015-12-10 Thread Aurelien Jarno
On 2015-12-10 07:31, Richard Henderson wrote: > On 12/10/2015 12:02 AM, Aurelien Jarno wrote: > >Note: I don't really get the reason for the current 16MB limit. With the > >standard branch instructions the offset is coded on 24 bits, but shifted > >right by 2, which should give us a +/-32MB jumps,

Re: [Qemu-devel] [PATCH COLO-Frame v11 27/39] COLO failover: Shutdown related socket fd when do failover

2015-12-10 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > If the net connection between COLO's two sides is broken while colo/colo > incoming > thread is blocked in 'read'/'write' socket fd. It will not detect this error > until > connect timeout. It will be a long time. > > Here we shutdown

Re: [Qemu-devel] [PATCH v4 6/8] ARM: ACPI: Add _E03 for Power Button

2015-12-10 Thread Igor Mammedov
On Mon, 7 Dec 2015 15:39:50 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Here GPIO pin 3 is used for Power Button, add _E03 in ACPI DSDT table. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao

Re: [Qemu-devel] [PATCH COLO-Frame v11 25/39] COLO: implement default failover treatment

2015-12-10 Thread Dr. David Alan Gilbert
* zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: > If we detect some error in colo, we will wait for some time, > hoping users also detect it. If users don't issue failover command. > We will go into default failover procedure, which the PVM will takeover > work while SVM is exit in

Re: [Qemu-devel] [PATCH v4 2/8] ARM: ACPI: Add GPIO controller in ACPI DSDT table

2015-12-10 Thread Igor Mammedov
On Thu, 10 Dec 2015 13:16:22 -0600 Wei Huang wrote: > > > On 12/10/2015 07:22 AM, Igor Mammedov wrote: > > On Mon, 7 Dec 2015 15:39:46 +0800 > > Shannon Zhao wrote: > > > >> From: Shannon Zhao > >> > >> Add GPIO controller

Re: [Qemu-devel] [PATCH 00/74] pc: acpi: convert DSDT to AML API and drop ASL templates support

2015-12-10 Thread Igor Mammedov
forgot to mention git tree for testing is available at: g...@github.com:imammedo/qemu.git drop_ASL_support_v1 or https://github.com/imammedo/qemu/commits/drop_ASL_support_v1 and fixed-up series with fixed comments is at: g...@github.com:imammedo/qemu.git drop_ASL_support_wip or

Re: [Qemu-devel] [PATCH] Fix xbzrle vs last_sent_block update

2015-12-10 Thread Peter Maydell
On 10 December 2015 at 16:31, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > My fix (84e7b80a) replaced the last_sent_block update that I'd > removed earlier; however it was too aggressive in the xbzrle case. > >

[Qemu-devel] [PATCH 4/4] hw/s390x: Rename local variables Error *l_err to just err

2015-12-10 Thread Markus Armbruster
Let's follow established naming practice here as well. Cc: David Hildenbrand Signed-off-by: Markus Armbruster --- hw/s390x/ipl.c | 12 ++-- hw/s390x/sclp.c | 14 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git

[Qemu-devel] [PATCH] hw/i386: fill in the CENTURY field of the FADT (FACP) ACPI table

2015-12-10 Thread Laszlo Ersek
The ACPI specification (minimally versions 1.0b through 6.0) define the FADT.CENTURY field as: The RTC CMOS RAM index to the century of data value (hundred and thousand year decimals). If this field contains a zero, then the RTC centenary feature is not supported. If this field has a

Re: [Qemu-devel] [PATCH v7 29/31] qapi: Simplify semantics of visit_next_list()

2015-12-10 Thread Eric Blake
On 12/07/2015 08:55 PM, Eric Blake wrote: > We can greatly simplify things by hoisting the special case > into the start() routine, and flipping the order in the loop > to visit before advance: > > start(head) > element = *head > while (element) { > visit(element) > element =

Re: [Qemu-devel] [PATCH 3/4] error: Clean up errors with embedded newlines (again), part 2

2015-12-10 Thread Laszlo Ersek
On 12/10/15 18:23, Markus Armbruster wrote: > The arguments of error_setg() & friends should yield a short error > string without newlines. > > A few places try to append additional help to the error message by > embedding newlines in the error string. That's nice, but let's do it > the right

[Qemu-devel] [PATCH 30/34] scripts/kvm/kvm_stat: Cleanup and pre-init perf_event_attr

2015-12-10 Thread Janosch Frank
All initializations of the ctypes struct that don't need additional information were moved to its init method. The unneeded initializations for sample_type and sample_period were removed as they do not affect the counters that are read. This improves readability of the setup_event_attribute by

[Qemu-devel] [PATCH 31/34] scripts/kvm/kvm_stat: Read event values as u64

2015-12-10 Thread Janosch Frank
The struct read_format, which denotes the returned values on a read states that the values are u64 and not long long which is used for struct unpacking. Therefore the 'q' long long formatter was exchanged with 'Q' which is the format for u64 data. --- scripts/kvm/kvm_stat | 2 +- 1 file changed,

[Qemu-devel] [PATCH 13/34] scripts/kvm/kvm_stat: Fixup syscall error reporting

2015-12-10 Thread Janosch Frank
In 2008 a patch was written that introduced ctypes.get_errno() and set_errno() as official interfaces to the libc errno variable. Using them we can avoid accessing private libc variables. The patch was included in python 2.6. Also we need to raise the right exception, with the right parameters

[Qemu-devel] [PATCH 26/34] scripts/kvm/kvm_stat: Remove unneeded X86_EXIT_REASONS

2015-12-10 Thread Janosch Frank
The architecture detection method directly accesses vmx and smv exit reason constants. Therefore we don't need it anymore. --- scripts/kvm/kvm_stat | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/kvm/kvm_stat b/scripts/kvm/kvm_stat index d81e7b6..345ead8 100755 ---

[Qemu-devel] [PATCH 00/34] kvm_stat: Cleanup and fixup

2015-12-10 Thread Janosch Frank
Kvm_stat is a very helpful script for checking the state of VMs, but when I tried to introduce new features it broke every few lines. This patch series aims to make the script more readable and durable, so future additions to it will break it less likely. It also fixes input/output problems for

[Qemu-devel] [PATCH 25/34] scripts/kvm/kvm_stat: Group arch specific data

2015-12-10 Thread Janosch Frank
Using global variables and multiple initialization functions for arch specific data makes the code hard to read. By grouping them in the Arch class we encapsulate and initialize them in one place. --- scripts/kvm/kvm_stat | 106 +-- 1 file changed,

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-10 Thread Paolo Bonzini
On 09/12/2015 15:57, Richard Henderson wrote: >> I think you means the ' __attribute__((target("avx2")))', I have tried >> this way, the issue here is: >> without the ' -mavx2' option for gcc, there are compiling error: >> '__m256i undeclared', the __attribute__((target("avx2"))) >> can't

Re: [Qemu-devel] [PATCH RFC 0/8] scsi-disk: Active/passive ALUA support

2015-12-10 Thread Hannes Reinecke
On 12/10/2015 09:26 AM, Stefan Hajnoczi wrote: On Fri, Nov 27, 2015 at 03:58:58PM +0100, Hannes Reinecke wrote: here's now an updated version to enable ALUA and simplified active/passive multipath support for qemu. This patchset relies on having _two_ block devices configured, and two SCSI

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-10 Thread Li, Liang Z
> >> without the ' -mavx2' option for gcc, there are compiling error: > >> '__m256i undeclared', the __attribute__((target("avx2"))) can't solve > >> this issue. Any idea? > > > > You're right that you can't use the normal __m256i, as it doesn't get > > declared. > > It should be declared.

Re: [Qemu-devel] Error handling in realize() methods

2015-12-10 Thread Markus Armbruster
Laszlo Ersek writes: > I've been following this discussion with great interest. > > My opinion should not be considered, because I won't be turning my > opinion into new code, or an agreement to support / maintain code. :) > > My opinion is that > - every single allocation

Re: [Qemu-devel] qemu 2.2 stuck on condition mutex locks on all threads

2015-12-10 Thread Stefan Hajnoczi
On Mon, Dec 07, 2015 at 07:44:24PM -0500, Neil McGill wrote: > Has anyone seen anything like this ? all 4 qemu threads are stuck on a > pthread condition This is incorrect. Thread 4 is blocked in poll(2). > QEMU emulator version 2.2.0 (Debian 1:2.2+dfsg-5expubuntu9.3~cloud0), > Copyright (c)

Re: [Qemu-devel] [PATCH] fix:readcapacity 10 failure shown even 16 sent

2015-12-10 Thread Peter Lieven
Am 10.12.2015 um 09:55 schrieb Paolo Bonzini: On 10/12/2015 03:59, Zhu Lingshan wrote: -if (task == NULL || task->status != SCSI_STATUS_GOOD) { +if ((rc16 != NULL) && ((task == NULL) || (task->status != SCSI_STATUS_GOOD))) { +error_setg(errp, "iSCSI: failed to send

Re: [Qemu-devel] Question about nonblocking stderr and lost logs

2015-12-10 Thread Stefan Hajnoczi
On Mon, Dec 07, 2015 at 02:22:18PM +1100, Sam Bobroff wrote: > On Fri, Dec 04, 2015 at 02:33:01PM +0800, Stefan Hajnoczi wrote: > > On Mon, Nov 30, 2015 at 04:34:47PM +1100, Sam Bobroff wrote: > > > Hi QEMU programmers, > > > > > > While doing some experimental work on QEMU that has involved

Re: [Qemu-devel] [PATCH RFC 0/8] scsi-disk: Active/passive ALUA support

2015-12-10 Thread Stefan Hajnoczi
On Fri, Nov 27, 2015 at 03:58:58PM +0100, Hannes Reinecke wrote: > here's now an updated version to enable ALUA and simplified > active/passive multipath support for qemu. > > This patchset relies on having _two_ block devices configured, > and two SCSI disks pointing to those block devices with

Re: [Qemu-devel] [PATCH] configure: remove bashism (since 2010)

2015-12-10 Thread Marc-André Lureau
Hi On Thu, Dec 10, 2015 at 3:51 AM, Eric Blake wrote: > On 12/09/2015 05:53 PM, marcandre.lur...@redhat.com wrote: >> From: Marc-André Lureau >> >> "type" is not POSIX shell, but a bashism. (found thanks to shellcheck) > > NACK. 'type' is POSIX,

[Qemu-devel] [PATCH] vfio/common: Check iova with limit not with size

2015-12-10 Thread Pierre Morel
In vfio_listener_region_add(), the code makes sure that the offset in the section is lower than the size of the section. To do this the calculation uses size of the region instead of the region limit (size - 1). This leads to Int128 overflow when the region has been initialized with UINT64_MAX.

[Qemu-devel] [PATCH] tcg/arm: improve direct jump

2015-12-10 Thread Aurelien Jarno
Use ldr pc, [pc, #-4] kind of branch for direct jump. This removes the need to flush the icache on TB linking, and allow to remove the limit on the code generation buffer. Cc: Richard Henderson Cc: TeLeMan Cc: Andrzej Zaborowski

Re: [Qemu-devel] HTTP access to QEMU Git repositories

2015-12-10 Thread Stefan Hajnoczi
On Wed, Dec 09, 2015 at 06:22:35PM +0100, Paolo Bonzini wrote: > On 09/12/2015 18:14, Liguori, Anthony wrote: > > Alex Bennee and Andreas also should have access as owners. I've just > > sent an invite to add Paolo as an owner too. > > Great, I've created github repos for all of: > >

Re: [Qemu-devel] what is the plan for seabios merged into qemu?

2015-12-10 Thread Gerd Hoffmann
On Do, 2015-12-10 at 05:52 +, Han, Huaitong wrote: > Hi, Gerd > > I find pc-bios/bios-256k.bin has not been updated for a long time, even > seabios is released a new version, what is the plan for seabios merged > into qemu? The new seabios version missed -rc0 (hard freeze) by a few days, so

Re: [Qemu-devel] subpage_write() and duplicated memory_region_ops_write tracepoints

2015-12-10 Thread Paolo Bonzini
On 10/12/2015 01:39, Hollis Blanchard wrote: > > Not sure I understand. Do you mean something like this? > -trace_memory_region_ops_write(mr, addr, tmp, size); > +trace_memory_region_ops_write(mr, addr, mr->ops->write == > subpage_write, tmp, size); There is also a mr->subpage that you can

Re: [Qemu-devel] Error handling in realize() methods

2015-12-10 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Markus Armbruster (arm...@redhat.com) wrote: >> "Dr. David Alan Gilbert" writes: >> >> > * Markus Armbruster (arm...@redhat.com) wrote: >> >> In general, code running withing a realize() method should not exit() on

Re: [Qemu-devel] [v3 1/3] cutils: add avx2 instruction optimization

2015-12-10 Thread Paolo Bonzini
On 10/12/2015 10:22, Li, Liang Z wrote: without the ' -mavx2' option for gcc, there are compiling error: '__m256i undeclared', the __attribute__((target("avx2"))) can't solve this issue. Any idea? >>> >>> You're right that you can't use the normal __m256i, as it doesn't get >>>

Re: [Qemu-devel] live migration vs device assignment (motivation)

2015-12-10 Thread Michael S. Tsirkin
On Thu, Dec 10, 2015 at 11:04:54AM +0800, Lan, Tianyu wrote: > > On 12/10/2015 4:07 AM, Michael S. Tsirkin wrote: > >On Thu, Dec 10, 2015 at 12:26:25AM +0800, Lan, Tianyu wrote: > >>On 12/8/2015 12:50 AM, Michael S. Tsirkin wrote: > >>>I thought about what this is doing at the high level, and I

Re: [Qemu-devel] [PATCH] fix:readcapacity 10 failure shown even 16 sent

2015-12-10 Thread Paolo Bonzini
On 10/12/2015 03:59, Zhu Lingshan wrote: > -if (task == NULL || task->status != SCSI_STATUS_GOOD) { > +if ((rc16 != NULL) && ((task == NULL) || (task->status != > SCSI_STATUS_GOOD))) { > +error_setg(errp, "iSCSI: failed to send readcapacity16 command."); > +} You need an

[Qemu-devel] [PATCH 1/1] qcow2: insert assert into qcow2_get_specific_info()

2015-12-10 Thread Denis V. Lunev
s->qcow_version is always set to 2 or 3. Let's assert if this is wrong. Signed-off-by: Denis V. Lunev CC: Roman Kagan CC: Max Reitz CC: Kevin Wolf --- block/qcow2.c | 4 1 file changed, 4 insertions(+) diff

Re: [Qemu-devel] [PATCH v3 4/4] target-tilegx: Integrate floating pointer implementation

2015-12-10 Thread Chen Gang
On 12/11/15 05:37, Richard Henderson wrote: > On 12/10/2015 06:16 AM, Chen Gang wrote: [...] >> >> diff --git a/target-tilegx/cpu.h b/target-tilegx/cpu.h >> index 03df107..445a606 100644 >> --- a/target-tilegx/cpu.h >> +++ b/target-tilegx/cpu.h >> @@ -88,6 +88,8 @@ typedef struct CPUTLGState {

Re: [Qemu-devel] [PATCH v3 4/4] target-tilegx: Integrate floating pointer implementation

2015-12-10 Thread Richard Henderson
On 12/10/2015 06:16 AM, Chen Gang wrote: > > It passes normal building, and gcc testsuite. > > Signed-off-by: Chen Gang > --- > target-tilegx/Makefile.objs | 3 +- > target-tilegx/cpu.h | 2 ++ > target-tilegx/helper.h | 12 >

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-10 Thread Chen Gang
On 12/11/15 04:18, Richard Henderson wrote: > On 12/10/2015 09:15 AM, Richard Henderson wrote: >> d = (uint64_t)sign << 63; >> d = deposit64(d, 53, 11, exp); >> d = deposit64(d, 21, 32, man); >> return float64_to_float32(d, fp_status); > > Hmm. Actually, this incorrectly adds the

Re: [Qemu-devel] [PATCH v1 1/2] sd: sdhci: Delete over-zealous power check

2015-12-10 Thread Andrew Baumann
Raspberry Pi needs this change as well. I don't mind if it's as implemented below, or conditional under a flag property. Tested-By: Andrew Baumann Thanks, Andrew > From: Peter Crosthwaite [mailto:crosthwaitepe...@gmail.com] > Sent: Thursday, 10 December 2015

Re: [Qemu-devel] [PATCH v3 3/4] target-tilegx: Add double floating point implementation

2015-12-10 Thread Richard Henderson
On 12/10/2015 06:15 AM, Chen Gang wrote: > +#define TILEGX_F_MAN_HBIT (1ULL << 59) ... > +static uint64_t fr_to_man(float64 d) > +{ > +uint64_t val = get_f64_man(d) << 7; > + > +if (get_f64_exp(d)) { > +val |= TILEGX_F_MAN_HBIT; > +} > + > +return val; > +} One presumes

Re: [Qemu-devel] [PATCH 09/12] isa: Clean up error handling around isa_bus_new()

2015-12-10 Thread Hervé Poussineau
Le 10/12/2015 11:29, Markus Armbruster a écrit : We can have at most one ISA bus. If you try to create another one, isa_bus_new() complains to stderr and returns null. isa_bus_new() is called in two contexts, machine's init() and device's realize() methods. Since complaining to stderr is not

Re: [Qemu-devel] [PATCH v3 14/15] qemu-img: Use QAPI visitor to generate JSON

2015-12-10 Thread Eric Blake
On 11/25/2015 10:05 PM, Fam Zheng wrote: > A visible improvement is that "filename" is now included in the output > if it's valid. > > Reviewed-by: Eric Blake > Signed-off-by: Fam Zheng > --- > qemu-img.c | 34 ++-- >

Re: [Qemu-devel] [PATCH v1 1/2] sd: sdhci: Delete over-zealous power check

2015-12-10 Thread Peter Crosthwaite
CCing Andrew who ran into a similar issue for rPI. On Sat, Nov 28, 2015 at 12:50 PM, Peter Crosthwaite wrote: > This check was conditionalising SD card operation on the card being > powered by the SDHCI host controller. It is however possible > (particularly in

Re: [Qemu-devel] [RFC PATCH v0 0/9] Generic cpu-core device

2015-12-10 Thread Matthew Rosato
On 12/10/2015 01:15 AM, Bharata B Rao wrote: > Hi, > > This is an attempt to define a generic CPU device that serves as a > containing device to underlying arch-specific CPU devices. The motivation > for this is to have an arch-neutral way to specify CPUs mainly during > hotplug. > > Instead of

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-10 Thread Boris Schrijver
Dear John, I already send a new patch with V2. Please see that one! > On December 10, 2015 at 10:26 PM John Snow wrote: > > > > > On 12/08/2015 03:49 PM, Boris Schrijver wrote: > > See inline! Thanks for your response! > > > > -- > > > > Met vriendelijke groet / Kind

Re: [Qemu-devel] [PATCH 10/12] isa: Clean up inappropriate hw_error()

2015-12-10 Thread Hervé Poussineau
Le 10/12/2015 11:29, Markus Armbruster a écrit : isa_bus_irqs(), isa_create() and isa_try_create() call hw_error() when passed a null bus. Use of hw_error() has always been questionable, because these are used only during machine initialization, and printing CPU registers isn't useful there.

Re: [Qemu-devel] [PATCH v3 2/4] target-tilegx: Add single floating point implementation

2015-12-10 Thread Chen Gang
On 12/11/15 01:15, Richard Henderson wrote: > On 12/10/2015 06:15 AM, Chen Gang wrote: >> +#define TILEGX_F_CALC_CVT 0 /* convert int to fsingle */ >> +#define TILEGX_F_CALC_NCVT 1 /* Not convertion */ >> + >> +static uint32_t get_f32_exp(float32 f) >> +{ >> +return

Re: [Qemu-devel] [Qemu-block] [PATCH v2] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-10 Thread John Snow
On 12/09/2015 05:37 PM, Boris Schrijver wrote: > Dear all, > > Thanks for your time so-far. > > I send a mail to the libcurl development list and got a helpful reaction [1]! > I > changed my patch accordingly. We now don't have to check for a > CURLE_WRITE_ERROR > anymore and

Re: [Qemu-devel] [PATCH v4 3/8] ARM: ACPI: Add power button device in ACPI DSDT table

2015-12-10 Thread Igor Mammedov
On Mon, 7 Dec 2015 15:39:47 +0800 Shannon Zhao wrote: > From: Shannon Zhao > > Add power button device in ACPI DSDT table. > > Signed-off-by: Shannon Zhao > Signed-off-by: Shannon Zhao >

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-img / curl: When fetching Content-Size use GET instead of HEAD.

2015-12-10 Thread John Snow
On 12/08/2015 03:49 PM, Boris Schrijver wrote: > See inline! Thanks for your response! > > -- > > Met vriendelijke groet / Kind regards, > > Boris Schrijver > > PCextreme B.V. > > http://www.pcextreme.nl/contact > Tel direct: +31 (0) 118 700 215 > >> On December 8, 2015 at 8:40 PM John

[Qemu-devel] [PATCH 11/11] pseries: Clean up error reporting in htab migration functions

2015-12-10 Thread David Gibson
The functions for migrating the hash page table on pseries machine type (htab_save_setup() and htab_load()) can report some errors with an explicit fprintf() before returning an appropriate eror code. Change these to use error_report() instead. Signed-off-by: David Gibson

[Qemu-devel] [PATCH 03/11] pseries: Clean up hash page table allocation error handling

2015-12-10 Thread David Gibson
The spapr_alloc_htab() and spapr_reset_htab() functions currently handle all errors with error_setg(_abort, ...). That's correct for spapr_reset_htab() - if anything goes wrong there, there's really nothing we can do about it. For spapr_alloc_htab() _fatal would make more sense, since it occurs

[Qemu-devel] [PATCH 07/11] pseries: Cleanup error handling in spapr_kvm_type()

2015-12-10 Thread David Gibson
Use error_setg() and _fatal instead of an explicit exit(). Signed-off-by: David Gibson --- hw/ppc/spapr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index fd16db4..546d2f5 100644 --- a/hw/ppc/spapr.c +++

[Qemu-devel] [PATCH 04/11] pseries: Clean up error handling in spapr_validate_node_memory()

2015-12-10 Thread David Gibson
Use error_setg() and return an error, rather than using an explicit exit(). Also improve messages, and be more explicit about which constraint failed. Signed-off-by: David Gibson --- hw/ppc/spapr.c | 37 ++--- 1 file changed, 22

[Qemu-devel] [PATCH 09/18] qemu/timer.h : Adding function to second scale

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch adds SCALE_S, timer_new_s(), and qemu_clock_get_s in qemu/timer.h to manage second-scale timers. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- include/qemu/timer.h

[Qemu-devel] [PATCH 08/18] slirp: Adding family argument to tcp_fconnect()

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch simply adds a sa_family_t argument to remove the hardcoded "AF_INET" in the call of qemu_socket(). Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/slirp.h

[Qemu-devel] [PATCH 10/18] slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch adds the functions needed to handle IPv6 packets. ICMPv6 and NDP headers are implemented. Slirp is now able to send NDP Router or Neighbor Advertisement when it receives Router or Neighbor Solicitation. Using a 64bit-sized IPv6 prefix, the

Re: [Qemu-devel] [PATCH 07/11] qapi: add json output visitor

2015-12-10 Thread Eric Blake
On 12/10/2015 04:53 PM, Eric Blake wrote: > We have several places that want to go from qapi to JSON; right now, > they have to create an intermediate QObject to do the work. That > also has the drawback that the JSON formatting of a QDict will > rearrange keys (according to a deterministic, but

[Qemu-devel] [PATCH 04/11] qapi: Factor out JSON number formatting

2015-12-10 Thread Eric Blake
Pull out a new qstring_append_json_number() helper, so that all JSON output producers can use a consistent style for printing floating point without duplicating code (since we are doing more data massaging than a simple printf format). Address one FIXME by adding an Error parameter and warning

[Qemu-devel] [PATCH 08/11] qjson: Simplify by using json-output-visitor

2015-12-10 Thread Eric Blake
Instead of rolling our own limited JSON outputter, we can just wrap the more full-featured JSON output Visitor. This slightly changes the output (different spacing), but the result is still equivalent JSON contents. Signed-off-by: Eric Blake --- qjson.c | 61

[Qemu-devel] [PATCH 07/11] qapi: add json output visitor

2015-12-10 Thread Eric Blake
We have several places that want to go from qapi to JSON; right now, they have to create an intermediate QObject to do the work. That also has the drawback that the JSON formatting of a QDict will rearrange keys (according to a deterministic, but unpredictable, hash), when humans have an easier

[Qemu-devel] [PATCH 09/11] qapi: Add qobject_to_json_pretty_prefix()

2015-12-10 Thread Eric Blake
The next patch will add pretty indentation to the JSON visitor. But in order to support pretty output in the type_any() callback, we need to prefix every line of the QObject visitor by the current indentation in the JSON visitor. Hence, a new function qobject_to_json_pretty_indent(), and the old

[Qemu-devel] [PATCH 01/11] qapi: Rename qjson.h to qobject-json.h

2015-12-10 Thread Eric Blake
We have two different JSON visitors in the tree; and having both named 'qjson.h' can cause include confusion. Rename the qapi version. Kill trailing whitespace in the renamed tests/check-qobject-json.c to keep checkpatch.pl happy. Signed-off-by: Eric Blake --- MAINTAINERS

[Qemu-devel] [PATCH 05/11] pseries: Cleanup error handling in spapr_vga_init()

2015-12-10 Thread David Gibson
Use error_setg() to return an error rather than an explicit exit(). Previously it was an exit(0) instead of a non-zero exit code, which was simply a bug. Also improve the error message. Signed-off-by: David Gibson --- hw/ppc/spapr.c | 10 +- 1 file changed,

[Qemu-devel] [PATCH 06/11] pseries: Improve error handling in find_unknown_sysbus_device()

2015-12-10 Thread David Gibson
Use error_setg() to return an error instead of using an explicit exit(). Signed-off-by: David Gibson --- hw/ppc/spapr.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0ff09b9..fd16db4 100644 ---

[Qemu-devel] [PATCH 15/18] slirp: Reindent after refactoring

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/tcp_input.c | 95 +++--- slirp/tcp_output.c | 29

[Qemu-devel] [PATCH 05/18] slirp: Factorizing address translation

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch factorizes some duplicate code into a new function, sotranslate_out(). This function perform the address translation when a packet is transmitted to the host network. If the paquet is destinated to the host, the loopback address is used,

[Qemu-devel] [PATCH 04/18] slirp: Make Socket structure IPv6 compatible

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch replaces foreign and local address/port couples in Socket structure by 2 sockaddr_storage which can be casted in sockaddr_in. Direct access to address and port is still possible thanks to some \#define, so retrocompatibility of the existing

[Qemu-devel] [PATCH 03/18] slirp: Reindent after refactoring

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron No code change. Signed-off-by: Guillaume Subiron Signed-off-by: Samuel Thibault --- slirp/slirp.c | 117 +- 1 file changed, 59

[Qemu-devel] [PATCH 18/18] qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses

2015-12-10 Thread Samuel Thibault
From: Yann Bordenave This patch adds parameters to manage some new options in the qemu -net command. Slirp IPv6 address, network prefix, and DNS IPv6 address can be given in argument to the qemu command. Defaults parameters are respectively fec0::2, fec0::, /64 and fec0::3.

[Qemu-devel] [PATCH 13/18] slirp: Factorizing tcpiphdr structure with an union

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin

[Qemu-devel] [PATCH 06/11] qapi: Add qstring_append_format()

2015-12-10 Thread Eric Blake
Back in commit 764c1ca (Nov 2009), we added qstring_append_int(). However, it did not see any use until commit 190c882 (Jan 2015). Furthermore, it has a rather limited use case - to print anything else, callers still have to format into a temporary buffer, unless we want to introduce an explosion

[Qemu-devel] [PATCH 10/11] qapi: Support pretty printing in JSON output visitor

2015-12-10 Thread Eric Blake
Similar to pretty printing in the QObject visitor. Trickiest parts are the fact that during type_any(), we have to coordinate with QObject to also print pretty; and the fact that the testsuite now has to honor parameterization on whether pretty printing is enabled. Signed-off-by: Eric Blake

[Qemu-devel] [PATCH 11/11] RFC: qemu-img: Use new JSON output formatter

2015-12-10 Thread Eric Blake
Now that we can pretty-print straight to JSON from a visitor, we can eliminate the temporary conversion into QObject inside qemu-img. RFC because at least qemu-iotests 043 has changed output, not included in this version of the patch. Conflicts with Fam's qemu-img edits, so one of the two of us

[Qemu-devel] [PATCH 01/11] ppc: Cleanup error handling in ppc_set_compat()

2015-12-10 Thread David Gibson
Current ppc_set_compat() returns -1 for errors, and also (unconditionally) reports an error message. The caller in h_client_architecture_support() may then report it again using an outdated fprintf(). Clean this up by using the modern error reporting mechanisms. Signed-off-by: David Gibson

[Qemu-devel] [PATCH 09/11] pseries: Clean up error handling in xics_system_init()

2015-12-10 Thread David Gibson
Use the error handling infrastructure to pass an error out from try_create_xics() instead of assuming _abort - the caller is in a better position to decide on error handling policy. Signed-off-by: David Gibson --- hw/ppc/spapr.c | 6 +++--- 1 file changed, 3

[Qemu-devel] [PATCH 17/18] slirp: Adding IPv6 address for DNS relay

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch adds an IPv6 address to the DNS relay. in6_equal_dns() is developed using this Slirp attribute. sotranslate_in/out/accept() are also updated to manage the IPv6 case so the guest can be able to join the host using one of the Slirp addresses.

[Qemu-devel] [PATCH 06/18] slirp: Factorizing and cleaning solookup()

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron This patch makes solookup() compatible with varying address families. Also, this function was only compatible with TCP. Having the socket list in argument, it is now compatible with UDP too. Finally, some optimization code is factorized inside the

[Qemu-devel] [PATCHv5 00/18] slirp: Adding IPv6 support to Qemu -net user mode

2015-12-10 Thread Samuel Thibault
Hello, This is another respin of IPv6 in Qemu -net user mode. These patches add ICMPv6, NDP, and make UDP and TCP compatible with IPv6. We have made some refactoring to make current code compatible with IPv6. Patches 1 to 8 are refactoring of existing code and do not change the behavior, 9 adds

[Qemu-devel] [PATCH 01/18] slirp: goto bad in udp_input if sosendto fails

2015-12-10 Thread Samuel Thibault
From: Guillaume Subiron Before this patch, if sosendto fails, udp_input is executed as if the packet was sent, recording the packet for icmp errors, which does not makes sense since the packet was not actually sent, errors would be related to a previous packet. This patch

  1   2   3   >