Re: [Qemu-devel] VFIO use of HOST_PAGE_ALIGN

2015-06-03 Thread Alexey Kardashevskiy
On 06/04/2015 03:53 AM, Peter Crosthwaite wrote: On Wed, Jun 3, 2015 at 4:16 AM, Alexey Kardashevskiy wrote: On 06/01/2015 04:27 AM, Peter Crosthwaite wrote: On Sun, May 31, 2015 at 6:34 AM, Alexey Kardashevskiy wrote: On 05/27/2015 01:22 AM, Alex Williamson wrote: [cc +alexey] On Mon,

[Qemu-devel] [PATCH v4 12/13] event-notifier: Always return 0 for posix implementation

2015-06-03 Thread Fam Zheng
qemu_set_fd_handler cannot fail, let's always return 0. Signed-off-by: Fam Zheng --- util/event_notifier-posix.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/util/event_notifier-posix.c b/util/event_notifier-posix.c index 8442c6e..ed4ca2b 100644 --- a/util/event_notifier

[Qemu-devel] [PATCH v4 10/13] oss: Remove unused error handling of qemu_set_fd_handler

2015-06-03 Thread Fam Zheng
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng --- audio/ossaudio.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/audio/ossaudio.c b/audio/ossaudio.c index 4db2ca6..b9c6b30 100644 --- a/audio/ossaudio.c +++ b/audio/ossaudio.c

[Qemu-devel] [PATCH v4 13/13] iohandler: Change return type of qemu_set_fd_handler to "void"

2015-06-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- include/qemu/main-loop.h | 8 iohandler.c | 9 - stubs/set-fd-handler.c | 8 3 files changed, 12 insertions(+), 13 deletions(-) diff --git a/include/qemu/main-loop.h b/include/qemu/main-loop.h index 7da1d63..0f4a0fd 100644 ---

[Qemu-devel] [PATCH v4 06/13] tap: Drop tap_can_send

2015-06-03 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be sent to peer when it arrives. If the device can't receive, it will be queued to incomi

[Qemu-devel] [PATCH v4 09/13] alsaaudio: Remove unused error handling of qemu_set_fd_handler

2015-06-03 Thread Fam Zheng
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng --- audio/alsaaudio.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/audio/alsaaudio.c b/audio/alsaaudio.c index 74ead97..ed7655d 100644 --- a/audio/alsaaudio.c +++ b/audio/alsa

[Qemu-devel] [PATCH v4 08/13] main-loop: Drop qemu_set_fd_handler2

2015-06-03 Thread Fam Zheng
All users are converted to qemu_set_fd_handler now, drop qemu_set_fd_handler2 and IOHandlerRecord.fd_read_poll. Signed-off-by: Fam Zheng --- include/block/aio.h | 2 +- include/qemu/main-loop.h | 49 +--- iohandler.c | 26 +--

[Qemu-devel] [PATCH v4 04/13] netmap: Drop netmap_can_send

2015-06-03 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be copied from s->fd to s->iov when it arrives. If the device can't receive, it will be q

[Qemu-devel] [PATCH v4 05/13] net/socket: Drop net_socket_can_send

2015-06-03 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be sent to peer when it arrives. If the device can't receive, it will be queued to incomi

[Qemu-devel] [PATCH v4 11/13] xen_backend: Remove unused error handling of qemu_set_fd_handler

2015-06-03 Thread Fam Zheng
The function cannot fail, so the check is superfluous. Signed-off-by: Fam Zheng --- hw/xen/xen_backend.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/xen/xen_backend.c b/hw/xen/xen_backend.c index b2cb22b..2510e2e 100644 --- a/hw/xen/xen_backend.c +++ b/hw/xen/xen_ba

[Qemu-devel] [PATCH v4 03/13] l2tpv3: Drop l2tpv3_can_send

2015-06-03 Thread Fam Zheng
This callback is called by main loop before polling s->fd, if it returns false, the fd will not be polled in this iteration. This is redundant with checks inside read callback. After this patch, the data will be copied from s->fd to s->msgvec when it arrives. If the device can't receive, it will b

[Qemu-devel] [PATCH v4 02/13] qemu-nbd: Switch to qemu_set_fd_handler

2015-06-03 Thread Fam Zheng
Achieved by: - Remembering the server fd with a global variable, in order to access it from nbd_client_closed. - Checking nbd_can_accept() and updating server_fd handler whenever client connects or disconnects. Signed-off-by: Fam Zheng Reviewed-by: Paolo Bonzini --- qemu-nbd.c | 21 ++

[Qemu-devel] [PATCH v4 07/13] Change qemu_set_fd_handler2(..., NULL, ...) to qemu_set_fd_handler

2015-06-03 Thread Fam Zheng
Done with following Coccinelle semantic patch, plus manual cosmetic changes in net/*.c. @@ expression E1, E2, E3, E4; @@ - qemu_set_fd_handler2(E1, NULL, E2, E3, E4); + qemu_set_fd_handler(E1, E2, E3, E4); Signed-off-by: Fam Zheng --- blockdev-nbd.c | 4 ++-- ma

[Qemu-devel] [PATCH v4 01/13] stubs: Add qemu_set_fd_handler

2015-06-03 Thread Fam Zheng
Some qemu_set_fd_handler2 stub callers will be converted to call qemu_set_fd_handler, add this stub for them before making the change. Signed-off-by: Fam Zheng --- stubs/set-fd-handler.c | 8 1 file changed, 8 insertions(+) diff --git a/stubs/set-fd-handler.c b/stubs/set-fd-handler.c i

[Qemu-devel] [PATCH v4 00/13] main-loop: Get rid of fd_read_poll and qemu_set_fd_handler2

2015-06-03 Thread Fam Zheng
v4: Remove unnecessary variable "can_send" in 06. [Stefan, Jason] This carries out the mandate in the comment of qemu_set_fd_handler2 and removes fd_read_poll from the code base, because it will make the work easier to convert ppoll to epoll in main loop, as well as convert iohandler to GSource. A

Re: [Qemu-devel] [PATCH v2 12/23] vl: run "late" notifiers immediately

2015-06-03 Thread Peter Crosthwaite
On Wed, Jun 3, 2015 at 10:08 AM, Paolo Bonzini wrote: > If a machine_init_done notifier is added late, as part of a hot-plugged > device, run it immediately. Blank line? > Signed-off-by: Paolo Bonzini Reviewed-by: Peter Crosthwaite > --- > vl.c | 6 ++ > 1 file changed, 6 insertions(+)

Re: [Qemu-devel] [PATCH v2 11/23] qom: add object_property_add_const_link

2015-06-03 Thread Peter Crosthwaite
On Wed, Jun 3, 2015 at 10:08 AM, Paolo Bonzini wrote: > Suggested-by: Eduardo Habkost > Acked-by: Andreas Faerber > Signed-off-by: Paolo Bonzini Reviewed-by: Peter Crosthwaite > --- > include/qom/object.h | 18 ++ > qom/object.c | 16 > 2 files chang

Re: [Qemu-devel] [PATCH v2 08/23] pflash_cfi01: change to new-style MMIO accessors

2015-06-03 Thread Peter Crosthwaite
On Wed, Jun 3, 2015 at 10:08 AM, Paolo Bonzini wrote: > This is a required step to implement read_with_attrs and write_with_attrs. > > Signed-off-by: Paolo Bonzini > --- > hw/block/pflash_cfi01.c | 96 > ++--- Nice stats. > 1 file changed, 10 insert

[Qemu-devel] [PATCH 2/2] vmdk: Use vmdk_find_index_in_cluster everywhere

2015-06-03 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block/vmdk.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 3e4d84b..56626b0 100644 --- a/block/vmdk.c +++ b/block/vmdk.c @@ -1424,7 +1424,6 @@ static int vmdk_read(BlockDriverState *bs, int64_t sector

[Qemu-devel] [PATCH 1/2] vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status

2015-06-03 Thread Fam Zheng
It has the similar issue with b1649fae49a8. Since the calculation is repeated for a few times already, introduce a function so it can be reused. Signed-off-by: Fam Zheng --- block/vmdk.c | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/block/vmdk.c b/block/vmdk.c

[Qemu-devel] [PATCH 0/2] vmdk: Fix vmdk_co_get_block_status

2015-06-03 Thread Fam Zheng
The buggy index_in_cluster was missed in b1649fae49a8. Fix that and dedup the calculation. Fam Zheng (2): vmdk: Fix index_in_cluster calculation in vmdk_co_get_block_status vmdk: Use vmdk_find_index_in_cluster everywhere block/vmdk.c | 23 ++- 1 file changed, 14 inserti

Re: [Qemu-devel] [PATCH v3 0/3] Bitmap based CPU enumeration

2015-06-03 Thread Peter Crosthwaite
On Wed, Jun 3, 2015 at 8:08 PM, Bharata B Rao wrote: > On Thu, May 28, 2015 at 09:59:38PM -0700, Peter Crosthwaite wrote: >> On Thu, May 28, 2015 at 7:27 PM, Bharata B Rao >> wrote: >> > All the comments have been addressed and the series has been reviewed >> > by David, Eduardo and Igor. Can thi

Re: [Qemu-devel] [PATCH v3 6/8] target-sh4: split out Q and M from of SR and optimize div1

2015-06-03 Thread Richard Henderson
On 05/24/2015 04:37 PM, Aurelien Jarno wrote: Splitting Q and M out of SR, it's possible to optimize div1 by using TCG code instead of an helper. Signed-off-by: Aurelien Jarno --- target-sh4/cpu.h | 12 +++-- target-sh4/helper.h| 1 - target-sh4/op_helper.c | 118 ---

Re: [Qemu-devel] [PATCH COLO-Block v5 00/15] Block replication for continuous checkpoints

2015-06-03 Thread Wen Congyang
On 05/28/2015 12:59 PM, Wen Congyang wrote: > Ping... Does anybody have time to review it. Thanks Wen Congyang > > On 05/21/2015 12:52 PM, Wen Congyang wrote: >> Block replication is a very important feature which is used for >> continuous checkpoints(for example: COLO). >> >> Usage: >> Please

Re: [Qemu-devel] [PATCH v6 5/6] spapr_pci: populate ibm,loc-code

2015-06-03 Thread Nikunj A Dadhania
Thomas Huth writes: > On Wed, 3 Jun 2015 16:55:56 +0530 > Nikunj A Dadhania wrote: > >> Each hardware instance has a platform unique location code. The OF >> device tree that describes a part of a hardware entity must include >> the “ibm,loc-code” property with a value that represents the loca

Re: [Qemu-devel] [PATCH] target-s390x: Only access allocated storage keys

2015-06-03 Thread Aurelien Jarno
On 2015-06-04 00:52, Alexander Graf wrote: > We allocate ram_size / PAGE_SIZE storage keys, so we need to make sure that > we only access that many. Unfortunately the code can overrun this array by > one, potentially overwriting unrelated memory. > > Fix it by limiting storage keys to their scope.

Re: [Qemu-devel] [PATCH v3 5/8] target-sh4: optimize negc using add2 and sub2

2015-06-03 Thread Richard Henderson
On 05/24/2015 04:37 PM, Aurelien Jarno wrote: Signed-off-by: Aurelien Jarno --- target-sh4/translate.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v3 4/8] target-sh4: optimize subc using sub2

2015-06-03 Thread Richard Henderson
On 05/24/2015 04:37 PM, Aurelien Jarno wrote: +tcg_gen_sub2_i32(t1, t2, REG(B11_8), t0, REG(B7_4), t0); +tcg_gen_sub2_i32(REG(B11_8), cpu_sr_t, t1, t2, cpu_sr_t, t0); Similarly. r~

Re: [Qemu-devel] [PATCH v3 3/8] target-sh4: optimize addc using add2

2015-06-03 Thread Richard Henderson
On 05/24/2015 04:37 PM, Aurelien Jarno wrote: -TCGv t0, t1; -t0 = tcg_temp_new(); +TCGv t0, t1, t2; +t0 = tcg_const_tl(0); t1 = tcg_temp_new(); -tcg_gen_add_i32(t0, REG(B7_4), REG(B11_8)); -tcg_gen_add_i32(t1, c

Re: [Qemu-devel] [PATCH v3 2/8] target-sh4: Split out T from SR

2015-06-03 Thread Richard Henderson
On 05/24/2015 04:37 PM, Aurelien Jarno wrote: @@ -174,6 +176,16 @@ void superh_cpu_dump_state(CPUState *cs, FILE *f, env->delayed_pc); } } +static void gen_read_sr(TCGv dst) +{ +tcg_gen_or_i32(dst, cpu_sr, cpu_sr_t); +} Watch the spacing. /* MOVCO.L @

[Qemu-devel] Steal time MSR not set properly during live migration?

2015-06-03 Thread Apollon Oikonomopoulos
Hi, I'm trying to debug an issue we're having with some debian.org machines running in QEMU 2.1.2 instances (see [1] for more background). In short, after a live migration guests running Debian Jessie (linux 3.16) stop accounting CPU time properly. /proc/stat in the guest shows no increase in

Re: [Qemu-devel] [PATCH] net: fix insecure temporary file creation in SLiRP

2015-06-03 Thread P J P
> On Wednesday, 3 June 2015 4:33 PM, Markus Armbruster wrote: > Let's go with Michael's v2, because it also fixes the "cleanup > after mkdir() / mkdtemp() failed" scenario. -> https://lists.nongnu.org/archive/html/qemu-devel/2015-06/msg00982.html Ah yes, looks concise. Thank you. --- Regard

Re: [Qemu-devel] Strange problems with lseek in qemu-img map

2015-06-03 Thread Wen Congyang
Cc: ext4 maillist On 06/03/2015 10:06 PM, Stefan Hajnoczi wrote: > On Tue, Jun 02, 2015 at 02:54:17PM +0200, David Weber wrote: >> Testcase: >> # qemu-img create test 500G >> # time qemu-img map test >> >> Systems: >> O3-3: Kubuntu 15.04 Workstation with stock-kernel 3.19.0-18-generic and >> stoc

Re: [Qemu-devel] [PATCH v3 0/3] Bitmap based CPU enumeration

2015-06-03 Thread Bharata B Rao
On Thu, May 28, 2015 at 09:59:38PM -0700, Peter Crosthwaite wrote: > On Thu, May 28, 2015 at 7:27 PM, Bharata B Rao > wrote: > > All the comments have been addressed and the series has been reviewed > > by David, Eduardo and Igor. Can this series be taken in now ? > > > > Andreas' comment on P3 l

Re: [Qemu-devel] [edk2] NVMe question

2015-06-03 Thread Tian, Feng
Got your point. Ok, I will roll back the change Thanks Feng -Original Message- From: Busch, Keith Sent: Wednesday, June 03, 2015 22:47 To: Tian, Feng; Laszlo Ersek Cc: edk2-de...@lists.sourceforge.net; Anbazhagan, Baraneedharan; qemu devel list Subject: RE: [edk2] NVMe question Sectio

Re: [Qemu-devel] [PATCH] Revert "iothread: release iothread around aio_poll"

2015-06-03 Thread Fam Zheng
On Wed, 06/03 10:30, Stefan Hajnoczi wrote: > This reverts commit a0710f7995f914e3044e5899bd8ff6c43c62f916. > > In qemu-devel email message <556dbf87.2020...@de.ibm.com>, Christian > Borntraeger writes: > > Having many guests all with a kernel/ramdisk (via -kernel) and > several null block de

Re: [Qemu-devel] Strange problems with lseek in qemu-img map

2015-06-03 Thread Wen Congyang
On 06/02/2015 08:54 PM, David Weber wrote: > Hello, > > I'm currently evaluating to switch our virtualization servers to a newer OS. > This includes a switch from qemu 1.7 to 2.2 or 2.3. > Our system heavily relies on big sparse images and drive_mirror. While > testing, I experienced some probl

Re: [Qemu-devel] [PATCH 0/4] More core code ENV_GET_CPU removals

2015-06-03 Thread Peter Crosthwaite
Ping! Was there an outcome? Regards, Peter On Fri, May 29, 2015 at 11:34 AM, Eduardo Habkost wrote: > On Tue, May 26, 2015 at 01:49:56PM +0200, Paolo Bonzini wrote: >> On 26/05/2015 10:33, Alexander Graf wrote: >> > How about we have the KVM call today and calmly talk about maintainer >> > resp

Re: [Qemu-devel] [RFC] edk2 support for a new QEMU device - PXB (PCI Expander Device)

2015-06-03 Thread Laszlo Ersek
On 06/03/15 22:34, Marcel Apfelbaum wrote: > On 06/03/2015 01:20 PM, Laszlo Ersek wrote: >> Maybe we can experiment some more; for example we could start by >> you explaining to me how exactly to probe for a root bus's presence >> (you mentioned device 0, but I'll need more than that). > Well, I

Re: [Qemu-devel] [PATCH v1 1/1] xilinx_axidma.c: Fix up the stream_running() function

2015-06-03 Thread Peter Crosthwaite
On Wed, May 27, 2015 at 12:37 AM, Alistair Francis wrote: > Previously the stream_running() function didn't check > if the DMA was halted. This caused hangs in recent versions > of MicroBlaze u-boot. Correct stream_running() to check > DMASR_HALTED as well as DMACR_RUNSTOP. > So I'm stuggling wit

[Qemu-devel] [PATCH] target-s390x: Only access allocated storage keys

2015-06-03 Thread Alexander Graf
We allocate ram_size / PAGE_SIZE storage keys, so we need to make sure that we only access that many. Unfortunately the code can overrun this array by one, potentially overwriting unrelated memory. Fix it by limiting storage keys to their scope. Signed-off-by: Alexander Graf --- target-s390x/mm

[Qemu-devel] [PATCH v5 3/4] monitor: Point to "help" command on syntax error

2015-06-03 Thread Bandan Das
When a command fails due to incorrect syntax or input, suggest using the "help" command to get more information about the command. This is only applicable for HMP. Signed-off-by: Bandan Das Reviewed-by: Markus Armbruster --- monitor.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/monit

[Qemu-devel] [PATCH v5 2/4] monitor: cleanup parsing of cmd name and cmd arguments

2015-06-03 Thread Bandan Das
There's too much going on in monitor_parse_command(). Split up the arguments parsing bits into a separate function monitor_parse_arguments(). Let the original function check for command validity and sub-commands if any and return data (*cmd) that the newly introduced function can process and return

[Qemu-devel] [PATCH v5 0/4] monitor: suggest running "help" for command errors

2015-06-03 Thread Bandan Das
v5: Move "monitor: remove debug prints" to first in the series Minor fixes to comments and commit messages v4: Better name for cmdline index pointer [1/4] Change comment for monitor_parse_command as suggested in review [1/4] Fix potential compilation failure in debug print [1/4] New - Fix failure

[Qemu-devel] [PATCH v5 4/4] monitor: Fix failure path for "S" argument

2015-06-03 Thread Bandan Das
Since the "S" argument type is only used with the "?" flag, the bug can't bite. Signed-off-by: Bandan Das Reviewed-by: Markus Armbruster --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 640c05c..5a18844 100644 --- a/monitor.c +++ b/mo

[Qemu-devel] [PATCH v5 1/4] monitor: remove debug prints

2015-06-03 Thread Bandan Das
The preferred solution is to use tracepoints and there is good chance of bitrot with the debug prints not being enabled at compile time. Remove them. Suggested-by: Markus Armbruster Signed-off-by: Bandan Das Reviewed-by: Markus Armbruster --- monitor.c | 20 +--- 1 file changed

Re: [Qemu-devel] [PATCH v2 00/16] fixes and improvements

2015-06-03 Thread Alexander Graf
On 03.06.15 23:09, Aurelien Jarno wrote: > The two first patches fixes bugs in the target-s390x TCG emulation. > > The 3 following patches fix some instruction definition. Given we don't > emulate a given CPU model and check the instruction availability, they > don't provide any functional chang

Re: [Qemu-devel] [PATCH v2 06/16] target-s390x: implement LOAD FP INTEGER instructions

2015-06-03 Thread Richard Henderson
On 06/03/2015 02:09 PM, Aurelien Jarno wrote: This is needed to pass the gcc.c-torture/execute/ieee/20010114-2.c test in the gcc testsuite. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/fpu_helper.c | 31 +++ target-s390x/

Re: [Qemu-devel] [PATCH v8 08/10] qcow2: Invoke refcount order amendment function

2015-06-03 Thread Eric Blake
On 06/03/2015 02:13 PM, Max Reitz wrote: > Make use of qcow2_change_refcount_order() to support changing the > refcount order with qemu-img amend. > > Signed-off-by: Max Reitz > --- > block/qcow2.c | 44 +++- > 1 file changed, 35 insertions(+), 9 deletions

Re: [Qemu-devel] [PATCH v2 15/16] target-s390x: use softmmu functions for mvcp/mvcs

2015-06-03 Thread Richard Henderson
On 06/03/2015 02:09 PM, Aurelien Jarno wrote: mvcp and mvcs helper get access to the physical memory by a call to mmu_translate for the virtual to real conversion and then using ldb_phys and stb_phys to physically access the data. In practice this is quite slow because it bypasses the QEMU softmm

Re: [Qemu-devel] [PATCH v8 07/10] qcow2: Add function for refcount order amendment

2015-06-03 Thread Eric Blake
On 06/03/2015 02:13 PM, Max Reitz wrote: > Add a function qcow2_change_refcount_order() which allows changing the > refcount order of a qcow2 image. > > Signed-off-by: Max Reitz > --- > block/qcow2-refcount.c | 447 > + > block/qcow2.h |

Re: [Qemu-devel] [PATCH v3 38/38] iotests: Add test for change-related QMP commands

2015-06-03 Thread Eric Blake
On 06/03/2015 01:44 PM, Max Reitz wrote: > Signed-off-by: Max Reitz > --- > tests/qemu-iotests/118 | 638 > + > tests/qemu-iotests/118.out | 5 + > tests/qemu-iotests/group | 1 + > 3 files changed, 644 insertions(+) > create mode 100755 tes

Re: [Qemu-devel] [PATCH v2 16/16] target-s390x: fix MVC instruction when areas overlap

2015-06-03 Thread Richard Henderson
On 06/03/2015 02:09 PM, Aurelien Jarno wrote: The MVC instruction and the memmove C funtion do not have the same semantic when memory areas overlap: MVC: When the operands overlap, the result is obtained as if the operands were processed one byte at a time and each result byte were stored immedi

[Qemu-devel] [PULL 20/40] spapr_drc: initial implementation of sPAPRDRConnector device

2015-06-03 Thread Alexander Graf
From: Michael Roth This device emulates a firmware abstraction used by pSeries guests to manage hotplug/dynamic-reconfiguration of host-bridges, PCI devices, memory, and CPUs. It is conceptually similar to an SHPC device, complete with LED indicators to identify individual slots to physical physi

Re: [Qemu-devel] [PULL 01/40] macio: Convert to realize()

2015-06-03 Thread Peter Maydell
On 3 June 2015 at 22:45, Alexander Graf wrote: > From: Markus Armbruster > > Alexander Graf writes: > >> On 09.03.15 19:30, Markus Armbruster wrote: >>> Alexander Graf writes: >>> On 27.02.15 13:43, Markus Armbruster wrote: > Convert device models "macio-oldworld" and "macio-newworld".

[Qemu-devel] [PULL 32/40] spapr_pci: enable basic hotplug operations

2015-06-03 Thread Alexander Graf
From: Michael Roth This enables hotplug of PCI devices to a PHB. Upon hotplug we generate the OF-nodes required by PAPR specification and IEEE 1275-1994 "PCI Bus Binding to Open Firmware" for the device. We associate the corresponding FDT for these nodes with the DRC corresponding to the slot, w

[Qemu-devel] [PULL 26/40] spapr_events: re-use EPOW event infrastructure for hotplug events

2015-06-03 Thread Alexander Graf
From: Nathan Fontenot This extends the data structures currently used to report EPOW events to guests via the check-exception RTAS interfaces to also include event types for hotplug/unplug events. This is currently undocumented and being finalized for inclusion in PAPR specification, but we impl

[Qemu-devel] [PULL 19/40] docs: add sPAPR hotplug/dynamic-reconfiguration documentation

2015-06-03 Thread Alexander Graf
From: Michael Roth This adds a general overview of hotplug/dynamic-reconfiguration for sPAPR/pSeries guest. As specified in PAPR+ v2.7. Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- docs/specs/ppc-spapr-hotplug.txt | 287

[Qemu-devel] [PULL 40/40] softmmu: support up to 12 MMU modes

2015-06-03 Thread Alexander Graf
From: Paolo Bonzini At 8k per TLB (for 64-bit host or target), 8 or more modes make the TLBs bigger than 64k, and some RISC TCG backends do not like that. On the affected hosts, cut the TLB size in half---there is still a measurable speedup on PPC with the next patch. Signed-off-by: Paolo Bonzi

[Qemu-devel] [PULL 39/40] tcg: add TCG_TARGET_TLB_DISPLACEMENT_BITS

2015-06-03 Thread Alexander Graf
From: Paolo Bonzini This will be used to size the TLB when more than 8 MMU modes are used by the target. Limitations come from the limited size of the immediate fields (which sometimes, as in the case of Aarch64, extend to instructions that shift the immediate). Signed-off-by: Paolo Bonzini Me

Re: [Qemu-devel] [PULL 01/40] macio: Convert to realize()

2015-06-03 Thread Alexander Graf
On 03.06.15 23:53, Peter Maydell wrote: > On 3 June 2015 at 22:45, Alexander Graf wrote: >> From: Markus Armbruster >> >> Alexander Graf writes: >> >>> On 09.03.15 19:30, Markus Armbruster wrote: Alexander Graf writes: > On 27.02.15 13:43, Markus Armbruster wrote: >> Convert

[Qemu-devel] [PULL 27/40] spapr_events: event-scan RTAS interface

2015-06-03 Thread Alexander Graf
From: Tyrel Datwyler We don't actually rely on this interface to surface hotplug events, and instead rely on the similar-but-interrupt-driven check-exception RTAS interface used for EPOW events. However, the existence of this interface is needed to ensure guest kernels initialize the event-report

[Qemu-devel] [PULL 21/40] spapr_rtas: add get/set-power-level RTAS interfaces

2015-06-03 Thread Alexander Graf
From: Nathan Fontenot These interfaces manage the power domains that guest devices are assigned to and are used to power on/off devices. Currently we only utilize 1 power domain, the 'live-insertion' domain, which automates power management of plugged/unplugged devices, essentially making these c

[Qemu-devel] [PULL 29/40] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge

2015-06-03 Thread Alexander Graf
From: Michael Roth This option enables/disables PCI hotplug for a particular PHB. Also add machine compatibility code to disable it by default for machine types prior to pseries-2.4. Signed-off-by: Michael Roth Reviewed-by: David Gibson Signed-off-by: David Gibson [agraf: move commas for com

[Qemu-devel] [PULL 22/40] spapr_rtas: add set-indicator RTAS interface

2015-06-03 Thread Alexander Graf
From: Mike Day This interface allows a guest to control various platform/device sensors. Initially, we only implement support necessary to control sensors that are required for hotplug: DR connector indicators/LEDs, resource allocation state, and resource isolation state. See docs/specs/ppc-spap

[Qemu-devel] [PULL 36/40] pseries: Enable in-kernel H_LOGICAL_CI_{LOAD, STORE} implementations

2015-06-03 Thread Alexander Graf
From: David Gibson qemu currently implements the hypercalls H_LOGICAL_CI_LOAD and H_LOGICAL_CI_STORE as PAPR extensions. These are used by the SLOF firmware for IO, because performing cache inhibited MMIO accesses with the MMU off (real mode) is very awkward on POWER. This approach breaks when

[Qemu-devel] [PULL 37/40] Add David Gibson for sPAPR in MAINTAINERS file

2015-06-03 Thread Alexander Graf
From: David Gibson At Alex Graf's request I'm now acting as sub-maintainer for the sPAPR (-machine pseries) code. This updates MAINTAINERS accordingly. While we're at it, change the label to mention pseries since that's the actual name of the machine type, even if most of the C files use the sP

[Qemu-devel] [PULL 16/40] pseries: Add pseries-2.4 machine type

2015-06-03 Thread Alexander Graf
From: David Gibson Now that 2.4 development has opened, create a new pseries machine type variant. For now it is identical to the pseries-2.3 machine type, but a number of new features are coming that will need to set backwards compatibility options. Signed-off-by: David Gibson Signed-off-by:

[Qemu-devel] [PULL 13/40] spapr_pci: Rework device-tree rendering

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy This replaces object_child_foreach() and callback with existing SPAPR_PCI_LIOBN() and spapr_tce_find_by_liobn() to make the code easier to read. This is a mechanical patch so no behaviour change is expected. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gi

[Qemu-devel] [PULL 18/40] hw/ppc/spapr: Use error_report() instead of hw_error()

2015-06-03 Thread Alexander Graf
From: Thomas Huth hw_error() is designed for printing CPU-related error messages (e.g. it also prints a full CPU register dump). For error messages that are not directly related to CPU problems, a function like error_report() should be used instead. Signed-off-by: Thomas Huth Signed-off-by: Dav

[Qemu-devel] [PULL 28/40] spapr_drc: add spapr_drc_populate_dt()

2015-06-03 Thread Alexander Graf
From: Michael Roth This function handles generation of ibm,drc-* array device tree properties to describe DRC topology to guests. This will by used by the guest to direct RTAS calls to manage any dynamic resources we associate with a particular DR Connector as part of hotplug/unplug. Since gener

[Qemu-devel] [PULL 25/40] spapr_rtas: add ibm, configure-connector RTAS interface

2015-06-03 Thread Alexander Graf
From: Michael Roth This interface is used to fetch an OF device-tree nodes that describes a newly-attached device to guest. It is called multiple times to walk the device-tree node and fetch individual properties into a 'workarea'/buffer provided by the guest. The device-tree is generated by QEM

[Qemu-devel] [PULL 17/40] hw/ppc/spapr: Fix error message when firmware could not be loaded

2015-06-03 Thread Alexander Graf
From: Thomas Huth When specifying a non-existing file with the "-bios" parameter, QEMU complained that it "could not find LPAR rtas". That's obviously a copy-n-paste bug from the code which loads the spapr-rtas.bin, it should complain about a missing firmware file instead. Additionally the error

[Qemu-devel] [PULL 07/40] spapr_pci: Introduce a liobn number generating macros

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy We are going to have multiple DMA windows per PHB and we want them to migrate so we need a predictable way of assigning LIOBNs. This introduces a macro which makes up a LIOBN from fixed prefix, PHB index (unique PHB id) and window number. This introduces a SPAPR_PCI_D

[Qemu-devel] [PULL 14/40] spapr_iommu: Give unique QOM name to TCE table

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy Useful for debugging. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/ppc/spapr_iommu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ppc/spapr_iommu.c b/hw/ppc/spapr_iommu.c index c17

[Qemu-devel] [PULL 34/40] machine: add default_ram_size to machine class

2015-06-03 Thread Alexander Graf
From: Nikunj A Dadhania Machines types can have different requirement for default ram size. Introduce a member in the machine class and set the current default_ram_size to 128MB. For QEMUMachine types override the value during the registration of the machine and for MachineClass introduce the ge

[Qemu-devel] [PULL 38/40] tci: do not use CPUArchState in tcg-target.h

2015-06-03 Thread Alexander Graf
From: Paolo Bonzini tcg-target.h does not use any QEMU-specific symbols, save for tci's usage of CPUArchState. Pull that up to tcg/tcg.h. This will make it possible to include tcg-target.h in cpu-defs.h. Signed-off-by: Paolo Bonzini Reviewed-by: Richard Henderson Signed-off-by: Alexander Gra

[Qemu-devel] [PULL 11/40] spapr_pci: Make find_phb()/find_dev() public

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy This makes find_phb()/find_dev() public and changed its names to spapr_pci_find_phb()/spapr_pci_find_dev() as they are going to be used from other parts of QEMU such as VFIO DDW (dynamic DMA window) or VFIO PCI error injection or VFIO EEH handling - in all these cases t

[Qemu-devel] [PULL 08/40] spapr_vio: Introduce a liobn number generating macros

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy This introduces a macro which makes up a LIOBN from fixed prefix and VIO device address (@reg property). This is to keep LIOBN macros rendering consistent - the same macro for PCI has been added by the previous patch. Signed-off-by: Alexey Kardashevskiy Reviewed-by:

[Qemu-devel] [PULL 09/40] spapr_pci: Define default DMA window size as a macro

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy This gets rid of a magic constant describing the default DMA window size for an emulated PHB. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/ppc/spapr_pci.c | 6 +++--- include/hw/pci-host/spapr.h | 2 +

[Qemu-devel] [PULL 06/40] spapr_iommu: Make H_PUT_TCE_INDIRECT endian-safe

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy PAPR is defined as big endian so TCEs need an adjustment so does this patch. This changes code to have ldq_be_phys() in one place. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/ppc/s

[Qemu-devel] [PULL 35/40] spapr: override default ram size to 512MB

2015-06-03 Thread Alexander Graf
From: Nikunj A Dadhania Signed-off-by: Nikunj A Dadhania Reviewed-by: Igor Mammedov Reviewed-by: Thomas Huth Acked-by: David Gibson Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/ppc/spapr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr

[Qemu-devel] [PULL 12/40] spapr_iommu: Make spapr_tce_find_by_liobn() public

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy At the moment spapr_tce_find_by_liobn() is used by H_PUT_TCE/... handlers to find an IOMMU by LIOBN. We are going to implement Dynamic DMA windows (DDW), new code will go to a new file and we will use spapr_tce_find_by_liobn() there too so let's make it public. Signed

[Qemu-devel] [PULL 33/40] spapr_pci: emit hotplug add/remove events during hotplug

2015-06-03 Thread Alexander Graf
From: Tyrel Datwyler This uses extension of existing EPOW interrupt/event mechanism to notify userspace tools like librtas/drmgr to handle in-guest configuration/cleanup operations in response to device_add/device_del. Userspace tools that don't implement this extension will need to be run manua

[Qemu-devel] [PULL 15/40] hw/ppc/spapr_iommu: Fix the check for invalid upper bits in liobn

2015-06-03 Thread Alexander Graf
From: Thomas Huth The check "liobn & 0xULL" in spapr_tce_find_by_liobn() is completely useless since liobn is only declared as an uint32_t parameter. Fix this by using target_ulong instead (this is what most of the callers of this function are using, too). Signed-off-by: Thomas H

[Qemu-devel] [PULL 04/40] spapr_pci: Fix unsafe signed/unsigned comparisons

2015-06-03 Thread Alexander Graf
From: David Gibson spapr_pci.c contains a number of expressions of the form (uval == -1) or (uval != -1), where 'uval' is an unsigned value. This mostly works in practice, because as long as the width of uval is greater or equal than that of (int), the -1 will be promoted to the unsigned type, w

[Qemu-devel] [PULL 05/40] spapr_iommu: Disable in-kernel IOMMU tables for >4GB windows

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy The existing KVM_CREATE_SPAPR_TCE ioctl only support 4G windows max as the window size parameter to the kernel ioctl() is 32-bit so there's no way of expressing a TCE window > 4GB. We are going to add huge DMA windows support so this will create small window and unexpe

[Qemu-devel] [PULL 24/40] spapr: add rtas_st_buffer_direct() helper

2015-06-03 Thread Alexander Graf
From: Michael Roth This is similar to the existing rtas_st_buffer(), but for cases where the guest is not expecting a length-encoded byte array. Namely, for calls where a "work area" buffer is used to pass around arbitrary fields/data. Signed-off-by: Michael Roth Reviewed-by: David Gibson Sign

[Qemu-devel] [PULL 23/40] spapr_rtas: add get-sensor-state RTAS interface

2015-06-03 Thread Alexander Graf
From: Mike Day This interface allows a guest to read various platform/device sensors. initially, we only implement support necessary to support hotplug: reading of the dr-entity-sense sensor, which communicates the state of a hotplugged resource/device to the guest (EMPTY/PRESENT/UNUSABLE). See

[Qemu-devel] [PULL 30/40] spapr_pci: create DRConnectors for each PCI slot during PHB realize

2015-06-03 Thread Alexander Graf
From: Michael Roth These will be used to support hotplug/unplug of PCI devices to the PCI bus associated with a particular PHB. We also set up device-tree properties in each PHBs initial FDT to describe the DRCs associated with them. This advertises to guests that each PHB is DR-capable device w

[Qemu-devel] [PULL 31/40] pci: make pci_bar useable outside pci.c

2015-06-03 Thread Alexander Graf
From: Michael Roth We need to work with PCI BARs to generate OF properties during PCI hotplug for sPAPR guests. Signed-off-by: Michael Roth Reviewed-by: David Gibson Acked-by: Michael S. Tsirkin Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/pci/pci.c | 2 +- incl

[Qemu-devel] [PULL 00/40] ppc patch queue 2015-06-03

2015-06-03 Thread Alexander Graf
Hi Peter, This is my current patch queue for ppc. Please pull. Alex The following changes since commit 3fc827d591679f3e262b9d1f8b34528eabfca8c0: target-arm: Correct check for non-EL3 (2015-06-02 13:22:29 +0100) are available in the git repository at: git://github.com/agraf/qemu.git tags

[Qemu-devel] [PULL 03/40] configure: Check for libfdt version 1.4.0

2015-06-03 Thread Alexander Graf
From: Thomas Huth Some recent patches require a function from libfdt version 1.4.0, so we should check for this version during the configure step already. Unfortunately, there does not seem to be a proper #define for the version number in the libfdt headers. So alternatively, we check for the ava

[Qemu-devel] [PULL 10/40] spapr_iommu: Add separate trace points for PCI DMA operations

2015-06-03 Thread Alexander Graf
From: Alexey Kardashevskiy This is to reduce VIO noise while debugging PCI DMA. Signed-off-by: Alexey Kardashevskiy Signed-off-by: David Gibson Signed-off-by: Alexander Graf --- hw/ppc/spapr_iommu.c | 27 --- include/hw/ppc/spapr.h | 1 + trace-events |

[Qemu-devel] [PULL 02/40] dtc: Update dtc / libfdt submodule to version 1.4.0

2015-06-03 Thread Alexander Graf
From: Thomas Huth Since some recent patches require libfdt version 1.4.0, let's update the dtc submodule to this version. Signed-off-by: Thomas Huth Signed-off-by: Alexander Graf --- dtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtc b/dtc index bc895d6..65cc4d2 16000

[Qemu-devel] [PULL 01/40] macio: Convert to realize()

2015-06-03 Thread Alexander Graf
From: Markus Armbruster Alexander Graf writes: > On 09.03.15 19:30, Markus Armbruster wrote: >> Alexander Graf writes: >> >>> On 27.02.15 13:43, Markus Armbruster wrote: Convert device models "macio-oldworld" and "macio-newworld". Signed-off-by: Markus Armbruster ---

Re: [Qemu-devel] [PATCH v2 14/16] target-s390x: support non current ASC in s390_cpu_handle_mmu_fault

2015-06-03 Thread Richard Henderson
On 06/03/2015 02:09 PM, Aurelien Jarno wrote: s390_cpu_handle_mmu_fault currently looks at the current ASC mode defined in PSW mask instead of the MMU index. This prevent emulating easily instructions using a specific ASC mode. Fix that by using the MMU index converted back to ASC using the just

Re: [Qemu-devel] [PATCH v2 13/16] target-s390x: add a cpu_mmu_idx_to_asc function

2015-06-03 Thread Richard Henderson
On 06/03/2015 02:09 PM, Aurelien Jarno wrote: Use constants to define the MMU indexes, and add a function to do the reverse conversion of cpu_mmu_index. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/cpu.h | 25 ++--- 1 file changed

Re: [Qemu-devel] [PATCH v2 08/16] target-s390x: implement TRANSLATE EXTENDED instruction

2015-06-03 Thread Richard Henderson
On 06/03/2015 02:09 PM, Aurelien Jarno wrote: It is part of the basic zArchitecture instructions. Cc: Alexander Graf Cc: Richard Henderson Signed-off-by: Aurelien Jarno --- target-s390x/helper.h | 1 + target-s390x/insn-data.def | 2 ++ target-s390x/mem_helper.c | 39

Re: [Qemu-devel] [PATCH v3 33/38] qmp: Introduce blockdev-change-medium

2015-06-03 Thread Eric Blake
On 06/03/2015 01:44 PM, Max Reitz wrote: > Introduce a new QMP command 'blockdev-change-medium' which is intended > to replace the 'change' command for block devices. The existing function > qmp_change_blockdev() is accordingly renamed to > qmp_blockdev_change_medium(). > > Signed-off-by: Max Reit

  1   2   3   4   5   6   >