Re: [Qemu-devel] [PATCH 6/6] spec/vhost-user spec: Add IOMMU support

2017-05-18 Thread Jason Wang
On 2017年05月17日 22:10, Maxime Coquelin wrote: On 05/17/2017 04:53 AM, Jason Wang wrote: On 2017年05月16日 23:16, Michael S. Tsirkin wrote: On Mon, May 15, 2017 at 01:45:28PM +0800, Jason Wang wrote: On 2017年05月13日 08:02, Michael S. Tsirkin wrote: On Fri, May 12, 2017 at 04:21:58PM +0200, M

Re: [Qemu-devel] [PATCH RFC 0/6] migration: enable return-path for precopy

2017-05-18 Thread Peter Xu
On Fri, May 19, 2017 at 02:43:26PM +0800, Peter Xu wrote: > This idea derives from the bug reported: > > https://bugzilla.redhat.com/show_bug.cgi?id=1439147 > > It is not a extremely critical bug, since as long as the user uses > libvirt to migrate, we won't have such an issue at all (we'll hav

[Qemu-devel] [PATCH RFC 6/6] migration: enable return path for precopy

2017-05-18 Thread Peter Xu
Let this be a flag, default to on. Turn it off for <=2.9 versions. After this patch, return path will be on even for pre-copy migration as long as the transport support, e.g., for socket typed transport including "tcp|udp|unix" typed. This will naturally fix the bug mentioned below, when destinat

[Qemu-devel] [PATCH RFC 4/6] migration: shut src return path unconditionally

2017-05-18 Thread Peter Xu
We were do the shutting off only for postcopy. Now we do this as long as the source return path is there. Moving the cleanup of from_src_file there too. Signed-off-by: Peter Xu --- migration/migration.c| 8 +++- migration/postcopy-ram.c | 1 - 2 files changed, 7 insertions(+), 2 deletio

[Qemu-devel] [PATCH RFC 5/6] migration: let MigrationState be an QObject

2017-05-18 Thread Peter Xu
Let the old man "MigrationState" join the object family. Direct benefit is that we can start to use all the property features derived from current QObject, like: HW_COMPAT_* bits, command line setup for migration parameters (so will never need to set them up each time using HMP/QMP, this is really,

[Qemu-devel] [PATCH RFC 0/6] migration: enable return-path for precopy

2017-05-18 Thread Peter Xu
This idea derives from the bug reported: https://bugzilla.redhat.com/show_bug.cgi?id=1439147 It is not a extremely critical bug, since as long as the user uses libvirt to migrate, we won't have such an issue at all (we'll have identical command line parameters for QEMU). However it can be an se

[Qemu-devel] [PATCH RFC 2/6] migration: isolate return path on src

2017-05-18 Thread Peter Xu
There are some places that binded "return path" with postcopy. Let's be prepared for its usage even without postcopy. This patch mainly did this on source side. This has no functional change. But it'll simplify further patches. Signed-off-by: Peter Xu --- migration/migration.c | 50 +++

[Qemu-devel] [PATCH RFC 3/6] migration: fix leak of src file on dst

2017-05-18 Thread Peter Xu
The return path channel is possibly leaked. Fix it. Signed-off-by: Peter Xu --- migration/migration.c | 5 + 1 file changed, 5 insertions(+) diff --git a/migration/migration.c b/migration/migration.c index e4f4c8c..92617fc 100644 --- a/migration/migration.c +++ b/migration/migration.c @@ -1

[Qemu-devel] [PATCH RFC 1/6] io: only allow return path for socket typed

2017-05-18 Thread Peter Xu
We don't really have a return path for the other types yet. Let's check this when .get_return_path() is called. For this, we introduce a new feature bit, and set it up only for socket typed IO channels. This will help detect earlier failure for postcopy, e.g., logically speaking postcopy cannot w

Re: [Qemu-devel] [PATCH 6/6] spapr: fix migration of ICP objects from/to older QEMU

2017-05-18 Thread David Gibson
On Wed, May 17, 2017 at 10:33:44PM +0200, Greg Kurz wrote: > On Wed, 17 May 2017 14:18:16 +1000 > David Gibson wrote: > > > On Mon, May 15, 2017 at 06:11:27PM +0200, Cédric Le Goater wrote: > > > >>> +int smt = kvmppc_smt_threads(); > > > >>> +int nr_servers = DIV_ROUND_UP(max_cpu

Re: [Qemu-devel] [RFC PATCH v2 4/4] spapr: Fix migration of Radix guests

2017-05-18 Thread Bharata B Rao
On Fri, May 19, 2017 at 11:10:39AM +0530, Bharata B Rao wrote: > Fix migration of radix guests by ensuring that we issue > KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. > > Reported-by: Nageswara R Sastry > Signed-off-by: Bharata B Rao > --- > hw/ppc/spapr.c | 12 > 1 fil

[Qemu-devel] [PATCH] usb: Deprecate HMP commands usb_add and usb_del

2017-05-18 Thread Thomas Huth
The commands 'device_add' and 'device_del' should be used nowadays instead. Signed-off-by: Thomas Huth --- hmp-commands.hx | 6 -- vl.c| 6 ++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index baeac47..e763606 100644 --- a

[Qemu-devel] [PATCH] usb: Deprecate the legacy -usbdevice option

2017-05-18 Thread Thomas Huth
The '-usbdevice' option is considered as deprecated nowadays and we might want to remove these options in a future version of QEMU. So mark this options as deprecated in the documenation and print out a warning if it is used to tell the user what to use instead. While we're at it, improve also some

Re: [Qemu-devel] [PATCH v4 2/3] net/rocker: Plug memory leak in pci_rocker_init()

2017-05-18 Thread Markus Armbruster
Mao Zhongyi writes: > pci_rocker_init() leaks a World when the name more than 9 chars, > then return a negative value directly, doesn't make a correct > cleanup. So add a new goto label to fix it. > > Cc: jasow...@redhat.com > Cc: j...@resnulli.us > Cc: f4...@amsat.org > Cc: arm...@redhat.com > S

Re: [Qemu-devel] [PATCH] e1000e: Fix a bug where guest hangs upon migration

2017-05-18 Thread Jason Wang
On 2017年05月17日 19:46, Sameeh Jubran wrote: The bug was caused by the "receive overrun" (bit #6 of the ICR register) interrupt which would be triggered post migration in a heavy traffic environment. Even though the "receive overrun" bit (#6) is masked out by the IMS register (refer to the log

Re: [Qemu-devel] [PATCH v4 1/3] net/rocker: Remove the dead error handling

2017-05-18 Thread Markus Armbruster
Mao Zhongyi writes: > The function of_dpa_world_alloc is a wrapper around world_alloc(), which > returns null only when g_malloc0(size_t size) does. But g_malloc0() also > is a wrapper around g_malloc0_n(1, size) that ignore the fact that > g_malloc0() of 0 bytes, it doesn't returns null. So the

Re: [Qemu-devel] [RESEND PATCH v10 2/5] hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 06:54:13PM -0300, Daniel Henrique Barboza wrote: > The pointer drc->detach_cb is being used as a way of informing > the detach() function inside spapr_drc.c which cb to execute. This > information can also be retrieved simply by checking drc->type and > choosing the right ca

Re: [Qemu-devel] [RESEND PATCH v10 1/5] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 06:54:12PM -0300, Daniel Henrique Barboza wrote: > The LMB DRC release callback, spapr_lmb_release(), uses an opaque > parameter, a sPAPRDIMMState struct that stores the current LMBs that > are allocated to a DIMM (nr_lmbs). After each call to this callback, > the nr_lmbs is

Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties

2017-05-18 Thread Thomas Huth
On 19.05.2017 07:54, Markus Armbruster wrote: > Thomas Huth writes: > >> On 18.05.2017 15:35, Paolo Bonzini wrote: >>> >>> >>> On 18/05/2017 15:22, Thomas Huth wrote: On 18.05.2017 14:00, Paolo Bonzini wrote: > > > On 12/05/2017 14:21, Gerd Hoffmann wrote: >> From: Thomas Hut

Re: [Qemu-devel] [PULL 6/6] hw/usb/dev-serial: Do not try to set vendorid or productid properties

2017-05-18 Thread Markus Armbruster
Thomas Huth writes: > On 18.05.2017 15:35, Paolo Bonzini wrote: >> >> >> On 18/05/2017 15:22, Thomas Huth wrote: >>> On 18.05.2017 14:00, Paolo Bonzini wrote: On 12/05/2017 14:21, Gerd Hoffmann wrote: > From: Thomas Huth > > When starting QEMU with the legacy USB ser

[Qemu-devel] [RFC PATCH v2 4/4] spapr: Fix migration of Radix guests

2017-05-18 Thread Bharata B Rao
Fix migration of radix guests by ensuring that we issue KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. Reported-by: Nageswara R Sastry Signed-off-by: Bharata B Rao --- hw/ppc/spapr.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index

[Qemu-devel] [PULL 0/4] xtensa semihosting fixes

2017-05-18 Thread Max Filippov
ository at: git://github.com/OSLL/qemu-xtensa.git tags/20170518-xtensa for you to fetch changes up to 4611d6e7956b4ae7c24ec2a70c3f3f46dcfa59c7: target/xtensa: support output to chardev console (2017-05-18 22:10:08 -0700) tar

[Qemu-devel] [RFC PATCH v2 0/4] ppc/spapr: Fix migration of radix guests

2017-05-18 Thread Bharata B Rao
This patchset fixes the migration of sPAPR radix guests. Changes in v1: -- - Dropped the unrequired patch that fixed unregister_savevm(). - Reimplemented unregister_savevm_live() such that the existing unregister_savevm() signature isn't modified. - Folded HTAB savevm unregistration

[Qemu-devel] [RFC PATCH v2 3/4] spapr: Make h_register_process_table hcall flags global

2017-05-18 Thread Bharata B Rao
The flags used in h_register_process_table hcall are needed in spapr.c and hence move them to a header file. While doing so, give them slightly specific names. Signed-off-by: Bharata B Rao Reviewed-by: David Gibson --- hw/ppc/spapr_hcall.c | 31 ++- include/hw/ppc/

[Qemu-devel] [RFC PATCH v2 2/4] spapr: Unregister HPT savevm handlers for radix guests

2017-05-18 Thread Bharata B Rao
HPT gets created by default for TCG guests and later when the guest turns out to be a radix guest, the HPT is destroyed when guest does H_REGISTER_PROC_TBL hcall. Let HTAB savevm handlers registration and unregistration follow the same model so that we don't end up having unrequired HTAB savevm han

[Qemu-devel] [RFC PATCH v2 1/4] migration: Introduce unregister_savevm_live()

2017-05-18 Thread Bharata B Rao
Introduce a new function unregister_savevm_live() to unregister the vmstate handlers registered via register_savevm_live(). register_savevm() allocates SaveVMHandlers while register_savevm_live() gets passed with SaveVMHandlers. During unregistration, we want to free SaveVMHandlers in the former

Re: [Qemu-devel] [RFC PATCH 09/20] Memory: introduce iommu_ops->record_device

2017-05-18 Thread Liu, Yi L
Hi Alex, What's your opinion with Tianyu's question? Is it accepatable to use VFIO API in intel_iommu emulator? Thanks, Yi L On Fri, Apr 28, 2017 at 02:46:16PM +0800, Lan Tianyu wrote: > On 2017年04月26日 18:06, Liu, Yi L wrote: > > With vIOMMU exposed to guest, vIOMMU emulator needs to do translati

[Qemu-devel] [PATCH v0 4/4] move cpu-exec-common.c

2017-05-18 Thread Yang Zhong
move cpu-exec-common.c to accel/tcg Signed-off-by: Yang Zhong --- Makefile.target | 1 - accel/tcg/Makefile.objs | 2 +- cpu-exec-common.c => accel/tcg/cpu-exec-common.c | 0 3 files changed, 1 insertion(+), 2 deletions(-) rename cpu-exe

[Qemu-devel] [PATCH v0 3/4] move cpu-exec.c

2017-05-18 Thread Yang Zhong
move cpu-exec.c to ./accel/tcg/ Signed-off-by: Yang Zhong --- Makefile.objs | 1 + Makefile.target| 4 ++-- accel/tcg/Makefile.objs| 1 + cpu-exec.c => accel/tcg/cpu-exec.c | 5 +++-- accel/tcg/trace-events | 7 +++ trace-event

[Qemu-devel] [PATCH v0 0/4] split the tcg code and separate tcg files.

2017-05-18 Thread Yang Zhong
In order to disable tcg, the first phase is to split some tcg code and separate those tcg relative files into one directory. The next phase will disable tcg more easily. In the first phase, there are three serial patchsets to deal with split code and separate the files. 1) split the tcg exec code

[Qemu-devel] [PATCH v0 1/4] accel: split the tcg accelerator from accel.c file

2017-05-18 Thread Yang Zhong
there are two accelerators in qemu, kvm and tcg. kvm accelerator is defined in kvm-all.c, but tcg accelerator is defined in accel.c file. we split tcg accelerator from accel.c file and create one new accel directory, which will include kvm and tcg accel files. Signed-off-by: Yang Zhong --- Make

[Qemu-devel] [PATCH v0 2/4] move cputlb.c

2017-05-18 Thread Yang Zhong
move cputlb.c to accel/tcg/ Signed-off-by: Yang Zhong --- Makefile.target| 2 +- accel/tcg/Makefile.objs| 1 + cputlb.c => accel/tcg/cputlb.c | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename cputlb.c => accel/tcg/cputlb.c (100%) diff --git a/Makefile.target b

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Rob Landley
On 05/18/2017 06:00 PM, Aurelien Jarno wrote: >> Exiting the linux instance says "reboot: Restarting system\nUnauthorized >> access" and then hangs eating 100% cpu, but maybe I can fix that with >> kernel configuration changes. > > I guess you mean rebooting the linux instance. This is because you

Re: [Qemu-devel] [PATCH 2/2] postcopy: Require RAMBlocks that are whole pages

2017-05-18 Thread Peter Xu
On Thu, May 18, 2017 at 09:08:34AM +0100, Dr. David Alan Gilbert wrote: > * Juan Quintela (quint...@redhat.com) wrote: > > "Dr. David Alan Gilbert (git)" wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > It turns out that it's legal to create a VM with RAMBlocks that aren't > > > a multiple

[Qemu-devel] [PATCH v4 09/10] intel_iommu: turn off pt before 2.9

2017-05-18 Thread Peter Xu
This is for compatibility. Signed-off-by: Peter Xu --- include/hw/compat.h | 4 1 file changed, 4 insertions(+) diff --git a/include/hw/compat.h b/include/hw/compat.h index 55b1765..4c53d60 100644 --- a/include/hw/compat.h +++ b/include/hw/compat.h @@ -6,6 +6,10 @@ .driver = "pc

[Qemu-devel] [PATCH v4 07/10] intel_iommu: allow dev-iotlb context entry conditionally

2017-05-18 Thread Peter Xu
When device-iotlb is not specified, we should fail this check. A new function vtd_ce_type_check() is introduced. While I'm at it, clean up the vtd_dev_to_context_entry() a bit - replace many "else if" usage into direct if check. That'll make the logic more clear. Signed-off-by: Peter Xu --- hw/

[Qemu-devel] [PATCH v4 06/10] intel_iommu: use IOMMU_ACCESS_FLAG()

2017-05-18 Thread Peter Xu
We have that now, so why not use it. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index b477143..3240e5d 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c @@ -1010,

[Qemu-devel] [PATCH v4 10/10] vhost: iommu: cache static mapping if there is

2017-05-18 Thread Peter Xu
This patch pre-heat vhost iotlb cache when passthrough mode enabled. Sometimes, even if user specified iommu_platform for vhost devices, IOMMU might still be disabled. One case is passthrough mode in VT-d implementation. We can detect this by observing iommu_list. If it's empty, it means IOMMU tra

[Qemu-devel] [PATCH v4 02/10] memory: remove the last param in memory_region_iommu_replay()

2017-05-18 Thread Peter Xu
We were always passing in that one as "false" to assume that's an read operation, and we also assume that IOMMU translation would always have that read permission. A better permission would be IOMMU_NONE since the replay is after all not a real read operation, but just a page table rebuilding proce

[Qemu-devel] [PATCH v4 03/10] x86-iommu: use DeviceClass properties

2017-05-18 Thread Peter Xu
No reason to keep tens of lines if we can do it actually far shorter. Signed-off-by: Peter Xu --- hw/i386/x86-iommu.c | 47 +++ 1 file changed, 7 insertions(+), 40 deletions(-) diff --git a/hw/i386/x86-iommu.c b/hw/i386/x86-iommu.c index 23dcd3f..02b8

[Qemu-devel] [PATCH v4 05/10] intel_iommu: provide vtd_ce_get_type()

2017-05-18 Thread Peter Xu
Helper to fetch VT-d context entry type. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index f06055f..b477143 100644 --- a/hw/i386/intel_iommu.c +++ b/hw/i386/intel_iommu.c

[Qemu-devel] [PATCH v4 04/10] intel_iommu: renaming context entry helpers

2017-05-18 Thread Peter Xu
The old names are too long and less ordered. Let's start to use vtd_ce_*() as a pattern. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c index 4a51df8..f

[Qemu-devel] [PATCH v4 08/10] intel_iommu: support passthrough (PT)

2017-05-18 Thread Peter Xu
Hardware support for VT-d device passthrough. Although current Linux can live with iommu=pt even without this, but this is faster than when using software passthrough. Signed-off-by: Peter Xu --- hw/i386/intel_iommu.c | 231 ++--- hw/i386/intel_iommu_

[Qemu-devel] [PATCH v4 01/10] memory: tune last param of iommu_ops.translate()

2017-05-18 Thread Peter Xu
This patch converts the old "is_write" bool into IOMMUAccessFlags. The difference is that "is_write" can only express either read/write, but sometimes what we really want is "none" here (neither read nor write). Replay is an good example - during replay, we should not check any RW permission bits s

[Qemu-devel] [PATCH v4 00/10] VT-d: PT (passthrough) mode support and misc fixes

2017-05-18 Thread Peter Xu
Online repo: https://github.com/xzpeter/qemu/tree/vtd-passthrough-misc-1 v4 - remove patch "pc: add 2.10 machine type" since it's merged already - remove patch "memory: fix address_space_get_iotlb_entry()" since the problem is fixed by an much better upstream patch: "exec: abstract address_

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [PATCH v2 00/16] Vhost-pci for inter-VM communication

2017-05-18 Thread Jason Wang
On 2017年05月18日 11:03, Wei Wang wrote: On 05/17/2017 02:22 PM, Jason Wang wrote: On 2017年05月17日 14:16, Jason Wang wrote: On 2017年05月16日 15:12, Wei Wang wrote: Hi: Care to post the driver codes too? OK. It may take some time to clean up the driver code before post it out. You can fir

Re: [Qemu-devel] [PATCH 3/9] migration: Export qemu-file-channel.c functions in its own file

2017-05-18 Thread Peter Xu
On Thu, May 18, 2017 at 06:16:49PM +0200, Juan Quintela wrote: > Signed-off-by: Juan Quintela Reviewed-by: Peter Xu -- Peter Xu

Re: [Qemu-devel] [PATCH 3/9] migration: Export qemu-file-channel.c functions in its own file

2017-05-18 Thread Peter Xu
On Thu, May 18, 2017 at 03:26:23PM +0200, Juan Quintela wrote: > Peter Xu wrote: > > On Wed, May 17, 2017 at 05:47:50PM +0200, Juan Quintela wrote: > >> Signed-off-by: Juan Quintela > >> --- > >> include/migration/migration.h | 1 + > >> include/migration/qemu-file.h | 4 > >> migration/c

[Qemu-devel] specify memory in QEMU with Virtio

2017-05-18 Thread jenia mtl
Hello. How do I specify how much graphics memory the Windows client should have in QEMU. I have successfully installed Virtio and can launch the VM (Windows) with it. This doubles the memory form 8MB to 16MB. But I need 512. How can I set that? I launch it like this (this command can be used to

[Qemu-devel] [PATCH RFC] virtio-net: enable configurable tx queue size

2017-05-18 Thread Wei Wang
This patch enables the virtio-net tx queue size to be configurable between 256 (the default queue size) and 1024 by the user. The queue size specified by the user should be power of 2. Setting the tx queue size to be 1024 requires the guest driver to support the VIRTIO_NET_F_MAX_CHAIN_SIZE feature

[Qemu-devel] [PATCH 2/4] block: Guarantee that *file is set on bdrv_get_block_status()

2017-05-18 Thread Eric Blake
We document that *file is valid if the return is not an error and includes BDRV_BLOCK_OFFSET_VALID, but forgot to obey this contract when a driver (such as blkdebug) lacks a callback. Broken in commit 67a0fd2 (v2.6), when we added the file parameter. Enhance qemu-iotest 177 to cover this, using a

[Qemu-devel] [PATCH 0/4] more blkdebug tweaks

2017-05-18 Thread Eric Blake
I found a crasher and some odd behavior while rebasing my bdrv_get_block_status series, so I figured I'd get these things fixed first. This is based on top of Max's block branch. Eric Blake (4): qemu-io: Don't die on second open block: Guarantee that *file is set on bdrv_get_block_status()

[Qemu-devel] [PATCH 1/4] qemu-io: Don't die on second open

2017-05-18 Thread Eric Blake
Failure to open a file in qemu-io should normally return 1 on failure to end the command loop, on the presumption that when batching commands all on the command line, failure to open means nothing further can be attempted. But when executing qemu-io interactively, there is a special case: if open i

[Qemu-devel] [PATCH 4/4] blkdebug: Support .bdrv_co_get_block_status

2017-05-18 Thread Eric Blake
Without a passthrough status of BDRV_BLOCK_RAW, anything wrapped by blkdebug appears 100% allocated as data. Better is treating it the same as the underlying file being wrapped. For a quick manual test, compare this sequence, pre- and post-patch: $ qemu-img create -f qcow2 file 10M $ qemu-io -f q

Re: [Qemu-devel] [PATCH 1/3] numa: consolidate cpu_preplug fixups/checks for pc/arm/spapr

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 10:09:29AM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov Reviewed-by: David Gibson > --- > include/sysemu/numa.h | 1 + > hw/arm/virt.c | 16 ++-- > hw/i386/pc.c | 17 + > hw/ppc/spapr.c| 17 +---

[Qemu-devel] [PATCH 3/4] block: Simplify use of BDRV_BLOCK_RAW.

2017-05-18 Thread Eric Blake
The lone caller that cares about a return of BDRV_BLOCK_RAW completely replaces the return value, so there is no point in passing BDRV_BLOCK_DATA. Signed-off-by: Eric Blake --- block/commit.c | 2 +- block/mirror.c | 2 +- block/raw-format.c | 2 +- block/vpc.c| 2 +- 4 files cha

Re: [Qemu-devel] [PATCH v11 2/2] migration: spapr: migrate pending_events of spapr state

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 05:24:02PM -0300, Daniel Henrique Barboza wrote: > From: Jianjun Duan > > In racing situations between hotplug events and migration operation, > a rtas hotplug event could have not yet be delivered to the source > guest when migration is started. In this case the pending_e

Re: [Qemu-devel] [PATCH v11 1/2] hw/ppc/spapr_events.c: removing 'exception' from sPAPREventLogEntry

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 05:24:01PM -0300, Daniel Henrique Barboza wrote: > Currenty we do not have any RTAS event that is reported by the > event-scan interface. The existing events, RTAS_LOG_TYPE_EPOW and > RTAS_LOG_TYPE_HOTPLUG, are being reported by the check-exception > interface and, as such,

Re: [Qemu-devel] [PATCH] spapr: ensure core_slot isn't NULL in spapr_core_unplug()

2017-05-18 Thread David Gibson
On Thu, May 18, 2017 at 03:58:31PM +0200, Greg Kurz wrote: > If we go that far on the path of hot-removing a core and we find out that > the core-id is invalid, then we have a serious bug. > > Let's make it explicit with an assert() instead of dereferencing a NULL > pointer. > > This fixes Coveri

Re: [Qemu-devel] [Bug 1691379] [NEW] NetBSD evbmips64el port installation doesn't work with qemu-system-mips64el.

2017-05-18 Thread Kamil Rytarowski
On 18.05.2017 12:54, Aurelien Jarno wrote: > On 2017-05-18 04:29, Kamil Rytarowski wrote: >> On 17.05.2017 19:58, Kamil Rytarowski wrote: >>> On 17.05.2017 10:10, Thomas Huth wrote: On 17.05.2017 09:52, Utkarsh Anand wrote: > Public bug reported: > > I successfully installed the Ne

Re: [Qemu-devel] [PATCH v8 00/13] basic channel IO passthrough infrastructure based on vfio

2017-05-18 Thread Dong Jia Shi
* Cornelia Huck [2017-05-18 15:13:56 +0200]: Hi Conny, > On Wed, 17 May 2017 02:48:00 +0200 > Dong Jia Shi wrote: > > > The patch series introduce a basic channel I/O passthrough > > infrastructure based on vfio. > > - Focus on supporting dasd-eckd(cu_type/dev_type = 0x3990/0x3390) as > > th

Re: [Qemu-devel] [PATCH] SMM: disable smram region if smm is disabled

2017-05-18 Thread Xu, Anthony
> On 16/05/2017 22:22, Xu, Anthony wrote: > >> On 16/05/2017 03:21, Anthony Xu wrote: > >>> when smm is disabled, smram is not used, so disable it > >>> > >>> Signed-off-by: Anthony Xu > >> > >> What is the benefit? > > > > This patch removes 1 memory region for i440 platform and 3 memory > region

Re: [Qemu-devel] [PATCH] Memory: use memory address space for cpu-memory

2017-05-18 Thread Xu, Anthony
> On 18/05/2017 23:48, Xu, Anthony wrote: > >> It should be called. Alternatively you could try adding a new function > >> to mark address_space_memory as a never-destroyed AddressSpace: > >> > > This patch would do it, could you please submit this patch? > > If you have tested it (together with

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 17:35, Rob Landley wrote: > > > On 05/18/2017 02:57 PM, Paolo Bonzini wrote: > > > > > > On 18/05/2017 18:08, Rob Landley wrote: > >> Serial input hangs after the first character in the 4.11 kernel: > >> > >> http://www.spinics.net/lists/linux-sh/msg51183.html > >> > >> Because

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 17:37, Rob Landley wrote: > > > On 05/18/2017 02:00 PM, Aurelien Jarno wrote: > > On 2017-05-18 11:08, Rob Landley wrote: > >> Serial input hangs after the first character in the 4.11 kernel: > >> > >> http://www.spinics.net/lists/linux-sh/msg51183.html > >> > >> Because they enab

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Rob Landley
On 05/18/2017 02:00 PM, Aurelien Jarno wrote: > On 2017-05-18 11:08, Rob Landley wrote: >> Serial input hangs after the first character in the 4.11 kernel: >> >> http://www.spinics.net/lists/linux-sh/msg51183.html >> >> Because they enabled support for a buffer size thing QEMU doesn't >> emulat

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Rob Landley
On 05/18/2017 02:57 PM, Paolo Bonzini wrote: > > > On 18/05/2017 18:08, Rob Landley wrote: >> Serial input hangs after the first character in the 4.11 kernel: >> >> http://www.spinics.net/lists/linux-sh/msg51183.html >> >> Because they enabled support for a buffer size thing QEMU doesn't >> e

Re: [Qemu-devel] [PATCH] SMM: disable smram region if smm is disabled

2017-05-18 Thread Paolo Bonzini
On 16/05/2017 22:22, Xu, Anthony wrote: >> On 16/05/2017 03:21, Anthony Xu wrote: >>> when smm is disabled, smram is not used, so disable it >>> >>> Signed-off-by: Anthony Xu >> >> What is the benefit? > > This patch removes 1 memory region for i440 platform and 3 memory regions > for q35 platf

[Qemu-devel] [RESEND PATCH v10 5/5] migration: spapr: migrate ccs_list in spapr state

2017-05-18 Thread Daniel Henrique Barboza
From: Jianjun Duan ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas hotplug event could be migrated from the source guest to target guest, or the source guest

[Qemu-devel] [RESEND PATCH v10 1/5] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState

2017-05-18 Thread Daniel Henrique Barboza
The LMB DRC release callback, spapr_lmb_release(), uses an opaque parameter, a sPAPRDIMMState struct that stores the current LMBs that are allocated to a DIMM (nr_lmbs). After each call to this callback, the nr_lmbs is decremented by one and, when it reaches zero, the callback proceeds with the qde

[Qemu-devel] [RESEND PATCH v10 4/5] hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release

2017-05-18 Thread Daniel Henrique Barboza
When a LMB hot unplug starts, the current DRC LMB status is stored at spapr->pending_dimm_unplugs QTAILQ. This queue isn't migrated, thus if a migration occurs in the middle of a LMB unplug the spapr_lmb_release callback will lost track of the LMB unplug progress. This patch implements a new recov

[Qemu-devel] [RESEND PATCH v10 3/5] hw/ppc: migrating the DRC state of hotplugged devices

2017-05-18 Thread Daniel Henrique Barboza
In pseries, a firmware abstraction called Dynamic Reconfiguration Connector (DRC) is used to assign a particular dynamic resource to the guest and provide an interface to manage configuration/removal of the resource associated with it. In other words, DRC is the 'plugged state' of a device. Before

[Qemu-devel] [RESEND PATCH v10 2/5] hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque

2017-05-18 Thread Daniel Henrique Barboza
The pointer drc->detach_cb is being used as a way of informing the detach() function inside spapr_drc.c which cb to execute. This information can also be retrieved simply by checking drc->type and choosing the right callback based on it. In this context, detach_cb is redundant information that must

[Qemu-devel] [RESEND PATCH v10 0/5] migration/ppc: migrating DRC and ccs_list

2017-05-18 Thread Daniel Henrique Barboza
v10: - removed 'migrating pending_events' patch this series - patch 1: * removed extra line between definitions; * removed spapr_pending_dimms functions definitons from spapr.h * turned spapr_pending_dimms functions into static - patch 2: * fixed the switch() statement - PHB and VIO

Re: [Qemu-devel] [PATCH] Memory: use memory address space for cpu-memory

2017-05-18 Thread Paolo Bonzini
On 18/05/2017 23:48, Xu, Anthony wrote: >> It should be called. Alternatively you could try adding a new function >> to mark address_space_memory as a never-destroyed AddressSpace: >> > This patch would do it, could you please submit this patch? If you have tested it (together with the change i

Re: [Qemu-devel] [PATCH] Memory: use memory address space for cpu-memory

2017-05-18 Thread Xu, Anthony
> >>> -AddressSpace *as = address_space_init_shareable(cpu->memory, > >>> -"cpu-memory"); > >>> +AddressSpace *as; > >>> +if (cpu->memory == address_space_memory.root) { > >>> +address_space_memory.ref_count

Re: [Qemu-devel] [PATCH] Memory: use memory address space for cpu-memory

2017-05-18 Thread Paolo Bonzini
On 17/05/2017 19:01, Xu, Anthony wrote: >>> -AddressSpace *as = address_space_init_shareable(cpu->memory, >>> -"cpu-memory"); >>> +AddressSpace *as; >>> +if (cpu->memory == address_space_memory.root) { >>> +

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Paolo Bonzini
On 18/05/2017 22:10, Aurelien Jarno wrote: > On 2017-05-18 21:57, Paolo Bonzini wrote: >> Anyway, Uli Hecht is saying SCIF "asserts DR even if the FIFO threshold >> has not been reached if no data is received for 1.5 frames". If that's >> just a register and doesn't trigger an interrupt, you can

[Qemu-devel] [PATCH v10 5/5] migration: spapr: migrate ccs_list in spapr state

2017-05-18 Thread Daniel Henrique Barboza
From: Jianjun Duan ccs_list in spapr state maintains the device tree related information on the rtas side for hotplugged devices. In racing situations between hotplug events and migration operation, a rtas hotplug event could be migrated from the source guest to target guest, or the source guest

[Qemu-devel] [PATCH v10 4/5] hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release

2017-05-18 Thread Daniel Henrique Barboza
When a LMB hot unplug starts, the current DRC LMB status is stored at spapr->pending_dimm_unplugs QTAILQ. This queue isn't migrated, thus if a migration occurs in the middle of a LMB unplug the spapr_lmb_release callback will lost track of the LMB unplug progress. This patch implements a new recov

[Qemu-devel] [PATCH v10 2/5] hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque

2017-05-18 Thread Daniel Henrique Barboza
The pointer drc->detach_cb is being used as a way of informing the detach() function inside spapr_drc.c which cb to execute. This information can also be retrieved simply by checking drc->type and choosing the right callback based on it. In this context, detach_cb is redundant information that must

[Qemu-devel] [PATCH v10 3/5] hw/ppc: migrating the DRC state of hotplugged devices

2017-05-18 Thread Daniel Henrique Barboza
In pseries, a firmware abstraction called Dynamic Reconfiguration Connector (DRC) is used to assign a particular dynamic resource to the guest and provide an interface to manage configuration/removal of the resource associated with it. In other words, DRC is the 'plugged state' of a device. Before

[Qemu-devel] [PATCH v10 1/5] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState

2017-05-18 Thread Daniel Henrique Barboza
The LMB DRC release callback, spapr_lmb_release(), uses an opaque parameter, a sPAPRDIMMState struct that stores the current LMBs that are allocated to a DIMM (nr_lmbs). After each call to this callback, the nr_lmbs is decremented by one and, when it reaches zero, the callback proceeds with the qde

[Qemu-devel] [PATCH v10 0/5] migration/ppc: migrating DRC and ccs_list

2017-05-18 Thread Daniel Henrique Barboza
v10: - removed 'migrating pending_events' patch this series - patch 1: * removed extra line between definitions; * removed spapr_pending_dimms functions definitons from spapr.h * turned spapr_pending_dimms functions into static - patch 2: * fixed the switch() statement - PHB and VIO

[Qemu-devel] [PATCH v11 2/2] migration: spapr: migrate pending_events of spapr state

2017-05-18 Thread Daniel Henrique Barboza
From: Jianjun Duan In racing situations between hotplug events and migration operation, a rtas hotplug event could have not yet be delivered to the source guest when migration is started. In this case the pending_events of spapr state need be transmitted to the target so that the hotplug event ca

[Qemu-devel] [PATCH v11 1/2] hw/ppc/spapr_events.c: removing 'exception' from sPAPREventLogEntry

2017-05-18 Thread Daniel Henrique Barboza
Currenty we do not have any RTAS event that is reported by the event-scan interface. The existing events, RTAS_LOG_TYPE_EPOW and RTAS_LOG_TYPE_HOTPLUG, are being reported by the check-exception interface and, as such, marked as 'exception=true'. Commit 79853e18d9, 'spapr_events: event-scan RTAS in

[Qemu-devel] [PATCH v11 0/2] pseries: migrate pending_events of spapr state

2017-05-18 Thread Daniel Henrique Barboza
v11: - patch 1 (new): cleanup of spapr_events.c: * removed the 'exception' boolean from the sPAPREventLogEntry * simplified the 'event_scan' function - patch 2: * data_size is now calculated inside rtas_event_log_queue() * using VBUFFER instead of VARRAY to avoid casts * log_typ

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 21:57, Paolo Bonzini wrote: > Anyway, Uli Hecht is saying SCIF "asserts DR even if the FIFO threshold > has not been reached if no data is received for 1.5 frames". If that's > just a register and doesn't trigger an interrupt, you can compute the > bit's value dynamically based on th

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Paolo Bonzini
On 18/05/2017 18:08, Rob Landley wrote: > Serial input hangs after the first character in the 4.11 kernel: > > http://www.spinics.net/lists/linux-sh/msg51183.html > > Because they enabled support for a buffer size thing QEMU doesn't > emulate right: > > http://www.spinics.net/lists/linux-s

Re: [Qemu-devel] [PATCH v2] gluster: add support for PREALLOC_MODE_FALLOC

2017-05-18 Thread Niels de Vos
On Thu, May 18, 2017 at 01:54:36PM -0400, Jeff Cody wrote: > On Thu, May 18, 2017 at 11:54:22AM +0200, Niels de Vos wrote: > > Add missing support for "preallocation=falloc" to the Gluster block > > driver. This change bases its logic on that of block/file-posix.c and > > removed the gluster_suppor

Re: [Qemu-devel] qemu-system-sh4 -M r2d serial is broken.

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 11:08, Rob Landley wrote: > Serial input hangs after the first character in the 4.11 kernel: > > http://www.spinics.net/lists/linux-sh/msg51183.html > > Because they enabled support for a buffer size thing QEMU doesn't > emulate right: > > http://www.spinics.net/lists/linux-sh/

Re: [Qemu-devel] [PATCH v2] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 08:42, Richard Henderson wrote: > On 05/18/2017 06:20 AM, Aurelien Jarno wrote: > > > +DEF_HELPER_FLAGS_2(testblock, TCG_CALL_NO_WG, i32, env, i64) > > As the helper does not read any values from the global, you can even use > > TCG_CALL_NO_RWG. > > > > By throwing an exception, we

Re: [Qemu-devel] [PATCH v4] target/s390x: Add support for the TEST BLOCK instruction

2017-05-18 Thread Aurelien Jarno
On 2017-05-18 19:26, Thomas Huth wrote: > TEST BLOCK was likely once used to execute basic memory > tests, but nowadays it's just a (slow) way to clear a page. > > Signed-off-by: Thomas Huth > --- > v4: > - Switched TCG_CALL_NO_RWG back to TCG_CALL_NO_WG as indicated by Richard > > v3: > - U

Re: [Qemu-devel] [PATCH 2/3] numa: move default mapping init to machine

2017-05-18 Thread Eduardo Habkost
On Thu, May 18, 2017 at 10:09:30AM +0200, Igor Mammedov wrote: > there is no need use cpu_index_to_instance_props() for setting > default cpu -> node mapping. Generic machine code can do it > without cpu_index by just enabling already preset defaults > in possible_cpus. > > PS: > as bonus it makes

Re: [Qemu-devel] [Qemu-ppc] [PATCH v10] migration: spapr: migrate pending_events of spapr state

2017-05-18 Thread Daniel Henrique Barboza
On 05/18/2017 01:46 PM, Michael Roth wrote: Quoting Daniel Henrique Barboza (2017-05-17 15:31:44) On 05/16/2017 09:04 AM, Daniel Henrique Barboza wrote: On 05/16/2017 01:25 AM, David Gibson wrote: On Mon, May 15, 2017 at 10:10:52AM -0300, Daniel Henrique Barboza wrote: From: Jianjun Duan

Re: [Qemu-devel] [PATCH 3/3] numa: silence incomplete mapping warning under qtest

2017-05-18 Thread Eduardo Habkost
On Thu, May 18, 2017 at 10:09:31AM +0200, Igor Mammedov wrote: > Suggested-by: Markus Armbruster > Signed-off-by: Igor Mammedov Where exactly is the test code that triggers those messages and requires this patch? I would like to document that in the commit message. > --- > CC: Markus Armbruster

Re: [Qemu-devel] [PATCH 1/3] numa: consolidate cpu_preplug fixups/checks for pc/arm/spapr

2017-05-18 Thread Eduardo Habkost
On Thu, May 18, 2017 at 10:09:29AM +0200, Igor Mammedov wrote: > Signed-off-by: Igor Mammedov > --- > include/sysemu/numa.h | 1 + > hw/arm/virt.c | 16 ++-- > hw/i386/pc.c | 17 + > hw/ppc/spapr.c| 17 + > numa.c

Re: [Qemu-devel] [PATCH v2] gluster: add support for PREALLOC_MODE_FALLOC

2017-05-18 Thread Jeff Cody
On Thu, May 18, 2017 at 11:54:22AM +0200, Niels de Vos wrote: > Add missing support for "preallocation=falloc" to the Gluster block > driver. This change bases its logic on that of block/file-posix.c and > removed the gluster_supports_zerofill() and qemu_gluster_zerofill() > functiond in favour of

Re: [Qemu-devel] [PATCH 1/1] s390x/css: catch section mismatch on load

2017-05-18 Thread Dr. David Alan Gilbert
* Halil Pasic (pa...@linux.vnet.ibm.com) wrote: > Prior to the virtio-ccw-2.7 machine (and commit 2a79eb1a), our virtio > devices residing under the virtual-css bus do not have qdev_path based > migration stream identifiers (because their qdev_path is NULL). The ids > are instead generated when the

[Qemu-devel] [PATCH 09/11] migration: Create include for migration snapshots

2017-05-18 Thread Juan Quintela
Start removing migration code from sysemu/sysemu.h. Signed-off-by: Juan Quintela --- hmp.c| 5 +++-- include/block/block_int.h| 4 ++-- include/migration/snapshot.h | 20 include/sysemu/sysemu.h | 3 --- migration/savevm.c | 5 +

  1   2   3   >