Re: [Qemu-devel] [PATCH] intel_iommu: handle invalid ce for shadow sync

2018-10-08 Thread Peter Xu
On Mon, Oct 08, 2018 at 11:08:31AM +0800, Jason Wang wrote: [...] > > +static int vtd_sync_shadow_page_table(VTDAddressSpace *vtd_as) > > +{ > > int ret; > > +VTDContextEntry ce; > > +IOMMUNotifier *n; > > -if (ce) { > > -/* If the caller provided context entry, use it

Re: [Qemu-devel] [PATCH] intel_iommu: handle invalid ce for shadow sync

2018-10-08 Thread Peter Xu
On Mon, Oct 01, 2018 at 01:36:50PM +0200, Auger Eric wrote: > Hi Peter, > On 9/13/18 9:55 AM, Peter Xu wrote: > > There are two callers for vtd_sync_shadow_page_table_range(), one > > provided a valid context entry and one not. Move that fetching > > operation into the caller

Re: [Qemu-devel] [PATCH v5 6/9] x86_iommu/amd: Add interrupt remap support when VAPIC is not enabled

2018-10-08 Thread Peter Xu
On Mon, Oct 01, 2018 at 07:44:39PM +, Singh, Brijesh wrote: > Emulate the interrupt remapping support when guest virtual APIC is > not enabled. > > For more info Refer: AMD IOMMU spec Rev 3.0 - section 2.2.5.1 > > When VAPIC is not enabled, it uses interrupt remapping as defined in > Table

Re: [Qemu-devel] [PATCH v2 0/2] intel_iommu: handle invalid ce for shadow sync

2018-10-08 Thread Peter Xu
On Mon, Oct 08, 2018 at 02:47:11PM +0800, Peter Xu wrote: > v2: > - split patch into more, remove useless comment [Eric] > - remove one error_report_once() when rework the code [Jason] > > This series fixes a QEMU crash reported here: > > https://bugzilla.redhat.com/show_bug.cgi?id=1627272 > >

Re: [Qemu-devel] [PATCH] intel_iommu: handle invalid ce for shadow sync

2018-10-08 Thread Peter Xu
On Mon, Oct 08, 2018 at 02:06:20PM +0800, Peter Xu wrote: > > > -static int vtd_sync_shadow_page_table(VTDAddressSpace *vtd_as) > > > -{ > > > -return vtd_sync_shadow_page_table_range(vtd_as, NULL, 0, UINT64_MAX); > > > +return vtd_sync_shadow_page_table_range(vtd_as, , 0, UINT64_MAX); > >

Re: [Qemu-devel] [PATCH v8 2/6] monitor: resume the monitor earlier if needed

2018-10-08 Thread Peter Xu
On Tue, Oct 02, 2018 at 01:13:10PM +0400, Marc-André Lureau wrote: > Hi Peter > > On Sat, Sep 29, 2018 at 8:05 AM Peter Xu wrote: > > > > On Fri, Sep 28, 2018 at 04:06:30PM +0400, Marc-André Lureau wrote: > > > Hi > > > > > > On Wed, Sep 5, 2018 at 10:24 AM Peter Xu wrote: > > > > > > > >

Re: [Qemu-devel] [3/4] cpus: protect TimerState writes with a spinlock

2018-10-08 Thread Pavel Dovgalyuk
Paolo, > From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 11/09/2018 08:00, Pavel Dovgalyuk wrote: > > Thanks, that works. Here is the updated diff (stubs were added). > > Will you apply it? > > Yes, thanks for the quick test! Thanks for applying RR patches, but I think you forgot about

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Set a category for the generic-loader device

2018-10-08 Thread Thomas Huth
On 2018-10-05 18:32, Peter Maydell wrote: > On 5 October 2018 at 10:42, Thomas Huth wrote: >> Each device that is instantiatable by the users should be marked with >> a category. > > Presumably we could assert() this somewhere (at which > point we'd find that we have dozens of devices that >

Re: [Qemu-devel] [PATCH] tests: remove gcov-files- variables

2018-10-08 Thread Thomas Huth
On 2018-10-05 18:17, Paolo Bonzini wrote: > Commit 31d2dda ("build-system: remove per-test GCOV reporting", 2018-06-20) > removed users of the variables, since those uses can be replaced by a simple > overall report produced by gcovr. However, the variables were never removed. > Do it now. > >

[Qemu-devel] [PATCH v2 1/2] intel_iommu: move ce fetching out when sync shadow

2018-10-08 Thread Peter Xu
There are two callers for vtd_sync_shadow_page_table_range(): one provided a valid context entry and one not. Move that fetching operation into the caller vtd_sync_shadow_page_table() where we need to fetch the context entry. Meanwhile, remove the error_report_once() directly since we're already

Re: [Qemu-devel] [PATCH 0/2] linux-user: usbfs improvements

2018-10-08 Thread Laurent Vivier
Le 08/10/2018 à 06:27, Cortland Tölva a écrit : > From: Cortland Setlow Tölva > > This patch series enables programs running under QEMU Linux user mode > emulation to implement user-space USB drivers via the USBFS ioctl()s. > Support is limited to control, bulk, and possibly interrupt transfers.

[Qemu-devel] [PATCH v2 0/2] intel_iommu: handle invalid ce for shadow sync

2018-10-08 Thread Peter Xu
v2: - split patch into more, remove useless comment [Eric] - remove one error_report_once() when rework the code [Jason] This series fixes a QEMU crash reported here: https://bugzilla.redhat.com/show_bug.cgi?id=1627272 Please review, thanks. Peter Xu (2): intel_iommu: move ce fetching out

[Qemu-devel] [PATCH v2 2/2] intel_iommu: handle invalid ce for shadow sync

2018-10-08 Thread Peter Xu
We should handle VTD_FR_CONTEXT_ENTRY_P properly when synchronizing shadow page tables. Having invalid context entry there is perfectly valid when we move a device out of an existing domain. When that happens, instead of posting an error we invalidate the whole region. Without this patch, QEMU

Re: [Qemu-devel] vhost: add virtio-vhost-user transport

2018-10-08 Thread Wodkowski, PawelX
Great to hear that. To get these patches merged you need to prepare a patch(es) and send them for review first. See https://spdk.io/development/ for information how to do that. Pawel > -Original Message- > From: SPDK [mailto:spdk-boun...@lists.01.org] On Behalf Of Nikos Dragazis >

Re: [Qemu-devel] [PATCH v2 0/3] add exit-script option to qemu

2018-10-08 Thread Dominik Csapak
On 10/8/18 5:28 AM, Jason Wang wrote: On 2018年10月04日 19:43, Dominik Csapak wrote: this patch series aims to execute a script when qemu exits so that one can do cleanups when using --daemonize without having to use the qmp monitor Hi: Can you give a example of why it must be done through

Re: [Qemu-devel] [PATCH] target/s390x/excp_helper: Remove DPRINTF() macro

2018-10-08 Thread David Hildenbrand
On 05/10/2018 17:00, Thomas Huth wrote: > Debug macros that are disabled by default should be avoided (since the > code bit-rots quite easily). Thus turn these debug prints into proper > qemu_log_mask(CPU_LOG_xxx, ...) statements instead. The DPRINTF statements > in do_[ext|io|mchk]_interrupt can

Re: [Qemu-devel] Hotplug handler

2018-10-08 Thread Sameeh Jubran
Thanks for your help, turns out that the hotlpug is set by piix4 after the devices are realized. On Mon, Oct 8, 2018 at 11:28 AM Igor Mammedov wrote: > > On Sun, 7 Oct 2018 12:52:11 +0300 > Sameeh Jubran wrote: > > > This is the command line. All of the devices are wired to pci.0, there is > >

Re: [Qemu-devel] [PULL v2 00/12] Option patches

2018-10-08 Thread Peter Maydell
On 5 October 2018 at 13:28, Marc-André Lureau wrote: > The following changes since commit b8e5671a8cd196e7262802ca895bf87d50416989: > > Merge remote-tracking branch 'remotes/elmarco/tags/chardev-pull-request' > into staging (2018-10-03 14:07:49 +0100) > > are available in the Git repository

Re: [Qemu-devel] [PATCH v3 00/15] target/arm: sve system mode patches

2018-10-08 Thread Peter Maydell
On 5 October 2018 at 18:53, Richard Henderson wrote: > For v3, the only change is to patch 4, which is also the only > patch without a reviewed-by tag. > > I now check for aa64 state before checking for sve length, and > added a comment about why it is important to play with sve when >

Re: [Qemu-devel] Hotplug handler

2018-10-08 Thread Igor Mammedov
On Sun, 7 Oct 2018 12:52:11 +0300 Sameeh Jubran wrote: > This is the command line. All of the devices are wired to pci.0, there is > no pci bridge. > > According to this, Integrated Endpoints are not hot-pluggable. However I > can still use device_del to delete a device and device_add to add

Re: [Qemu-devel] [PATCH] qemu-io-cmds: Fix two format strings

2018-10-08 Thread Kevin Wolf
Am 06.10.2018 um 20:38 hat Stefan Weil geschrieben: > Use %zu instead of %zd for unsigned numbers. > > This fixes two error messages from the LSTM static code analyzer: > > This argument should be of type 'ssize_t' but is of type 'unsigned long' > > Signed-off-by: Stefan Weil Thanks, applied

Re: [Qemu-devel] [PATCH] util: aio-posix: fix a typo

2018-10-08 Thread Peter Maydell
On 8 October 2018 at 03:16, Li Qiang wrote: > Cc: qemu-triv...@nongnu.org > Signed-off-by: Li Qiang > --- > util/aio-posix.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/util/aio-posix.c b/util/aio-posix.c > index 621b302..51c41ed 100644 > --- a/util/aio-posix.c >

Re: [Qemu-devel] [PATCH v3 1/3] qapi: add x-debug-query-block-graph

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
05.10.2018 22:34, Max Reitz wrote: On 02.10.18 15:01, Vladimir Sementsov-Ogievskiy wrote: 28.09.2018 19:31, Max Reitz wrote: On 23.08.18 17:46, Vladimir Sementsov-Ogievskiy wrote: Add a new command, returning block nodes (and their users) graph. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [RFC PATCH 04/21] trace: enable the exec_tb trace events

2018-10-08 Thread Alex Bennée
Emilio G. Cota writes: > On Fri, Oct 05, 2018 at 16:48:53 +0100, Alex Bennée wrote: >> Our performance isn't so critical that we can't spare a simple flag >> check when we exec a TB considering everything else we check in the >> outer loop. > > [I know this is just done to illustrate how

Re: [Qemu-devel] [PULL 0/4] Vga 20181005 patches

2018-10-08 Thread Peter Maydell
On 5 October 2018 at 12:11, Gerd Hoffmann wrote: > The following changes since commit dafd95053611aa14dda40266857608d12ddce658: > > Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into > staging (2018-10-02 18:27:18 +0100) > > are available in the git repository at: > >

Re: [Qemu-devel] [PATCH] hw/core/generic-loader: Set a category for the generic-loader device

2018-10-08 Thread Peter Maydell
On 8 October 2018 at 07:14, Thomas Huth wrote: > On 2018-10-05 18:32, Peter Maydell wrote: >> On 5 October 2018 at 10:42, Thomas Huth wrote: >>> Each device that is instantiatable by the users should be marked with >>> a category. >> >> Presumably we could assert() this somewhere (at which >>

[Qemu-devel] Strange behavior abount bootindex

2018-10-08 Thread Li Qiang
Hello Paolo, Lei, Gerd and all, Recently I encounter a strange issue about bootindex. I have two disk named "disk1.test" and "disk1". When using disk1.test alone, the login picture is: (hostname is localhost) [image: image.png] When using disk1 alone, the login picture is:(hostname is

Re: [Qemu-devel] [PATCH] tests: Disable test-bdrv-drain

2018-10-08 Thread Peter Maydell
On 5 October 2018 at 19:09, Kevin Wolf wrote: > And if we disable it wholesale, then nobody has any incentive to fix any > bug that the test case could have uncovered. Yes, that's fair. I'm sorry; I was a bit grumpy when I wrote that email because my test runs had been bumping into it all day.

Re: [Qemu-devel] [PATCH] target/s390x/excp_helper: Remove DPRINTF() macro

2018-10-08 Thread Cornelia Huck
On Fri, 5 Oct 2018 17:00:01 +0200 Thomas Huth wrote: > Debug macros that are disabled by default should be avoided (since the > code bit-rots quite easily). Thus turn these debug prints into proper > qemu_log_mask(CPU_LOG_xxx, ...) statements instead. The DPRINTF statements > in

Re: [Qemu-devel] [RFC PATCH 00/21] Trace updates and plugin RFC

2018-10-08 Thread Alex Bennée
Emilio G. Cota writes: > On Fri, Oct 05, 2018 at 16:48:49 +0100, Alex Bennée wrote: > (snip) >> ==Known Limitations== >> >> Currently there is only one hook allowed per trace event. We could >> make this more flexible or simply just error out if two plugins try >> and hook to the same point.

[Qemu-devel] [PATCH 2/2] i386/kvm: add support for Hyper-V IPI send

2018-10-08 Thread Vitaly Kuznetsov
Hyper-V PV IPI support is merged to KVM, enable the feature in Qemu. When enabled, this allows Windows guests to send IPIs to other vCPUs with a single hypercall even when there are >64 vCPUs in the request. Signed-off-by: Vitaly Kuznetsov --- target/i386/cpu.c | 1 +

[Qemu-devel] [PATCH 1/2] linux-headers: update to pre-4.20 (kvm/queue)

2018-10-08 Thread Vitaly Kuznetsov
This brings us three new defines: KVM_CAP_ARM_INJECT_SERROR_ESR, KVM_CAP_MSR_PLATFORM_INFO and KVM_CAP_HYPERV_SEND_IPI. Signed-off-by: Vitaly Kuznetsov --- linux-headers/linux/kvm.h | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/linux-headers/linux/kvm.h

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for selecting the Memory Region that the GEM > will do DMA to. > > Signed-off-by: Edgar E. Iglesias > --- > @@ -1500,6 +1506,13 @@ static void gem_realize(DeviceState *dev, Error **errp) >

Re: [Qemu-devel] [PATCH v2 1/2] Deprecate QMP `cpu-add`

2018-10-08 Thread Markus Armbruster
Kashyap Chamarthy writes: > On Mon, Oct 01, 2018 at 11:28:17AM +0200, Thomas Huth wrote: >> On 2018-09-25 18:02, Kashyap Chamarthy wrote: > > [...] > >> > +++ b/qapi/misc.json >> > @@ -1104,7 +1104,11 @@ >> > ## >> > # @cpu-add: >> > # >> > -# Adds CPU with specified ID >> > +# Adds CPU with

[Qemu-devel] [PULL 11/33] target/arm: Rewrite helper_sve_ld1*_r using pages

2018-10-08 Thread Peter Maydell
From: Richard Henderson Uses tlb_vaddr_to_host for correct operation with softmmu. Optimize for accesses within a single page or pair of pages. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id: 20181005175350.30752-8-richard.hender...@linaro.org Signed-off-by: Peter

Re: [Qemu-devel] [PATCH] hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c

2018-10-08 Thread Thomas Huth
On 2018-10-08 02:57, David Gibson wrote: > On Fri, Oct 05, 2018 at 08:12:12AM +0200, Thomas Huth wrote: >> On 2018-10-05 06:25, David Gibson wrote: >>> On Thu, Oct 04, 2018 at 12:07:01PM +0200, Thomas Huth wrote: The spapr-rng device is suboptimal when compared to virtio-rng, so users

Re: [Qemu-devel] [3/4] cpus: protect TimerState writes with a spinlock

2018-10-08 Thread Paolo Bonzini
On 08/10/2018 09:09, Pavel Dovgalyuk wrote: > Paolo, > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 11/09/2018 08:00, Pavel Dovgalyuk wrote: >>> Thanks, that works. Here is the updated diff (stubs were added). >>> Will you apply it? >> >> Yes, thanks for the quick test! > > Thanks

Re: [Qemu-devel] [RFC PATCH 00/21] Trace updates and plugin RFC

2018-10-08 Thread Philippe Mathieu-Daudé
Hi Alex, On 08/10/2018 12:28, Alex Bennée wrote: > > Emilio G. Cota writes: > >> On Fri, Oct 05, 2018 at 16:48:49 +0100, Alex Bennée wrote: >> (snip) >>> ==Known Limitations== >>> >>> Currently there is only one hook allowed per trace event. We could >>> make this more flexible or simply just

Re: [Qemu-devel] [RFC PATCH 06/21] trace: show trace point counts in the monitor

2018-10-08 Thread Markus Armbruster
Alex Bennée writes: > Now we have counts for each trace point we can expose them in the > monitor when the user queries what trace points are available. > > Signed-off-by: Alex Bennée > --- > monitor.c | 5 +++-- > qapi/trace.json | 3 ++- > trace/qmp.c | 1 + > 3 files changed, 6

Re: [Qemu-devel] [PATCH v1 09/12] target-arm: powerctl: Enable HVC when starting CPUs to EL2

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > When QEMU provides the equivalent of the EL3 firmware, we > need to enable HVCs in scr_el3 when turning on CPUs that > target EL2. > > Signed-off-by: Edgar E. Iglesias > --- > target/arm/arm-powerctl.c | 11

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-08 Thread David Hildenbrand
On 08/10/2018 14:19, Igor Mammedov wrote: > On Mon, 8 Oct 2018 13:47:53 +0200 > David Hildenbrand wrote: > >>> That way using [2] and [1 - modulo it should match only concrete type] >>> machine would be able to override hotplug handlers for TYPE_VIRTIO_PMEM_PCI >>> and explicitly call machine +

[Qemu-devel] [PATCH v2] hw/ppc/spapr_rng: Introduce CONFIG_SPAPR_RNG switch for spapr_rng.c

2018-10-08 Thread Thomas Huth
The spapr-rng device is suboptimal when compared to virtio-rng, so users might want to disable it in their builds. Thus let's introduce a proper CONFIG switch to allow us to compile QEMU without this device. The function spapr_rng_populate_dt is required for linking, so move it to a different

Re: [Qemu-devel] [PATCH v1 11/12] hw/arm: versal: Add a model of Xilinx Versal SoC

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add a model of Xilinx Versal SoC. > > Signed-off-by: Edgar E. Iglesias > --- > default-configs/aarch64-softmmu.mak | 1 + > hw/arm/Makefile.objs| 1 + > hw/arm/xlnx-versal.c

[Qemu-devel] [PATCH] qapi: add info about reset to SHUTDOWN event

2018-10-08 Thread Dominik Csapak
when '-no-reboot' is set, it is interesting if the guest was originally shutdown or reset, so save and return that info Signed-off-by: Dominik Csapak --- qapi/run-state.json | 5 - vl.c| 5 - 2 files changed, 8 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [RFC PATCH 00/21] Trace updates and plugin RFC

2018-10-08 Thread Emilio G. Cota
On Mon, Oct 08, 2018 at 11:28:38 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > Again, for performance you'd avoid the tracepoint (i.e. calling > > a helper to call another function) and embed directly the > > callback from TCG. Same thing applies to TB's. > > OK I see what you mean. I

[Qemu-devel] [PULL 00/33] target-arm queue

2018-10-08 Thread Peter Maydell
-fpu-20181005' into staging (2018-10-08 12:44:35 +0100) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181008 for you to fetch changes up to 74e2e59b8d0a68be0956310fc349179c89fd7be0: hw/display/bcm2835_fb: Silence Coverity

[Qemu-devel] [PULL 16/33] target/arm: Rewrite vector gather loads

2018-10-08 Thread Peter Maydell
From: Richard Henderson This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson Message-id:

[Qemu-devel] [PULL 15/33] target/arm: Split contiguous stores for endianness

2018-10-08 Thread Peter Maydell
From: Richard Henderson We can choose the endianness at translation time, rather than re-computing it at execution time. Tested-by: Laurent Desnogues Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-id: 20181005175350.30752-12-richard.hender...@linaro.org

[Qemu-devel] [PULL 09/33] target/arm: Adjust aarch64_cpu_dump_state for system mode SVE

2018-10-08 Thread Peter Maydell
From: Richard Henderson Use the existing helpers to determine if (1) the fpu is enabled, (2) sve state is enabled, and (3) the current sve vector length. Tested-by: Laurent Desnogues Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson Message-id:

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add support for selecting the Memory Region that the GEM > will do DMA to. > > Signed-off-by: Edgar E. Iglesias > --- > hw/net/cadence_gem.c | 63 > >

[Qemu-devel] [PULL 22/33] target/arm: Move v7m_using_psp() to internals.h

2018-10-08 Thread Peter Maydell
We're going to want v7m_using_psp() in op_helper.c in the next patch, so move it from helper.c to internals.h. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20181002163556.10279-4-peter.mayd...@linaro.org --- target/arm/internals.h

[Qemu-devel] [PATCH 0/2] i386/kvm: enable Hyper-V PV IPI mechanism

2018-10-08 Thread Vitaly Kuznetsov
Hyper-V PV IPI enlightenment was merged to KVM (kvm/queue currently). Support the feature enablement in Qemu. Vitaly Kuznetsov (2): linux-headers: update to pre-4.20 (kvm/queue) i386/kvm: add support for Hyper-V IPI send linux-headers/linux/kvm.h | 7 +-- target/i386/cpu.c |

Re: [Qemu-devel] [RFC PATCH 19/21] plugins: add an example hotblocks plugin

2018-10-08 Thread Pavel Dovgalyuk
I guess this one is too tcg-dependent. It count TB's, but breaking code into TBs may depend on many things, like breakpoints, record/replay, ... I mean that this measuring approach may be used only in some specific cases, and not ok as an example. Pavel Dovgalyuk > -Original Message- >

Re: [Qemu-devel] [PATCH v4 10/10] qmp: common 'id' handling & make QGA conform to QMP spec

2018-10-08 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > > On Sat, Sep 1, 2018 at 4:06 PM Marc-André Lureau > wrote: >> >> On Sat, Sep 1, 2018 at 12:59 PM, Markus Armbruster wrote: >> > Marc-André Lureau writes: >> > >> >> Let qmp_dispatch() copy the 'id' field. That way any qmp client will >> >> conform to the

Re: [Qemu-devel] [PATCH v3 3/4] cputlb: serialize tlb updates with env->tlb_lock

2018-10-08 Thread Alex Bennée
Emilio G. Cota writes: > Currently we rely on atomic operations for cross-CPU invalidations. > There are two cases that these atomics miss: cross-CPU invalidations > can race with either (1) vCPU threads flushing their TLB, which > happens via memset, or (2) vCPUs calling tlb_reset_dirty on

Re: [Qemu-devel] [PATCH] target/i386: kvm: just return after migrate_add_blocker failed

2018-10-08 Thread Dr. David Alan Gilbert
* Li Qiang (liq...@163.com) wrote: > When migrate_add_blocker failed, the invtsc_mig_blocker is not > appended so no need to remove. This can save several instructions. > > Signed-off-by: Li Qiang > --- > target/i386/kvm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PULL 0/3] Slirp updates

2018-10-08 Thread Peter Maydell
On 7 October 2018 at 19:05, Samuel Thibault wrote: > The following changes since commit 3c2d3042849686969add641bd38b08b9877b9e8f: > > Merge remote-tracking branch > 'remotes/mcayland/tags/qemu-openbios.for-upstream-20181005' into staging > (2018-10-05 17:55:22 +0100) > > are available in the

Re: [Qemu-devel] [PATCH] tests: remove gcov-files- variables

2018-10-08 Thread Alex Bennée
Paolo Bonzini writes: > Commit 31d2dda ("build-system: remove per-test GCOV reporting", 2018-06-20) > removed users of the variables, since those uses can be replaced by a simple > overall report produced by gcovr. However, the variables were never removed. > Do it now. > > Signed-off-by:

Re: [Qemu-devel] [PATCH v4 09/10] qga: process_event() simplification

2018-10-08 Thread Markus Armbruster
Marc-André Lureau writes: > Hi > On Thu, Aug 30, 2018 at 6:03 PM Markus Armbruster wrote: >> >> Marc-André Lureau writes: >> >> > Simplify the code around qmp_dispatch(): >> > - rely on qmp_dispatch/check_obj() for message checking >> > - have a single send_response() point >> > - constify

Re: [Qemu-devel] [PATCH v2 5/6] qapi: add block-dirty-bitmap-merge

2018-10-08 Thread Vladimir Sementsov-Ogievskiy
20.09.2018 22:40, Eric Blake wrote: > [reviving an old patch] > > On 1/16/18 6:54 AM, Vladimir Sementsov-Ogievskiy wrote: >> Signed-off-by: Vladimir Sementsov-Ogievskiy >> --- >>   qapi/block-core.json | 38 >> ++ >>   include/block/dirty-bitmap.h |  2

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-08 Thread David Hildenbrand
> That way using [2] and [1 - modulo it should match only concrete type] > machine would be able to override hotplug handlers for TYPE_VIRTIO_PMEM_PCI > and explicitly call machine + pci hotplug handlers in necessary order. > > flow would look like: > [acpi|shcp|native pci-e eject]-> >

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-08 Thread Igor Mammedov
On Mon, 8 Oct 2018 13:47:53 +0200 David Hildenbrand wrote: > > That way using [2] and [1 - modulo it should match only concrete type] > > machine would be able to override hotplug handlers for TYPE_VIRTIO_PMEM_PCI > > and explicitly call machine + pci hotplug handlers in necessary order. > > >

Re: [Qemu-devel] [PATCH v1 06/12] net: cadence_gem: Add support for selecting the DMA MemoryRegion

2018-10-08 Thread Peter Maydell
On 6 October 2018 at 00:14, Philippe Mathieu-Daudé wrote: > Hi Edgar, > > On 03/10/2018 17:07, Edgar E. Iglesias wrote: >> From: "Edgar E. Iglesias" >> >> Add support for selecting the Memory Region that the GEM >> will do DMA to. >> @@ -1500,6 +1506,13 @@ static void gem_realize(DeviceState

Re: [Qemu-devel] [PATCH v1 10/12] target/arm: Add the Cortex-A72

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > From: "Edgar E. Iglesias" > > Add the ARM Cortex-A72. > > Signed-off-by: Edgar E. Iglesias > --- > target/arm/cpu64.c | 59 > ++ > 1 file changed, 59 insertions(+) > > diff --git

[Qemu-devel] [PULL 12/33] target/arm: Rewrite helper_sve_ld[234]*_r

2018-10-08 Thread Peter Maydell
From: Richard Henderson Use the same *_tlb primitives as we use for ld1. For linux-user, this hoists the set of helper_retaddr. For softmmu, hoists the computation of the current mmu_idx outside the loop, fixes the endianness problem, and moves the main loop out of a macro and into an inlined

[Qemu-devel] [PULL 20/33] target/arm: Define new TBFLAG for v8M stack checking

2018-10-08 Thread Peter Maydell
The Arm v8M architecture includes hardware stack limit checking. When certain instructions update the stack pointer, if the new value of SP is below the limit set in the associated limit register then an exception is taken. Add a TB flag that tracks whether the limit-checking code needs to be

[Qemu-devel] [PULL 23/33] target/arm: Add v8M stack checks on ADD/SUB/MOV of SP

2018-10-08 Thread Peter Maydell
Add code to insert calls to a helper function to do the stack limit checking when we handle these forms of instruction that write to SP: * ADD (SP plus immediate) * ADD (SP plus register) * SUB (SP minus immediate) * SUB (SP minus register) * MOV (register) Signed-off-by: Peter Maydell

Re: [Qemu-devel] [PATCH v4 7/8] file-posix: account discard operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:52 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> This will help to identify how many of the user-issued discard operations >> (accounted on a device level) have actually suceeded down on the host file >> (even though the numbers will not be

Re: [Qemu-devel] [PULL 0/8] softfloat queue

2018-10-08 Thread Peter Maydell
On 5 October 2018 at 19:01, Richard Henderson wrote: > The following changes since commit ae7a4c0a4604bcfed40170db6cca576c44d872a2: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20181004' into > staging (2018-10-05 16:05:06 +0100) > > are available in the Git repository at: > >

[Qemu-devel] [PULL 08/33] target/arm: Handle SVE vector length changes in system mode

2018-10-08 Thread Peter Maydell
From: Richard Henderson SVE vector length can change when changing EL, or when writing to one of the ZCR_ELn registers. For correctness, our implementation requires that predicate bits that are inaccessible are never set. Which means noticing length changes and zeroing the appropriate register

[Qemu-devel] [PULL 19/33] target/arm: Pass TCGMemOpIdx to sve memory helpers

2018-10-08 Thread Peter Maydell
From: Richard Henderson There is quite a lot of code required to compute cpu_mem_index, or even put together the full TCGMemOpIdx. This can easily be done at translation time. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson Message-id:

[Qemu-devel] [PULL 10/33] target/arm: Clear unused predicate bits for LD1RQ

2018-10-08 Thread Peter Maydell
From: Richard Henderson The 16-byte load only uses 16 predicate bits. But while reusing the other load infrastructure, we find other bits that are set and trigger an assert. To avoid this and retain the assert, zero-extend the predicate that we pass to the LD1 helper. Tested-by: Laurent

[Qemu-devel] [PULL 03/33] target/arm: Correct condition for v8M callee stack push

2018-10-08 Thread Peter Maydell
In v7m_exception_taken() we were incorrectly using a "LR bit EXCRET.ES is 1" check when it should be 0 (compare the pseudocode ExceptionTaken() function). This meant we didn't stack the callee-saved registers when tailchaining from a NonSecure to a Secure exception. Cc: qemu-sta...@nongnu.org

Re: [Qemu-devel] [PATCH v2 4/7] target/mips: Add bit definitions for DSP R3 ASE

2018-10-08 Thread Aleksandar Markovic
> From: Stefan Markovic > > Add DSP R3 ASE related bit definition for insn_flags and hflags. > > Signed-off-by: Aleksandar Markovic This should be integrated with other pending insn_flags cleanups. hflags need cleaning too, but this is not planned this year. Any such cleanup should be

[Qemu-devel] [PULL 25/33] target/arm: Add v8M stack checks on exception entry

2018-10-08 Thread Peter Maydell
Add checks for breaches of the v8M stack limit when the stack pointer is decremented to push the exception frame for exception entry. Note that the exception-entry case is unique in that the stack pointer is updated to be the limit value if the limit is hit (per rule R_ZLZG). Signed-off-by:

Re: [Qemu-devel] [RFC 6/6] cputlb: dynamically resize TLBs based on use rate

2018-10-08 Thread Emilio G. Cota
On Sun, Oct 07, 2018 at 21:48:34 -0400, Emilio G. Cota wrote: > - 70/40% use rate for growing/shrinking the TLB does not > seem a great choice, if one wants to avoid a pathological > case that can induce constant resizing. Imagine we got > exactly 70% use rate, and all TLB misses were

[Qemu-devel] [PULL 27/33] target/arm: Add v8M stack checks for LDRD/STRD (imm)

2018-10-08 Thread Peter Maydell
Add the v8M stack checks for: * LDRD (immediate) * STRD (immediate) Loads and stores are more complicated than ADD/SUB/MOV, because we must ensure that memory accesses below the stack limit are not performed, so we can't simply do the check when we actually update SP. For these instructions,

Re: [Qemu-devel] [RFC PATCH 00/21] Trace updates and plugin RFC

2018-10-08 Thread Alex Bennée
Emilio G. Cota writes: > On Mon, Oct 08, 2018 at 11:28:38 +0100, Alex Bennée wrote: >> Emilio G. Cota writes: >> > Again, for performance you'd avoid the tracepoint (i.e. calling >> > a helper to call another function) and embed directly the >> > callback from TCG. Same thing applies to TB's.

[Qemu-devel] [PULL 06/33] target/arm: Adjust sve_exception_el

2018-10-08 Thread Peter Maydell
From: Richard Henderson Check for EL3 before testing CPTR_EL3.EZ. Return 0 when the exception should be routed via AdvSIMDFPAccessTrap. Mirror the structure of CheckSVEEnabled more closely. Fixes: 5be5e8eda78 Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Tony Krowiak
On 10/08/2018 10:35 AM, Cornelia Huck wrote: On Mon, 8 Oct 2018 16:22:27 +0200 David Hildenbrand wrote: On 08/10/2018 16:20, Tony Krowiak wrote: On 09/27/2018 08:52 AM, Cornelia Huck wrote: On Thu, 27 Sep 2018 14:29:01 +0200 Thomas Huth wrote: On 2018-09-27 00:54, Tony Krowiak wrote:

[Qemu-devel] [PATCH v3 00/12] Misc MIPS fixes and improvements for October 2018

2018-10-08 Thread Aleksandar Markovic
From: Aleksandar Markovic This series contains support for MIPS ABI flags in elf.h, DSP R3 availability control, and emulation of nanoMIPS EVA instructions. MIPS ABI flags will be used in near future for linux user mode support for certain MIPS-specific parts of prctl() system call. This series

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Kevin Wolf
Am 08.10.2018 um 16:38 hat Anton Nefedov geschrieben: > On 4/10/2018 6:33 PM, Kevin Wolf wrote: > > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: > >> Signed-off-by: Anton Nefedov > >> Reviewed-by: Alberto Garcia > >> --- > >> hw/ide/core.c | 12 > >> 1 file changed, 12

[Qemu-devel] [PATCH v3 02/12] elf: Add MIPS_ABI_FP_XXX constants

2018-10-08 Thread Aleksandar Markovic
From: Stefan Markovic Add MIPS_ABI_FP_XXX constants to elf.h. The source of information is kernel header arch/mips/include/asm/elf.h. Signed-off-by: Stefan Markovic Signed-off-by: Aleksandar Markovic --- include/elf.h | 8 1 file changed, 8 insertions(+) diff --git a/include/elf.h

Re: [Qemu-devel] [PATCH 0/2] linux-user: usbfs improvements

2018-10-08 Thread Cortland Setlow Tölva
On Sun, Oct 7, 2018 at 11:59 PM Laurent Vivier wrote: > > Le 08/10/2018 à 06:27, Cortland Tölva a écrit : > > From: Cortland Setlow Tölva > > > > This patch series enables programs running under QEMU Linux user mode > > emulation to implement user-space USB drivers via the USBFS ioctl()s. > >

Re: [Qemu-devel] [PATCH] s390x/tcg: always enable AFP for linux-user

2018-10-08 Thread Richard Henderson
On 10/8/18 8:32 AM, David Hildenbrand wrote: > linux-user should always enable AFP, otherwise our emulated binary > might crash once it tries to make use of additional floating-point > registers or instructions. > > Cc: Peter Maydell > Cc: Alex Bennée > Fixes: db0504154e ("s390x/tcg: check for

[Qemu-devel] [PULL 14/33] target/arm: Split contiguous loads for endianness

2018-10-08 Thread Peter Maydell
From: Richard Henderson We can choose the endianness at translation time, rather than re-computing it at execution time. Tested-by: Laurent Desnogues Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson Message-id: 20181005175350.30752-11-richard.hender...@linaro.org

[Qemu-devel] [PULL 28/33] target/arm: Add v8M stack checks for Thumb2 LDM/STM

2018-10-08 Thread Peter Maydell
Add the v8M stack checks for: * LDM (T2 encoding) * STM (T2 encoding) This includes the 32-bit encodings of the instructions listed in v8M ARM ARM rule R_YVWT as * LDM, LDMIA, LDMFD * LDMDB, LDMEA * POP (multiple registers) * PUSH (muliple registers) * STM, STMIA, STMEA * STMDB, STMFD We

[Qemu-devel] [PULL 13/33] target/arm: Rewrite helper_sve_st[1234]*_r

2018-10-08 Thread Peter Maydell
From: Richard Henderson This fixes the endianness problem for softmmu, and moves the main loop out of a macro and into an inlined function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson Message-id:

[Qemu-devel] [PULL 02/33] virt: Suppress external aborts on virt-2.10 and earlier

2018-10-08 Thread Peter Maydell
In commit c79c0a314c43b78 we enabled emulation of external aborts when the guest attempts to access a physical address with no mapped device. In commit 4672cbd7bed88dc6 we suppress this for most legacy boards to prevent breakage of previously working guests, but we didn't suppress it in the 'virt'

[Qemu-devel] [PULL 18/33] target/arm: Rewrite vector gather first-fault loads

2018-10-08 Thread Peter Maydell
From: Richard Henderson This implements the feature for softmmu, and moves the main loop out of a macro and into a function. Reviewed-by: Peter Maydell Tested-by: Laurent Desnogues Signed-off-by: Richard Henderson Message-id: 20181005175350.30752-15-richard.hender...@linaro.org

[Qemu-devel] [PULL 04/33] target/arm: Don't read r4 from v8M exception stackframe twice

2018-10-08 Thread Peter Maydell
A cut-and-paste error meant we were reading r4 from the v8M callee-saves exception stack frame twice. This is harmless since it just meant we did two memory accesses to the same location, but it's unnecessary. Delete it. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé

Re: [Qemu-devel] [PATCH v4 18/24] qdev: hotplug: provide do_unplug handler

2018-10-08 Thread Igor Mammedov
On Mon, 8 Oct 2018 14:41:50 +0200 David Hildenbrand wrote: > On 08/10/2018 14:19, Igor Mammedov wrote: > > On Mon, 8 Oct 2018 13:47:53 +0200 > > David Hildenbrand wrote: > > > >>> That way using [2] and [1 - modulo it should match only concrete type] > >>> machine would be able to override

[Qemu-devel] [PULL 31/33] target/arm: Add v8M stack checks for VLDM/VSTM

2018-10-08 Thread Peter Maydell
Add the v8M stack checks for the VLDM/VSTM (aka VPUSH/VPOP) instructions. This code is currently unreachable because we haven't yet implemented M profile floating point support, but since the change is simple, we add it now because otherwise we're likely to forget to do it later. Signed-off-by:

Re: [Qemu-devel] [PATCH v2 5/7] target/mips: Add availability control for DSP R3 ASE

2018-10-08 Thread Aleksandar Markovic
> From: Stefan Markovic > > Add infrastructure for availability control for DSP R3 ASE MIPS instructions. Only BPOSGE32C currently belongs to DSP R3 ASE, but this is likely to be changed in near future. > > Signed-off-by: Aleksandar Markovic I think check_dspr3() should be check_dsp_r3(), but

Re: [Qemu-devel] [PATCH v3 3/4] cputlb: serialize tlb updates with env->tlb_lock

2018-10-08 Thread Emilio G. Cota
On Mon, Oct 08, 2018 at 14:57:18 +0100, Alex Bennée wrote: > Emilio G. Cota writes: > > The readers that do not hold tlb_lock must use atomic reads when > > reading .addr_write, since this field can be updated by other threads; > > the conversion to atomic reads is done in the next patch. > > We

Re: [Qemu-devel] [qemu-s390x] [PATCH v9 4/6] s390x/ap: base Adjunct Processor (AP) object model

2018-10-08 Thread Cornelia Huck
On Mon, 8 Oct 2018 16:22:27 +0200 David Hildenbrand wrote: > On 08/10/2018 16:20, Tony Krowiak wrote: > > On 09/27/2018 08:52 AM, Cornelia Huck wrote: > >> On Thu, 27 Sep 2018 14:29:01 +0200 > >> Thomas Huth wrote: > >> > >>> On 2018-09-27 00:54, Tony Krowiak wrote: > From: Tony

[Qemu-devel] [PULL 30/33] target/arm: Add v8M stack checks for Thumb push/pop

2018-10-08 Thread Peter Maydell
Add v8M stack checks for the 16-bit Thumb push/pop encodings: STMDB, STMFD, LDM, LDMIA, LDMFD. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Message-id: 20181002163556.10279-12-peter.mayd...@linaro.org --- target/arm/translate.c | 16

Re: [Qemu-devel] [PATCH v1 00/12] arm: Add first models of Xilinx Versal SoC

2018-10-08 Thread Peter Maydell
On 3 October 2018 at 16:07, Edgar E. Iglesias wrote: > In QEMU we'd like to have a virtual developer board with the Versal SoC > and a selected set of peripherals under the control of QEMU. > We'd like to gradually extend this board as QEMU gains more support > for Versal hardware components.

Re: [Qemu-devel] [PULL 00/33] target-arm queue

2018-10-08 Thread Peter Maydell
ing changes since commit 079911cb6e26898e16f5bb56ef4f9d33cf92d32d: > > Merge remote-tracking branch 'remotes/rth/tags/pull-fpu-20181005' into > staging (2018-10-08 12:44:35 +0100) > > are available in the Git repository at: > > https://git.linaro.org/people/pmaydell/qemu-arm.git > tags/pull-tar

Re: [Qemu-devel] [PATCH v4 3/8] ide: account UNMAP (TRIM) operations

2018-10-08 Thread Anton Nefedov
On 4/10/2018 6:33 PM, Kevin Wolf wrote: > Am 21.08.2018 um 11:46 hat Anton Nefedov geschrieben: >> Signed-off-by: Anton Nefedov >> Reviewed-by: Alberto Garcia >> --- >> hw/ide/core.c | 12 >> 1 file changed, 12 insertions(+) >> >> diff --git a/hw/ide/core.c b/hw/ide/core.c >>

  1   2   3   >