[Qemu-devel] [PATCH v2] KVM: x86: Fix nmi injection failure when vcpu got blocked

2017-05-24 Thread Zhuangyanying
From: ZhuangYanying When spin_lock_irqsave() deadlock occurs inside the guest, vcpu threads, other than the lock-holding one, would enter into S state because of pvspinlock. Then inject NMI via libvirt API "inject-nmi", the NMI could not be injected into vm. The reason is: 1 It sets nmi_queued t

Re: [Qemu-devel] [PATCH] Fix nmi injection failure when vcpu got blocked

2017-05-24 Thread Zhuangyanying
> -Original Message- > From: Radim Krčmář [mailto:rkrc...@redhat.com] > Sent: Wednesday, May 24, 2017 10:34 PM > To: Zhuangyanying > Cc: pbonz...@redhat.com; Herongguang (Stephen); qemu-devel@nongnu.org; > Gonglei (Arei); Zhangbo (Oscar); k...@vger.kernel.org > Subject: Re: [PATCH] Fix nmi

Re: [Qemu-devel] [PATCH v2 5/5] blkdebug: Support .bdrv_co_get_block_status

2017-05-24 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > 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. > > Update iotest 177 for the new expected output. > > Signed-off-by: Eri

Re: [Qemu-devel] [PATCH v2 4/5] block: Simplify use of BDRV_BLOCK_RAW

2017-05-24 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > The lone caller that cares about a return of BDRV_BLOCK_RAW > (namely, io.c:bdrv_co_get_block_status) completely replaces the > return value, so there is no point in passing BDRV_BLOCK_DATA. > > Signed-off-by: Eric Blake > > --- > v2: fix subject, tweak c

Re: [Qemu-devel] [PATCH v2 3/5] block: Allow NULL file for bdrv_get_block_status()

2017-05-24 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > Not all callers care about which BDS owns the mapping for a given > range of the file. This patch merely simplifies the callers by > consolidating the logic in the common call point, while guaranteeing > a non-NULL file to all the driver callbacks, for no s

Re: [Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-24 Thread Alexey Perevalov
On 05/25/2017 02:30 AM, Peter Xu wrote: On Wed, May 24, 2017 at 03:16:23PM +0300, Alexey Perevalov wrote: On 05/24/2017 03:01 PM, Peter Xu wrote: On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: On Wed, May 24, 2017 at 02:57:36PM +0800, Peter Xu wrote: On Tue, May 23, 2017 at 02:31:08P

Re: [Qemu-devel] [PATCH V5 6/9] net/colo-compare.c: Make colo-compare support vnet_hdr_len

2017-05-24 Thread Jason Wang
On 2017年05月23日 22:20, Zhang Chen wrote: We add the vnet_hdr option for colo-compare, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0,vnet_hdr=on

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

2017-05-24 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > 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.

Re: [Qemu-devel] [PATCH V5 3/9] net/filter-mirror.c: Add new option to enable vnet support for filter-redirector

2017-05-24 Thread Jason Wang
On 2017年05月23日 22:20, Zhang Chen wrote: We add the vnet_hdr option for filter-redirector, default is disable. If you use virtio-net-pci net driver, please enable it. Because colo-compare or other modules needs the vnet_hdr_len to parse packet, so we add this new option send the len to others. Y

Re: [Qemu-devel] [PATCH V5 2/9] net/filter-mirror.c: Make filter mirror support vnet support.

2017-05-24 Thread Jason Wang
On 2017年05月23日 22:20, Zhang Chen wrote: We add the vnet_hdr option for filter-mirror, default is disable. If you use virtio-net-pci net driver, please enable it. You can use it for example: -object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr=on If vnet_hdr=on we change the

[Qemu-devel] Behavior of QMP "query-block"

2017-05-24 Thread Bruno Alvisio
Hello all, Summary I am using XEN hypervisor to run a HVM with a QEMU backed disk. After I start the HVM I use QMP "query-block" command to see the devices of the VM. Initially the command returns the disk that I set as part of the configuration. After a few seconds the a DEVICE_DELETE event occu

[Qemu-devel] [PULL 16/18] hw/ppc: migrating the DRC state of hotplugged devices

2017-05-24 Thread David Gibson
From: 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 'plu

[Qemu-devel] [PULL 17/18] hw/ppc/spapr.c: recover pending LMB unplug info in spapr_lmb_release

2017-05-24 Thread David Gibson
From: 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. T

[Qemu-devel] [PULL 14/18] hw/ppc/spapr.c: adding pending_dimm_unplugs to sPAPRMachineState

2017-05-24 Thread David Gibson
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] [PULL 13/18] spapr: add pre_plug function for memory

2017-05-24 Thread David Gibson
From: Laurent Vivier This allows to manage errors before the memory has started to be hotplugged. We already have the function for the CPU cores. Signed-off-by: Laurent Vivier Reviewed-by: Greg Kurz [dwg: Fixed a couple of style nits] Signed-off-by: David Gibson --- hw/ppc/spapr.c | 41 +

[Qemu-devel] [PULL 18/18] xics: add unrealize handler

2017-05-24 Thread David Gibson
From: Greg Kurz Now that ICPState objects get finalized on CPU unplug, we should unregister reset handlers as well to avoid a QEMU crash at machine reset time. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- hw/intc/xics.c | 5 + hw/intc/xics_kvm.c | 6 ++ 2 files changed

[Qemu-devel] [PULL 15/18] hw/ppc: removing drc->detach_cb and drc->detach_cb_opaque

2017-05-24 Thread David Gibson
From: 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

[Qemu-devel] [PULL 09/18] spapr_cpu_core: drop reference on ICP object during CPU realization

2017-05-24 Thread David Gibson
From: Greg Kurz When a piece of code allocates an object, it implicitely gets a reference on it. If it then makes that object a child property of another object, it should drop its own reference at some point otherwise the child object can never be finalized. The current code hence leaks one ICP

[Qemu-devel] [PULL 10/18] spapr: fix error reporting in xics_system_init()

2017-05-24 Thread David Gibson
From: Greg Kurz If the user explicitely asked for kernel-irqchip support and "xics-kvm" initialization fails, we shouldn't fallback to emulated "xics" as we do now. It is also awkward to print an error message when we have an errp pointer argument. Let's use the errp argument to report the error

[Qemu-devel] [PULL 12/18] pseries: Restore support for total vcpus not a multiple of threads-per-core for old machine types

2017-05-24 Thread David Gibson
As of pseries-2.7 and later, we require the total number of guest vcpus to be a multiple of the threads-per-core. pseries-2.6 and earlier machine types, however, are supposed to allow this for the sake of migration from old qemu versions which allowed this. Unfortunately, 8149e29 "pseries: Enforc

[Qemu-devel] [PULL 11/18] pseries: Split CAS PVR negotiation out into a separate function

2017-05-24 Thread David Gibson
Guests of the qemu machine type go through a feature negotiation process known as "client architecture support" (CAS) during early boot. This does a number of things, one of which is finding a CPU compatibility mode which can be supported by both guest and host. In fact the CPU negotiation is pro

[Qemu-devel] [PULL 07/18] spapr: ensure core_slot isn't NULL in spapr_core_unplug()

2017-05-24 Thread David Gibson
From: Greg Kurz 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 Coverity issue CID 1375404. Signed-off-by: Greg Kurz Review

[Qemu-devel] [PULL 06/18] xics_kvm: cache already enabled vCPU ids

2017-05-24 Thread David Gibson
From: Greg Kurz Since commit a45863bda90d ("xics_kvm: Don't enable KVM_CAP_IRQ_XICS if already enabled"), we were able to re-hotplug a vCPU that had been hot- unplugged ealier, thanks to a boolean flag in ICPState that we set when enabling KVM_CAP_IRQ_XICS. This could work because the lifecycle

[Qemu-devel] [PULL 08/18] hw/ppc/spapr_events.c: removing 'exception' from sPAPREventLogEntry

2017-05-24 Thread David Gibson
From: 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, '

[Qemu-devel] [PULL 00/18] ppc-for-2.10 queue 20170525

2017-05-24 Thread David Gibson
The following changes since commit 9964e96dccf7f7c936ee854a795415d19b60: Merge remote-tracking branch 'jasowang/tags/net-pull-request' into staging (2017-05-23 15:01:31 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170525 for you t

[Qemu-devel] [PULL 05/18] spapr: Consolidate HPT freeing code into a routine

2017-05-24 Thread David Gibson
From: Bharata B Rao Consolidate the code that frees HPT into a separate routine spapr_free_hpt() as the same chunk of code is called from two places. Signed-off-by: Bharata B Rao Signed-off-by: David Gibson --- hw/ppc/spapr.c | 13 + hw/ppc/spapr_hcall.c | 5 + incl

[Qemu-devel] [PULL 04/18] spapr-cpu-core: release ICP object when realization fails

2017-05-24 Thread David Gibson
From: Greg Kurz While here we introduce a single error path to avoid code duplication. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr_cpu_core.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_c

[Qemu-devel] [PULL 01/18] target/ppc: reset reservation in do_rfi()

2017-05-24 Thread David Gibson
From: Nikunj A Dadhania For transitioning back to userspace after the interrupt. Suggested-by: Richard Henderson Signed-off-by: Nikunj A Dadhania Signed-off-by: David Gibson --- target/ppc/excp_helper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/ppc/excp_helper.c b/target/

[Qemu-devel] [PULL 03/18] spapr: sanitize error handling in spapr_ics_create()

2017-05-24 Thread David Gibson
From: Greg Kurz The spapr_ics_create() function handles errors in a rather convoluted way, with two local Error * variables. Moreover, failing to parent the ICS object to the machine should be considered as a bug but it is currently ignored. This patch addresses both issues. Signed-off-by: Greg

[Qemu-devel] [PULL 02/18] ppc/xics: simplify prototype of xics_spapr_init()

2017-05-24 Thread David Gibson
From: Greg Kurz This function only does hypercall and RTAS-call registration, and thus never returns an error. This patch adapt the prototype to reflect that. Signed-off-by: Greg Kurz Reviewed-by: Cédric Le Goater Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- hw/intc/x

[Qemu-devel] [PATCH] qtest: add rtc periodic timer test

2017-05-24 Thread guangrong . xiao
From: Xiao Guangrong It tests the accuracy of rtc periodic timer which is recently improved & fixed by: mc146818rtc: precisely count the clock for periodic timer (commit id has not been decided yet) Note: as qemu needs a precise timer to drive its rtc timer callbacks, that means clock=vm i

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-24 Thread David Gibson
On Wed, May 24, 2017 at 12:14:02PM +0200, Igor Mammedov wrote: > On Wed, 24 May 2017 11:28:57 +0200 > Greg Kurz wrote: > > > On Wed, 24 May 2017 15:07:54 +1000 > > David Gibson wrote: > > > > > On Tue, May 23, 2017 at 01:18:11PM +0200, Laurent Vivier wrote: > > > > If the OS is not started, Q

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-24 Thread David Gibson
On Wed, May 24, 2017 at 11:28:57AM +0200, Greg Kurz wrote: > On Wed, 24 May 2017 15:07:54 +1000 > David Gibson wrote: > > > On Tue, May 23, 2017 at 01:18:11PM +0200, Laurent Vivier wrote: > > > If the OS is not started, QEMU sends an event to the OS > > > that is lost and cannot be recovered. An

Re: [Qemu-devel] [Qemu-ppc] [PATCH 3/4] spapr: disable hotplugging without OS

2017-05-24 Thread David Gibson
On Wed, May 24, 2017 at 12:40:37PM -0500, Michael Roth wrote: > Quoting Laurent Vivier (2017-05-24 11:02:30) > > On 24/05/2017 17:54, Greg Kurz wrote: > > > On Wed, 24 May 2017 12:14:02 +0200 > > > Igor Mammedov wrote: > > > > > >> On Wed, 24 May 2017 11:28:57 +0200 > > >> Greg Kurz wrote: > > >

Re: [Qemu-devel] [PATCH 4/4] migration: use dirty_rate_high_cnt more aggressively

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 05:10:03PM +0100, Felipe Franciosi wrote: > The commit message from 070afca25 suggests that dirty_rate_high_cnt > should be used more aggressively to start throttling after two > iterations instead of four. The code, however, only changes the auto > convergence behaviour to

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

2017-05-24 Thread David Gibson
On Wed, 24 May 2017 08:01:47 -0400 (EDT) Marcel Apfelbaum wrote: > - Original Message - > > From: "Markus Armbruster" > > To: "Philippe Mathieu-Daudé" > > Cc: qemu-devel@nongnu.org, "Mao Zhongyi" , > > j...@resnulli.us, jasow...@redhat.com, "Michael > > S. Tsirkin" , "Marcel Apfelbaum"

Re: [Qemu-devel] [PATCH] xics: add unrealize handler

2017-05-24 Thread David Gibson
On Wed, May 24, 2017 at 07:40:43PM +0200, Greg Kurz wrote: > Now that ICPState objects get finalized on CPU unplug, we should unregister > reset handlers as well to avoid a QEMU crash at machine reset time. > > Signed-off-by: Greg Kurz Applied to ppc-for-2.10. > --- > hw/intc/xics.c |5

Re: [Qemu-devel] [PATCH] migration: remove register_savevm()

2017-05-24 Thread David Gibson
On Wed, May 24, 2017 at 02:10:48PM +0200, Laurent Vivier wrote: > We can replace the four remaining calls of register_savevm() by > calls to register_savevm_live(). So we can remove the function and > as we don't allocate anymore the ops pointer with g_new0() > we don't have to free it then. > > S

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

2017-05-24 Thread Fam Zheng
On Wed, 05/24 15:28, Eric Blake wrote: > Most callback commands in qemu-io return 0 to keep the interpreter > loop running, or 1 to quit immediately. However, open_f() just > passed through the return value of openfile(), which has different > semantics of returning 0 if a file was opened, or 1 on

Re: [Qemu-devel] [PATCH 1/4] migration: keep bytes_xfer_prev init'd to zero

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 05:10:00PM +0100, Felipe Franciosi wrote: > The first time migration_bitmap_sync() is called, bytes_xfer_prev is set > to ram_state.bytes_transferred which is, at this point, zero. The next > time migration_bitmap_sync() is called, an iteration has happened and > bytes_xfer_

Re: [Qemu-devel] [PATCH 3/4] migration: set bytes_xfer_* outside of autoconverge logic

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 05:10:02PM +0100, Felipe Franciosi wrote: > The bytes_xfer_now/prev counters are only used by the auto convergence > logic. However, they are used alongside the dirty_pages_rate counter, > which is calculated (and required) outside of this logic. The problem > with this appr

Re: [Qemu-devel] [PATCH 2/4] migration: set dirty_pages_rate before autoconverge logic

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 05:10:01PM +0100, Felipe Franciosi wrote: > Currently, a "period" in the RAM migration logic is at least a second > long and accounts for what happened since the last period (or the > beginning of the migration). The dirty_pages_rate counter is calculated > at the end this l

Re: [Qemu-devel] [PATCH v2 0/4] 9pfs: local: fix metadata of mapped-file security mode

2017-05-24 Thread Leo Gaspard
On 05/24/2017 10:54 AM, Greg Kurz wrote: > On Wed, 24 May 2017 00:59:29 +0200 > Leo Gaspard wrote: > >> On 05/23/2017 04:32 PM, Greg Kurz wrote: >>> v2: - posted patch for CVE-2017-7493 separately >>> - other changes available in each patch changelog >>> >>> Leo, >>> >>> If you find time to t

Re: [Qemu-devel] [PATCH] migration: keep bytes_xfer_prev init'd to zero

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 01:02:25PM +, Felipe Franciosi wrote: > > > On 23 May 2017, at 05:27, Peter Xu wrote: > > > > On Fri, May 19, 2017 at 10:59:02PM +0100, Felipe Franciosi wrote: > >> The first time migration_bitmap_sync() is called, bytes_xfer_prev is set > >> to ram_state.bytes_transf

Re: [Qemu-devel] [PATCH] target/i386: use multiple CPU AddressSpaces

2017-05-24 Thread Richard Henderson
On 05/19/2017 02:16 AM, Paolo Bonzini wrote: This speeds up SMM switches. Later on it may remove the need to take the BQL, and it may also allow to reuse code between TCG and KVM. Signed-off-by: Paolo Bonzini --- target/i386/cpu.c| 15 +- target/i386/cpu.h| 11 +++

Re: [Qemu-devel] [PATCH V6 07/10] migration: add bitmap for copied page

2017-05-24 Thread Peter Xu
On Wed, May 24, 2017 at 03:16:23PM +0300, Alexey Perevalov wrote: > On 05/24/2017 03:01 PM, Peter Xu wrote: > >On Wed, May 24, 2017 at 10:56:37AM +0300, Alexey wrote: > >>On Wed, May 24, 2017 at 02:57:36PM +0800, Peter Xu wrote: > >>>On Tue, May 23, 2017 at 02:31:08PM +0300, Alexey Perevalov wrote:

Re: [Qemu-devel] [PATCH 5/5] target/sh4: fix RTE instruction delay slot

2017-05-24 Thread Richard Henderson
On 05/16/2017 03:47 PM, Aurelien Jarno wrote: The ReTurn from Exception (RTE) instruction loads the system register (SR) with the saved system register (SSR). It has a delay slot, and behaves specially according to the SH4 manual: The SR value accessed by the instruction in the RTE delay slot

Re: [Qemu-devel] [PATCH 2/5] target/sh4: fix reset when using a kernel and an initrd

2017-05-24 Thread Richard Henderson
On 05/16/2017 03:47 PM, Aurelien Jarno wrote: When a masked exception happens, the SH4 CPU generates a non-masked reset exception, which then jumps to the reset vector at address 0xA000. While this is emulated correctly in QEMU, this does not work when using a kernel and initrd as this addres

Re: [Qemu-devel] [PATCH 4/5] target/sh4: ignore interrupts in a delay slot

2017-05-24 Thread Richard Henderson
On 05/16/2017 03:47 PM, Aurelien Jarno wrote: Delay slots are indivisible, therefore avoid scheduling an interrupt in the delay slot. However exceptions are possible. Signed-off-by: Aurelien Jarno --- target/sh4/helper.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) Re

Re: [Qemu-devel] [PATCH 3/5] target/sh4: introduce DELAY_SLOT_MASK

2017-05-24 Thread Richard Henderson
On 05/16/2017 03:47 PM, Aurelien Jarno wrote: This will make easier the introduction of a new flag in the next patches. Signed-off-by: Aurelien Jarno --- target/sh4/cpu.h | 3 ++- target/sh4/helper.c| 4 ++-- target/sh4/translate.c | 17 - 3 files changed, 12 ins

Re: [Qemu-devel] [PATCH 1/5] target/sh4: log unauthorized accesses using qemu_log_mask

2017-05-24 Thread Richard Henderson
On 05/16/2017 03:47 PM, Aurelien Jarno wrote: qemu_log_mask() is preferred over fprintf() for logging errors. Signed-off-by: Aurelien Jarno --- target/sh4/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v2 0/2] Add global device ID in virt machine

2017-05-24 Thread Michael S. Tsirkin
On Tue, May 23, 2017 at 02:12:43PM +0300, Diana Craciun wrote: > The NXP DPAA2 is a hardware architecture designed for high-speeed network > packet processing. The DPAA2 hardware components are managed by a hardware > component called the Management Complex (or MC) which provides an > object-base a

[Qemu-devel] [PATCH 3/4] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-24 Thread Richard Henderson
Previously, helper_ex would construct the insn and then implement the insn via direct calls other helpers. This was sufficient to boot Linux but that is all. It is easy enough to go the whole nine yards by stashing state for EXECUTE within the cpu, and then rely on a new TB to be created that pro

[Qemu-devel] [PATCH 4/4] target/s390x: Re-implement a few EXECUTE target insns directly

2017-05-24 Thread Richard Henderson
While the previous patch is required for proper conformance, the vast majority of target insns are MVC and XC for implementing memmove and memset respectively. The next most common are CLC, TR, and SVC. Implementing these (and a few others for which we already have an implementation) directly is

[Qemu-devel] [PATCH 2/4] target/s390x: End the TB after EXECUTE

2017-05-24 Thread Richard Henderson
This split will be required for implementing EXECUTE properly. Do this now as a separate step to aid comparison of before and after TB listings. Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 54 --- target/s390x/translate.c | 6 +++

[Qemu-devel] [PATCH 1/4] target/s390x: Save current ilen during translation

2017-05-24 Thread Richard Henderson
Use this saved value instead of recomputing from next_pc difference. Signed-off-by: Richard Henderson --- target/s390x/translate.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/s390x/translate.c b/target/s390x/translate.c index 4bd16d9..5b8333f 100644 --- a/t

[Qemu-devel] [PATCH 0/4] target/s390x Implement EXECUTE via TranslationBlock

2017-05-24 Thread Richard Henderson
This is the rewrite of EX that I posted last week, fixed with Aurelien's help, and adjusted to be applied on top of my v2 unwind patch set. It also splits the patch into more pieces to make it easier to debug, and keeps the direct implementation of the most common target insns. Which are in fact s

Re: [Qemu-devel] [PATCH] pc: ACPI BIOS: use highest NUMA node for hotplug mem hole SRAT entry

2017-05-24 Thread Michael S. Tsirkin
On Wed, May 24, 2017 at 11:16:14AM +0200, Ladi Prosek wrote: > On Wed, May 24, 2017 at 11:07 AM, Laszlo Ersek wrote: > > On 05/24/17 10:09, Ladi Prosek wrote: > >> For reasons unknown, Windows won't online all memory, both at command > >> line and hot-plugged later, unless the hotplug mem hole SRA

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-05-24 Thread Eric Blake
On 05/24/2017 04:51 PM, Tomáš Golembiovský wrote: > So what about the following, would that be acceptable? > > > ## > # @GuestOSRelease: > # > # @content: > # POSIX systems the @kernel_version, @kernel_release and > # @machine_hardware correspond to the values release, version

Re: [Qemu-devel] [PATCH v2] vhost-user: pass message as a pointer to process_message_reply()

2017-05-24 Thread Michael S. Tsirkin
On Wed, May 24, 2017 at 11:05:20AM +0200, Maxime Coquelin wrote: > process_message_reply() was recently updated to get full message > content instead of only its request field. > > There is no need to copy all the struct content into the stack, > so just pass its pointer as const. > > Cc: Zhiyong

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-05-24 Thread Tomáš Golembiovský
On Wed, 24 May 2017 23:51:55 +0200 Tomáš Golembiovský wrote: > On Wed, 12 Apr 2017 15:05:02 -0500 > Michael Roth wrote: > > > On 04/03/2017 10:17 AM, Marc-André Lureau wrote: > > > Hi > > > > > > On Fri, Mar 31, 2017 at 3:41 PM Eric Blake wrote: > > > > > >> On 03/31/2017 05:19 AM, Vin

Re: [Qemu-devel] [PATCH v3] qemu-ga: add guest-get-osrelease command

2017-05-24 Thread Tomáš Golembiovský
On Wed, 12 Apr 2017 15:05:02 -0500 Michael Roth wrote: > On 04/03/2017 10:17 AM, Marc-André Lureau wrote: > > Hi > > > > On Fri, Mar 31, 2017 at 3:41 PM Eric Blake wrote: > > > >> On 03/31/2017 05:19 AM, Vinzenz 'evilissimo' Feenstra wrote: > >>> From: Vinzenz Feenstra > >>> > >>> Add a n

Re: [Qemu-devel] [PATCH 02/31] target/s390x: Implement EXECUTE via new TranslationBlock

2017-05-24 Thread Richard Henderson
On 05/24/2017 10:54 AM, Aurelien Jarno wrote: It seems the problem arise if an interrupt happens when the TB containing the EXECUTE instruction is being executed. In that case at the end of the TB, the interruption code is translated with the ex_value set, which means with the wrong PC, wrong per

Re: [Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-24 Thread Niels de Vos
On Wed, May 24, 2017 at 04:50:03PM -0400, Jeff Cody wrote: > On Wed, May 24, 2017 at 11:02:02AM +0200, Niels de Vos wrote: > > On Tue, May 23, 2017 at 01:27:50PM -0400, Jeff Cody wrote: > > > On current released versions of glusterfs, glfs_lseek() will sometimes > > > return invalid values for SEEK

Re: [Qemu-devel] [PATCH] block/gluster: glfs_lseek() workaround

2017-05-24 Thread Jeff Cody
On Wed, May 24, 2017 at 11:02:02AM +0200, Niels de Vos wrote: > On Tue, May 23, 2017 at 01:27:50PM -0400, Jeff Cody wrote: > > On current released versions of glusterfs, glfs_lseek() will sometimes > > return invalid values for SEEK_DATA or SEEK_HOLE. For SEEK_DATA and > > SEEK_HOLE, the returned

[Qemu-devel] [PATCH v2 3/5] block: Allow NULL file for bdrv_get_block_status()

2017-05-24 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. This patch merely simplifies the callers by consolidating the logic in the common call point, while guaranteeing a non-NULL file to all the driver callbacks, for no semantic change. However, this will also set th

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

2017-05-24 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 v2 5/5] blkdebug: Support .bdrv_co_get_block_status

2017-05-24 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. Update iotest 177 for the new expected output. Signed-off-by: Eric Blake --- v2: tweak commit message --- block/blk

[Qemu-devel] [PATCH v2 4/5] block: Simplify use of BDRV_BLOCK_RAW

2017-05-24 Thread Eric Blake
The lone caller that cares about a return of BDRV_BLOCK_RAW (namely, io.c:bdrv_co_get_block_status) completely replaces the return value, so there is no point in passing BDRV_BLOCK_DATA. Signed-off-by: Eric Blake --- v2: fix subject, tweak commit message --- block/commit.c | 2 +- block/mir

[Qemu-devel] [PATCH v2 0/5] more blkdebug tweaks

2017-05-24 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. Since v1: - patch 1: patch open_f instead of openfile [Fam] - patch 2: drop redundant assignment - patch 3: new - patc

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

2017-05-24 Thread Eric Blake
Most callback commands in qemu-io return 0 to keep the interpreter loop running, or 1 to quit immediately. However, open_f() just passed through the return value of openfile(), which has different semantics of returning 0 if a file was opened, or 1 on any failure. As a result of mixing the return

[Qemu-devel] [PATCH v2 32/33] target/s390x: Use atomic operations for COMPARE SWAP PURGE

2017-05-24 Thread Richard Henderson
Also provide the cross-cpu tlb flushing required by the PoO. Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/insn-data.def | 2 +- target/s390x/mem_helper.c | 32 target/s390x/translate.c | 42

[Qemu-devel] [PATCH v2 30/33] target/s390x: Fix some helper_ex problems

2017-05-24 Thread Richard Henderson
(1) The OR of the low bits or R1 into INSN were not being done consistently; it was forgotten along all but the SVC path. (2) The setting of ILEN was wrong on SVC path for EXRL. (3) The data load for ICM read too much. Fix these by consolidating data load at the beginning, using get_ilen to contro

[Qemu-devel] [PATCH v2 29/33] target/s390x: Use unwind data for helper_mvcs/mvcp

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 8 ++-- target/s390x/translate.c | 2 -- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 17d8257.

[Qemu-devel] [PATCH v2 28/33] target/s390x: Use unwind data for helper_lra

2017-05-24 Thread Richard Henderson
Fix saving exception_index around mmu_translate; eliminate a dead store. Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 6 +++--- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.

[Qemu-devel] [PATCH v2 27/33] target/s390x: Use unwind data for helper_tprot

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 1 - target/s390x/translate.c | 1 - 2 files changed, 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 7df2e53..a8c85c9 100644 --- a/tar

[Qemu-devel] [PATCH v2 33/33] target/s390x: Implement CSPG

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 1 + target/s390x/translate.c | 1 + 2 files changed, 2 insertions(+) diff --git a/target/s390x/insn-data.def b/target/s390x/insn-data.def index 4c91f30..f818437 100644 --- a/target/s390x/insn-data.def +++ b/target/s390x/insn-da

[Qemu-devel] [PATCH v2 31/33] target/s390x: Fix EXECUTE with R1==0

2017-05-24 Thread Richard Henderson
The PoO specifies that when R1==0, no ORing into the insn loaded from storage takes place. Load a zero for this case. Signed-off-by: Richard Henderson --- target/s390x/insn-data.def | 4 ++-- target/s390x/translate.c | 14 +- 2 files changed, 15 insertions(+), 3 deletions(-) dif

[Qemu-devel] [PATCH v2 23/33] target/s390x: Use unwind data for helper_lctlg

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 8 target/s390x/translate.c | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index ff12777..

[Qemu-devel] [PATCH v2 18/33] target/s390x: Use unwind data for helper_cksm

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 11 ++- target/s390x/translate.c | 1 - 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index f5a3

[Qemu-devel] [PATCH v2 15/33] target/s390x: Use unwind data for helper_mvcl

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 7 --- target/s390x/translate.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 2acc984..4

[Qemu-devel] [PATCH v2 25/33] target/s390x: Use unwind data for helper_stctl

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 10 ++ target/s390x/translate.c | 2 -- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 614c

[Qemu-devel] [PATCH v2 24/33] target/s390x: Use unwind data for helper_lctl

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 9 + target/s390x/translate.c | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 68e3817.

[Qemu-devel] [PATCH v2 17/33] target/s390x: Use unwind data for helper_clcle

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 6 +++--- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 8a095ad..f5

[Qemu-devel] [PATCH v2 14/33] target/s390x: Use unwind data for helper_stam

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 88e817a..2acc9

[Qemu-devel] [PATCH v2 26/33] target/s390x: Use unwind data for helper_testblock

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 +++ target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b64c04e..7df2e5

[Qemu-devel] [PATCH v2 10/33] target/s390x: Use unwind data for helper_clst

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 5 +++-- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 33d83e5..af2

[Qemu-devel] [PATCH v2 21/33] target/s390x: Use unwind data for helper_tre

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 15 --- target/s390x/translate.c | 1 - 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index

[Qemu-devel] [PATCH v2 16/33] target/s390x: Use unwind data for helper_mvcle

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 7 --- target/s390x/translate.c | 1 - 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 49cfc9b..8

[Qemu-devel] [PATCH v2 22/33] target/s390x: Use unwind data for helper_trt

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 28 target/s390x/translate.c | 1 - 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_

[Qemu-devel] [PATCH v2 20/33] target/s390x: Use unwind data for helper_tr

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 25 +++-- target/s390x/translate.c | 1 - 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0701e10..b37a963 100644 --- a/target/s390x/

[Qemu-devel] [PATCH v2 06/33] target/s390x: Use unwind data for helper_mvc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 30 ++ target/s390x/translate.c | 1 - 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b71437a..78a9ac1 100644 --- a/target/s

[Qemu-devel] [PATCH v2 13/33] target/s390x: Use unwind data for helper_lam

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index e4bfc6e..88e81

[Qemu-devel] [PATCH v2 19/33] target/s390x: Use unwind data for helper_unpk

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 9 + target/s390x/translate.c | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index d4ee364.

[Qemu-devel] [PATCH v2 12/33] target/s390x: Use unwind data for helper_mvst

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 5 +++-- target/s390x/translate.c | 1 - 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 1c36a47..e4b

[Qemu-devel] [PATCH v2 05/33] target/s390x: Use unwind data for helper_xc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 44 target/s390x/translate.c | 1 - 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index b4b50d1..b71437a 100644

[Qemu-devel] [PATCH v2 03/33] target/s390x: Use unwind data for helper_nc

2017-05-24 Thread Richard Henderson
Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 31 ++- target/s390x/translate.c | 1 - 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 90b62fa..7d6133b 100644 --- a/target/

[Qemu-devel] [PATCH v2 11/33] target/s390x: Use unwind data for helper_mvpg

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/helper.h | 2 +- target/s390x/mem_helper.c | 9 + target/s390x/translate.c | 3 +-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/target/s390x/helper.h b/target/s

[Qemu-devel] [PATCH v2 01/33] target/s390x: Use cpu_loop_exit_restore for tlb_fill

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 0c6a0d9..e3325a4 100644 --- a/target/s39

[Qemu-devel] [PATCH v2 09/33] target/s390x: Use unwind data for helper_srst

2017-05-24 Thread Richard Henderson
Reviewed-by: Thomas Huth Reviewed-by: Aurelien Jarno Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 3 ++- target/s390x/translate.c | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mem_helper.c b/target/s390x/mem_helper.c index 3e75cae..33d83

  1   2   3   >