RE: [RFC v3 03/25] hw/iommu: introduce IOMMUContext

2020-02-14 Thread Liu, Yi L
> From: David Gibson < da...@gibson.dropbear.id.au > > Sent: Friday, February 14, 2020 1:36 PM > To: Liu, Yi L > Subject: Re: [RFC v3 03/25] hw/iommu: introduce IOMMUContext > > On Wed, Feb 12, 2020 at 07:15:13AM +, Liu, Yi L wrote: > > Hi Peter, > > > > > From: Peter Xu > > > Sent: Wednesda

Re: [PATCH v2] target/ppc: Fix typo in comments

2020-02-14 Thread David Gibson
On Fri, Feb 14, 2020 at 12:57:34AM +0100, BALATON Zoltan wrote: > "Deferred" was misspelled as "differed" in some comments, correct this > typo, > > Signed-off-by: BALATON Zoltan I've replaced the earlier version in my tree. > --- > v2: Found one more where even the typo was misspelled > > tar

[PATCH] test-vmstate: Fix memleaks in test_load_qlist

2020-02-14 Thread kuhn.chenqun
From: Chen Qun We may forget to free fload. ASAN spotted it. Reported-by: Euler Robot Signed-off-by: Chen Qun --- tests/test-vmstate.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test-vmstate.c b/tests/test-vmstate.c index cea363dd69..5b2743121b 100644 --- a/tests/test-vmstate.c

Re: The issues about architecture of the COLO checkpoint

2020-02-14 Thread Daniel Cho
Hi Dave, Yes, I agree with you, it does need a timeout. Hi Hailiang, We base on qemu-4.1.0 for using COLO feature, in your patch, we found a lot of difference between your version and ours. Could you give us a latest release version which is close your developing code? Thanks. Regards Daniel

Re: [PATCH] ppc: free 'fdt' after reset the machine

2020-02-14 Thread Pan Nengyuan
On 2/14/2020 11:48 PM, Greg Kurz wrote: > On Fri, 14 Feb 2020 11:32:06 +0800 > wrote: > >> From: Pan Nengyuan >> >> 'fdt' forgot to clean both e500 and pnv when we call 'system_reset' on ppc, >> this patch fix it. The leak stacks are as follow: >> >> Direct leak of 4194304 byte(s) in 4 object

[PATCH v2] Handle gdb.MemoryError exception in dump-guest-memory.py

2020-02-14 Thread Kevin Buettner
[Included a "Signed-off-by" line in this version.] I recently investigated a bug in which the dump-guest-memory.py script sees a gdb.MemoryError exception while attempting to dump memory obtained from a QEMU core dump. (And, yes, dump-guest-core=on was specified in the -machine option of the QEMU

[PATCH v2 3/3] arm: allwinner: Wire up USB ports

2020-02-14 Thread Guenter Roeck
Instantiate EHCI and OHCI controllers on Allwinner A10. OHCI ports are modeled as companions of the respective EHCI ports. With this patch applied, USB controllers are discovered and instantiated when booting the cubieboard machine with a recent Linux kernel. ehci-platform 1c14000.usb: EHCI Host

[PATCH v2 1/3] hw: usb: hcd-ohci: Move OHCISysBusState and TYPE_SYSBUS_OHCI to include file

2020-02-14 Thread Guenter Roeck
We need to be able to use OHCISysBusState outside hcd-ohci.c, so move it to its include file. Signed-off-by: Guenter Roeck --- v2: no changes hw/usb/hcd-ohci.c | 15 --- hw/usb/hcd-ohci.h | 16 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/hw/usb/

[PATCH v2 2/3] hcd-ehci: Introduce "companion-enable" sysbus property

2020-02-14 Thread Guenter Roeck
We'll use this property in a follow-up patch to insantiate an EHCI bus with companion support. Signed-off-by: Guenter Roeck --- v2: Added patch hw/usb/hcd-ehci-sysbus.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/usb/hcd-ehci-sysbus.c b/hw/usb/hcd-ehci-sysbus.c index b5a014f968..01

[PATCH v2 0/3] arm: allwinner: Wire up USB ports

2020-02-14 Thread Guenter Roeck
Instantiate EHCI and OHCI controllers on Allwinner A10. The first patch in the series moves the declaration of EHCISysBusState from hcd-ohci.c to hcd-ohci.h. This lets us add the structure to AwA10State. Similar, TYPE_SYSBUS_OHCI is moved to be able to use it outside its driver. The second patch

Re: [PATCH] accel/tcg: fix race in cpu_exec_step_atomic (bug 1863025)

2020-02-14 Thread Yifan Lu
What race are you thinking of in my patch? The obvious race I can think of is benign: Case 1: A: does TB flush B: read tb_flush_count A: increment tb_flush_count A: end_exclusive B: tb_lookup__cpu_state/tb_gen_code B: start_exclusive B: read tb_flush_count again (increment seen) B: retries Case 2

[Bug 1793859] Re: GTK display and mouse input area scaling fails when using vfio-pci device

2020-02-14 Thread UserPC2021
Perhaps this is due to this issue https://github.com/intel/gvt- linux/issues/71 https://yadi.sk/i/Ejg_6JJEBIc-Zw ** Bug watch added: github.com/intel/gvt-linux/issues #71 https://github.com/intel/gvt-linux/issues/71 -- You received this bug notification because you are a member of qemu- deve

Re: [PATCH] Handle gdb.MemoryError exception in dump-guest-memory.py

2020-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200214232650.35381-1-kev...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH] Handle gdb.MemoryError exception in dump-guest-memory.py Message-id: 20200214232650.35381-1-kev...@r

Re: [PATCH] accel/tcg: fix race in cpu_exec_step_atomic (bug 1863025)

2020-02-14 Thread Richard Henderson
On 2/14/20 6:49 AM, Alex Bennée wrote: > The bug describes a race whereby cpu_exec_step_atomic can acquire a TB > which is invalidated by a tb_flush before we execute it. This doesn't > affect the other cpu_exec modes as a tb_flush by it's nature can only > occur on a quiescent system. The race was

[PATCH] Handle gdb.MemoryError exception in dump-guest-memory.py

2020-02-14 Thread Kevin Buettner
I recently investigated a bug in which the dump-guest-memory.py script sees a gdb.MemoryError exception while attempting to dump memory obtained from a QEMU core dump. (And, yes, dump-guest-core=on was specified in the -machine option of the QEMU invocation.) It turns out that memory region in qu

QEMU Sockets Networking Backend Multicast Networking Fix

2020-02-14 Thread Faisal Al-Humaimidi
Hello QEMU developers, I have noticed a bug in the `mcast` option of the `socket` networking backend, where I simply cannot join a multicast group (tested in Windows 10 with QEMU 4.2.0 release). I have found a fix to the problem. The problem was mainly due to the fact that QEMU was binding to the

Re: How do UEFI on Windows host

2020-02-14 Thread Laszlo Ersek
On 02/14/20 19:12, Philippe Mathieu-Daudé wrote: > On 2/14/20 5:37 PM, Jerry Geis wrote: >> I dont know how to get all files listing on windows. But, I cd >> \program files\qemu >> dir *.fd >> edk2-x86_64-code.fd >> edk2-x86_64-secure-code.fd >> >> It seems like from other posts these might be the

Re: [PATCH 3/3] hw/riscv/spike: Allow more than one CPUs

2020-02-14 Thread Alistair Francis
On Thu, Feb 13, 2020 at 11:24 PM Anup Patel wrote: > > Currently, the upstream Spike ISA simulator allows more than > one CPUs so we update QEMU Spike machine on similar lines to > allow more than one CPUs. > > The maximum number of CPUs for QEMU Spike machine is kept > same as QEMU Virt machine.

Re: [PATCH v2 21/21] target/arm: Correctly implement ACTLR2, HACTLR2

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > diff --git a/target/arm/cpu.c b/target/arm/cpu.c > index c46bb5a5c09..9f618e120aa 100644 > --- a/target/arm/cpu.c > +++ b/target/arm/cpu.c > @@ -2718,6 +2718,7 @@ static void arm_max_initfn(Object *obj) > > t = cpu->isar.id_mmfr4; >

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 03:04:23PM -0500, David Hildenbrand wrote: > > > > Am 14.02.2020 um 20:45 schrieb Peter Xu : > > > > On Fri, Feb 14, 2020 at 07:26:59PM +0100, David Hildenbrand wrote: > >> +if (!postcopy_is_running()) { > >> +Error *err = NULL; > >> + > >> +

Re: [PATCH v2 20/21] target/arm: Use FIELD_EX32 for testing 32-bit fields

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > Cut-and-paste errors mean we're using FIELD_EX64() to extract fields from > some 32-bit ID register fields. Use FIELD_EX32() instead. (This makes > no difference in behaviour, it's just more consistent.) > > Signed-off-by: Peter Maydell > --- > target/a

Re: [PATCH v2 19/21] target/arm: Use isar_feature function for testing AA32HPD feature

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > Now we have moved ID_MMFR4 into the ARMISARegisters struct, we > can define and use an isar_feature for the presence of the > ARMv8.2-AA32HPD feature, rather than open-coding the test. > > While we're here, correct a comment typo which missed an 'A' > fro

Re: [PATCH v2 18/21] target/arm: Test correct register in aa32_pan and aa32_ats1e1 checks

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > The isar_feature_aa32_pan and isar_feature_aa32_ats1e1 functions > are supposed to be testing fields in ID_MMFR3; but a cut-and-paste > error meant we were looking at MVFR0 instead. > > Fix the functions to look at the right register; this requires > us t

Re: [PATCH v2 12/21] target/arm: Read debug-related ID registers from KVM

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > +/* > + * DBGDIDR is a bit complicated because the kernel doesn't > + * provide an accessor for it in 64-bit mode, which is what this > + * scratch VM is in, and there's no architected "64-bit sysreg > + * which read

Re: [PATCH v2 11/21] target/arm: Move DBGDIDR into ARMISARegisters

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > We're going to want to read the DBGDIDR register from KVM in > a subsequent commit, which means it needs to be in the > ARMISARegisters sub-struct. Move it. > > Signed-off-by: Peter Maydell > --- > target/arm/cpu.h | 2 +- > target/arm/internals.h

Re: [PATCH v2 10/21] target/arm: Stop assuming DBGDIDR always exists

2020-02-14 Thread Richard Henderson
On 2/14/20 9:51 AM, Peter Maydell wrote: > The AArch32 DBGDIDR defines properties like the number of > breakpoints, watchpoints and context-matching comparators. On an > AArch64 CPU, the register may not even exist if AArch32 is not > supported at EL1. > > Currently we hard-code use of DBGDIDR to

[PATCH 6/7] commit: Expose on-error option in QMP

2020-02-14 Thread Kevin Wolf
Now that the error handling in the common block job is fixed, we can expose the on-error option in QMP instead of hard-coding it as 'report' in qmp_block_commit(). This fulfills the promise that the old comment in that function made, even if a bit later than expected: "This will be part of the QMP

Re: [PATCH 00/19] target/arm: vfp feature and decodetree cleanup

2020-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200214181547.21408-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [PATCH 00/19] target/arm: vfp feature and decodetree cleanup Message-id: 20200214181547.21408-1-

[PATCH 3/7] commit: Fix argument order for block_job_error_action()

2020-02-14 Thread Kevin Wolf
The block_job_error_action() error call in the commit job gives the on_err and is_read arguments in the wrong order. Fix this. (Of course, hard-coded is_read = false is wrong, too, but that's a separate problem for a separate patch.) Signed-off-by: Kevin Wolf --- block/commit.c | 2 +- 1 file c

Re: [PATCH v2 02/21] target/arm: Check aa32_pan in take_aarch32_exception(), not aa64_pan

2020-02-14 Thread Richard Henderson
On 2/14/20 9:50 AM, Peter Maydell wrote: > In take_aarch32_exception(), we know we are dealing with a CPU that > has AArch32, so the right isar_feature test is aa32_pan, not aa64_pan. > > Signed-off-by: Peter Maydell > --- > target/arm/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletio

[PATCH 2/7] commit: Remove unused bytes_written

2020-02-14 Thread Kevin Wolf
The bytes_written variable is only ever written to, it serves no purpose. This has actually been the case since the commit job was first introduced in commit 747ff602636. Signed-off-by: Kevin Wolf --- block/commit.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block/commit.c b/block/comm

[PATCH 7/7] iotests: Test error handling policies with block-commit

2020-02-14 Thread Kevin Wolf
This tests both read failure (from the top node) and write failure (to the base node) for on-error=report/stop/ignore. As block-commit actually starts two different types of block jobs (mirror.c for committing the active later, commit.c for intermediate layers), all tests are run for both cases.

[PATCH 4/7] commit: Inline commit_populate()

2020-02-14 Thread Kevin Wolf
commit_populate() is a very short function and only called in a single place. Its return value doesn't tell us whether an error happened while reading or writing, which would be necessary for sending the right data in the BLOCK_JOB_ERROR QMP event. Signed-off-by: Kevin Wolf --- block/commit.c |

[PATCH 5/7] commit: Fix is_read for block_job_error_action()

2020-02-14 Thread Kevin Wolf
block_job_error_action() needs to know if reading from the top node or writing to the base node failed so that it can set the right 'operation' in the BLOCK_JOB_ERROR QMP event. Signed-off-by: Kevin Wolf --- block/commit.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a

[PATCH 1/7] qapi: Document meaning of 'ignore' BlockdevOnError for jobs

2020-02-14 Thread Kevin Wolf
It is not obvious what 'ignore' actually means for block jobs: It could be continuing the job and returning success in the end despite the error (no block job does this). It could also mean continuing and returning failure in the end (this is what stream does). And it can mean retrying the failed r

[PATCH 0/7] commit: Expose on-error option in QMP

2020-02-14 Thread Kevin Wolf
All other block jobs already provide a QMP option to control the error handling policy. It's time to add it to commit, too. Peter, I guess libvirt wants to expose this? Nir, as you would probably assume, this is motivated by the recent finding that VDSM has to preallocate the theoretical maximum

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
> Am 14.02.2020 um 20:45 schrieb Peter Xu : > > On Fri, Feb 14, 2020 at 07:26:59PM +0100, David Hildenbrand wrote: >> +if (!postcopy_is_running()) { >> +Error *err = NULL; >> + >> +/* >> + * Precopy code cannot deal with the size of ram blocks >>

[PATCH 4/4] target/arm: Flush high bits of sve register after AdvSIMD INS

2020-02-14 Thread Richard Henderson
Writes to AdvSIMD registers flush the bits above 128. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index b83d09dbcd..bd68588a71 100644 --- a/target/arm/translate-a

[PATCH 3/4] target/arm: Flush high bits of sve register after AdvSIMD ZIP/UZP/TRN

2020-02-14 Thread Richard Henderson
Writes to AdvSIMD registers flush the bits above 128. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 096a854aed..b83d09dbcd 100644 --- a/target/arm/translate-a64.c +

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 07:26:59PM +0100, David Hildenbrand wrote: > +if (!postcopy_is_running()) { > +Error *err = NULL; > + > +/* > + * Precopy code cannot deal with the size of ram blocks > changing at > + * random points in

[PATCH 1/4] target/arm: Flush high bits of sve register after AdvSIMD EXT

2020-02-14 Thread Richard Henderson
Writes to AdvSIMD registers flush the bits above 128. Buglink: https://bugs.launchpad.net/bugs/1863247 Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 7c26c3bfeb..620

[PATCH 0/4] target/arm: fix some simd writes vs sve

2020-02-14 Thread Richard Henderson
The launchpad bug only mentions EXT, but I found three more via inspection. I really should extend RISU so that we can do AdvSIMD testing with SVE enabled... r~ Richard Henderson (4): target/arm: Flush high bits of sve register after AdvSIMD EXT target/arm: Flush high bits of sve register

[PATCH 2/4] target/arm: Flush high bits of sve register after AdvSIMD TBL/TBX

2020-02-14 Thread Richard Henderson
Writes to AdvSIMD registers flush the bits above 128. Signed-off-by: Richard Henderson --- target/arm/translate-a64.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c index 620a429067..096a854aed 100644 --- a/target/arm/translate-a64.c +

Re: [PATCH v2 01/19] tests/tcg: include a skip runner for pauth3 with plugins

2020-02-14 Thread Robert Foley
On Thu, 13 Feb 2020 at 17:51, Alex Bennée wrote: > > If we have plugins enabled we still need to have built the test to be > able to run it. > > Signed-off-by: Alex Bennée Reviewed-by: Robert Foley

Re: [PATCH v2 14/19] target/riscv: progressively load the instruction during decode

2020-02-14 Thread Robert Foley
On Thu, 13 Feb 2020 at 18:00, Alex Bennée wrote: > > The plugin system would throw up a harmless warning when it detected > that a disassembly of an instruction didn't use all it's bytes. Fix > the riscv decoder to only load the instruction bytes it needs as it > needs them. > > This drops opcode

Re: [PATCH 1/2] dp264: use pci_create() to initialise the cmd646 device

2020-02-14 Thread Mark Cave-Ayland
On 14/02/2020 11:47, Philippe Mathieu-Daudé wrote: > Hi Mark, > > On Fri, Feb 14, 2020 at 9:48 AM Mark Cave-Ayland > wrote: >> >> Remove the call to pci_cmd646_ide_init() since global device init functions >> are deprecated in preference of using qdev directly. >> >> Signed-off-by: Mark Cave-Ayl

Re: [PATCH v2 19/19] tests/tcg: take into account expected clashes pauth-4

2020-02-14 Thread Robert Foley
On Thu, 13 Feb 2020 at 18:00, Alex Bennée wrote: > > Pointer authentication isn't perfect so measure the percentage of > failed checks. As we want to vary the pointer that is authenticated we > recurse down the stack. > > Signed-off-by: Alex Bennée Reviewed-by: Robert Foley

Re: [RFC v2 4/6] tpm: Separate TPM_TIS and TPM_TIS_ISA configs

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 7:37 PM, Eric Auger wrote: Let's separate the compilation of tpm_tis_common.c from the compilation of tpm_tis_isa.c The common part will be also compiled along with the tpm_tis_sysbus device. Signed-off-by: Eric Auger --- default-configs/i386-softmmu.mak | 2 +- hw/i386/Kconfig

Re: [RFC v2 2/6] tpm: Use TPMState as a common struct

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 7:37 PM, Eric Auger wrote: As we plan to introdce a SysBus TPM TIS device, let's typo "introduce" make the TPMState a common struct usable by both the ISADevice and the SysBusDevice. TPMStateISA embeds the struct and inherits from the ISADevice. The prototype of functions bound to

Re: [RFC v2 1/6] tpm: rename TPM_TIS into TPM_TIS_ISA

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 7:36 PM, Eric Auger wrote: As we plan to introduce a sysbus TPM_TIS, let's rename TPM_TIS into TPM_TIS_ISA. Signed-off-by: Eric Auger --- hw/i386/acpi-build.c | 6 +++--- hw/tpm/tpm_tis.c | 4 ++-- include/sysemu/tpm.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletion

Re: [PATCH 06/19] target/arm: Rename isar_feature_aa32_fpdp_v2

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 7:15 PM, Richard Henderson wrote: The old name, isar_feature_aa32_fpdp, does not reflect that the test includes VFPv2. We will introduce another feature tests for VFPv3. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 4 ++-- target/arm/translate-vfp.inc.c

Re: [PATCH v5 7/8] multifd: Add multifd-zstd-level parameter

2020-02-14 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Juan Quintela writes: > > > Markus Armbruster wrote: > >> "Dr. David Alan Gilbert" writes: > >> > >>> * Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela > --- > migration/migration.c | 15 +++

Re: [PATCH 02/19] target/arm: Rename isar_feature_aa32_simd_r32

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 7:15 PM, Richard Henderson wrote: The old name, isar_feature_aa32_fp_d32, does not reflect the MVFR0 field name, SIMDReg. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 2 +- target/arm/translate-vfp.inc.c | 52 +- 2 files c

[RFC v2 6/6] hw/arm/virt: vTPM support

2020-02-14 Thread Eric Auger
Let the TPM TIS SYSBUS device be dynamically instantiable in ARM virt. A device tree node is dynamically created (TPM via MMIO). The TPM Physical Presence interface (PPI) is not supported. To run with the swtmp TPM emulator, the qemu command line must be augmented with: -chardev socket,

[RFC v2 4/6] tpm: Separate TPM_TIS and TPM_TIS_ISA configs

2020-02-14 Thread Eric Auger
Let's separate the compilation of tpm_tis_common.c from the compilation of tpm_tis_isa.c The common part will be also compiled along with the tpm_tis_sysbus device. Signed-off-by: Eric Auger --- default-configs/i386-softmmu.mak | 2 +- hw/i386/Kconfig | 2 +- hw/tpm/Kconfig

[RFC v2 3/6] tpm: Separate tpm_tis common functions from isa code

2020-02-14 Thread Eric Auger
Move the device agnostic code into tpm_tis_common.c and put the ISA device specific code into tpm_tis_isa.c Signed-off-by: Eric Auger --- hw/tpm/Makefile.objs | 2 +- hw/tpm/tpm_tis.h | 91 +++ hw/tpm/{tpm_tis.c => tpm_tis_common.c} | 209 ++

[RFC v2 2/6] tpm: Use TPMState as a common struct

2020-02-14 Thread Eric Auger
As we plan to introdce a SysBus TPM TIS device, let's make the TPMState a common struct usable by both the ISADevice and the SysBusDevice. TPMStateISA embeds the struct and inherits from the ISADevice. The prototype of functions bound to be used by both the ISA and SysBus devices is changed to tak

[RFC v2 5/6] tpm: Add the SysBus TPM TIS device

2020-02-14 Thread Eric Auger
Introduce the tpm-tis-device which is a sysbus device and is bound to be used on ARM. Signed-off-by: Eric Auger --- hw/tpm/Kconfig | 5 ++ hw/tpm/Makefile.objs| 1 + hw/tpm/tpm_tis_sysbus.c | 159 include/sysemu/tpm.h| 1 + 4 files

[RFC v2 0/6] vTPM for aarch64

2020-02-14 Thread Eric Auger
This series adds the capability to instantiate an MMIO TPM TIS in ARM virt. The existing TPM TIS code is reshuffled into a generic part, the ISA device and the sysbus device. The last patch allows the instantiation of the TPM TIS sysbus device in ARM virt. The series was tested with the swtpm/lib

[RFC v2 1/6] tpm: rename TPM_TIS into TPM_TIS_ISA

2020-02-14 Thread Eric Auger
As we plan to introduce a sysbus TPM_TIS, let's rename TPM_TIS into TPM_TIS_ISA. Signed-off-by: Eric Auger --- hw/i386/acpi-build.c | 6 +++--- hw/tpm/tpm_tis.c | 4 ++-- include/sysemu/tpm.h | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw

Re: [PULL 0/6] Pull migration patches

2020-02-14 Thread Peter Maydell
On Thu, 13 Feb 2020 at 13:21, Juan Quintela wrote: > > The following changes since commit e18e5501d8ac692d32657a3e1ef545b14e72b730: > > Merge remote-tracking branch > 'remotes/dgilbert-gitlab/tags/pull-virtiofs-20200210' into staging > (2020-02-10 18:09:14 +) > > are available in the Git r

Re: [PATCH 01/19] target/arm: Fix field extract from MVFR[0-2]

2020-02-14 Thread Peter Maydell
On Fri, 14 Feb 2020 at 18:15, Richard Henderson wrote: > > These registers are 32-bits wide. Cut and paste used FIELD_EX64 > instead of the more proper FIELD_EX32. In practice all this did > was use an unnecessary 64-bit operation, producing correct results. > > Signed-off-by: Richard Henderson

[Bug 1863025] Re: Use-after-free after flush in TCG accelerator

2020-02-14 Thread Yifan
Apologies, the patch got messed up. diff --git a/accel/tcg/cpu-exec.c b/accel/tcg/cpu-exec.c index c01f59c743..7a9e8c94bd 100644 --- a/accel/tcg/cpu-exec.c +++ b/accel/tcg/cpu-exec.c @@ -238,8 +238,11 @@ void cpu_exec_step_atomic(CPUState *cpu) uint32_t flags; uint32_t cflags = 1; u

Re: [PATCH 01/19] target/arm: Fix field extract from MVFR[0-2]

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 7:15 PM, Richard Henderson wrote: These registers are 32-bits wide. Cut and paste used FIELD_EX64 instead of the more proper FIELD_EX32. In practice all this did was use an unnecessary 64-bit operation, producing correct results. Signed-off-by: Richard Henderson --- target/arm/cp

[Bug 1863025] Re: Use-after-free after flush in TCG accelerator

2020-02-14 Thread Yifan
I found it just by launching Ubuntu 19.10 live cd with QXL driver. I will re-test this weekend. The workaround I had is to check the number of TLB flushes and to re-try obtaining the TB if the number changes. There is a penalty for the case where TLB is flushed but should not degrade performance i

Re: [PATCH v1 2/4] Acceptance test: EXEC migration

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 3:52 PM, Oksana Vohchana wrote: Improves EXEC migration to run whole test stage Signed-off-by: Oksana Vohchana Fixes: 2e768cb682bf --- tests/acceptance/migration.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/acceptance/migration.py b/tests/acceptance/migration

[PATCH 19/19] target/arm: Split VMINMAXNM decode

2020-02-14 Thread Richard Henderson
Passing the raw op field from the manual is less instructive than it might be. Do the full decode and use the existing helpers to perform the expansion. Since these are v8 insns, VECLEN+VECSTRIDE are already RES0. Signed-off-by: Richard Henderson --- target/arm/vfp-uncond.decode | 12 ++--

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread David Hildenbrand
On 14.02.20 19:11, Peter Xu wrote: > On Fri, Feb 14, 2020 at 06:32:35PM +0100, David Hildenbrand wrote: >> On 14.02.20 18:29, Peter Xu wrote: >>> On Fri, Feb 14, 2020 at 01:02:46PM +0100, David Hildenbrand wrote: From c0049ac2e95d6756037db918852c507fb88297d9 Mon Sep 17 00:00:00 2001 From:

[PATCH 14/19] target/arm: Move the vfp decodetree calls next to the base isa

2020-02-14 Thread Richard Henderson
Have the calls adjacent as an intermediate step toward actually merging the decodes. Signed-off-by: Richard Henderson --- target/arm/translate.c | 80 +- 1 file changed, 24 insertions(+), 56 deletions(-) diff --git a/target/arm/translate.c b/target/arm/tr

Re: [PATCH v4 03/20] target/arm: Add isar_feature tests for PAN + ATS1E1

2020-02-14 Thread Richard Henderson
On 2/14/20 3:28 AM, Peter Maydell wrote: >> +static inline bool isar_feature_aa32_pan(const ARMISARegisters *id) >> +{ >> +return FIELD_EX64(id->mvfr0, ID_MMFR3, PAN) != 0; >> +} >> + >> +static inline bool isar_feature_aa32_ats1e1(const ARMISARegisters *id) >> +{ >> +return FIELD_EX64(id->

[PATCH 10/19] target/arm: Add missing checks for fpsp_v2

2020-02-14 Thread Richard Henderson
We will eventually remove the early ARM_FEATURE_VFP test, so add a proper test for each trans_* that does not already have another ISA test. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 78 ++ 1 file changed, 69 insertions(+), 9 deletions(

[PATCH 17/19] target/arm: Add formats for some vfp 2 and 3-register insns

2020-02-14 Thread Richard Henderson
Those vfp instructions without extra opcode fields can share a common @format for brevity. Signed-off-by: Richard Henderson --- target/arm/vfp.decode | 134 -- 1 file changed, 52 insertions(+), 82 deletions(-) diff --git a/target/arm/vfp.decode b/target/a

[PATCH 09/19] target/arm: Replace ARM_FEATURE_VFP3 checks with fp{sp, dp}_v3

2020-02-14 Thread Richard Henderson
Sort this check to the start of a trans_* function. Merge this with any existing test for fpdp_v2. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 24 1 file changed, 8 insertions(+), 16 deletions(-) diff --git a/target/arm/translate-vfp.inc.c b/ta

Re: [PATCH v2 09/19] tracing: only allow -trace to override -D if set

2020-02-14 Thread Robert Foley
On Thu, 13 Feb 2020 at 17:51, Alex Bennée wrote: > > Otherwise any -D settings the user may have made get ignored. > > Signed-off-by: Alex Bennée Reviewed-by: Robert Foley

[PATCH 05/19] target/arm: Add isar_feature_aa32_simd_r16

2020-02-14 Thread Richard Henderson
Use this in the places that were checking ARM_FEATURE_VFP, and are obviously testing for the existance of the register set as opposed to testing for some particular instruction extension. Signed-off-by: Richard Henderson --- target/arm/cpu.h| 6 ++ hw/intc/armv7m_nvic.c | 20 +

[PATCH 18/19] target/arm: Split VFM decode

2020-02-14 Thread Richard Henderson
Passing the raw o1 and o2 fields from the manual is less instructive than it might be. Do the full decode and let the trans_* functions pass in booleans to a helper. Signed-off-by: Richard Henderson --- target/arm/vfp.decode | 17 +-- target/arm/translate-vfp.inc.c | 52 +++

[PATCH 06/19] target/arm: Rename isar_feature_aa32_fpdp_v2

2020-02-14 Thread Richard Henderson
The old name, isar_feature_aa32_fpdp, does not reflect that the test includes VFPv2. We will introduce another feature tests for VFPv3. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 4 ++-- target/arm/translate-vfp.inc.c | 40 +- 2 files

[PATCH 13/19] target/arm: Move VLLDM and VLSTM to vfp.decode

2020-02-14 Thread Richard Henderson
Now that we no longer have an early check for ARM_FEATURE_VFP, we can use the proper ISA check in trans_VLLDM_VLSTM. Signed-off-by: Richard Henderson --- target/arm/vfp.decode | 2 ++ target/arm/translate-vfp.inc.c | 35 ++ target/arm/translate.c | 53 ++

[PATCH 15/19] linux-user/arm: Replace ARM_FEATURE_VFP* tests for HWCAP

2020-02-14 Thread Richard Henderson
Use isar feature tests instead of feature bit tests. Although none of QEMUs current cpus have VFPv3 without D32, replace the large comment explaining why with one line that sets ARM_HWCAP_ARM_VFPv3D16 under the correct conditions. Mirror the test sequence used in the linux kernel. Signed-off-by:

[PATCH 04/19] target/arm: Set MVFR0.FPSP for ARMv5 cpus

2020-02-14 Thread Richard Henderson
We are going to convert FEATURE tests to ISAR tests, so FPSP needs to be set for these cpus, like we have already for FPDP. Signed-off-by: Richard Henderson --- target/arm/cpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/target/arm/cpu.c b/target/arm/cpu.c ind

[PATCH 08/19] target/arm: Perform fpdp_v2 check first

2020-02-14 Thread Richard Henderson
Shuffle the order of the checks so that we test the ISA before we test anything else, such as the register arguments. Signed-off-by: Richard Henderson --- target/arm/translate-vfp.inc.c | 143 + 1 file changed, 72 insertions(+), 71 deletions(-) diff --git a/targe

Re: [PATCH] spapr: Rework hash<->radix transitions at CAS

2020-02-14 Thread Greg Kurz
On Fri, 14 Feb 2020 09:28:35 +1100 David Gibson wrote: > On Thu, Feb 13, 2020 at 04:38:38PM +0100, Greg Kurz wrote: > > Until the CAS negotiation is over, an HPT can be allocated on three > > different paths: > > > > 1) during machine reset if the host doesn't support radix, > > > > 2) during C

[PATCH 02/19] target/arm: Rename isar_feature_aa32_simd_r32

2020-02-14 Thread Richard Henderson
The old name, isar_feature_aa32_fp_d32, does not reflect the MVFR0 field name, SIMDReg. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 2 +- target/arm/translate-vfp.inc.c | 52 +- 2 files changed, 27 insertions(+), 27 deletions(-) diff --

[PATCH 03/19] target/arm: Use isar_feature_aa32_simd_r32 more places

2020-02-14 Thread Richard Henderson
Many uses of ARM_FEATURE_VFP3 are testing for the number of simd registers implemented. Use the proper test vs MVCR0.SIMDReg. Signed-off-by: Richard Henderson --- target/arm/cpu.c | 9 - target/arm/helper.c| 13 ++--- target/arm/translate.c | 2 +- 3 files changed, 1

[PATCH 11/19] target/arm: Replace ARM_FEATURE_VFP4 with isar_feature_aa32_simdfmac

2020-02-14 Thread Richard Henderson
All remaining tests for VFP4 are for fused multiply-add insns. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 5 + target/arm/translate-vfp.inc.c | 12 target/arm/translate.c | 2 +- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a

[PATCH 16/19] target/arm: Remove ARM_FEATURE_VFP*

2020-02-14 Thread Richard Henderson
We have converted all tests against these features to ISAR tests. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 3 --- target/arm/cpu.c | 25 - target/arm/cpu64.c | 3 --- target/arm/kvm32.c | 5 - target/arm/kvm64.c | 1 - 5 files changed, 37 deleti

[PATCH 01/19] target/arm: Fix field extract from MVFR[0-2]

2020-02-14 Thread Richard Henderson
These registers are 32-bits wide. Cut and paste used FIELD_EX64 instead of the more proper FIELD_EX32. In practice all this did was use an unnecessary 64-bit operation, producing correct results. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 18 +- 1 file changed, 9 i

[PATCH 07/19] target/arm: Add isar_feature_aa32_{fpsp_v2, fpsp_v3, fpdp_v3}

2020-02-14 Thread Richard Henderson
We will shortly use these to test for VFPv2 and VFPv3 in different situations. Signed-off-by: Richard Henderson --- target/arm/cpu.h | 18 ++ 1 file changed, 18 insertions(+) diff --git a/target/arm/cpu.h b/target/arm/cpu.h index 5f08cbd2d8..4ff28418df 100644 --- a/target/arm/cp

[PATCH 00/19] target/arm: vfp feature and decodetree cleanup

2020-02-14 Thread Richard Henderson
The main goal of the patchset is to move the ARM_FEATURE_VFP test from outside of the disas_vfp_insn() to inside each of the trans_* functions, so that we get the proper ISA check for each case. At the end of that, it is easy to eliminate all of the remaining tests vs ARM_FEATURE_VFP* in favor of

[PATCH 12/19] target/arm: Remove ARM_FEATURE_VFP check from disas_vfp_insn

2020-02-14 Thread Richard Henderson
We now have proper ISA checks within each trans_* function. Signed-off-by: Richard Henderson --- target/arm/translate.c | 4 1 file changed, 4 deletions(-) diff --git a/target/arm/translate.c b/target/arm/translate.c index 0da780102c..e8c3d4f26f 100644 --- a/target/arm/translate.c +++ b/ta

Re: How do UEFI on Windows host

2020-02-14 Thread Philippe Mathieu-Daudé
On 2/14/20 5:37 PM, Jerry Geis wrote: I dont know how to get all files listing on windows. But, I cd \program files\qemu dir *.fd edk2-x86_64-code.fd edk2-x86_64-secure-code.fd It seems like from other posts these might be the files - but still not sure how to do "boot" a command line for UEFI

Re: [PATCH RFC] memory: Don't allow to resize RAM while migrating

2020-02-14 Thread Peter Xu
On Fri, Feb 14, 2020 at 06:32:35PM +0100, David Hildenbrand wrote: > On 14.02.20 18:29, Peter Xu wrote: > > On Fri, Feb 14, 2020 at 01:02:46PM +0100, David Hildenbrand wrote: > >> From c0049ac2e95d6756037db918852c507fb88297d9 Mon Sep 17 00:00:00 2001 > >> From: David Hildenbrand > >> Date: Fri, 14

[PATCH v2 21/21] target/arm: Correctly implement ACTLR2, HACTLR2

2020-02-14 Thread Peter Maydell
The ACTLR2 and HACTLR2 AArch32 system registers didn't exist in ARMv7 or the original ARMv8. They were later added as optional registers, whose presence is signaled by the ID_MMFR4.AC2 field. From ARMv8.2 they are mandatory (ie ID_MMFR4.AC2 must be non-zero). We implemented HACTLR2 in commit 0e0

[PATCH v2 19/21] target/arm: Use isar_feature function for testing AA32HPD feature

2020-02-14 Thread Peter Maydell
Now we have moved ID_MMFR4 into the ARMISARegisters struct, we can define and use an isar_feature for the presence of the ARMv8.2-AA32HPD feature, rather than open-coding the test. While we're here, correct a comment typo which missed an 'A' from the feature name. Signed-off-by: Peter Maydell --

[PATCH v2 20/21] target/arm: Use FIELD_EX32 for testing 32-bit fields

2020-02-14 Thread Peter Maydell
Cut-and-paste errors mean we're using FIELD_EX64() to extract fields from some 32-bit ID register fields. Use FIELD_EX32() instead. (This makes no difference in behaviour, it's just more consistent.) Signed-off-by: Peter Maydell --- target/arm/cpu.h | 18 +- 1 file changed, 9 ins

[PATCH v2 14/21] target/arm: Implement ARMv8.4-PMU extension

2020-02-14 Thread Peter Maydell
The ARMv8.4-PMU extension adds: * one new required event, STALL * one new system register PMMIR_EL1 (There are also some more L1-cache related events, but since we don't implement any cache we don't provide these, in the same way we don't provide the base-PMUv3 cache events.) The STALL event "c

[PATCH v2 17/21] target/arm: Correct handling of PMCR_EL0.LC bit

2020-02-14 Thread Peter Maydell
The LC bit in the PMCR_EL0 register is supposed to be: * read/write * RES1 on an AArch64-only implementation * an architecturally UNKNOWN value on reset (and use of LC==0 by software is deprecated). We were implementing it incorrectly as read-only always zero, though we do have all the code nee

Re: [PATCH v1 08/14] tests/vm: Added configuration file support

2020-02-14 Thread Robert Foley
On Fri, 14 Feb 2020 at 11:54, Alex Bennée wrote: > > from socket_thread import SocketThread > > +import yaml > > So this throws my setup on my Gentoo SynQuacer. Is this meant to be in > the standard library or is this a separate dependency? > This is a separate dependency. On Ubuntu the package

[PATCH v2 16/21] target/arm: Correct definition of PMCRDP

2020-02-14 Thread Peter Maydell
The PMCR_EL0.DP bit is bit 5, which is 0x20, not 0x10. 0x10 is 'X'. Correct our #define of PMCRDP and add the missing PMCRX. We do have the correct behaviour for handling the DP bit being set, so this fixes a guest-visible bug. Fixes: 033614c47de Reviewed-by: Philippe Mathieu-Daudé Reviewed-by:

[Bug 1863247] Re: AArch64 EXT instruction for V register does not clear MSB side bits

2020-02-14 Thread Richard Henderson
Yep. ** Changed in: qemu Status: New => In Progress ** Changed in: qemu Assignee: (unassigned) => Richard Henderson (rth) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1863247 Title:

  1   2   3   >