Re: [Qemu-devel] [PATCH v7 2/2] Add QTest testcase for the Intel Hexadecimal Object File Loader.

2018-05-15 Thread Su Hang
Great! Thanks for your suggestion! Best, SU Hang "Steffen Görtz" wrote: > On 10.05.2018 09:18, Su Hang wrote: > > Hi, > this will be my first comment on devel as part of my GSoC participation > this year. > > > + > > +QTestState *s = qtest_startf( > > +

[Qemu-devel] [Bug 1435101] Re: Windows, QEMU 2.2.50 fails to boot XP CD

2018-05-15 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1435101 Title: Windows,

Re: [Qemu-devel] [PATCH] iothread: fix epollfd leak in the process of delIOThread

2018-05-15 Thread Peter Xu
On Wed, May 16, 2018 at 09:38:31AM +0800, Fam Zheng wrote: > On Tue, 05/15 20:00, Jie Wang wrote: > > When we call addIOThread, the epollfd created in aio_context_setup, > > but not close it in the process of delIOThread, so the epollfd will leak. > > > > Signed-off-by: Jie Wang

Re: [Qemu-devel] [PATCH RFC] qemu-error: introduce error_report_once

2018-05-15 Thread Peter Xu
On Tue, May 15, 2018 at 05:56:34PM +0200, Markus Armbruster wrote: [...] > I see. > > Add a contract comment (suggest to start with the one next to > error_report()), expand the tabs, replace the reserved identifiers > (caught by patchew; you can use foo_ instead of __foo), throw in at > least

Re: [Qemu-devel] [PATCH RFC] qemu-error: introduce error_report_once

2018-05-15 Thread Peter Xu
On Tue, May 15, 2018 at 10:29:39AM -0500, Eric Blake wrote: > On 05/15/2018 04:13 AM, Peter Xu wrote: > > I stole the printk_once() macro. > > > > I always wanted to be able to print some error directly if there is a > > buffer to dump, however we can't use error_report() really quite often > >

Re: [Qemu-devel] [PATCH qemu v2] slirp/debug: Print IP addresses in human readable form

2018-05-15 Thread Alexey Kardashevskiy
On 16/5/18 12:30 am, Eric Blake wrote: > On 05/14/2018 02:00 AM, Alexey Kardashevskiy wrote: >> On 13/3/18 6:44 pm, Samuel Thibault wrote: >>> Alexey Kardashevskiy, on mar. 13 mars 2018 15:49:44 +1100, wrote: Signed-off-by: Alexey Kardashevskiy >>> >>> Applied to my tree,

Re: [Qemu-devel] [PATCH v6 0/4] slirp: Add query-usernet QMP command

2018-05-15 Thread Fam Zheng
On Fri, 05/04 15:42, Fam Zheng wrote: > v6: Rename QAPI enum: TCPS -> UsernetTcpState. [Daniel] Ping? Fam

Re: [Qemu-devel] [PATCH v3 0/6] Extend vhost-user to support registering external host notifiers

2018-05-15 Thread Tiwei Bie
On Wed, May 16, 2018 at 04:41:48AM +0300, Michael S. Tsirkin wrote: > On Thu, Apr 12, 2018 at 11:12:26PM +0800, Tiwei Bie wrote: > > The original subject is: Extend vhost-user to support VFIO based > > accelerators > > > > Update notes > > > > > > Now, this patch set just focuses

Re: [Qemu-devel] [PATCH v3 0/6] Extend vhost-user to support registering external host notifiers

2018-05-15 Thread Michael S. Tsirkin
On Thu, Apr 12, 2018 at 11:12:26PM +0800, Tiwei Bie wrote: > The original subject is: Extend vhost-user to support VFIO based accelerators > > Update notes > > > Now, this patch set just focuses on adding the support for > registering memory region based host notifiers. With this >

Re: [Qemu-devel] [PATCH] iothread: fix epollfd leak in the process of delIOThread

2018-05-15 Thread Fam Zheng
On Tue, 05/15 20:00, Jie Wang wrote: > When we call addIOThread, the epollfd created in aio_context_setup, > but not close it in the process of delIOThread, so the epollfd will leak. > > Signed-off-by: Jie Wang > --- > iothread.c | 1 + > 1 file changed, 1 insertion(+) >

Re: [Qemu-devel] [PATCH v2 1/1] sandbox: disable -sandbox if CONFIG_SECCOMP undefined

2018-05-15 Thread Yi Min Zhao
在 2018/5/15 下午11:25, Eric Blake 写道: On 05/15/2018 06:33 AM, Yi Min Zhao wrote: If CONFIG_SECCOMP is undefined, the option 'elevateprivileges' remains compiled. This would make libvirt set the corresponding capability and then trigger the guest startup fails. So this patch excludes the code

[Qemu-devel] [PULL 40/40] Migration+TLS: Fix crash due to double cleanup

2018-05-15 Thread Juan Quintela
From: "Dr. David Alan Gilbert" During a TLS connect we see: migration_channel_connect calls migration_tls_channel_connect (calls after TLS setup) migration_channel_connect My previous error handling fix made migration_channel_connect call migrate_fd_connect in all

[Qemu-devel] [PULL 38/40] migration: update index field when delete or qsort RDMALocalBlock

2018-05-15 Thread Juan Quintela
From: Lidong Chen rdma_delete_block function deletes RDMALocalBlock base on index field, but not update the index field. So when next time invoke rdma_delete_block, it will not work correctly. If start and cancel migration repeatedly, some RDMALocalBlock not invoke

[Qemu-devel] [PULL 32/40] qmp/migration: new command migrate-recover

2018-05-15 Thread Juan Quintela
From: Peter Xu The first allow-oob=true command. It's used on destination side when the postcopy migration is paused and ready for a recovery. After execution, a new migration channel will be established for postcopy to continue. Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [Bug 1771238] Re: Not able to passthrough > 32 PCIe devices to a KVM Guest

2018-05-15 Thread David Coronel
@Khaled El Mously: It's more a feature request. ** No longer affects: qemu -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1771238 Title: Not able to passthrough > 32 PCIe devices to a KVM Guest

[Qemu-devel] [PULL 24/40] migration: new message MIG_RP_MSG_RECV_BITMAP

2018-05-15 Thread Juan Quintela
From: Peter Xu Introducing new return path message MIG_RP_MSG_RECV_BITMAP to send received bitmap of ramblock back to source. This is the reply message of MIG_CMD_RECV_BITMAP, it contains not only the header (including the ramblock name), and it was appended with the whole

[Qemu-devel] [PULL 25/40] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2018-05-15 Thread Juan Quintela
From: Peter Xu Introducing this new command to be sent when the source VM is ready to resume the paused migration. What the destination does here is basically release the fault thread to continue service page faults. Reviewed-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH] WHPX Add signature CPUID

2018-05-15 Thread Alessandro Pilotti
Hi Paolo, The main reason for different signatures is to allow guest workloads to be aware of the differences between the two platforms (eg VirtIO vs VMBus). Thanks, Alessandro > On 15 May 2018, at 16:44, Paolo Bonzini wrote: > >> On 15/05/2018 13:37,

[Qemu-devel] [PULL 37/40] migration: update docs

2018-05-15 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Update the migration docs: Among other changes: * Added a general list of advice for device authors * Reordered the section on conditional state (subsections etc) into the order we prefer. * Add a note about firmware Signed-off-by:

[Qemu-devel] [PULL 39/40] migration: Textual fixups for blocktime

2018-05-15 Thread Juan Quintela
From: "Dr. David Alan Gilbert" Blank lines and comments as suggested by Eric. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Reviewed-by: Eric Blake Message-Id:

[Qemu-devel] [PULL 23/40] migration: new cmd MIG_CMD_RECV_BITMAP

2018-05-15 Thread Juan Quintela
From: Peter Xu Add a new vm command MIG_CMD_RECV_BITMAP to request received bitmap for one ramblock. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-12-pet...@redhat.com> Signed-off-by:

[Qemu-devel] [PULL 34/40] migration: introduce lock for to_dst_file

2018-05-15 Thread Juan Quintela
From: Peter Xu Let's introduce a lock for that QEMUFile since we are going to operate on it in multiple threads. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-23-pet...@redhat.com>

[Qemu-devel] [PULL 21/40] migration: new state "postcopy-recover"

2018-05-15 Thread Juan Quintela
From: Peter Xu Introducing new migration state "postcopy-recover". If a migration procedure is paused and the connection is rebuilt afterward successfully, we'll switch the source VM state from "postcopy-paused" to the new state "postcopy-recover", then we'll do the resume

[Qemu-devel] [PULL 36/40] migration/hmp: add migrate_pause command

2018-05-15 Thread Juan Quintela
From: Peter Xu Wrapper for QMP command "migrate-pause". Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-25-pet...@redhat.com> Signed-off-by: Juan Quintela ---

[Qemu-devel] [PULL 33/40] hmp/migration: add migrate_recover command

2018-05-15 Thread Juan Quintela
From: Peter Xu Sister command to migrate-recover in QMP. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-22-pet...@redhat.com> Signed-off-by: Juan Quintela ---

[Qemu-devel] [PULL 35/40] migration/qmp: add command migrate-pause

2018-05-15 Thread Juan Quintela
From: Peter Xu It pauses an ongoing migration. Currently it only supports postcopy. Note that this command will work on either side of the migration. Basically when we trigger this on one side, it'll interrupt the other side as well since the other side will get notified on

[Qemu-devel] [PULL 19/40] qmp: hmp: add migrate "resume" option

2018-05-15 Thread Juan Quintela
From: Peter Xu It will be used when we want to resume one paused migration. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-8-pet...@redhat.com> Signed-off-by: Juan Quintela

[Qemu-devel] [PULL 31/40] migration: init dst in migration_object_init too

2018-05-15 Thread Juan Quintela
From: Peter Xu Though we may not need it, now we init both the src/dst migration objects in migration_object_init() so that even incoming migration object would be thread safe (it was not). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[Qemu-devel] [PULL 30/40] migration: final handshake for the resume

2018-05-15 Thread Juan Quintela
From: Peter Xu Finish the last step to do the final handshake for the recovery. First source sends one MIG_CMD_RESUME to dst, telling that source is ready to resume. Then, dest replies with MIG_RP_MSG_RESUME_ACK to source, telling that dest is ready to resume (after switch

[Qemu-devel] [PULL 18/40] migration: allow fault thread to pause

2018-05-15 Thread Juan Quintela
From: Peter Xu Allows the fault thread to stop handling page faults temporarily. When network failure happened (and if we expect a recovery afterwards), we should not allow the fault thread to continue sending things to source, instead, it should halt for a while until the

[Qemu-devel] [PULL 07/40] migration: Be sure all recv channels are created

2018-05-15 Thread Juan Quintela
We need them before we start migration. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/migration.c | 6 +- migration/ram.c | 11 +++ migration/ram.h | 1 + 3 files changed, 17 insertions(+), 1

[Qemu-devel] [PULL 27/40] migration: introduce SaveVMHandlers.resume_prepare

2018-05-15 Thread Juan Quintela
From: Peter Xu This is hook function to be called when a postcopy migration wants to resume from a failure. For each module, it should provide its own recovery logic before we switch to the postcopy-active state. Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 22/40] migration: wakeup dst ram-load-thread for recover

2018-05-15 Thread Juan Quintela
From: Peter Xu On the destination side, we cannot wake up all the threads when we got reconnected. The first thing to do is to wake up the main load thread, so that we can continue to receive valid messages from source again and reply when needed. At this point, we switch the

[Qemu-devel] [PULL 29/40] migration: setup ramstate for resume

2018-05-15 Thread Juan Quintela
From: Peter Xu After we updated the dirty bitmaps of ramblocks, we also need to update the critical fields in RAMState to make sure it is ready for a resume. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id:

[Qemu-devel] [PULL 15/40] migration: implement "postcopy-pause" src logic

2018-05-15 Thread Juan Quintela
From: Peter Xu Now when network down for postcopy, the source side will not fail the migration. Instead we convert the status into this new paused state, and we will try to wait for a rescue in the future. If a recovery is detected, migration_thread() will reset its local

[Qemu-devel] [PULL 26/40] migration: new message MIG_RP_MSG_RESUME_ACK

2018-05-15 Thread Juan Quintela
From: Peter Xu Creating new message to reply for MIG_CMD_POSTCOPY_RESUME. One uint32_t is used as payload to let the source know whether destination is ready to continue the migration. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[Qemu-devel] [PULL 28/40] migration: synchronize dirty bitmap for resume

2018-05-15 Thread Juan Quintela
From: Peter Xu This patch implements the first part of core RAM resume logic for postcopy. ram_resume_prepare() is provided for the work. When the migration is interrupted by network failure, the dirty bitmap on the source side will be meaningless, because even the dirty bit

[Qemu-devel] [PULL 20/40] migration: rebuild channel on source

2018-05-15 Thread Juan Quintela
From: Peter Xu This patch detects the "resume" flag of migration command, rebuild the channels only if the flag is set. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-9-pet...@redhat.com>

[Qemu-devel] [PULL 14/40] migration: new postcopy-pause state

2018-05-15 Thread Juan Quintela
From: Peter Xu Introducing a new state "postcopy-paused", which can be used when the postcopy migration is paused. It is targeted for postcopy network failure recovery. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PULL 17/40] migration: allow src return path to pause

2018-05-15 Thread Juan Quintela
From: Peter Xu Let the thread pause for network issues. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Message-Id: <20180502104740.12123-6-pet...@redhat.com> Signed-off-by: Juan Quintela ---

[Qemu-devel] [PULL 04/40] migration: Set error state in case of error

2018-05-15 Thread Juan Quintela
Signed-off-by: Juan Quintela --- migration/ram.c | 26 -- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/migration/ram.c b/migration/ram.c index da0b567003..4d8be30676 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -448,10

[Qemu-devel] [PULL 16/40] migration: allow dst vm pause on postcopy

2018-05-15 Thread Juan Quintela
From: Peter Xu When there is IO error on the incoming channel (e.g., network down), instead of bailing out immediately, we allow the dst vm to switch to the new POSTCOPY_PAUSE state. Currently it is still simple - it waits the new semaphore, until someone poke it for another

[Qemu-devel] [PULL 10/40] migration: Delay start of migration main routines

2018-05-15 Thread Juan Quintela
We need to make sure that we have started all the multifd threads. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/migration.c | 4 ++-- migration/migration.h | 1 + migration/ram.c | 3 +++ migration/socket.c| 4

[Qemu-devel] [PULL 13/40] migration: let incoming side use thread context

2018-05-15 Thread Juan Quintela
From: Peter Xu The old incoming migration is running in main thread and default gcontext. With the new qio_channel_add_watch_full() we can now let it run in the thread's own gcontext (if there is one). Currently this patch does nothing alone. But when any of the incoming

[Qemu-devel] [PULL 12/40] migration: Define MultifdRecvParams sooner

2018-05-15 Thread Juan Quintela
Once there, we don't need the struct names anywhere, just the typedefs. And now also document all fields. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 46 +++--- 1 file

[Qemu-devel] [PULL 03/40] tests: Migration ppc now inlines its program

2018-05-15 Thread Juan Quintela
No need to write it to a file. Just need a proper firmware O:-) Signed-off-by: Juan Quintela Reviewed-by: Laurent Vivier Reviewed-by: Thomas Huth --- tests/migration-test.c | 41 + 1 file

[Qemu-devel] [PULL 08/40] migration: Export functions to create send channels

2018-05-15 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/socket.c | 28 +++- migration/socket.h | 7 +++ 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/migration/socket.c

[Qemu-devel] [PULL 11/40] migration: Transmit initial package through the multifd channels

2018-05-15 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé -- Be network agnostic. Add error checking for all values. --- migration/ram.c | 104 +--- 1 file changed, 99 insertions(+), 5 deletions(-) diff

[Qemu-devel] [PULL 06/40] migration: terminate_* can be called for other threads

2018-05-15 Thread Juan Quintela
Once there, make count field to always be accessed with atomic operations. To make blocking operations, we need to know that the thread is running, so create a bool to indicate that. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --

[Qemu-devel] [PULL 00/40] Migration PULL requset (take 2)

2018-05-15 Thread Juan Quintela
+0100) are available in the Git repository at: git://github.com/juanquintela/qemu.git tags/migration/20180515 for you to fetch changes up to 8b7bf2badac25c0a52aff1b181ad75fdb304dd0c: Migration+TLS: Fix crash due to double cleanup (2018-05-15 22:13:08 +0200

[Qemu-devel] [PULL 09/40] migration: Create multifd channels

2018-05-15 Thread Juan Quintela
In both sides. We still don't transmit anything through them. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/ram.c | 52 +++-- 1 file changed, 42 insertions(+), 10 deletions(-)

[Qemu-devel] [PULL 02/40] tests: Add migration precopy test

2018-05-15 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu --- tests/migration-test.c | 44 -- 1 file changed, 42 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL 05/40] migration: Introduce multifd_recv_new_channel()

2018-05-15 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrangé --- migration/migration.c | 3 ++- migration/ram.c | 6 ++ migration/ram.h | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/migration/migration.c

[Qemu-devel] [PULL 01/40] migration: fix saving normal page even if it's been compressed

2018-05-15 Thread Juan Quintela
From: Xiao Guangrong Fix the bug introduced by da3f56cb2e767016 (migration: remove ram_save_compressed_page()), It should be 'return' rather than 'res' Sorry for this stupid mistake :( Signed-off-by: Xiao Guangrong Message-Id:

Re: [Qemu-devel] [PATCH 3/3] nvdimm: platform capabilities command line option

2018-05-15 Thread Ross Zwisler
On Thu, May 10, 2018 at 03:28:48PM +0200, Igor Mammedov wrote: > On Fri, 27 Apr 2018 15:53:14 -0600 > Ross Zwisler wrote: > > > Add a device command line option to allow the user to control the Platform > > Capabilities Structure in the virtualized NFIT. > > > >

[Qemu-devel] [Bug 1771238] Re: Not able to passthrough > 32 PCIe devices to a KVM Guest

2018-05-15 Thread Khaled El Mously
@David Coronel: It's not clear to me - is this a regression? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1771238 Title: Not able to passthrough > 32 PCIe devices to a KVM Guest Status in QEMU:

[Qemu-devel] [PATCH v6 24/28] fpu/softfloat: Pass FloatClass to pickNaN

2018-05-15 Thread Richard Henderson
For each operand, pass a single enumeration instead of a pair of booleans. The commit also merges multiple different ifdef-selected implementations of pickNaN into a single function whose body is ifdef-selected. Reviewed-by: Peter Maydell Signed-off-by: Richard

[Qemu-devel] [PATCH v6 19/28] target/s390x: Remove floatX_maybe_silence_nan from conversions

2018-05-15 Thread Richard Henderson
This is now handled properly by the generic softfloat code. Cc: Alexander Graf Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/fpu_helper.c | 12 ++-- 1 file changed, 6 insertions(+), 6

[Qemu-devel] [PATCH v6 23/28] fpu/softfloat: Make is_nan et al available to softfloat-specialize.h

2018-05-15 Thread Richard Henderson
We will need these helpers within softfloat-specialize.h, so move the definitions above the include. After specialization, they will not always be used so mark them to avoid the Werror. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by:

[Qemu-devel] [PATCH v6 12/28] fpu/softfloat: re-factor float to float conversions

2018-05-15 Thread Richard Henderson
From: Alex Bennée This allows us to delete a lot of additional boilerplate code which is no longer needed. Reviewed-by: Peter Maydell Signed-off-by: Alex Bennée Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH v6 17/28] target/mips: Remove floatX_maybe_silence_nan from conversions

2018-05-15 Thread Richard Henderson
This is now handled properly by the generic softfloat code. Cc: Aurelien Jarno Cc: Yongbok Kim Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/mips/msa_helper.c | 4

[Qemu-devel] [PATCH v6 13/28] target/arm: Use floatX_silence_nan when we have already checked for SNaN

2018-05-15 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/helper-a64.c | 6 +++--- target/arm/helper.c | 12

[Qemu-devel] [PATCH v6 16/28] target/m68k: Use floatX_silence_nan when we have already checked for SNaN

2018-05-15 Thread Richard Henderson
Reviewed-by: Peter Maydell Reviewed-by: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/softfloat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/target/m68k/softfloat.c

[Qemu-devel] [PATCH v6 11/28] fpu/softfloat: Partial support for ARM Alternative half-precision

2018-05-15 Thread Richard Henderson
From: Alex Bennée For float16 ARM supports an alternative half-precision format which sacrifices the ability to represent NaN/Inf in return for a higher dynamic range. The new FloatFmt flag, arm_althp, is then used to modify the behaviour of canonicalize and

[Qemu-devel] [PATCH v6 22/28] fpu/softfloat: Specialize on snan_bit_is_one

2018-05-15 Thread Richard Henderson
Only MIPS requires snan_bit_is_one to be variable. While we are specializing softfloat behaviour, allow other targets to eliminate this runtime check. Cc: Aurelien Jarno Cc: Yongbok Kim Cc: David Gibson Cc: Alexander

[Qemu-devel] [PATCH v6 28/28] fpu/softfloat: Define floatN_silence_nan in terms of parts_silence_nan

2018-05-15 Thread Richard Henderson
Isolate the target-specific choice to 3 functions instead of 6. The code in floatx80_default_nan tried to be over-general. There are only two targets that support this format: x86 and m68k. Thus there is no point in inventing a mechanism for snan_bit_is_one. Move routines that no longer have

[Qemu-devel] [PATCH v6 15/28] target/hppa: Remove floatX_maybe_silence_nan from conversions

2018-05-15 Thread Richard Henderson
This is now handled properly by the generic softfloat code. Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- target/hppa/op_helper.c | 2 -- 1 file changed, 2 deletions(-)

[Qemu-devel] [PATCH v6 21/28] fpu/softfloat: Remove floatX_maybe_silence_nan

2018-05-15 Thread Richard Henderson
These functions are now unused. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- fpu/softfloat-specialize.h | 63

[Qemu-devel] [PATCH v6 03/28] fpu/softfloat: Split floatXX_silence_nan from floatXX_maybe_silence_nan

2018-05-15 Thread Richard Henderson
The new function assumes that the input is an SNaN and does not double-check. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v6 27/28] fpu/softfloat: Clean up parts_default_nan

2018-05-15 Thread Richard Henderson
Reduce the number of ifdefs. Correct the result for OpenRISC and TriCore (although TriCore fixed in target-specific code). Signed-off-by: Richard Henderson --- fpu/softfloat-specialize.h | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-)

[Qemu-devel] [PATCH v6 14/28] target/arm: Remove floatX_maybe_silence_nan from conversions

2018-05-15 Thread Richard Henderson
This is now handled properly by the generic softfloat code. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v6 20/28] fpu/softfloat: Use float*_silence_nan in propagateFloat*NaN

2018-05-15 Thread Richard Henderson
We have already checked the arguments for SNaN; we don't need to do it again. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v6 05/28] fpu/softfloat: Canonicalize NaN fraction

2018-05-15 Thread Richard Henderson
Shift the NaN fraction to a canonical position, much like we do for the fraction of normal numbers. This will facilitate manipulation of NaNs within the shared code paths. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH v6 26/28] fpu/softfloat: Define floatN_default_nan in terms of parts_default_nan

2018-05-15 Thread Richard Henderson
Isolate the target-specific choice to 2 functions instead of 6. The code in float16_default_nan was only correct for ARM, MIPS, and X86. Though float16 support is rare among our targets. The code in float128_default_nan was arguably wrong for Sparc. While QEMU supports the Sparc 128-bit insns,

[Qemu-devel] [PATCH v6 18/28] target/riscv: Remove floatX_maybe_silence_nan from conversions

2018-05-15 Thread Richard Henderson
This is now handled properly by the generic softfloat code. Cc: Palmer Dabbelt Cc: Sagar Karandikar Cc: Bastian Koppelmann Reviewed-by: Michael Clark Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH v6 09/28] target/arm: convert conversion helpers to fpst/ahp_flag

2018-05-15 Thread Richard Henderson
From: Alex Bennée Instead of passing env and leaving it up to the helper to get the right fpstatus we pass it explicitly. There was already a get_fpstatus helper for neon for the 32 bit code. We also add an get_ahp_flag() for passing the state of the alternative FP16

[Qemu-devel] [PATCH v6 04/28] fpu/softfloat: Move softfloat-specialize.h below FloatParts definition

2018-05-15 Thread Richard Henderson
We want to be able to specialize on the canonical representation. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson ---

[Qemu-devel] [PATCH v6 25/28] fpu/softfloat: Pass FloatClass to pickNaNMulAdd

2018-05-15 Thread Richard Henderson
For each operand, pass a single enumeration instead of a pair of booleans. The commit also merges multiple different ifdef-selected implementations of pickNaNMulAdd into a single function whose body is ifdef-selected. Reviewed-by: Peter Maydell Signed-off-by: Richard

[Qemu-devel] [PATCH v6 07/28] fpu/softfloat: Replace float_class_dnan with parts_default_nan

2018-05-15 Thread Richard Henderson
With a canonical representation of NaNs, we can return the default nan directly rather than delay the expansion until the final format is known. Note one case where we uselessly assigned to a.sign, which was overwritten/ignored later when expanding float_class_dnan. Tested-by: Alex Bennée

[Qemu-devel] [PATCH v6 01/28] fpu/softfloat: Fix conversion from uint64 to float128

2018-05-15 Thread Richard Henderson
From: Petr Tesarik The significand is passed to normalizeRoundAndPackFloat128() as high first, low second. The current code passes the integer first, so the result is incorrectly shifted left by 64 bits. This bug affects the emulation of s390x instruction CXLGBR (convert from

[Qemu-devel] [PATCH v6 10/28] target/arm: squash FZ16 behaviour for conversions

2018-05-15 Thread Richard Henderson
From: Alex Bennée The ARM ARM specifies FZ16 is suppressed for conversions. Rather than pushing this logic into the softfloat code we can simply save the FZ state and temporarily disable it for the softfloat call. Reviewed-by: Peter Maydell

[Qemu-devel] [PATCH v6 08/28] fpu/softfloat: Replace float_class_msnan with parts_silence_nan

2018-05-15 Thread Richard Henderson
With a canonical representation of NaNs, we can silence an SNaN immediately rather than delay until the final format is known. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by:

[Qemu-devel] [PATCH v6 02/28] fpu/softfloat: Merge NO_SIGNALING_NANS definitions

2018-05-15 Thread Richard Henderson
Move the ifdef inside the relevant functions instead of duplicating the function declarations. Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson

[Qemu-devel] [PATCH v6 06/28] fpu/softfloat: Introduce parts_is_snan_frac

2018-05-15 Thread Richard Henderson
Tested-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- fpu/softfloat-specialize.h | 15 +++ fpu/softfloat.c|

[Qemu-devel] [PATCH v6 00/28] softfloat patch roundup

2018-05-15 Thread Richard Henderson
This is my SNaN patch set, Alex's float-float refactor, and a couple of other random outstanding fpu patches. This has been reordered so as to be bisectable, since the float-float refactor requires the snan work to avoid breakage. The edition of pm215/target-arm.next upon which this was built

Re: [Qemu-devel] [PATCH v2 28/36] target-microblaze: Add support for extended access to TLBLO

2018-05-15 Thread Edgar E. Iglesias
On Wed, May 09, 2018 at 02:15:14PM -0700, Richard Henderson wrote: > On 05/08/2018 10:31 AM, Edgar E. Iglesias wrote: > > +if (to) { > > +gen_helper_mmu_write(cpu_env, tcg_const_i32(extended), > > + tcg_const_i32(sr), cpu_R[dc->ra]); > > +

[Qemu-devel] [PULL 7/7] i386: Add new property to control cache info

2018-05-15 Thread Eduardo Habkost
From: Babu Moger The property legacy-cache will be used to control the cache information. If user passes "-cpu legacy-cache" then older information will be displayed even if the hardware supports new information. Otherwise use the statically loaded cache definitions if

[Qemu-devel] [PULL 2/7] x86/cpu: Enable CLDEMOTE(Demote Cache Line) cpu feature

2018-05-15 Thread Eduardo Habkost
From: Jingqi Liu The CLDEMOTE instruction hints to hardware that the cache line that contains the linear address should be moved("demoted") from the cache(s) closest to the processor core to a level more distant from the processor core. This may accelerate subsequent

[Qemu-devel] [PULL 3/7] i386: Helpers to encode cache information consistently

2018-05-15 Thread Eduardo Habkost
Instead of having a collection of macros that need to be used in complex expressions to build CPUID data, define a CPUCacheInfo struct that can hold information about a given cache. Helper functions will take a CPUCacheInfo struct as input to encode CPUID leaves for a cache. This will help us

[Qemu-devel] [PULL 1/7] i386: add KnightsMill cpu model

2018-05-15 Thread Eduardo Habkost
From: Boqun Feng A new cpu model called "KnightsMill" is added to model Knights Mill processors. Compared to "Skylake-Server" cpu model, the following features are added: avx512_4vnniw avx512_4fmaps avx512pf avx512er avx512_vpopcntdq and the following features

[Qemu-devel] [PULL 5/7] i386: Initialize cache information for EPYC family processors

2018-05-15 Thread Eduardo Habkost
From: Babu Moger Initialize pre-determined cache information for EPYC processors. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Message-Id: <20180510204148.11687-5-babu.mo...@amd.com> Signed-off-by: Eduardo Habkost

[Qemu-devel] [PULL 6/7] pc: add 2.13 machine types

2018-05-15 Thread Eduardo Habkost
From: Babu Moger Add pc-q35-2.13 and pc-i440fx-2.13 machine types Signed-off-by: Babu Moger Message-Id: <20180514164156.27034-2-babu.mo...@amd.com> Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost

[Qemu-devel] [PULL 4/7] i386: Add cache information in X86CPUDefinition

2018-05-15 Thread Eduardo Habkost
From: Babu Moger Add cache information in X86CPUDefinition and CPUX86State. Signed-off-by: Babu Moger Tested-by: Geoffrey McRae Reviewed-by: Eduardo Habkost Message-Id:

[Qemu-devel] [PULL 0/7] x86 queue, 2018-05-15

2018-05-15 Thread Eduardo Habkost
The following changes since commit ad1b4ec39caa5b3f17cbd8160283a03a3dcfe2ae: Merge remote-tracking branch 'remotes/kraxel/tags/input-20180515-pull-request' into staging (2018-05-15 12:50:06 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/x86-next

Re: [Qemu-devel] [PATCH v2 10/36] target-microblaze: Bypass MMU with MMU_NOMMU_IDX

2018-05-15 Thread Edgar E. Iglesias
On Wed, May 09, 2018 at 01:51:31PM -0700, Richard Henderson wrote: > On 05/08/2018 10:31 AM, Edgar E. Iglesias wrote: > > +if (cpu->cfg.use_mmu && (env->sregs[SR_MSR] & MSR_VM) > > +&& mmu_idx != MMU_NOMMU_IDX) { > > For future cleanup, the first condition should be moved to

Re: [Qemu-devel] [PATCH] exec.c: Initialize sa_flags passed to sigaction()

2018-05-15 Thread Eric Blake
On 05/15/2018 03:53 PM, Philippe Mathieu-Daudé wrote: On 05/15/2018 03:27 PM, Peter Maydell wrote: Coverity points out that in the user-only version of cpu_abort() we call sigaction() with a partially initialized struct sigaction (CID 1005351). Correct the omission. Signed-off-by: Peter

[Qemu-devel] Problem with data miscompare using scsi-hd, cache=none and io=threads

2018-05-15 Thread Daniel Henrique Barboza
Hi, I've been working in the last two months in a miscompare issue that happens when using a raid device and a SATA as scsi-hd (emulated SCSI) with cache=none and io=threads during a hardware stress test. I'll summarize it here as best as I can without creating a great wall of text - Red Hat

Re: [Qemu-devel] [RFC PATCH 07/12] qcow2-bitmap: add basic bitmaps info

2018-05-15 Thread John Snow
On 05/14/2018 11:12 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> Add functions for querying the basic information inside of bitmaps. >> Restructure the bitmaps flags masks to facilitate providing a list of >> flags belonging to the bitmap(s) being queried. >>

Re: [Qemu-devel] [RFC PATCH 03/12] block/qcow2-bitmap: avoid adjusting bm->flags for RO bitmaps

2018-05-15 Thread John Snow
On 05/14/2018 08:44 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> Instead of always setting IN_USE, handle whether or not the bitmap >> is read-only instead of a two-loop pass. This will allow us to show >> the flags exactly as they appear for bitmaps in

Re: [Qemu-devel] [RFC PATCH 06/12] qapi: add bitmap info

2018-05-15 Thread John Snow
On 05/14/2018 10:30 AM, Vladimir Sementsov-Ogievskiy wrote: > 12.05.2018 04:25, John Snow wrote: >> Add some of the necessary scaffolding for reporting bitmap information. >> >> Signed-off-by: John Snow >> --- >>   qapi/block-core.json | 60 >>

  1   2   3   4   5   >