Re: [Qemu-devel] [PATCH v2 7/8] cputlb: Handle watchpoints via TLB_WATCHPOINT

2019-08-28 Thread David Hildenbrand
On 29.08.19 01:16, Richard Henderson wrote: > The raising of exceptions from check_watchpoint, buried inside > of the I/O subsystem, is fundamentally broken. We do not have > the helper return address with which we can unwind guest state. > > Replace PHYS_SECTION_WATCH and io_mem_watch with TLB_W

Re: [Qemu-devel] [PATCH v2 6/8] cputlb: Remove double-alignment in store_helper

2019-08-28 Thread David Hildenbrand
On 29.08.19 01:16, Richard Henderson wrote: > We have already aligned page2 to the start of the next page. > There is no reason to do that a second time. > > Signed-off-by: Richard Henderson > --- > accel/tcg/cputlb.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/ac

Re: [Qemu-devel] [PATCH v2 5/8] cputlb: Fix size operand for tlb_fill on unaligned store

2019-08-28 Thread David Hildenbrand
On 29.08.19 01:16, Richard Henderson wrote: > We are currently passing the size of the full write to > the tlb_fill for the second page. Instead pass the real > size of the write to that page. > > This argument is unused within all tlb_fill, except to be > logged via tracing, so in practice this

Re: [Qemu-devel] [PATCH for-4.2 v5 1/2] kvm: s390: split too big memory section on several memslots

2019-08-28 Thread Christian Borntraeger
On 27.08.19 14:56, Igor Mammedov wrote: > On Tue, 20 Aug 2019 18:07:27 +0200 > Cornelia Huck wrote: > >> On Wed, 7 Aug 2019 11:32:41 -0400 >> Igor Mammedov wrote: >> >>> Max memslot size supported by kvm on s390 is 8Tb, >>> move logic of splitting RAM in chunks upto 8T to KVM code. >>> >>> T

[Qemu-devel] [PULL 17/19] spapr_pci: Advertise BAR reallocation capability

2019-08-28 Thread David Gibson
From: Alexey Kardashevskiy The pseries guests do not normally allocate PCI resources and rely on the system firmware doing so. Furthermore at least at some point in the past the pseries guests won't even allowed to change BARs, probably it is still the case for phyp. So since the initial commit w

[Qemu-devel] [PULL 19/19] spapr: Set compat mode in spapr_core_plug()

2019-08-28 Thread David Gibson
From: Greg Kurz A recent change in spapr_machine_reset() showed that resetting the compat mode in spapr_machine_reset() for the boot vCPU and in spapr_cpu_reset() for all other vCPUs was fragile. The fix was thus to reset the compat mode for all vCPUs in spapr_machine_reset(), but we still have t

[Qemu-devel] [PULL 18/19] spapr/pci: Convert types to QEMU coding style

2019-08-28 Thread David Gibson
From: Greg Kurz The QEMU coding style requires: - to typedef structured types (HACKING) - to use CamelCase for types and structure names (CODING_STYLE) Do that for PCI and Nvlink2 code. Signed-off-by: Greg Kurz Message-Id: <156701644465.505236.2850655823182656869.st...@bahia.lan> Signed-off-by

[Qemu-devel] [PULL 15/19] powerpc/spapr: Add host threads parameter to ibm, get_system_parameter

2019-08-28 Thread David Gibson
From: Suraj Jitindar Singh The ibm,get_system_parameter rtas call is used by the guest to retrieve data relating to certain parameters of the system. The SPLPAR characteristics option (token 20) is used to determine characteristics of the environment in which the lpar will run. It may be useful

[Qemu-devel] [PULL 08/19] ppc: Fix xscvdpspn for SNAN

2019-08-28 Thread David Gibson
From: "Paul A. Clarke" The xscvdpspn instruction implements a non-arithmetic conversion. In particular, NaNs are not silenced and rounding is not performed. Rewrite to match the pseudocode for ConvertDPtoSP_NS() in the Power 3.0B manual. Signed-off-by: Paul A. Clarke Message-Id: <1566321964-14

[Qemu-devel] [PULL 10/19] pseries: Fix compat_pvr on reset

2019-08-28 Thread David Gibson
From: Laurent Vivier If we a migrate P8 machine to a P9 machine, the migration fails on destination with: error while loading state for instance 0x1 of device 'cpu' load of migration failed: Operation not permitted This is caused because the compat_pvr field is only present for the first CP

[Qemu-devel] [PULL 13/19] target/ppc: Refactor emulation of vmrgew and vmrgow instructions

2019-08-28 Thread David Gibson
From: Stefan Brankovic Since I found this two instructions implemented with tcg, I refactored them so they are consistent with other similar implementations that I introduced in this patch. Also, a new dual macro GEN_VXFORM_TRANS_DUAL is added. This macro is used if one instruction is realized w

[Qemu-devel] [PULL 04/19] ppc/pnv: Generate phandle for the "interrupt-parent" property

2019-08-28 Thread David Gibson
From: Cédric Le Goater Devices such as the BT or serial devices require a valid "interrupt-parent" phandle in the device tree and it is currently empty (0x0). It was not a problem until now but since OpenFirmare started using a recent libdft (>= 1.4.7), petitboot fails to boot the system image wi

[Qemu-devel] [PULL 11/19] target/ppc: Set float_tininess_before_rounding at cpu reset

2019-08-28 Thread David Gibson
From: Richard Henderson As defined in Power 3.0 section 4.4.4 "Underflow Exception", a tiny result is detected before rounding. Fixes: https://bugs.launchpad.net/qemu/+bug/1841491 Reported-by: Paul Clarke Signed-off-by: Richard Henderson Message-Id: <20190827020013.27154-1-richard.hender...@li

[Qemu-devel] [PULL 07/19] ppc: Fix xsmaddmdp and friends

2019-08-28 Thread David Gibson
From: "Paul A. Clarke" A class of instructions of the form: op Target,A,B which operate like: Target = Target * A + B have a bit set which distinguishes them from instructions that operate as: Target = Target * B + A This bit is not being checked properly (using PPC_BIT macro), so all inst

[Qemu-devel] [PULL 12/19] target/ppc: Fix do_float_check_status vs inexact

2019-08-28 Thread David Gibson
From: Richard Henderson The underflow and inexact exceptions are not mutually exclusive. Check for both of them. Tidy the reset of FPSCR[FI]. Fixes: https://bugs.launchpad.net/bugs/1841442 Reported-by: Paul Clarke Signed-off-by: Richard Henderson Tested-by: Paul Clarke Message-Id: <201908261

[Qemu-devel] [PULL 06/19] tests/boot-serial-test: add support for all the PowerNV machines

2019-08-28 Thread David Gibson
From: Cédric Le Goater Use the machine names specifiying the CPU type, POWER8 and POWER9. Signed-off-by: Cédric Le Goater Message-Id: <20190731141233.1340-3-...@kaod.org> Signed-off-by: David Gibson --- tests/boot-serial-test.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --g

[Qemu-devel] [PULL 09/19] spapr_pci: remove all child functions in function zero unplug

2019-08-28 Thread David Gibson
From: Daniel Henrique Barboza There is nothing wrong with how sPAPR handles multifunction PCI hot unplugs. The problem is that x86 does it simpler. Instead of removing each non-zero function and then removing function zero, x86 can remove any function of the slot to trigger the hot unplug. Libvi

[Qemu-devel] [PULL 00/19] ppc-for-4.2 queue 20190829

2019-08-28 Thread David Gibson
The following changes since commit 23919ddfd56135cad3cb468a8f54d5a595f024f4: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20190827' into staging (2019-08-27 15:52:36 +0100) are available in the Git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-4.2-20190829 fo

[Qemu-devel] [PULL 01/19] ppc/pnv: Set default ram size to 1.75GB

2019-08-28 Thread David Gibson
From: Joel Stanley This makes the powernv machine easier for end users as the default initrd address (1.5GB) is now within RAM. This uses less than 2GB of RAM to ensure 32 bit Qemu still works. Signed-off-by: Joel Stanley Message-Id: <20190821030945.473-1-j...@jms.id.au> [dwg: Fix comment styl

[Qemu-devel] [PULL 16/19] spapr: Use SHUTDOWN_CAUSE_SUBSYSTEM_RESET for CAS reboots

2019-08-28 Thread David Gibson
The sPAPR platform includes feature negotiation between the guest and platform. That sometimes requires reconfiguring the virtual hardware, and in some cases that is a complex enough process that we trigger a system reset to handle it. That interacts badly with -no-reboot - we trigger the reboot,

[Qemu-devel] [PULL 03/19] ppc/pnv: add more dummy XSCOM addresses for the P9 CAPP

2019-08-28 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20190718115420.19919-3-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/pnv_xscom.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/ppc/pnv_xscom.c b/hw/ppc/pnv_xscom.c index 0e31c5786b..67aab9

[Qemu-devel] [PULL 05/19] ppc/pnv: Introduce PowerNV machines with fixed CPU models

2019-08-28 Thread David Gibson
From: Cédric Le Goater Make the current "powernv" machine an abstract type and derive from it new machines with specific CPU models: power8 and power9. The "powernv" machine is now an alias on the "powernv9" machine. Signed-off-by: Cédric Le Goater Message-Id: <20190731141233.1340-2-...@kaod.o

Re: [Qemu-devel] [Qemu-block] [PATCH] qemu-doc: Do not hard-code the name of the QEMU binary

2019-08-28 Thread Thomas Huth
On 28/08/2019 21.18, John Snow wrote: > > > On 8/28/19 5:34 AM, Thomas Huth wrote: >> In our documentation, we use a mix of "$QEMU", "qemu-system-i386" and >> "qemu-system-x86_64" when we give examples to the users how to run >> QEMU. Some more consistency would be good here. Also some distributi

[Qemu-devel] [PATCH 2/2] target/i386: Add support for put/get PEBS registers

2019-08-28 Thread Luwei Kang
This patch add a new feature words for IA32_PERF_CAPABILITIES (RO) register that serve to expose PEBS output Intel PT feature. The registers relate with PEBS need to be set/get when PEBS output Intel PT is supported in guest. Signed-off-by: Luwei Kang --- target/i386/cpu.c | 20 +

[Qemu-devel] [PATCH 1/2] target/i386: Add support for save PEBS registers

2019-08-28 Thread Luwei Kang
Intel processor introduce some hardware extensions that output PEBS record to Intel PT buffer instead of DS area, so PEBS can be enabled in KVM guest by PEBS output Intel PT. This patch adds a section for PEBS which use for saves PEBS registers when the value is no-zero. Signed-off-by: Luwei Kang

Re: [Qemu-devel] [RFC 2/3] intc/arm_gic: Support PPI injection for more than 256 vpus

2019-08-28 Thread Zenghui Yu
Hi Eric, On 2019/8/28 0:05, Eric Auger wrote: Host kernels that expose the KVM_CAP_ARM_IRQ_LINE_LAYOUT_2 capability allow injection of PPIs along with vcpu ids larger than 255. Let's encode the vpcu id on 12 bits according to the upgraded KVM_IRQ_LINE ABI when needed. Without that patch qemu ex

Re: [Qemu-devel] [RFC 0/3] KVM/ARM: Fix >256 vcpus

2019-08-28 Thread Zenghui Yu
Hi Eric, On 2019/8/28 0:05, Eric Auger wrote: Since 4.18, KVM/ARM exposes a KVM_MAX_VCPUS equal to 512. However it was reported [1] that a VM with more than 256 vcpus cannot be launched. 5.4 is about to fix the situation with 2 patches: - one upgrade of the KVM_IRQ_LINE API [2] supporting a vcpu

Re: [Qemu-devel] Cryptic errors from PIP install if missing openssl-devel

2019-08-28 Thread Cleber Rosa
On Thu, Aug 29, 2019 at 11:51:17AM +1000, David Gibson wrote: > On Thu, Aug 29, 2019 at 11:31:25AM +1000, David Gibson wrote: > > If I attempt to run "make check-acceptance" on my POWER9, RHEL8.1 > > machine when the openssl-devel package isn't installed, I get the > > following very cryptic error:

[Qemu-devel] [PATCH] migration: multifd_send_thread always post p->sem_sync when error happen

2019-08-28 Thread Ivan Ren
From: Ivan Ren When encounter error, multifd_send_thread should always notify who pay attention to it before exit. Otherwise it may block migration_thread at multifd_send_sync_main forever. Error as follow: --- (gdb) bt

Re: [Qemu-devel] [PATCH v5 3/4] crypto.c: cleanup created file when block_crypto_co_create_opts_luks fails

2019-08-28 Thread John Snow
On 8/7/19 10:21 AM, Daniel Henrique Barboza wrote: > When using a non-UTF8 secret to create a volume using qemu-img, the > following error happens: > > $ qemu-img create -f luks --object > secret,id=vol_1_encrypt0,file=vol_resize_pool.vol_1.secret.qzVQrI -o > key-secret=vol_1_encrypt0 /var/tm

Re: [Qemu-devel] [PATCH v5 2/4] block.c: adding bdrv_delete_file

2019-08-28 Thread John Snow
On 8/7/19 10:21 AM, Daniel Henrique Barboza wrote: > Using the new 'bdrv_co_delete_file' interface, bdrv_delete_file > can be used in a way similar of the existing bdrv_create_file to > to clean up a created file. > > The logic is also similar to what is already done in bdrv_create_file: > a qe

Re: [Qemu-devel] Cryptic errors from PIP install if missing openssl-devel

2019-08-28 Thread David Gibson
On Thu, Aug 29, 2019 at 11:31:25AM +1000, David Gibson wrote: > If I attempt to run "make check-acceptance" on my POWER9, RHEL8.1 > machine when the openssl-devel package isn't installed, I get the > following very cryptic error: > > VENV/home/dwg/qemu/build/rhel8/tests/venv > PIP /hom

Re: [Qemu-devel] [PATCH v2] target-arm: Make the counter tick relative to cntfrq

2019-08-28 Thread Andrew Jeffery
On Thu, 29 Aug 2019, at 11:08, Andrew Jeffery wrote: > > > On Wed, 28 Aug 2019, at 01:39, Peter Maydell wrote: > > On Fri, 9 Aug 2019 at 06:43, Andrew Jeffery wrote: > > > > > > The use of GTIMER_SCALE assumes the clock feeding the generic timer is > > > 62.5MHz for all platforms. This is unt

Re: [Qemu-devel] [PATCH v2] target-arm: Make the counter tick relative to cntfrq

2019-08-28 Thread Andrew Jeffery
On Wed, 28 Aug 2019, at 01:39, Peter Maydell wrote: > On Fri, 9 Aug 2019 at 06:43, Andrew Jeffery wrote: > > > > The use of GTIMER_SCALE assumes the clock feeding the generic timer is > > 62.5MHz for all platforms. This is untrue in general, for example the > > ASPEED AST2600 feeds the counter

[Qemu-devel] [PATCH] target/arm: Fix SMMLS argument order

2019-08-28 Thread Richard Henderson
The previous simplification got the order of operands to the subtraction wrong. Since the 64-bit product is the subtrahend, we must use a 64-bit subtract to properly compute the borrow from the low-part of the product. Fixes: 5f8cd06ebcf5 ("target/arm: Simplify SMMLA, SMMLAR, SMMLS, SMMLSR") Repo

[Qemu-devel] Cryptic errors from PIP install if missing openssl-devel

2019-08-28 Thread David Gibson
If I attempt to run "make check-acceptance" on my POWER9, RHEL8.1 machine when the openssl-devel package isn't installed, I get the following very cryptic error: VENV/home/dwg/qemu/build/rhel8/tests/venv PIP /home/dwg/qemu/tests/requirements.txt Command "/home/dwg/qemu/build/rhel8/test

Re: [Qemu-devel] [PATCH v3 0/4] iotests: use python logging

2019-08-28 Thread John Snow
Gentle ping. This should be fairly easy to review, I hope; the worst of it is making sure that no tests remain that don't engage an entry point in iotests.py anymore. On 8/20/19 7:52 PM, John Snow wrote: > This series uses python logging to enable output conditionally on > iotests.log(). We unify

Re: [Qemu-devel] [PATCH RFC 0/4] intel_iommu: Do sanity check of vfio-pci earlier

2019-08-28 Thread Peter Xu
On Wed, Aug 28, 2019 at 02:59:45PM +0200, Auger Eric wrote: > Hi Peter, Hi, Eric, [...] > In > [PATCH v4 2/5] memory: Add IOMMU_ATTR_HW_NESTED_PAGING IOMMU memory > region attribute (https://patchwork.kernel.org/patch/11109701/) [1] > > [PATCH v4 3/5] hw/vfio/common: Fail on VFIO/HW nested pa

Re: [Qemu-devel] [Qemu-ppc] [GIT PULL for qemu-pseries] spapr: Render full FDT on ibm, client-architecture-support

2019-08-28 Thread David Gibson
On Wed, Aug 28, 2019 at 11:50:14AM +0200, Greg Kurz wrote: > On Wed, 28 Aug 2019 15:57:40 +1000 > David Gibson wrote: > > > On Wed, Aug 28, 2019 at 01:27:35PM +1000, Alexey Kardashevskiy wrote: > > > > > > > > > On 28/08/2019 12:12, David Gibson wrote: > > > > On Wed, Aug 28, 2019 at 10:46:34AM

Re: [Qemu-devel] [PATCH v2] job: drop job_drain

2019-08-28 Thread John Snow
On 8/23/19 10:32 AM, Vladimir Sementsov-Ogievskiy wrote: > In job_finish_sync job_enter should be enough for a job to make some > progress and draining is a wrong tool for it. So use job_enter directly > here and drop job_drain with all related staff not used more. > > Suggested-by: Kevin Wolf

[Qemu-devel] [PULL 4/5] Boot Linux Console Test: add a test for ppc64 + pseries

2019-08-28 Thread Cleber Rosa
Just like the previous tests, boots a Linux kernel on a ppc64 target using the pseries machine. Signed-off-by: Cleber Rosa CC: Daniel P. Berrangé Reviewed-by: Wainer dos Santos Moschetta Message-Id: <20190607152223.9467-5-cr...@redhat.com> Signed-off-by: Cleber Rosa --- .travis.yml

[Qemu-devel] [PULL 5/5] VNC Acceptance test: simplify test names

2019-08-28 Thread Cleber Rosa
The test name is composed of the class name and method name, so it looks like there's some redundancy here that we can eliminate. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607152223.9467-7-cr...@redhat.com> Signed-o

[Qemu-devel] [PULL 1/5] tests.acceptance.avocado_qemu: Add support for powerpc

2019-08-28 Thread Cleber Rosa
From: Satheesh Rajendran Current acceptance test will not run properly in powerpc environment due qemu target is different from arch, this usually matches, except with bi-endian architectures like ppc64. uname would return `ppc64` or `ppc64le` based `big` or `little` endian but qemu `target` is a

[Qemu-devel] [PULL 0/5] Python (acceptance tests) queue, 2019-08-28

2019-08-28 Thread Cleber Rosa
The following changes since commit 23919ddfd56135cad3cb468a8f54d5a595f024f4: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20190827' into staging (2019-08-27 15:52:36 +0100) are available in the Git repository at: git://github.com/clebergnu/qemu.git tags/python-next-pull-reque

[Qemu-devel] [PULL 3/5] Acceptance tests: drop left over usage of ":avocado: enable"

2019-08-28 Thread Cleber Rosa
Commit 9531d26c10 removed all of ":avocado: enable" tags, but then a new entry was added with the introduction of migration.py. Let's remove it for consistency. Signed-off-by: Cleber Rosa Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20190607152223.9

[Qemu-devel] [PULL 2/5] tests/requirements.txt: pin paramiko version requirement

2019-08-28 Thread Cleber Rosa
It's a good practice (I'd really say a must) to pin as much as possible of the software versions used during test, so let's apply that to paramiko. According to https://pypi.org/project/paramiko/, 2.4.2 is the latest released version. It's also easily obtainable on systems such as Fedora 30. Sig

Re: [Qemu-devel] [PATCH v6 1/6] iotests: allow Valgrind checking all QEMU processes

2019-08-28 Thread Eric Blake
On 8/28/19 5:58 PM, John Snow wrote: >> +++ b/tests/qemu-iotests/common.rc >> @@ -60,61 +60,132 @@ if ! . ./common.config >> exit 1 >> fi >> >> +# Unset the variables to turn Valgrind off for specific processes, e.g. That's not unsetting, that's setting to the empty string. >> +# $ VALGR

Re: [Qemu-devel] [PATCH] spapr: Set compat mode in spapr_core_plug()

2019-08-28 Thread David Gibson
On Wed, Aug 28, 2019 at 07:20:53PM +0200, Greg Kurz wrote: > A recent change in spapr_machine_reset() showed that resetting the compat > mode in spapr_machine_reset() for the boot vCPU and in spapr_cpu_reset() > for all other vCPUs was fragile. The fix was thus to reset the compat mode > for all vC

Re: [Qemu-devel] [PATCH] spapr/pci: Convert types to QEMU coding style

2019-08-28 Thread David Gibson
On Wed, Aug 28, 2019 at 08:20:44PM +0200, Greg Kurz wrote: > The QEMU coding style requires: > - to typedef structured types (HACKING) > - to use CamelCase for types and structure names (CODING_STYLE) > > Do that for PCI and Nvlink2 code. > > Signed-off-by: Greg Kurz Applied, thanks. > --- >

Re: [Qemu-devel] [Qemu-ppc] [PATCH] ppc: Fix xsmaddmdp and friends

2019-08-28 Thread David Gibson
On Wed, Aug 28, 2019 at 07:32:38PM +0200, Laurent Vivier wrote: > On 22/08/2019 00:56, David Gibson wrote: > > On Wed, Aug 21, 2019 at 10:28:41AM -0500, Paul A. Clarke wrote: > >> From: "Paul A. Clarke" > >> > >> A class of instructions of the form: > >> op Target,A,B > >> which operate like: >

[Qemu-devel] [PATCH v2 8/8] tcg: Check for watchpoints in probe_write()

2019-08-28 Thread Richard Henderson
From: David Hildenbrand Let size > 0 indicate a promise to write to those bytes. Check for write watchpoints in the probed range. Suggested-by: Richard Henderson Signed-off-by: David Hildenbrand Message-Id: <20190823100741.9621-10-da...@redhat.com> [rth: Recompute index after tlb_fill; check T

[Qemu-devel] [PATCH v2 5/8] cputlb: Fix size operand for tlb_fill on unaligned store

2019-08-28 Thread Richard Henderson
We are currently passing the size of the full write to the tlb_fill for the second page. Instead pass the real size of the write to that page. This argument is unused within all tlb_fill, except to be logged via tracing, so in practice this makes no difference. But in a moment we'll need the val

[Qemu-devel] [PATCH v2 7/8] cputlb: Handle watchpoints via TLB_WATCHPOINT

2019-08-28 Thread Richard Henderson
The raising of exceptions from check_watchpoint, buried inside of the I/O subsystem, is fundamentally broken. We do not have the helper return address with which we can unwind guest state. Replace PHYS_SECTION_WATCH and io_mem_watch with TLB_WATCHPOINT. Move the call to cpu_check_watchpoint into

[Qemu-devel] [PATCH v2 2/8] exec: Factor out core logic of check_watchpoint()

2019-08-28 Thread Richard Henderson
From: David Hildenbrand We want to perform the same checks in probe_write() to trigger a cpu exit before doing any modifications. We'll have to pass a PC. Signed-off-by: David Hildenbrand Reviewed-by: Richard Henderson Message-Id: <20190823100741.9621-9-da...@redhat.com> [rth: Use vaddr for le

[Qemu-devel] [PATCH v2 6/8] cputlb: Remove double-alignment in store_helper

2019-08-28 Thread Richard Henderson
We have already aligned page2 to the start of the next page. There is no reason to do that a second time. Signed-off-by: Richard Henderson --- accel/tcg/cputlb.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/accel/tcg/cputlb.c b/accel/tcg/cputlb.c index 7fb67d2f05..d0f8db

[Qemu-devel] [PATCH v2 4/8] exec: Factor out cpu_watchpoint_address_matches

2019-08-28 Thread Richard Henderson
We want to move the check for watchpoints from memory_region_section_get_iotlb to tlb_set_page_with_attrs. Isolate the loop over watchpoints to an exported function. Rename the existing cpu_watchpoint_address_matches to watchpoint_address_matches, since it doesn't actually have a cpu argument. Re

[Qemu-devel] [PATCH v2 3/8] cputlb: Fold TLB_RECHECK into TLB_INVALID_MASK

2019-08-28 Thread Richard Henderson
We had two different mechanisms to force a recheck of the tlb. Before TLB_RECHECK was introduced, we had a PAGE_WRITE_INV bit that would immediate set TLB_INVALID_MASK, which automatically means that a second check of the tlb entry fails. We can use the same mechanism to handle small pages. Conse

[Qemu-devel] [PATCH v2 1/8] exec: Move user-only watchpoint stubs inline

2019-08-28 Thread Richard Henderson
Let the user-only watchpoint stubs resolve to empty inline functions. Reviewed-by: David Hildenbrand Signed-off-by: Richard Henderson --- include/hw/core/cpu.h | 23 +++ exec.c| 26 ++ 2 files changed, 25 insertions(+), 24 deletions(-)

[Qemu-devel] [PATCH v2 0/8] exec: Cleanup watchpoints

2019-08-28 Thread Richard Henderson
Changes from v1: * Split out some minor fixes to separate patches. * Reload tlb_addr2 after tlb_fill for page2 in patch 7. Blurb from v1: As discussed with David earlier this week, the current implementation of watchpoints cannot work, at least reliably. We are raising an exception out of the

Re: [Qemu-devel] [PATCH v2 5/7] mips/tcg: Call probe_write() for CONFIG_USER_ONLY as well

2019-08-28 Thread Richard Henderson
Pinging the mips maintainers. r~ On 8/26/19 12:51 AM, David Hildenbrand wrote: > Let's call it also for CONFIG_USER_ONLY. While at it, add a FIXME and get > rid of one local variable. > > MIPS code probably needs a bigger refactoring in regards of > ensure_writable_pages(), similar to s390x, so

Re: [Qemu-devel] [PATCH v6 6/6] iotests: extend sleeping time under Valgrind

2019-08-28 Thread John Snow
On 8/26/19 11:50 AM, Andrey Shinkevich wrote: > To synchronize the time when QEMU is running longer under the Valgrind, > increase the sleeping time in the test 247. > > Signed-off-by: Andrey Shinkevich > Reviewed-by: Vladimir Sementsov-Ogievskiy Probably fine, as discussed. We can work on e

Re: [Qemu-devel] [PATCH v6 2/6] iotests: exclude killed processes from running under Valgrind

2019-08-28 Thread John Snow
On 8/26/19 11:50 AM, Andrey Shinkevich wrote: > The Valgrind tool fails to manage its termination in multi-threaded > processes when they raise the signal SIGKILL. The bug has been reported > to the Valgrind maintainers and was registered as the bug #409141: > https://bugs.kde.org/show_bug.c

Re: [Qemu-devel] [PATCH v6 1/6] iotests: allow Valgrind checking all QEMU processes

2019-08-28 Thread John Snow
On 8/26/19 11:50 AM, Andrey Shinkevich wrote: > With the '-valgrind' option, let all the QEMU processes be run under > the Valgrind tool. The Valgrind own parameters may be set with its > environment variable VALGRIND_OPTS, e.g. > $ VALGRIND_OPTS="--leak-check=yes" ./check -valgrind > or they m

Re: [Qemu-devel] [PATCH 5/6] cputlb: Handle watchpoints via TLB_WATCHPOINT

2019-08-28 Thread David Hildenbrand
On 24.08.19 23:34, Richard Henderson wrote: > The raising of exceptions from check_watchpoint, buried inside > of the I/O subsystem, is fundamentally broken. We do not have > the helper return address with which we can unwind guest state. > > Replace PHYS_SECTION_WATCH and io_mem_watch with TLB_W

Re: [Qemu-devel] [PATCH 4/6] exec: Factor out cpu_watchpoint_address_matches

2019-08-28 Thread David Hildenbrand
On 28.08.19 23:28, Richard Henderson wrote: > On 8/26/19 1:41 AM, David Hildenbrand wrote: >>> -/* Make accesses to pages with watchpoints go via the >>> - watchpoint trap routines. */ >>> -QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { >>> -if (cpu_watchpoint_address_matches

Re: [Qemu-devel] [PATCH 0/6] exec: Cleanup watchpoints

2019-08-28 Thread Richard Henderson
Ping for 5/6, as yet unreviewed. r~ On 8/24/19 2:34 PM, Richard Henderson wrote: > As discussed with David earlier this week, the current implementation > of watchpoints cannot work, at least reliably. We are raising an > exception out of the middle of the i/o access path which does not > even

Re: [Qemu-devel] [PATCH 0/9] qapi: Schema language cleanups & doc improvements

2019-08-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190828202641.24752-1-arm...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/9] qapi: Schema language cleanups & doc improvements Message-id: 20190828202641.24752

Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1

2019-08-28 Thread Alistair Francis
On Wed, Aug 28, 2019 at 12:04 AM liuzhiwei wrote: > > Change-Id: I3cf891bc400713b95f47ecca82b1bf773f3dcb25 > Signed-off-by: liuzhiwei > --- > fpu/softfloat.c | 119 + > include/fpu/softfloat.h | 4 + > linux-user/riscv/cpu_loop.c | 8

Re: [Qemu-devel] [PATCH 4/6] exec: Factor out cpu_watchpoint_address_matches

2019-08-28 Thread Richard Henderson
On 8/26/19 1:41 AM, David Hildenbrand wrote: >> -/* Make accesses to pages with watchpoints go via the >> - watchpoint trap routines. */ >> -QTAILQ_FOREACH(wp, &cpu->watchpoints, entry) { >> -if (cpu_watchpoint_address_matches(wp, vaddr, TARGET_PAGE_SIZE)) { >> -/

Re: [Qemu-devel] [PATCH 2/2] tests/acceptance: Add new test cases in linux_ssh_mips_malta.py

2019-08-28 Thread Cleber Rosa
On Fri, Aug 02, 2019 at 05:35:58PM +0200, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > Add 15 new tests cases. They all rely on simple commands used for > detecting hardware configuration information. > > Signed-off-by: Aleksandar Markovic > --- > tests/acceptance/linux_ssh_mips_

Re: [Qemu-devel] [PATCH 0/2] tests/acceptance: Update MIPS Malta ssh test

2019-08-28 Thread Cleber Rosa
On Thu, Aug 22, 2019 at 07:59:07PM +0200, Aleksandar Markovic wrote: > 22.08.2019. 05.15, "Aleksandar Markovic" је > написао/ла: > > > > > > 21.08.2019. 23.00, "Eduardo Habkost" је написао/ла: > > > > > > On Wed, Aug 21, 2019 at 10:27:11PM +0200, Aleksandar Markovic wrote: > > > > 02.08.2019. 17.

Re: [Qemu-devel] [PATCH v1 5/9] includes: remove stale [smp|max]_cpus externs

2019-08-28 Thread Richard Henderson
On 8/28/19 9:53 AM, Alex Bennée wrote: > Commit a5e0b3311 removed these in favour of querying machine > properties. Remove the extern declarations as well. > > Signed-off-by: Alex Bennée > Cc: Like Xu > Message-Id: <20190711130546.18578-1-alex.ben...@linaro.org> > --- > include/sysemu/sysemu.h

Re: [Qemu-devel] [PATCH v1 4/9] target/arm: remove run time semihosting checks

2019-08-28 Thread Richard Henderson
On 8/28/19 9:53 AM, Alex Bennée wrote: > Now we do all our checking and use a common EXCP_SEMIHOST for > semihosting operations we can make helper code a lot simpler. > > Signed-off-by: Alex Bennée > > --- > v2 > - fix re-base conflicts > - hoist EXCP_SEMIHOST check > - comment cleanups >

Re: [Qemu-devel] [RFC,Draft] ui: add an embedded Barrier client

2019-08-28 Thread Laurent Vivier
Le 28/08/2019 à 11:07, Gerd Hoffmann a écrit : ... >> I will try to add a keyboard remapping as we have with VNC because it >> doesn't work well with my french keyboard (AZERTY). Or perhaps I can use >> the "button" id instead of the keyid but I don't now how to map the >> value to a qcode. > > De

Re: [Qemu-devel] [PATCH 1/2] tests/acceptance: Refactor and improve reporting in linux_ssh_mips_malta.py

2019-08-28 Thread Cleber Rosa
On Fri, Aug 02, 2019 at 05:35:57PM +0200, Aleksandar Markovic wrote: > From: Aleksandar Markovic > > This patch restructures code organization around the test case > executions. At the same time, rather than outputing a cryptic message: > > FAIL: True not found in [False], > > the following wil

Re: [Qemu-devel] [PATCH v1 1/2] tcg: Make probe_write() return a pointer to the host page

2019-08-28 Thread David Hildenbrand
On 28.08.19 16:44, Richard Henderson wrote: > On 8/28/19 4:10 AM, David Hildenbrand wrote: >> + * If the access is permitted, returns the host address similar to >> + * tlb_vaddr_to_host(). Returns NULL in case direct access to the host page >> + * is not allowed or if the size is 0. > > Maybe we

Re: [Qemu-devel] [PATCH 0/3] Acceptance test x86_cpu_model_versions: fixes and minor improvements

2019-08-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190828193628.7687-1-cr...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH 0/3] Acceptance test x86_cpu_model_versions: fixes and minor improvements Message-id: 201

Re: [Qemu-devel] [PATCH v1 2/2] tcg: Factor out probe_write() logic into probe_access()

2019-08-28 Thread David Hildenbrand
On 28.08.19 16:52, Richard Henderson wrote: > On 8/28/19 4:10 AM, David Hildenbrand wrote: >> +void *probe_access(CPUArchState *env, target_ulong addr, int size, >> + MMUAccessType access_type, int mmu_idx, uintptr_t >> retaddr) >> { >> CPUState *cpu = env_cpu(env); >>

[Qemu-devel] [PATCH 6/9] docs/devel/qapi-code-gen: Reorder sections for readability

2019-08-28 Thread Markus Armbruster
Section "QMP/Guest agent schema" starts with a brief introduction, then subsection "Comments", then subsection "Schema overview" (more elaborate introduction), and only then talks about schema entities like types, commands, and so forth. Subsection "Comments" is long and tiring: almost 500 words,

Re: [Qemu-devel] [PATCH v8 01/13] vfio: KABI for migration interface

2019-08-28 Thread Alex Williamson
On Tue, 27 Aug 2019 00:25:41 +0530 Kirti Wankhede wrote: > - Defined MIGRATION region type and sub-type. > - Used 3 bits to define VFIO device states. > Bit 0 => _RUNNING > Bit 1 => _SAVING > Bit 2 => _RESUMING > Combination of these bits defines VFIO device's state during migrati

[Qemu-devel] [PATCH 5/9] tests/qapi-schema: Consistently name string tests string-FOO

2019-08-28 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- .../{unclosed-string.json => string-unclosed.json}| 0 tests/qapi-schema/{unicode-str.json => string-unicode.json} | 0 tests/Makefile.include| 4 ++-- tests/qapi-schema/string-unclosed.err

[Qemu-devel] [PATCH 3/9] docs/devel/qapi-code-gen: Minor specification fixes

2019-08-28 Thread Markus Armbruster
The specification claims "Each expression that isn't an include directive may be preceded by a documentation block", but the code also rejects them for pragma directives. The code is correct. Fix the specification. The specification claims "The string 'max' is not allowed as an enum value". Unt

[Qemu-devel] [PATCH 2/9] qapi: Drop support for boxed alternate for commands, events

2019-08-28 Thread Markus Armbruster
Commands and events can define their argument type inline (default) or by referring to another type ('boxed': true, since commit c818408e44 "qapi: Implement boxed types for commands/events", v2.7.0). The unboxed inline definition is an (anonymous) struct type. The boxed type may be a struct, unio

Re: [Qemu-devel] [PATCH] RISCV: support riscv vector extension 0.7.1

2019-08-28 Thread Richard Henderson
On 8/28/19 11:54 AM, Richard Henderson wrote: > But it might be reasonable to include (VSTART == 0 && VL == VLMAX) as a > single bit. BTW, it is reasonable to check VSTART == 0 always. Quoting the spec: # Implementations are permitted to raise illegal instruction exceptions # when attempting to

Re: [Qemu-devel] [Qemu-block] [PATCH 2/2] iotests: Test reverse sub-cluster qcow2 writes

2019-08-28 Thread John Snow
On 8/23/19 9:03 AM, Max Reitz wrote: > This exercises the regression introduced in commit > 50ba5b2d994853b38fed10e0841b119da0f8b8e5. On my machine, it has close > to a 50 % false-negative rate, but that should still be sufficient to > test the fix. > > Signed-off-by: Max Reitz > --- > tests

Re: [Qemu-devel] [PATCH v3 00/69] target/arm: Convert aa32 base isa to decodetree

2019-08-28 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190828190456.30315-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PATCH v3 00/69] target/arm: Convert aa32 base isa to decodetree Message-id: 20190

Re: [Qemu-devel] [Qemu-block] [PATCH 1/2] block/file-posix: Reduce xfsctl() use

2019-08-28 Thread John Snow
On 8/23/19 9:03 AM, Max Reitz wrote: > This patch removes xfs_write_zeroes() and xfs_discard(). Both functions > have been added just before the same feature was present through > fallocate(): > > - fallocate() has supported PUNCH_HOLE for XFS since Linux 2.6.38 (March > 2011); xfs_discard()

[Qemu-devel] [PATCH 9/9] docs/devel/qapi-code-gen: Improve QAPI schema language doc

2019-08-28 Thread Markus Armbruster
We document the language by giving patterns of valid JSON objects. The patterns contain placeholders we don't define anywhere; their names have to speak for themselves. I guess they do, but I'd prefer a bit more rigor. Provide a grammar instead, and rework the text accordingly. Documentation for

Re: [Qemu-devel] [PATCH v9 13/13] block/backup: use backup-top instead of write notifiers

2019-08-28 Thread Max Reitz
On 26.08.19 18:13, Vladimir Sementsov-Ogievskiy wrote: > Drop write notifiers and use filter node instead. > > = Changes = > > 1. add filter-node-name argument for backup qmp api. We have to do it > in this commit, as 257 needs to be fixed. I feel a bit bad about it not being an implicit node.

[Qemu-devel] [PATCH 7/9] docs/devel/qapi-code-gen: Rewrite compatibility considerations

2019-08-28 Thread Markus Armbruster
We have some compatibility advice buried in sections "Enumeration types" and "Struct types". Compatibility is actually about commands and events. It devolves to the types used there. All kinds of types, not just enumerations and structs. Replace the existing advice by a new section "Compatibili

[Qemu-devel] [PATCH 8/9] docs/devel/qapi-code-gen: Rewrite introduction to schema

2019-08-28 Thread Markus Armbruster
The introduction to the QAPI schema is somewhat rambling. Rewrite for clarity. Signed-off-by: Markus Armbruster --- docs/devel/qapi-code-gen.txt | 106 --- 1 file changed, 47 insertions(+), 59 deletions(-) diff --git a/docs/devel/qapi-code-gen.txt b/docs/devel/q

[Qemu-devel] [PULL 1/2] BootLinuxSshTest: Only use 'test' for unittest.TestCase method names

2019-08-28 Thread Eduardo Habkost
From: Philippe Mathieu-Daudé In commit f6e501a28ef9, Eduardo started to use "check_" as a prefix for methods of similar purpose. Follow this prior art, since it might become the conventions when writting Avocado tests. Suggested-by: Cleber Rosa Signed-off-by: Philippe Mathieu-Daudé Message-Id:

[Qemu-devel] [PATCH 2/3] Acceptance test x86_cpu_model_versions: fix mismatches between test and messages

2019-08-28 Thread Cleber Rosa
This fixes a few mismatches between the test and the error messages produced in case of failures. Signed-off-by: Cleber Rosa --- tests/acceptance/x86_cpu_model_versions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/x86_cpu_model_versions.py b/test

[Qemu-devel] [PATCH 4/9] qapi: Outlaw control characters in strings

2019-08-28 Thread Markus Armbruster
RFC 8259 on string contents: All Unicode characters may be placed within the quotation marks, except for the characters that MUST be escaped: quotation mark, reverse solidus, and the control characters (U+ through U+001F). The QAPI schema parser accepts both less and more than JSO

[Qemu-devel] [PATCH 1/9] qapi: Drop check_type()'s redundant parameter @allow_optional

2019-08-28 Thread Markus Armbruster
check_type() uses @allow_optional only when @value is a dictionary and @allow_dict is True. All callers that pass allow_dict=True also pass allow_optional=True. Therefore, @allow_optional is always True when check_type() uses it. Drop the redundant parameter. Signed-off-by: Markus Armbruster --

[Qemu-devel] [PULL 0/2] Python queue, 2019-08-28

2019-08-28 Thread Eduardo Habkost
The following changes since commit 23919ddfd56135cad3cb468a8f54d5a595f024f4: Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20190827' into staging (2019-08-27 15:52:36 +0100) are available in the Git repository at: git://github.com/ehabkost/qemu.git tags/python-next-pull-reques

[Qemu-devel] [PATCH 0/9] qapi: Schema language cleanups & doc improvements

2019-08-28 Thread Markus Armbruster
Markus Armbruster (9): qapi: Drop check_type()'s redundant parameter @allow_optional qapi: Drop support for boxed alternate for commands, events docs/devel/qapi-code-gen: Minor specification fixes qapi: Outlaw control characters in strings tests/qapi-schema: Consistently name string tests

[Qemu-devel] [PATCH v3 63/69] target/arm: Convert T16, Miscellaneous 16-bit instructions

2019-08-28 Thread Richard Henderson
Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- v3: Split firstcond & mask within trans_IT. --- target/arm/translate.c | 111 + target/arm/t16.decode | 29 +++ 2 files changed, 54 insertions(+), 86 deletions(-) diff --git a/targe

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/2] Alignment checks cleanup

2019-08-28 Thread John Snow
On 8/27/19 2:59 PM, Nir Soffer wrote: > While working on 4k support, I noticed that there is lot of code using > BDRV_SECTOR_SIZE (512) for checking alignment. I wonder how this can work with > 4k storage. > > Lets start by cleaning up to make the code easier to understand: > - Use QEMU_IS_ALIG

[Qemu-devel] [PATCH 3/3] Acceptance test x86_cpu_model_versions: split into smaller tests

2019-08-28 Thread Cleber Rosa
The justifications being automatic destruction of the vm instances when no longer needed and more compact test naming under a common class. Besides those, a smaller test makes the one and only assertion rather obvious, which suggests that we could even get rid of the more verbose (and manual) erro

  1   2   3   4   >