[Qemu-devel] [PATCH v3 2/3] applesmc: implement error status port

2017-06-16 Thread Gabriel L. Somlo
As of release 10.12.4, OS X (Sierra) refuses to boot unless the AppleSMC supports an additional I/O port, expected to provide an error status code. Update the [cmd|data]_write() and data_read() methods to implement the required state machine, and add I/O region & methods to handle access to the er

[Qemu-devel] [PATCH v2 0/2] cpu_env in gen-icount

2017-06-16 Thread Emilio G. Cota
v1: https://lists.gnu.org/archive/html/qemu-devel/2017-06/msg03771.html Changes from v1: - Use tcg_ctx.tcg_env instead of passing cpu_env around as suggested by Richard. - Added Richard's R-b tag to patch 1. Thanks, Emilio

[Qemu-devel] [PATCH v2 2/2] gen-icount: use tcg_ctx.tcg_env instead of cpu_env

2017-06-16 Thread Emilio G. Cota
We are relying on cpu_env being defined as a global, yet most targets (i.e. all but arm/a64) have it defined as a local variable. Luckily all of them use the same "cpu_env" name, but really compilation shouldn't break if the name of that local variable changed. Fix it by using tcg_ctx.tcg_env, whi

[Qemu-devel] [PATCH v3 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-16 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 34

[Qemu-devel] [PATCH v3 0/3] Add bitmap for received pages in postcopy migration

2017-06-16 Thread Alexey Perevalov
This is third version of [PATCH v1 0/2] Add bitmap for copied pages in postcopy migration cover message from there This is a separate patch set, it derived from https://www.mail-archive.com/qemu-devel@nongnu.org/msg456004.html There are several possible use cases: 1. solve issue with postcopy liv

[Qemu-devel] [PATCH v3 1/3] migration: postcopy_place_page factoring out

2017-06-16 Thread Alexey Perevalov
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 13 +++-- migr

[Qemu-devel] [PATCH v3 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received page

[Qemu-devel] [PATCH v9 0/8] calculate blocktime for postcopy live migration

2017-06-16 Thread Alexey Perevalov
This is 9th version. The rationale for that idea is following: vCPU could suspend during postcopy live migration until faulted page is not copied into kernel. Downtime on source side it's a value - time interval since source turn vCPU off, till destination start runnig vCPU. But that value was pro

[Qemu-devel] [PATCH v9 6/8] migration: add postcopy blocktime ctx into MigrationIncomingState

2017-06-16 Thread Alexey Perevalov
This patch adds request to kernel space for UFFD_FEATURE_THREAD_ID, in case when this feature is provided by kernel. PostcopyBlocktimeContext is incapsulated inside postcopy-ram.c, due to it's postcopy only feature. Also it defines PostcopyBlocktimeContext's instance live time. Information from Po

[Qemu-devel] [PATCH v9 8/8] migration: postcopy_blocktime documentation

2017-06-16 Thread Alexey Perevalov
Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- docs/devel/migration.txt | 10 ++ 1 file changed, 10 insertions(+) diff --git a/docs/devel/migration.txt b/docs/devel/migration.txt index 1b940a8..4b625ca 100644 --- a/docs/devel/migration.txt +++ b/docs/devel/migra

[Qemu-devel] [PATCH v9 3/8] migration: fix hardcoded function name in error report

2017-06-16 Thread Alexey Perevalov
Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov --- migration/postcopy-ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/postcopy-ram.c b/migration/postcopy-ram.c index 35f3ffd..b35baf3 100644 --- a/migration/postc

[Qemu-devel] [PATCH v9 1/8] userfault: add pid into uffd_msg & update UFFD_FEATURE_*

2017-06-16 Thread Alexey Perevalov
This commit duplicates header of "userfaultfd: provide pid in userfault msg" into linux kernel. Signed-off-by: Alexey Perevalov --- linux-headers/linux/userfaultfd.h | 4 1 file changed, 4 insertions(+) diff --git a/linux-headers/linux/userfaultfd.h b/linux-headers/linux/userfaultfd.h ind

[Qemu-devel] [PATCH v9 5/8] migration: introduce postcopy-blocktime capability

2017-06-16 Thread Alexey Perevalov
Right now it could be used on destination side to enable vCPU blocktime calculation for postcopy live migration. vCPU blocktime - it's time since vCPU thread was put into interruptible sleep, till memory page was copied and thread awake. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey P

[Qemu-devel] [PATCH v9 2/8] migration: pass MigrationIncomingState* into migration check functions

2017-06-16 Thread Alexey Perevalov
That tiny refactoring is necessary to be able to set UFFD_FEATURE_THREAD_ID while requesting features, and then to create downtime context in case when kernel supports it. Signed-off-by: Alexey Perevalov --- migration/migration.c| 3 ++- migration/postcopy-ram.c | 10 +- migration/p

[Qemu-devel] [PATCH v9 4/8] migration: split ufd_version_check onto receive/request features part

2017-06-16 Thread Alexey Perevalov
This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU have to use separate userfault file descriptor, due to userfault context has int

[Qemu-devel] [PATCH v9 7/8] migration: calculate vCPU blocktime on dst side

2017-06-16 Thread Alexey Perevalov
This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested by Peter Xu, as an improvements of previous approch where QEMU kept tree with faulted page address and cpus bitmask in it. Now QEMU is keeping array with faulted pa

Re: [Qemu-devel] [PATCH v2 3/3] migration: add bitmap for received page

2017-06-16 Thread Alexey Perevalov
On 06/16/2017 09:46 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: On 06/16/2017 08:14 PM, Dr. David Alan Gilbert wrote: * Alexey Perevalov (a.pereva...@samsung.com) wrote: This patch adds ability to track down already received pages, it's necessary for c

Re: [Qemu-devel] ARM v6 memory barrier cp15 ops still implemented as NOPs

2017-06-16 Thread Alex Bennée
Peter Maydell writes: > Hi; I just noticed that we seem to still implement the ARM v6 > memory-barrier cp15 ops as NOPs: > > { .name = "ISB", .cp = 15, .crn = 7, .crm = 5, .opc1 = 0, .opc2 = 4, > .access = PL0_W, .type = ARM_CP_NO_RAW, .writefn = arm_cp_write_ignore > }, > { .name

Re: [Qemu-devel] [PATCH v1 3/3] tcg-runtime: short-circuit lookup_tb_ptr on IRQs

2017-06-16 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:43:00 -0700, Richard Henderson wrote: > On 06/14/2017 12:07 PM, Alex Bennée wrote: > >If your rolling a series for all these can you also pick up Thomas > >Huth's fix for --accel? > > Will do. Just a heads up since I see the patch is in your tcg-next branch: Paolo incl

Re: [Qemu-devel] [PATCH v2 1/5] tcg: Refactor helper_lookup_tb_ptr

2017-06-16 Thread Emilio G. Cota
On Wed, Jun 14, 2017 at 12:48:17 -0700, Richard Henderson wrote: > --- a/tcg-runtime.c > +++ b/tcg-runtime.c (snip) > tb = tb_htable_lookup(cpu, addr, cs_base, flags); > -if (likely(tb)) { > -atomic_set(&cpu->tb_jmp_cache[tb_jmp_cache_hash_func(addr)], tb); > -

Re: [Qemu-devel] [RFC] virtio-mem: paravirtualized memory

2017-06-16 Thread Michael S. Tsirkin
On Fri, Jun 16, 2017 at 05:59:07PM +0200, David Hildenbrand wrote: > On 16.06.2017 17:04, Michael S. Tsirkin wrote: > > On Fri, Jun 16, 2017 at 04:20:02PM +0200, David Hildenbrand wrote: > >> Hi, > >> > >> this is an idea that is based on Andrea Arcangeli's original idea to > >> host enforce guest

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [virtio-dev] Re: [PATCH v1] virtio-net: enable configurable tx queue size

2017-06-16 Thread Michael S. Tsirkin
On Fri, Jun 16, 2017 at 07:04:27PM +0200, Maxime Coquelin wrote: > > > On 06/16/2017 05:19 PM, Michael S. Tsirkin wrote: > > On Fri, Jun 16, 2017 at 04:57:01PM +0800, Jason Wang wrote: > > > > > > > > > On 2017年06月16日 11:22, Michael S. Tsirkin wrote: > > > > > I think the issues can be solved b

Re: [Qemu-devel] [PATCH v2 1/5] tcg: Refactor helper_lookup_tb_ptr

2017-06-16 Thread Richard Henderson
On 06/16/2017 01:19 PM, Emilio G. Cota wrote: While booting debian-arm I'm measuring (see below) a hit rate in the high 90's for the htable lookups here, so adding an 'unlikely()' hint would be a good idea. GCC already predicts null pointers unlikely. We get identical code with and without the

Re: [Qemu-devel] [PATCHv4 1/5] fw_cfg: don't map the fw_cfg IO ports in fw_cfg_io_realize()

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > As indicated by Laszlo it is a QOM bug for the realize() method to actually > map the device. Set up the IO regions within fw_cfg_io_realize() and defer > the mapping with sysbus_add_io() to the caller, as already done in > fw_cfg_init_mem_wide(). > > T

Re: [Qemu-devel] [PATCHv4 3/5] fw_cfg: move assert() and linking of fw_cfg device to the machine into instance_init()

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > In preparation for calling fw_cfg_init1() during realize rather than during > init, move the assert() checking for existing fw_cfg devices and the linking > of the device to the machine with object_property_add_child() to a new > fw_cfg instance_init() f

Re: [Qemu-devel] [PATCHv4 4/5] fw_cfg: move qdev_init_nofail() from fw_cfg_init1() to callers

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > When looking to instantiate a TYPE_FW_CFG_MEM or TYPE_FW_CFG_IO device to be > able to wire it up differently, it is much more convenient for the caller to > instantiate the device and have the fw_cfg default files already preloaded > during realize. >

Re: [Qemu-devel] [PATCHv4 5/5] fw_cfg: move QOM type defines and fw_cfg types into fw_cfg.h

2017-06-16 Thread Laszlo Ersek
On 06/16/17 15:23, Mark Cave-Ayland wrote: > This allows the device to be instantiated externally for boards that > wish to wire up the fw_cfg device themselves. > > Signed-off-by: Mark Cave-Ayland > --- > hw/nvram/fw_cfg.c | 56 --- > include/hw

Re: [Qemu-devel] [PATCH v6 3/6] target: [tcg] Add generic translation framework

2017-06-16 Thread Emilio G. Cota
On Thu, Jun 15, 2017 at 19:25:07 -0400, Emilio G. Cota wrote: > Also, consider keeping the @is_jmp name instead of renaming it to > @jmp_type. (@jmp would be shorter but it would be confusing though, > e.g. cris has both dc->jmp and dc->is_jmp.) It turns out that keeping the original names also ma

Re: [Qemu-devel] [PATCH] fix: avoid an infinite loop or a dangling pointer problem in img_commit

2017-06-16 Thread sochin.jiang
Good advice, thank you, Max. On 2017/6/16 21:27, Max Reitz wrote: > On 2017-06-15 08:47, sochin.jiang wrote: >> From: "sochin.jiang" >> >> img_commit could fall into an infinite loop calling run_block_job() if >> its blockjob fails on any I/O error, fix this already known problem. >> >> Signed-o

<    1   2   3