[Qemu-devel] [PATCH v3 11/32] migration: pass MigrationState to migrate_init()

2017-10-16 Thread Peter Xu
Let the callers take the object, then pass it to migrate_init(). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/migration.c | 7 ++- migration/migration.h | 2 +- migration/savevm.c| 5 - 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/migra

[Qemu-devel] [PATCH v3 14/32] migration: wakeup dst ram-load-thread for recover

2017-10-16 Thread 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 destination VM state from postcopy-p

[Qemu-devel] [PATCH v3 24/32] migration: return incoming task tag for sockets

2017-10-16 Thread Peter Xu
For socket based incoming migration, we attached a background task onto main loop to handle the acception of connections. We never had a way to destroy it before, only if we finished the migration. Let's allow socket_start_incoming_migration() to return the source tag of the listening async work,

[Qemu-devel] [PATCH v3 13/32] migration: new state "postcopy-recover"

2017-10-16 Thread 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 logic in the migration thread (along wit

[Qemu-devel] [PATCH v3 28/32] migration: allow migrate_incoming for paused VM

2017-10-16 Thread Peter Xu
migrate_incoming command is previously only used when we were providing "-incoming defer" in the command line, to defer the incoming migration channel creation. However there is similar requirement when we are paused during postcopy migration. The old incoming channel might have been destroyed alr

[Qemu-devel] [PATCH v3 17/32] migration: new cmd MIG_CMD_POSTCOPY_RESUME

2017-10-16 Thread 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 Signed-off-by: Peter Xu --- migration/savevm.c | 35

[Qemu-devel] [PATCH v3 15/32] migration: new cmd MIG_CMD_RECV_BITMAP

2017-10-16 Thread 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 --- migration/savevm.c | 61 ++ migration/savevm.h | 1 + migration/trace-events | 2 ++ 3

[Qemu-devel] [PATCH v3 16/32] migration: new message MIG_RP_MSG_RECV_BITMAP

2017-10-16 Thread 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 ramblock received bitmap on the destina

[Qemu-devel] [PATCH v3 32/32] migration, hmp: new command "migrate_pause"

2017-10-16 Thread Peter Xu
HMP version of QMP "migrate-pause". Signed-off-by: Peter Xu --- hmp-commands.hx | 14 ++ hmp.c | 9 + hmp.h | 1 + 3 files changed, 24 insertions(+) diff --git a/hmp-commands.hx b/hmp-commands.hx index 7adb029b34..bfba3ea977 100644 --- a/hmp-commands.hx

[Qemu-devel] [PATCH v3 19/32] migration: introduce SaveVMHandlers.resume_prepare

2017-10-16 Thread 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 Signed-off-by: Peter Xu --- include/migration/register.h | 2

[Qemu-devel] [PATCH v3 18/32] migration: new message MIG_RP_MSG_RESUME_ACK

2017-10-16 Thread 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 --- migration/migration.c | 37 +

[Qemu-devel] [PATCH v3 22/32] migration: final handshake for the resume

2017-10-16 Thread 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 to postcopy-active state). When sourc

[Qemu-devel] [PATCH v3 20/32] migration: synchronize dirty bitmap for resume

2017-10-16 Thread 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 is cleared, it is still possible that

[Qemu-devel] [PATCH v3 25/32] migration: return incoming task tag for exec

2017-10-16 Thread Peter Xu
Return the async task tag for exec typed incoming migration in exec_start_incoming_migration(). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/exec.c | 18 +++--- migration/exec.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/mig

Re: [Qemu-devel] [PATCH v3 31/32] migration, qmp: new command "migrate-pause"

2017-10-16 Thread Peter Xu
On Mon, Oct 16, 2017 at 02:52:15PM +0800, Peter Xu wrote: [...] > +# @migrate-pause: > +# > +# Pause an migration. Currently it can only pause a postcopy > +# migration. Pausing a precopy migration is not supported yet. > +# > +# It is mostly used as a manual way to trigger the postcopy paused

[Qemu-devel] [PATCH v3 23/32] migration: free SocketAddress where allocated

2017-10-16 Thread Peter Xu
Freeing the SocketAddress struct in socket_start_incoming_migration is slightly confusing. Let's free the address in the same context where we allocated it. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(

[Qemu-devel] [PATCH v3 26/32] migration: return incoming task tag for fd

2017-10-16 Thread Peter Xu
Allow to return the task tag in fd_start_incoming_migration(). Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu --- migration/fd.c | 18 +++--- migration/fd.h | 2 +- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/migration/fd.c b/migration/fd.c index 30

[Qemu-devel] [PATCH v3 21/32] migration: setup ramstate for resume

2017-10-16 Thread 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 --- migration/ram.c| 37 - migration/trace-event

[Qemu-devel] [PATCH v3 27/32] migration: store listen task tag

2017-10-16 Thread Peter Xu
Store the task tag for migration types: tcp/unix/fd/exec in current MigrationIncomingState struct. For defered migration, no need to store task tag since there is no task running in the main loop at all. For RDMA, let's mark it as todo. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu

[Qemu-devel] [FIX PATCH] monitor: Don't return CPU marked for unplug as monitor CPU

2017-10-16 Thread Bharata B Rao
The following sequence of steps kill the QEMU: - Hotplug a CPU - Change the default CPU to the newly hotplugged cpu using "cpu" HMP command. - Hot unplug the CPU - Run "info cpus" Fix this by not letting monitor_get_cpu() to return a CPU which is marked for unplug. Reported-by: Satheesh Rajendra

Re: [Qemu-devel] [PATCH v2 00/30] s390x: SMP for TCG

2017-10-16 Thread David Hildenbrand
On 11.10.2017 14:07, Cornelia Huck wrote: > On Thu, 28 Sep 2017 22:36:38 +0200 > David Hildenbrand wrote: > >> This series is based on a couple of other patches floating around on >> the mailing list (e.g. cleanups and LAP). The fist patches of v1 have >> been sent as a separate series. >> >> As

[Qemu-devel] [PATCH v3 29/32] migration: init dst in migration_object_init too

2017-10-16 Thread 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 --- migration/migration.c | 28 +++-

[Qemu-devel] [PATCH v3 30/32] migration: delay the postcopy-active state switch

2017-10-16 Thread Peter Xu
Switch the state until we try to start the VM on destination side. The problem is that without doing this we may have a very small window that we'll be in such a state: - dst VM is in postcopy-active state, - main thread is handling MIG_CMD_PACKAGED message, which loads all the device states, -

[Qemu-devel] [PATCH v3 31/32] migration, qmp: new command "migrate-pause"

2017-10-16 Thread Peter Xu
It is used to manually trigger the postcopy pause state. It works just like when we found the migration stream failed during postcopy, but provide an explicit way for user in case of misterious socket hangs. Signed-off-by: Peter Xu --- migration/migration.c | 18 ++ qapi/migrati

Re: [Qemu-devel] [RFC v2 09/22] monitor: create monitor dedicate iothread

2017-10-16 Thread Peter Xu
On Thu, Oct 12, 2017 at 01:29:11PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 29, 2017 at 11:38:31AM +0800, Peter Xu wrote: > > @@ -4126,10 +4150,23 @@ void monitor_init(Chardev *chr, int flags) > > qemu_mutex_unlock(&monitor_lock); > > } > > > > +static void monitor_io_thread_destroy(void

Re: [Qemu-devel] [PATCH v1 5/6] kvm: kvm_log_start/stop are only called with known sections

2017-10-16 Thread David Hildenbrand
On 10.10.2017 15:29, Paolo Bonzini wrote: > On 10/10/2017 11:06, Thomas Huth wrote: >> On 11.09.2017 19:49, David Hildenbrand wrote: >>> Let's properly align the sections first and bail out if we would ever >>> get called with a memory section we don't know yet. >>> >>> Signed-off-by: David Hildenb

Re: [Qemu-devel] [PATCH RFC 2/3] s390x/tcg: low-address protection support

2017-10-16 Thread David Hildenbrand
On 12.10.2017 10:41, Thomas Huth wrote: > On 29.09.2017 13:27, Cornelia Huck wrote: >> On Thu, 28 Sep 2017 15:08:11 +0200 >> David Hildenbrand wrote: >> >>> On 28.09.2017 06:50, Thomas Huth wrote: On 27.09.2017 19:00, David Hildenbrand wrote: > This is a neat way to implement low addres

Re: [Qemu-devel] [PATCH RFC 1/3] accel/tcg: allow to invalidate a write TLB entry immediately

2017-10-16 Thread David Hildenbrand
On 27.09.2017 19:48, Richard Henderson wrote: > On 09/27/2017 10:00 AM, David Hildenbrand wrote: >> Background: s390x implements Low-Address Protection (LAP). If LAP is >> enabled, writing to effective addresses (before any transaltion) >> 0-511 and 4096-4607 triggers a protection exception. >> >>

Re: [Qemu-devel] [RFC v2 10/22] monitor: allow to use IO thread for parsing

2017-10-16 Thread Peter Xu
On Thu, Oct 12, 2017 at 01:35:08PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 29, 2017 at 11:38:32AM +0800, Peter Xu wrote: > > For each Monitor, add one field "use_io_thr" to show whether it will be > > using the dedicated monitor IO thread to handle input/output. When set, > > monitor IO parsin

Re: [Qemu-devel] [PATCH] configure: pick the right compiler for OpenBSD by default

2017-10-16 Thread Gerd Hoffmann
Hi, > By the way, looks like OpenBSD is also switching to clang by default > soon: > > https://www.phoronix.com/scan.php?page=news_item&px=OpenBSD-Default- > Clang It did happen already. On openbsd 6.2 (released a week ago) cc is clang: $ cc --version OpenBSD clang version 4.0.0 (tags/RELEAS

Re: [Qemu-devel] [RFC v2 13/22] monitor: separate QMP parser and dispatcher

2017-10-16 Thread Peter Xu
On Thu, Oct 12, 2017 at 01:50:45PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 29, 2017 at 11:38:35AM +0800, Peter Xu wrote: > > Originally QMP is going throw these steps: > > s/is going throw/goes through/ Fixed. > > > > > JSON Parser --> QMP Dispatcher --> Respond > > /|\(2)

Re: [Qemu-devel] [PATCH v2 00/40] generalize parsing of cpu_model (part 2)

2017-10-16 Thread Igor Mammedov
On Fri, 13 Oct 2017 16:13:16 -0300 Eduardo Habkost wrote: > On Thu, Oct 12, 2017 at 06:27:46PM +0200, Igor Mammedov wrote: > > On Thu, 5 Oct 2017 15:50:34 +0200 > > Igor Mammedov wrote: > > > > Eduardo, > > > > Could you merge series via machine tree, pls? > > I just queued it on machine-n

Re: [Qemu-devel] [PATCH 2/2] monitor: add proper reference counting of the current CPU

2017-10-16 Thread Igor Mammedov
On Fri, 13 Oct 2017 12:05:46 +0200 Greg Kurz wrote: > On Fri, 13 Oct 2017 11:24:59 +0200 > Igor Mammedov wrote: > > > On Fri, 13 Oct 2017 10:35:31 +0200 > > Greg Kurz wrote: > > > > > If a CPU selected with the "cpu" command is hot-unplugged then "info cpus" > > > causes QEMU to exit: > > >

Re: [Qemu-devel] [RFC v2 15/22] monitor: send event when request queue full

2017-10-16 Thread Peter Xu
On Thu, Oct 12, 2017 at 01:56:20PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 29, 2017 at 11:38:37AM +0800, Peter Xu wrote: > > Set maximum QMP request queue length to 8. If queue full, instead of > > queue the command, we directly return a "request-dropped" event, telling > > client that specifi

Re: [Qemu-devel] [RFC v2 16/22] monitor: enable IO thread for (qmp & !mux) typed

2017-10-16 Thread Peter Xu
On Thu, Oct 12, 2017 at 01:57:55PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 29, 2017 at 11:38:38AM +0800, Peter Xu wrote: > > Start to use dedicate IO thread for QMP monitors that are not using > > MUXed chardev. > > > > We excluded MUXed chardev because when mux is used, frontend can be the >

Re: [Qemu-devel] [RFC PATCH 14/30] softfloat: 16 bit helpers for shr, clz and rounding and packing

2017-10-16 Thread Alex Bennée
Richard Henderson writes: > On 10/13/2017 09:24 AM, Alex Bennée wrote: >> Half-precision helpers for float16 maths. I didn't bother hand-coding >> the count leading zeros as we could always fall-back to host-utils if >> we needed to. >> >> Signed-off-by: Alex Bennée >> --- >> fpu/softfloat-mac

Re: [Qemu-devel] [PATCH] spapr_cpu_core: instantiate CPUs separately

2017-10-16 Thread Igor Mammedov
On Sat, 14 Oct 2017 20:33:37 +1100 David Gibson wrote: > On Fri, Oct 13, 2017 at 01:31:44PM +0200, Greg Kurz wrote: > > The current code assumes that only the CPU core object holds a > > reference on each individual CPU object, and happily frees their > > allocated memory when the core is unreali

Re: [Qemu-devel] [PATCH 2/4] multiboot: load any machine type of ELF

2017-10-16 Thread Kevin Wolf
Am 14.10.2017 um 15:41 hat Peter Maydell geschrieben: > On 14 October 2017 at 00:21, Eduardo Habkost wrote: > > I don't believe the spec restricts that, but I don't see why it > > would be useful to load an ELF file that doesn't match the target > > architecture (e.g. loading non-x86 ELF files on

Re: [Qemu-devel] [PATCH v4 1/8] nbd: Include error names in trace messages

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: NBD errors were originally sent over the wire based on Linux errno values; but not all the world is Linux, and not all platforms share the same values. Since a number isn't very easy to decipher on all platforms, update the trace messages to include the name o

Re: [Qemu-devel] [RFC v2 00/32] postcopy+vhost-user/shared ram

2017-10-16 Thread Alexey Perevalov
Hello Maxime On 09/01/2017 04:42 PM, Maxime Coquelin wrote: Hello Alexey, On 09/01/2017 03:34 PM, Alexey Perevalov wrote: Hello David, You wrote in previous version: We've had a postcopy migrate work now, with a few hacks we're still cleaning up, both on vhost-user-bridge and dpdk; so I'll

Re: [Qemu-devel] [PATCH v4 2/8] nbd: Move nbd_errno_to_system_errno() to public header

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: This is needed in preparation for structured reply handling, as we will be performing the translation from NBD error to system errno value higher in the stack at block/nbd-client.c. you've forget to sign-off. Reviewed-by: Vladimir Sementsov-Ogievskiy ---

Re: [Qemu-devel] [PATCH] monitor: fix dangling CPU pointer

2017-10-16 Thread Igor Mammedov
On Fri, 13 Oct 2017 13:47:51 +0200 Greg Kurz wrote: [...] > Note that the resolution should really return a CPU object, otherwise > we have a bug. This is achieved by relying on object_resolve_path() > and CPU() instead of calling object_resolve_path_type(path, TYPE_CPU). I'm not sure what you a

Re: [Qemu-devel] [PATCH v4 3/8] nbd: Expose constants and structs for structured read

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: Upcoming patches will implement the NBD structured reply extension [1] for both client and server roles. Declare the constants, structs, and lookup routines that will be valuable whether the server or client code is backported in isolation. This includes movi

Re: [Qemu-devel] [PATCH v1 5/6] kvm: kvm_log_start/stop are only called with known sections

2017-10-16 Thread Thomas Huth
On 16.10.2017 09:16, David Hildenbrand wrote: > On 10.10.2017 15:29, Paolo Bonzini wrote: >> On 10/10/2017 11:06, Thomas Huth wrote: >>> On 11.09.2017 19:49, David Hildenbrand wrote: Let's properly align the sections first and bail out if we would ever get called with a memory section we

[Qemu-devel] [PATCH 0/2] add "nopin" option in the memory-backend-file

2017-10-16 Thread Yang Zhong
Qemu does not need pin NVDIMM memory for VFIO device during VFIO hotplug, what's more, if there is no NVDIMM hw in the test machine, the VFIO hotplug operation will need at least 10 minutes to pin RAM as the NVDIMM, this time is not accepted. So we add "nopin=on" option in the memory-backed-file, w

[Qemu-devel] [PATCH 1/2] hostmem-file: Add "nopin" option for memory-backend-file

2017-10-16 Thread Yang Zhong
Since qemu does not need pin nvdimm memory during the VFIO hotplug, the new option can be used to avoid pin whole nvdimm memory. The default value is still "nopin=off" as previous. Signed-off-by: Yang Zhong --- backends/hostmem-file.c | 23 +++ hw/vfio/common.c| 12 ++

[Qemu-devel] [PATCH 2/2] nvdimm: Add "nopin" for related documents

2017-10-16 Thread Yang Zhong
Added the "nopin" related changes in nvdimm.txt and qemu-options.hx. Signed-off-by: Yang Zhong --- docs/nvdimm.txt | 10 -- qemu-options.hx | 6 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt index 2d9f8c0..41ac1c2 100644 --- a/d

[Qemu-devel] [PATCH RESEND 0/2] x86_iommu: Fix segfault when starting on non-PCI machines

2017-10-16 Thread Mohammed Gamal
Starting qemu with qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu leads to a segfault. The code assume PCI bus is present and tries to access the bus structure without checking. The patch series moves the error checks from vtd_realize() and amdvi_realize() to the generic x86_iommu_realiz

[Qemu-devel] [PATCH RESEND 1/2] x86_iommu: Move machine check to x86_iommu_realize()

2017-10-16 Thread Mohammed Gamal
Instead of having the same error checks in vtd_realize() and amdvi_realize(), move that over to the generic x86_iommu_realize(). Reviewed-by: Peter Xu Reviewed-by: Eduardo Habkost Signed-off-by: Mohammed Gamal --- hw/i386/amd_iommu.c | 13 ++--- hw/i386/intel_iommu.c | 13 ++-

[Qemu-devel] [PATCH RESEND 2/2] x86_iommu: check if machine has PCI bus

2017-10-16 Thread Mohammed Gamal
Starting qemu with qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu leads to a segfault. The code assume PCI bus is present and tries to access the bus structure without checking. Since Intel VT-d and AMDVI should only work with PCI, add a check for PCI bus and return error if not present.

Re: [Qemu-devel] [FIX PATCH] monitor: Don't return CPU marked for unplug as monitor CPU

2017-10-16 Thread Igor Mammedov
On Mon, 16 Oct 2017 12:33:26 +0530 Bharata B Rao wrote: > The following sequence of steps kill the QEMU: > > - Hotplug a CPU > - Change the default CPU to the newly hotplugged cpu using "cpu" HMP command. > - Hot unplug the CPU > - Run "info cpus" > > Fix this by not letting monitor_get_cpu() t

[Qemu-devel] [PATCH v1] memory: call log_start after region_add

2017-10-16 Thread David Hildenbrand
It might be confusing for some listener implementations that implement both, region_add and log_start (e.g. KVM) if we call log_start before an actual region was added using region_add. This makes current KVM code trigger an assertion ("kvm_section_update_flags: error finding slot"). So let's just

Re: [Qemu-devel] [PATCH v1 5/6] kvm: kvm_log_start/stop are only called with known sections

2017-10-16 Thread David Hildenbrand
On 16.10.2017 10:52, Thomas Huth wrote: > On 16.10.2017 09:16, David Hildenbrand wrote: >> On 10.10.2017 15:29, Paolo Bonzini wrote: >>> On 10/10/2017 11:06, Thomas Huth wrote: On 11.09.2017 19:49, David Hildenbrand wrote: > Let's properly align the sections first and bail out if we would

Re: [Qemu-devel] [PULL 00/11] Ui 20171013 patches

2017-10-16 Thread Gerd Hoffmann
Hi, > I'm afraid this is quite likely to fail build smoke test again. I've > just tried a build on OpenBSD with the bash -> sh fix in it, and I > found that it still tried to build the keycodemap files in parallel > with checking out the GIT submodules. It also tried to run the > mkdir -p dtc/li

Re: [Qemu-devel] [PULL 00/13] target-arm queue

2017-10-16 Thread Peter Maydell
On 12 October 2017 at 17:03, Peter Maydell wrote: > target-arm queue: > * mostly my latest v8M stuff, plus a couple of minor patches > > The following changes since commit a0b261db8c030813e30a39eae47359ac2a37f7e2: > > Merge remote-tracking branch > 'remotes/ehabkost/tags/python-next-pull-reque

Re: [Qemu-devel] [PATCH RESEND 0/2] x86_iommu: Fix segfault when starting on non-PCI machines

2017-10-16 Thread Peter Xu
On Mon, Oct 16, 2017 at 11:06:21AM +0200, Mohammed Gamal wrote: > Starting qemu with > qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu > leads to a segfault. The code assume PCI bus is present and > tries to access the bus structure without checking. > > The patch series moves the error c

Re: [Qemu-devel] using which notification for guest about GHES error

2017-10-16 Thread Igor Mammedov
On Mon, 16 Oct 2017 14:10:05 +0800 gengdongjiu wrote: > Hi Igor/Michael, >I am very sorry to disturb you again. > Now we use Qemu to create APEI table and record CPER for guest, > After QEMU recorded a asynchronous CPER error, we needs to notify guest using > interrupt or Polled notification

Re: [Qemu-devel] [PATCH v1] memory: call log_start after region_add

2017-10-16 Thread David Hildenbrand
On 16.10.2017 11:18, David Hildenbrand wrote: > It might be confusing for some listener implementations that implement > both, region_add and log_start (e.g. KVM) if we call log_start before an > actual region was added using region_add. > > This makes current KVM code trigger an assertion > ("kvm

Re: [Qemu-devel] [PATCH qemu v3] RFC: ppc/spapr: Receive and store device tree blob from SLOF

2017-10-16 Thread David Gibson
On Mon, Oct 16, 2017 at 04:20:04PM +1100, Alexey Kardashevskiy wrote: > SLOF receives a device tree and updates it with various properties > before switching to the guest kernel and QEMU is not aware of any changes > made by SLOF. Since there is no real RTAS and QEMU implements it, > it makes sense

[Qemu-devel] [PATCH v1] kvm: tolerate non-existing slot for log_start and log_stop

2017-10-16 Thread David Hildenbrand
log_start might be called by memory.c just before registering the section. So we can actually get a log_start without a region_add, which we can silently ignore. This makes current KVM code trigger an assertion ("kvm_section_update_flags: error finding slot"). Also, if we want to trap every acces

Re: [Qemu-devel] [PATCH v3 00/32] Migration: postcopy failure recovery

2017-10-16 Thread Peter Xu
On Mon, Oct 16, 2017 at 12:32:10AM -0700, no-re...@patchew.org wrote: > Hi, > > This series failed build test on s390x host. Please find the details below. > > Type: series > Subject: [Qemu-devel] [PATCH v3 00/32] Migration: postcopy failure recovery > Message-id: 20171016065216.18162-1-pet...@re

Re: [Qemu-devel] [PATCH v11 3/5] msf2: Add Smartfusion2 SPI controller

2017-10-16 Thread sundeep subbaraya
Hi Peter, On Tue, Oct 10, 2017 at 6:24 PM, Peter Maydell wrote: > On 20 September 2017 at 21:17, Philippe Mathieu-Daudé > wrote: > > From: Subbaraya Sundeep > > > > Modelled Microsemi's Smartfusion2 SPI controller. > > > > Signed-off-by: Subbaraya Sundeep > > Reviewed-by: Alistair Francis >

Re: [Qemu-devel] [PATCH v3 00/32] Migration: postcopy failure recovery

2017-10-16 Thread Peter Xu
On Mon, Oct 16, 2017 at 01:05:04AM -0700, no-re...@patchew.org wrote: > Hi, > > This series failed automatic build test. Please find the testing commands and > their output below. If you have docker installed, you can probably reproduce > it > locally. > > Type: series > Message-id: 201710160652

Re: [Qemu-devel] [PATCH v4 4/8] nbd: Minimal structured read for server

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Minimal implementation of structured read: one structured reply chunk, no segmentation. Minimal structured error implementation: no text message. Support DF flag, but just ignore it, as there is no segmentation any way. Sig

Re: [Qemu-devel] [PATCH] checkpatch: replace ERROR with WARN forextern checking.

2017-10-16 Thread jiang.biao2
> On 11 October 2017 at 05:33, Jiang Biao wrote: > > I'd rather not drop this to a warning for the sake of a single > use case that's already in the tree (and which if you really > cared about you could work around by putting the link_error() > declaration in a header file I suppose, though I wou

Re: [Qemu-devel] [PATCH v1] kvm: tolerate non-existing slot for log_start and log_stop

2017-10-16 Thread David Hildenbrand
On 16.10.2017 11:41, David Hildenbrand wrote: > log_start might be called by memory.c just before registering the > section. So we can actually get a log_start without a region_add, which > we can silently ignore. > > This makes current KVM code trigger an assertion > ("kvm_section_update_flags: e

Re: [Qemu-devel] QEMU terminates during reboot after memory unplug with vhost=on

2017-10-16 Thread Bharata B Rao
On Thu, Sep 14, 2017 at 10:59:05AM +0200, Igor Mammedov wrote: > On Thu, 14 Sep 2017 13:48:26 +0530 > Bharata B Rao wrote: > > > On Thu, Sep 14, 2017 at 10:00:11AM +0200, Igor Mammedov wrote: > > > On Thu, 14 Sep 2017 12:31:18 +0530 > > > Bharata B Rao wrote: > > > > > > > Hi, > > > > > > >

Re: [Qemu-devel] [PULL 00/11] Ui 20171013 patches

2017-10-16 Thread Daniel P. Berrange
On Mon, Oct 16, 2017 at 11:19:13AM +0200, Gerd Hoffmann wrote: > Hi, > > > I'm afraid this is quite likely to fail build smoke test again. I've > > just tried a build on OpenBSD with the bash -> sh fix in it, and I > > found that it still tried to build the keycodemap files in parallel > > with

Re: [Qemu-devel] [PATCH] configure: pick the right compiler for OpenBSD by default

2017-10-16 Thread Daniel P. Berrange
On Mon, Oct 16, 2017 at 09:44:42AM +0200, Gerd Hoffmann wrote: > Hi, > > > By the way, looks like OpenBSD is also switching to clang by default > > soon: > > > > https://www.phoronix.com/scan.php?page=news_item&px=OpenBSD-Default- > > Clang > > It did happen already. On openbsd 6.2 (released

Re: [Qemu-devel] [PATCH 0/2] add "nopin" option in the memory-backend-file

2017-10-16 Thread Xiao Guangrong
On 10/16/2017 04:56 PM, Yang Zhong wrote: Qemu does not need pin NVDIMM memory for VFIO device during VFIO hotplug, what's more, if there is no NVDIMM hw in the test machine, the VFIO hotplug operation will need at least 10 minutes to pin RAM as the NVDIMM, this time is not accepted. So we add

Re: [Qemu-devel] [PATCH v4 5/8] nbd/server: Include human-readable message in structured errors

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: The NBD spec permits including a human-readable error string if structured replies are in force, so we might as well send the client the message that we logged on any error. Signed-off-by: Eric Blake --- nbd/server.c | 22 -- nbd/tr

Re: [Qemu-devel] [PATCH v4 6/8] nbd/client: refactor nbd_receive_starttls

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Split out nbd_request_simple_option to be reused for structured reply option. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake ok for me. -- Best regards, Vladimir

Re: [Qemu-devel] qemu-img convert to VMDK

2017-10-16 Thread Guilherme Moro
On 10/14/2017 10:45 AM, Fam Zheng wrote: On Fri, 10/13 15:20, Guilherme Moro wrote: Hi, I'm trying to convert some images from raw to vmdk to run in a ESXi6.5 server but I need to rectify the image before being able to run. The scenario goes like that: qemu-img convert -f raw image.raw -O vmd

Re: [Qemu-devel] [PATCH v3 00/32] Migration: postcopy failure recovery

2017-10-16 Thread no-reply
Hi, This series failed build test on s390x host. Please find the details below. Type: series Subject: [Qemu-devel] [PATCH v3 00/32] Migration: postcopy failure recovery Message-id: 20171016065216.18162-1-pet...@redhat.com === TEST SCRIPT BEGIN === #!/bin/bash # Testing script will be invoked und

Re: [Qemu-devel] [PATCH] monitor: fix dangling CPU pointer

2017-10-16 Thread Greg Kurz
On Mon, 16 Oct 2017 10:41:39 +0200 Igor Mammedov wrote: > On Fri, 13 Oct 2017 13:47:51 +0200 > Greg Kurz wrote: > > [...] > > > Note that the resolution should really return a CPU object, otherwise > > we have a bug. This is achieved by relying on object_resolve_path() > > and CPU() instead of

Re: [Qemu-devel] kvm_set_phys_mem: assertion failed

2017-10-16 Thread David Hildenbrand
On 04.10.2017 17:48, Laszlo Ersek wrote: > Hi, > > On 09/21/17 16:28, Auger Eric wrote: >> Hi David, >> On 20/09/2017 16:34, David Hildenbrand wrote: >>> On 20.09.2017 16:31, Gerd Hoffmann wrote: Hi, > Dropping from os section: > > type="pflash">/usr/share/edk2.git/ovm

Re: [Qemu-devel] [PATCH v2 22/47] hw/m68k: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. [...] > @@ -83,7 +83,7 @@ static void an5206_init(MachineState *machine) >

Re: [Qemu-devel] [PATCH v4 7/8] nbd/client: prepare nbd_receive_reply for structured reply

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy In following patch nbd_receive_reply will be used both for simple and structured reply header receiving. NBDReply is altered into union of simple reply header and structured reply chunk header, simple error translation moved

Re: [Qemu-devel] [PATCH v4 8/8] nbd: Move nbd_read() to common header

2017-10-16 Thread Vladimir Sementsov-Ogievskiy
15.10.2017 04:01, Eric Blake wrote: An upcoming change to block/nbd-client.c will want to read the tail of a structured reply chunk directly from the wire. Move this function to make it easier. Based on a patch from Vladimir Sementsov-Ogievskiy. Signed-off-by: Eric Blake Reviewed-by: Vladim

[Qemu-devel] [Bug 1723927] [NEW] Linux or windows guest boot failed by uefi on CPU of Intel Xeon X5675

2017-10-16 Thread chan
Public bug reported: Hi, I started windows server 2012 DC or redhat7.0, but boot failed by UEFI, and start process stop on "TianoCore" image by looking at VNCviewer. VM using the command:(redhat7.0) /usr/bin/kvm -name guest=ytest,debug-threads=on -S -object secret,id=masterKey0,format=raw,file

Re: [Qemu-devel] [PATCH v2 05/47] hw/arm: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:15, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH v2 10/47] hw/cris: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 01.10.2017 16:13, Thomas Huth wrote: > On 30.09.2017 02:15, Alistair Francis wrote: >> Replace a large number of the fprintf(stderr, "*\n" calls with >> error_report(). The functions were renamed with these commands and then >> compiler issues where manually fixed. > [...] >> diff --git a/hw/cri

Re: [Qemu-devel] [PATCH v2 17/47] hw/input: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:15, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. [...] > diff --git a/hw/input/pckbd.c b/hw/input/pckbd.c > index c479f827b6

Re: [Qemu-devel] [PATCH v2 21/47] hw/lm32: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH v2 24/47] hw/mips: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH v2 26/47] hw/moxie: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH v2 30/47] hw/openrisc: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH v2 32/47] hw/ppc: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. [...] > diff --git a/hw/ppc/e500.c b/hw/ppc/e500.c > index db0e49ab8f..8a53

Re: [Qemu-devel] kvm_set_phys_mem: assertion failed

2017-10-16 Thread Joe Clifford
On 16/10/17 12:23, David Hildenbrand wrote: On 04.10.2017 17:48, Laszlo Ersek wrote: Hi, On 09/21/17 16:28, Auger Eric wrote: Hi David, On 20/09/2017 16:34, David Hildenbrand wrote: On 20.09.2017 16:31, Gerd Hoffmann wrote: Hi, Dropping from os section: /usr/share/edk2.git/ovmf-x64/OVM

Re: [Qemu-devel] [PATCH v2 36/47] hw/sh4: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH v2 33/47] hw/s390x: Replace fprintf(stderr, "*\n" with error_report()

2017-10-16 Thread Thomas Huth
On 30.09.2017 02:16, Alistair Francis wrote: > Replace a large number of the fprintf(stderr, "*\n" calls with > error_report(). The functions were renamed with these commands and then > compiler issues where manually fixed. > > find ./* -type f -exec sed -i \ > 'N;N;N;N;N;N;N;N;N;N;N;N; {s|fpr

Re: [Qemu-devel] [PATCH 0/2] add "nopin" option in the memory-backend-file

2017-10-16 Thread Paolo Bonzini
On 16/10/2017 12:20, Xiao Guangrong wrote: > >> Qemu does not need pin NVDIMM memory for VFIO device during VFIO >> hotplug, what's more, if there is no NVDIMM hw in the test machine, >> the VFIO hotplug operation will need at least 10 minutes to pin RAM >> as the NVDIMM, this time is not accepted

Re: [Qemu-devel] [PATCH 1/6] tests: Add basic migration precopy test

2017-10-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela 1) I think I agree with the bits about needing to share this code with postcopy; lets see how it goes. 2) I do have a bug I can reproduce in the postcopy test where it fails under heavy load (e.g. ~10 TCG'd guests on one

Re: [Qemu-devel] [PULL 0/4] vhost-user patches

2017-10-16 Thread Peter Maydell
On 12 October 2017 at 21:53, Marc-André Lureau wrote: > The following changes since commit a0b261db8c030813e30a39eae47359ac2a37f7e2: > > Merge remote-tracking branch > 'remotes/ehabkost/tags/python-next-pull-request' into staging (2017-10-12 > 10:02:09 +0100) > > are available in the Git repos

Re: [Qemu-devel] [PATCH 2/6] tests: Add basic migration precopy tcp test

2017-10-16 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > --- > tests/migration-test.c | 8 > 1 file changed, 8 insertions(+) > > diff --git a/tests/migration-test.c b/tests/migration-test.c > index cd954caee4..8ef2b72459 100644 > --- a/tests/migration-test.c > +++ b

Re: [Qemu-devel] [PATCH v4 2/8] nbd: Move nbd_errno_to_system_errno() to public header

2017-10-16 Thread Eric Blake
On 10/16/2017 03:33 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.10.2017 04:01, Eric Blake wrote: >> This is needed in preparation for structured reply handling, >> as we will be performing the translation from NBD error to >> system errno value higher in the stack at block/nbd-client.c. > > you'v

Re: [Qemu-devel] [PATCH v1] kvm: tolerate non-existing slot for log_start and log_stop

2017-10-16 Thread Paolo Bonzini
On 16/10/2017 11:41, David Hildenbrand wrote: > log_start might be called by memory.c just before registering the > section. So we can actually get a log_start without a region_add, which > we can silently ignore. This is really a bug in memory.c, I think. When you put together everything as a si

Re: [Qemu-devel] [PATCH v1] kvm: tolerate non-existing slot for log_start and log_stop

2017-10-16 Thread Paolo Bonzini
On 16/10/2017 11:53, David Hildenbrand wrote: > > Looks like adding these assertions was counter productive :) Or productive. Bugs happen, and if they are a good occasion to add new tests to the testsuite or at least a comment to the code, all the better. Paolo

Re: [Qemu-devel] [PATCH v4 3/8] nbd: Expose constants and structs for structured read

2017-10-16 Thread Eric Blake
On 10/16/2017 03:49 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.10.2017 04:01, Eric Blake wrote: >> Upcoming patches will implement the NBD structured reply >> extension [1] for both client and server roles.  Declare the >> constants, structs, and lookup routines that will be valuable >> whether t

Re: [Qemu-devel] [PATCH v4 4/8] nbd: Minimal structured read for server

2017-10-16 Thread Eric Blake
On 10/16/2017 04:49 AM, Vladimir Sementsov-Ogievskiy wrote: > 15.10.2017 04:01, Eric Blake wrote: >> From: Vladimir Sementsov-Ogievskiy >> >> Minimal implementation of structured read: one structured reply chunk, >> no segmentation. >> Minimal structured error implementation: no text message. >> S

  1   2   3   4   5   >