[Qemu-devel] Proper use of unnest-vars (was: [PATCH v5 00/18] qapi: add #if pre-processor conditions to generated code (part 3))

2019-02-14 Thread Markus Armbruster
Eric Blake writes: > On 2/14/19 9:24 AM, Markus Armbruster wrote: >> Diff from v4: >> > >> +++ b/qapi/Makefile.objs >> @@ -18,8 +18,9 @@ util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-visit-%.o) >> util-obj-y += qapi-emit-events.o >> util-obj-y += $(QAPI_COMMON_MODULES:%=qapi-events-%.o) >> >>

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-14 Thread Yi Sun
On 19-02-15 13:39:05, Peter Xu wrote: > On Fri, Feb 15, 2019 at 01:22:34PM +0800, Yi Sun wrote: > > [...] > > > > > +/* TODO: read cap/ecap from host to decide which cap to be > > > > exposed. */ > > > > +if (s->scalable_mode) { > > > > +if (!s->caching_mode) { > > > > +

Re: [Qemu-devel] Object instantiation vs. device realization: what to do when?

2019-02-14 Thread Thomas Huth
On 14/02/2019 17.33, Peter Maydell wrote: > On Thu, 14 Feb 2019 at 16:21, Markus Armbruster wrote: >> >> One of qdev's perennial sources of confusion is what to do at object >> instantiation time, i.e. in TypeInfo::instance_init(), and what to do at >> device realization time, i.e. in

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-14 Thread Peter Xu
On Fri, Feb 15, 2019 at 01:22:34PM +0800, Yi Sun wrote: [...] > > > +/* TODO: read cap/ecap from host to decide which cap to be exposed. > > > */ > > > +if (s->scalable_mode) { > > > +if (!s->caching_mode) { > > > +error_report("Need to set caching-mode for scalable

Re: [Qemu-devel] [RFC v1 3/3] intel_iommu: add scalable-mode option to make scalable mode work

2019-02-14 Thread Yi Sun
On 19-02-12 14:46:29, Peter Xu wrote: [...] > > diff --git a/hw/i386/intel_iommu.c b/hw/i386/intel_iommu.c > > index 3664a00..447fdf3 100644 > > --- a/hw/i386/intel_iommu.c > > +++ b/hw/i386/intel_iommu.c > > @@ -2492,6 +2492,17 @@ static bool vtd_process_inv_desc(IntelIOMMUState *s) > >

Re: [Qemu-devel] [PATCH qemu v2 2/4] vfio/spapr: Rename local systempagesize variable

2019-02-14 Thread Alexey Kardashevskiy
On 15/02/2019 14:57, David Gibson wrote: > On Fri, Feb 15, 2019 at 02:37:55PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 15/02/2019 14:32, David Gibson wrote: >>> On Thu, Feb 14, 2019 at 04:21:42PM +1100, Alexey Kardashevskiy wrote: The "systempagesize" name suggests that it is the

Re: [Qemu-devel] [PATCH qemu v2 4/4] spapr: Support NVIDIA V100 GPU with NVLink2

2019-02-14 Thread Alexey Kardashevskiy
On 15/02/2019 14:22, David Gibson wrote: > On Thu, Feb 14, 2019 at 04:21:44PM +1100, Alexey Kardashevskiy wrote: >> NVIDIA V100 GPUs have on-board RAM which is mapped into the host memory >> space and accessible as normal RAM via an NVLink bus. The VFIO-PCI driver >> implements special regions

Re: [Qemu-devel] [PATCH v2 0/9] vhost: enable for all targets

2019-02-14 Thread Michael S. Tsirkin
On Thu, Feb 14, 2019 at 09:37:42PM +0100, Paolo Bonzini wrote: > On 14/02/19 20:28, Michael S. Tsirkin wrote: > > On Thu, Feb 14, 2019 at 06:35:47PM +0100, Paolo Bonzini wrote: > >> See also "[PATCH for-3.2 00/10] vhost: preparation for qgraph > >> conversion of vhost-user-test". Some of the

Re: [Qemu-devel] [PATCH v1] tests: Add a simple device_del test for PCI devices

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 06:11:28PM +0100, David Hildenbrand wrote: > The issue with testing asynchronous unplug requests it that they usually > require a running guest to handle the request. However, to test if > unplug of PCI devices works, we can apply a nice little trick on some >

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alexey Kardashevskiy
On 15/02/2019 14:54, David Gibson wrote: > On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote: >> >> >> On 15/02/2019 14:24, David Gibson wrote: >>> On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote: On 15/02/2019 10:37, Alex Williamson wrote:

Re: [Qemu-devel] [PATCH v3 0/9] Network announce changes

2019-02-14 Thread Jason Wang
On 2019/2/15 上午4:29, Dr. David Alan Gilbert wrote: * Jason Wang (jasow...@redhat.com) wrote: On 2019/2/7 上午7:35, Michael S. Tsirkin wrote: On Wed, Feb 06, 2019 at 11:00:35AM +, Dr. David Alan Gilbert (git) wrote: From: "Dr. David Alan Gilbert" Hi, This is a reworking of a few sets

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread David Gibson
On Fri, Feb 15, 2019 at 02:32:14PM +1100, Alexey Kardashevskiy wrote: > > > On 15/02/2019 14:24, David Gibson wrote: > > On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote: > >> > >> > >> On 15/02/2019 10:37, Alex Williamson wrote: > >>> On Thu, 14 Feb 2019 16:21:40 +1100 > >>>

Re: [Qemu-devel] [PATCH qemu v2 2/4] vfio/spapr: Rename local systempagesize variable

2019-02-14 Thread David Gibson
On Fri, Feb 15, 2019 at 02:37:55PM +1100, Alexey Kardashevskiy wrote: > > > On 15/02/2019 14:32, David Gibson wrote: > > On Thu, Feb 14, 2019 at 04:21:42PM +1100, Alexey Kardashevskiy wrote: > >> The "systempagesize" name suggests that it is the host system page size > >> while it is the

Re: [Qemu-devel] [PATCH qemu v2 1/4] vfio/spapr: Fix indirect levels calculation

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 04:21:41PM +1100, Alexey Kardashevskiy wrote: > The current code assumes that we can address more bits on a PCI bus > for DMA than we really can but there is no way knowing the actual limit. > > This makes a better guess for the number of levels and if the kernel > fails

Re: [Qemu-devel] [PATCH qemu v2 4/4] spapr: Support NVIDIA V100 GPU with NVLink2

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 04:21:44PM +1100, Alexey Kardashevskiy wrote: > NVIDIA V100 GPUs have on-board RAM which is mapped into the host memory > space and accessible as normal RAM via an NVLink bus. The VFIO-PCI driver > implements special regions for such GPUs and emulates an NVLink bridge. >

Re: [Qemu-devel] [PATCH qemu v2 2/4] vfio/spapr: Rename local systempagesize variable

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 04:21:42PM +1100, Alexey Kardashevskiy wrote: > The "systempagesize" name suggests that it is the host system page size > while it is the smallest page size of memory backing the guest RAM so > let's rename it to stop confusion. This should cause no behavioral change. > >

Re: [Qemu-devel] [PATCH qemu v2 2/4] vfio/spapr: Rename local systempagesize variable

2019-02-14 Thread Alexey Kardashevskiy
On 15/02/2019 14:32, David Gibson wrote: > On Thu, Feb 14, 2019 at 04:21:42PM +1100, Alexey Kardashevskiy wrote: >> The "systempagesize" name suggests that it is the host system page size >> while it is the smallest page size of memory backing the guest RAM so >> let's rename it to stop

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 04:37:43PM -0700, Alex Williamson wrote: > On Thu, 14 Feb 2019 16:21:40 +1100 > Alexey Kardashevskiy wrote: > > > This is for passing through NVIDIA V100 GPUs on POWER9 systems. > > > > This implements a subdriver for NVIDIA V100 GPU with coherent memory and > > NPU/ATS

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread David Gibson
On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote: > > > On 15/02/2019 10:37, Alex Williamson wrote: > > On Thu, 14 Feb 2019 16:21:40 +1100 > > Alexey Kardashevskiy wrote: > > > >> This is for passing through NVIDIA V100 GPUs on POWER9 systems. > >> > >> This implements a

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alexey Kardashevskiy
On 15/02/2019 14:24, David Gibson wrote: > On Fri, Feb 15, 2019 at 11:35:02AM +1100, Alexey Kardashevskiy wrote: >> >> >> On 15/02/2019 10:37, Alex Williamson wrote: >>> On Thu, 14 Feb 2019 16:21:40 +1100 >>> Alexey Kardashevskiy wrote: >>> This is for passing through NVIDIA V100 GPUs on

Re: [Qemu-devel] [PATCH] scsi-cd: Fix crash after remote cdrom detached

2019-02-14 Thread Zheng Xiang
Hi Paolo, On 2019/2/15 2:07, Paolo Bonzini wrote: > On 14/02/19 13:27, Xiang Zheng wrote: >> There is a small window between the twice blk_is_available in >> scsi_disk_emulate_command which would cause crash due to the later >> assertion if the remote cdrom is detached in this window. >> >> So

[Qemu-devel] [Bug 1815993] [NEW] drive-backup with iscsi will cause vm disk no response

2019-02-14 Thread Cheng Chen
Public bug reported: virsh qemu-monitor-command ${DOMAIN} '{ "execute" : "drive-backup" , "arguments" : { "device" : "drive-virtio-disk0" , "sync" : "top" , "target" : "iscsi://192.168.1.100:3260/iqn.2019-01.com.iaas/0" } }' When the drive-backup is running, I manually crash the iscsi server(or

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/27] target-arm queue Message-id:

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH] migration/rdma: Fix qemu_rdma_cleanup null check

2019-02-14 Thread Peter Xu
On Thu, Feb 14, 2019 at 06:53:51PM +, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > If the migration fails before the channel is open (e.g. a bad > address) we end up in the cleanup with rdma->channel==NULL. > > Spotted by Coverity: CID 1398634 > Fixes:

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/27] target-arm queue Message-id:

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-14 Thread BALATON Zoltan
On Thu, 14 Feb 2019, Peter Maydell wrote: The OSX Mojave release is more picky about enforcing the Cocoa API restriction that only the main thread may perform UI calls. To accommodate this we need to restructure the Cocoa code: * the special OSX main() creates a second thread and uses that to

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/27] target-arm queue Message-id:

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH v2 0/7] ui/cocoa: Use OSX's main loop

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214102816.3393-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214102816.3393-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PATCH v2 0/7] ui/cocoa: Use

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

[Qemu-devel] [PATCH] ui/cocoa: Make sure app is not starting in the background

2019-02-14 Thread BALATON Zoltan
Activate app to make sure the window is brought to front e.g. when started from a terminal window. Signed-off-by: BALATON Zoltan --- This is on top of Peter's patches. ui/cocoa.m | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index

Re: [Qemu-devel] [PATCH v2 7/7] ui/cocoa: Perform UI operations only on the main thread

2019-02-14 Thread BALATON Zoltan
On Thu, 14 Feb 2019, Peter Maydell wrote: The OSX Mojave release is more picky about enforcing the Cocoa API restriction that only the main thread may perform UI calls. To accommodate this we need to restructure the Cocoa code: * the special OSX main() creates a second thread and uses that to

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/27] target-arm queue Message-id:

Re: [Qemu-devel] [PATCH 2/2] pcie: Don't allow extended config space access via conventional PCI bridges

2019-02-14 Thread David Gibson
On Thu, Feb 14, 2019 at 05:04:03PM +1100, Alexey Kardashevskiy wrote: > > > On 14/02/2019 16:08, David Gibson wrote: > > In hardware it's possible, if odd, to have a configuration like: > > > > PCIe host bridge > > \- PCIe to PCI bridge > >\- PCI to PCIe bridge > > \- PCIe device > >

Re: [Qemu-devel] [PATCH v2] ppc: add host-serial and host-model machine attributes

2019-02-14 Thread David Gibson
On Fri, Feb 15, 2019 at 12:57:35AM +0530, P J P wrote: > +-- On Wed, 13 Feb 2019, David Gibson wrote --+ > | > + > | > +object_class_property_add_str(oc, "host-serial", > | > +machine_get_host_serial, machine_set_host_serial, > | > +_abort); > | > +

Re: [Qemu-devel] [PATCH v2 5/7] ui/cocoa: Don't call NSApp sendEvent directly from handleEvent

2019-02-14 Thread BALATON Zoltan
On Thu, 14 Feb 2019, Peter Maydell wrote: > On Thu, 14 Feb 2019 at 17:04, BALATON Zoltan wrote: >>> -- (void) handleEvent:(NSEvent *)event >>> +- (bool) handleEvent:(NSEvent *)event >>> { >>> -with_iothread_lock(^{ >>> -[self handleEventLocked:event]; >>> +return

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alexey Kardashevskiy
On 15/02/2019 10:37, Alex Williamson wrote: > On Thu, 14 Feb 2019 16:21:40 +1100 > Alexey Kardashevskiy wrote: > >> This is for passing through NVIDIA V100 GPUs on POWER9 systems. >> >> This implements a subdriver for NVIDIA V100 GPU with coherent memory and >> NPU/ATS support available in

Re: [Qemu-devel] [PATCH v2 4/7] ui/cocoa: Move console/device menu creation code up in file

2019-02-14 Thread BALATON Zoltan
On Thu, 14 Feb 2019, Peter Maydell wrote: Move the console/device menu creation code functions further up in the source file, next to the code which creates the initial menus. We're going to want to change the location we call these functions from in the next patch. This commit is a pure code

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Subject: [Qemu-devel] [PULL 00/27] target-arm queue Message-id:

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [Bug 1815078] Re: Qemu 3.1.0 risc-v mie.MEIE

2019-02-14 Thread Alistair Francis
On Wed, Feb 13, 2019 at 11:02 PM RTOS Pharos <1815...@bugs.launchpad.net> wrote: > > So I tried it but got the error: > > ERROR: missing file ../qemu-3.1.0/ui/keycodemapdb/README > > This is not a GIT checkout but module content appears to > be missing. Do not use 'git archive' or GitHub download

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH qemu] pci: Move NVIDIA vendor id to the rest of ids

2019-02-14 Thread Alex Williamson
On Thu, 14 Feb 2019 16:14:40 +1100 Alexey Kardashevskiy wrote: > sPAPR code will use it too so move it from VFIO to the common code. > > Signed-off-by: Alexey Kardashevskiy > Reviewed-by: David Gibson > Reviewed-by: Alistair Francis > --- > > Previous version was RFC, this is is not. I

Re: [Qemu-devel] [PATCH] target-i386: Enhance the stub for kvm_arch_get_supported_cpuid()

2019-02-14 Thread Kamil Rytarowski
On 14.02.2019 21:51, Paolo Bonzini wrote: > On 14/02/19 20:41, Kamil Rytarowski wrote: >> Please do replace the current kludge that is sensitive to: >> - compiler behavior that can change with new versions >> - compiler gcc/clang >> - optimization options > > Not really, any half-decent

Re: [Qemu-devel] [PATCH qemu v2 0/4] spapr_pci, vfio: NVIDIA V100 + POWER9 passthrough

2019-02-14 Thread Alex Williamson
On Thu, 14 Feb 2019 16:21:40 +1100 Alexey Kardashevskiy wrote: > This is for passing through NVIDIA V100 GPUs on POWER9 systems. > > This implements a subdriver for NVIDIA V100 GPU with coherent memory and > NPU/ATS support available in the POWER9 CPU. > > 1/4 is a preparation for bigger DMA

[Qemu-devel] [PATCH 00/13] target/xtensa: add FLIX support

2019-02-14 Thread Max Filippov
Hello, this series adds limited support for FLIX instructions. FLIX (flexible length instruction extensions) allows bundling multiple opcodes in a single instruction. Each opcode is executed as if it was the only opcode in the instruction. Opcodes may not simultaneously modify same resource

[Qemu-devel] [PATCH 06/13] target/xtensa: add generic instruction post-processing

2019-02-14 Thread Max Filippov
Some opcodes may need additional actions at every exit from the translated instruction or may need to amend TB exit slots available to jumps generated for the instruction. Add gen_postprocess function and call it from the gen_jump_slot and from the disas_xtensa_insn. Signed-off-by: Max Filippov

Re: [Qemu-devel] [PULL 3/3] blockdev: acquire aio_context for bitmap add/remove

2019-02-14 Thread John Snow
On 2/14/19 10:46 AM, Eric Blake wrote: > On 2/13/19 5:49 PM, John Snow wrote: >> When bitmaps are persistent, they may incur a disk read or write when bitmaps >> are added or removed. For configurations like virtio-dataplane, failing to >> acquire this lock will abort QEMU when disk IO occurs.

[Qemu-devel] [PATCH 02/13] target/xtensa: don't require opcode table sorting

2019-02-14 Thread Max Filippov
Requirement for alphabetical opcode sorting in opcode tables is awkward and does not allow sharing implementation between multiple opcodes. Use hash tables to find opcodes by name. Move implementation from the translate.c to the helper.c to its only user and remove declaration from the cpu.h

[Qemu-devel] [PATCH 05/13] target/xtensa: sort FLIX instruction opcodes

2019-02-14 Thread Max Filippov
Opcodes in different slots may read and write same resources (registers, states). In the absence of resource dependency loops it must be possible to sort opcodes to avoid interference. Record resources used by each opcode in the bundle. Build opcode dependency graph and use topological sort to

[Qemu-devel] [PATCH 03/13] target/xtensa: allow multiple names for single opcode

2019-02-14 Thread Max Filippov
There are opcodes that differ only in encoding or possible range of immediate arguments. Allow multiple names for single opcode translation table entry to reduce code duplication in that case. Signed-off-by: Max Filippov --- target/xtensa/cpu.h | 4 +- target/xtensa/helper.c| 16

[Qemu-devel] [PATCH 07/13] target/xtensa: move WINDOW_BASE SR update to postprocessing

2019-02-14 Thread Max Filippov
Opcodes that modify WINDOW_BASE SR don't have dependency on opcodes that use windowed registers. If such opcodes are combined in a single instruction they may not be correctly ordered. Instead of adding said dependency use temporary register to store changed WINDOW_BASE value and do actual

[Qemu-devel] [PATCH 01/13] target/xtensa: move xtensa_finalize_config to xtensa_core_class_init

2019-02-14 Thread Max Filippov
Don't run xtensa_finalize_config at the time of core registration, instead run it at the CPU class initialization. Signed-off-by: Max Filippov --- target/xtensa/cpu.h | 1 - target/xtensa/helper.c | 36 +++- target/xtensa/overlay_tool.h | 1 - 3

[Qemu-devel] [PATCH 08/13] target/xtensa: only rotate window in the retw helper

2019-02-14 Thread Max Filippov
Move return address calculation and WINDOW_START adjustment out of the retw helper to simplify logic a bit and avoid using registers directly. Pass a0 as a parameter to the helper. Signed-off-by: Max Filippov --- target/xtensa/helper.h | 2 +- target/xtensa/translate.c | 9 +++--

[Qemu-devel] [PATCH 09/13] target/xtensa: reorganize register handling in translators

2019-02-14 Thread Max Filippov
To support circular register dependencies in FLIX bundles opcode inputs and outputs must be separate and adjustable. Circular dependencies can be broken by making temporary copies of opcode inputs and substituting them into the arguments array instead of the original registers. E.g. the circular

[Qemu-devel] [PATCH 10/13] target/xtensa: reorganize access to MAC16 registers

2019-02-14 Thread Max Filippov
libisa represents MAC16 registers m0..m3 as an MR register file. Add this register file and reference its registers directly from the translate_mac16. Drop translator parameter that indicates whether opcode argument is in ar or in mr. Signed-off-by: Max Filippov --- target/xtensa/translate.c |

[Qemu-devel] [PATCH 04/13] target/xtensa: implement wide branches and loops

2019-02-14 Thread Max Filippov
FLIX adds branch and loop instruction variants with 15- and 18-bit wide target offset. Implement them as additional names for the ordinary branch/loop opcodes. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 129 -- 1 file changed, 102

[Qemu-devel] [PATCH 13/13] target/xtensa: prioritize load/store in FLIX bundles

2019-02-14 Thread Max Filippov
Load/store opcodes may raise MMU exceptions. Normally exceptions should be checked in priority order before any actual operations, but since MMU exceptions are tightly coupled with actual memory access, there's currently no way to do it. Approximate this behavior by executing all load, then all

[Qemu-devel] [PATCH 11/13] target/xtensa: reorganize access to boolean registers

2019-02-14 Thread Max Filippov
libisa represents boolean registers b0..b16 as a BR register file and as BR4 and BR8 register groups. Add these register files and use OpcodeArg::{in,out} parameters to access boolean registers in translators. Signed-off-by: Max Filippov --- target/xtensa/translate.c | 50

[Qemu-devel] [PATCH 12/13] target/xtensa: break circular register dependencies

2019-02-14 Thread Max Filippov
Currently topologic opcode sorting stops at the first detected dependency loop. Introduce struct opcode_arg_copy that describes temporary register copy. Scan remaining opcodes searching for dependencies that can be broken, break them by introducing temporary register copies and record them in an

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH] hw/block: report when pflash backing file isn't aligned

2019-02-14 Thread Alex Bennée
Laszlo Ersek writes: > On 02/14/19 16:57, Alex Bennée wrote: >> It looks like there was going to be code to check we had some sort of >> alignment so lets replace it with an actual check. This is a bit more >> useful than the enigmatic "failed to read the initial flash content" >> when we

[Qemu-devel] [PATCH] lsi: implement basic SBCL functionality

2019-02-14 Thread Sven Schnelle
HP-UX checks this register after sending data to the target. If there's no valid information present, it assumes the client disconnected because the kernel sent to much data. Implement at least some of the SBCL functionality that is possible without having a real SCSI bus. Signed-off-by: Sven

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH v2 0/3] target/arm: Implement ARMv8.3-JSConv

2019-02-14 Thread Richard Henderson
On 2/14/19 1:10 PM, Richard Henderson wrote: > On 2/14/19 5:53 AM, Peter Maydell wrote: >> On Wed, 6 Feb 2019 at 05:29, Richard Henderson >> wrote: >>> >>> Changes since v1: >>> * Typo fixed in patch 2, which had scrogged FMOV >>> * Return 0 for NaN, as for any other ARM fp conversion. >>>

Re: [Qemu-devel] [PATCH v2 0/3] target/arm: Implement ARMv8.3-JSConv

2019-02-14 Thread Richard Henderson
On 2/14/19 5:53 AM, Peter Maydell wrote: > On Wed, 6 Feb 2019 at 05:29, Richard Henderson > wrote: >> >> Changes since v1: >> * Typo fixed in patch 2, which had scrogged FMOV >> * Return 0 for NaN, as for any other ARM fp conversion. >> >> >> r~ >> >> >> Richard Henderson (3): >>

[Qemu-devel] [PATCH v3 3/3] target/arm: Implement ARMv8.3-JSConv

2019-02-14 Thread Richard Henderson
Signed-off-by: Richard Henderson --- v2: Return 0 for NaN v3: Return aa32 flags in FPSCR.NZCV. --- target/arm/cpu.h | 10 + target/arm/helper.h| 3 ++ target/arm/cpu.c | 1 + target/arm/cpu64.c | 2 + target/arm/translate-a64.c | 26 +++

Re: [Qemu-devel] [PATCH v2 1/9] ccid-card-passthru: Move assertion in read() to can_read()

2019-02-14 Thread Eric Blake
On 2/14/19 2:19 PM, Philippe Mathieu-Daudé wrote: > chardev::read() depends of what chardev::can_read() returns, move the s/of/on/ > assertion to can_read(). > > Suggested-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/usb/ccid-card-passthru.c | 5 ++--- > 1 file

Re: [Qemu-devel] [PATCH v2 7/9] ccid-card-passthru: Use QERR_MISSING_PARAMETER

2019-02-14 Thread Eric Blake
On 2/14/19 2:19 PM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/usb/ccid-card-passthru.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c > index 6cb8b2d26b..d63aa28584

[Qemu-devel] [PATCH v3 1/3] target/arm: Split out vfp_helper.c

2019-02-14 Thread Richard Henderson
Move all of the fp helpers out of helper.c into a new file. This is code movement only. Since helper.c has no copyright header, take the one from cpu.h for the new file. Signed-off-by: Richard Henderson --- target/arm/helper.c | 1062 -

[Qemu-devel] [PATCH v3 2/3] target/arm: Rearrange decode of Floating-point data-processing (2 regs)

2019-02-14 Thread Richard Henderson
There are lots of special cases within these insns. Split the major argument decode/loading/saving into no_output (compares), rd_is_dp, and rm_is_dp. We still need to special case argument load for compare (rd as input, rm as zero) and vcvt fixed (rd as input+output), but lots of special cases

[Qemu-devel] [PATCH v3 0/3] target/arm: Implement ARMv8.3-JSConv

2019-02-14 Thread Richard Henderson
Based-on: something akin to target-arm.next, with the gvec changes, but without the v2 2/3 "Restructure disas_fp_int_conv". The full tree is at https://github.com/rth7680/qemu.git tgt-arm-jscvt Patch 1 splits out vfp_helper.c, which I wrote for something else. But while rebasing it occured to

Re: [Qemu-devel] [PATCH] i386, acpi: check acpi_memory_hotplug capacity in pre_plug

2019-02-14 Thread Wei Yang
On Thu, Feb 14, 2019 at 12:25:27PM +0100, Igor Mammedov wrote: >On Thu, 14 Feb 2019 08:52:25 +0800 >Wei Yang wrote: > >> Currently we do device realization like below: >> >>hotplug_handler_pre_plug() >>dc->realize() >>hotplug_handler_plug() >> >> Before we do device realization and

Re: [Qemu-devel] [PATCH] target-i386: Enhance the stub for kvm_arch_get_supported_cpuid()

2019-02-14 Thread Paolo Bonzini
On 14/02/19 20:41, Kamil Rytarowski wrote: > Please do replace the current kludge that is sensitive to: > - compiler behavior that can change with new versions > - compiler gcc/clang > - optimization options Not really, any half-decent compiler will optimize away "if (0)" and QEMU is far from

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH v2 0/9] vhost: enable for all targets

2019-02-14 Thread Paolo Bonzini
On 14/02/19 20:28, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2019 at 06:35:47PM +0100, Paolo Bonzini wrote: >> See also "[PATCH for-3.2 00/10] vhost: preparation for qgraph >> conversion of vhost-user-test". Some of the other vhost-user-test >> patches have gone in already, and this is what is

Re: [Qemu-devel] [PATCH v2 02/25] hw/arm: Express dependencies of the highbank machines with Kconfig

2019-02-14 Thread Paolo Bonzini
On 14/02/19 20:17, Peter Maydell wrote: > On Wed, 13 Feb 2019 at 08:38, Thomas Huth wrote: >> >> Add Kconfig dependencies for the highbank machine (and the midway >> machine). >> This patch is slightly based on earlier work by Ákos Kovács (i.e. >> his "hw/arm/Kconfig: Add ARM Kconfig" patch). >>

Re: [Qemu-devel] [PATCH] hw/i386/pc: run the multiboot loader before the PVH loader

2019-02-14 Thread Paolo Bonzini
On 14/02/19 20:09, Michael S. Tsirkin wrote: > On Thu, Feb 14, 2019 at 07:02:16PM +0100, Stefano Garzarella wrote: >> Some multiboot images could be in the ELF format. In the current >> implementation QEMU fails because we try to load these images >> as a PVH image. >> >> In order to fix this

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

2019-02-14 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20190214190603.25030-1-peter.mayd...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20190214190603.25030-1-peter.mayd...@linaro.org Subject: [Qemu-devel] [PULL 00/27] target-arm

Re: [Qemu-devel] [PATCH v3 0/9] Network announce changes

2019-02-14 Thread Dr. David Alan Gilbert
* Jason Wang (jasow...@redhat.com) wrote: > > On 2019/2/7 上午7:35, Michael S. Tsirkin wrote: > > On Wed, Feb 06, 2019 at 11:00:35AM +, Dr. David Alan Gilbert (git) > > wrote: > > > From: "Dr. David Alan Gilbert" > > > > > > Hi, > > >This is a reworking of a few sets of patches from 2017

[Qemu-devel] [PATCH v2 8/9] ccid-card-passthru: Use size_t to hold size argument

2019-02-14 Thread Philippe Mathieu-Daudé
check_atr() is called once with a unsigned argument. Since there is no need to use a signed type, use a size_t. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c

[Qemu-devel] [PATCH v2 9/9] ccid-card-passthru: Use size_t for index

2019-02-14 Thread Philippe Mathieu-Daudé
The variable 'opt_bytes' is an index to the data[] array. Use size_t for indexes. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index

[Qemu-devel] [PATCH v2 7/9] ccid-card-passthru: Use QERR_MISSING_PARAMETER

2019-02-14 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 6cb8b2d26b..d63aa28584 100644 --- a/hw/usb/ccid-card-passthru.c +++

[Qemu-devel] [PATCH v2 3/9] ccid-card-passthru: Assert on a stricter expression

2019-02-14 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 1676b5fc05..0c44b38fc2 100644 --- a/hw/usb/ccid-card-passthru.c

[Qemu-devel] [PATCH v2 6/9] ccid-card-passthru: Simplify the if() condition

2019-02-14 Thread Philippe Mathieu-Daudé
Simplify the if() condition so we can remove an indent layer and the code is easier to review. Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c

[Qemu-devel] [PATCH v2 2/9] ccid-card-passthru: Replace never trigger if statement by an assertion

2019-02-14 Thread Philippe Mathieu-Daudé
The right side of the comparison is the return value of can_read(): VSCARD_IN_SIZE - card->vscard_in_pos. Since the 'size' argument of chardev::read() is bound to what chardev::can_read() returns, this condition can never happen. Add an assertion, which will always fail if card->vscard_in_pos >=

[Qemu-devel] [PATCH v2 4/9] ccid-card-passthru: Let the chardev::read() be more generic

2019-02-14 Thread Philippe Mathieu-Daudé
Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index 0c44b38fc2..ba7c285ded 100644 ---

[Qemu-devel] [PATCH v2 5/9] ccid-card-passthru: Replace assert() by QEMU_BUILD_BUG_ON()

2019-02-14 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c b/hw/usb/ccid-card-passthru.c index ba7c285ded..ccc3ffa7fa 100644 --- a/hw/usb/ccid-card-passthru.c +++

[Qemu-devel] [PATCH v2 0/9] ccid-card-passthru: check buffer size parameter

2019-02-14 Thread Philippe Mathieu-Daudé
Hi, This is the v2 of Prasad J Pandit first version [*], with Paolo's review comment addressed. This is a quick fix for CVE-2018-18438: "Integer overflow in ccid_card_vscard_read() allows memory corruption". Please review, Phil. [*]

[Qemu-devel] [PATCH v2 1/9] ccid-card-passthru: Move assertion in read() to can_read()

2019-02-14 Thread Philippe Mathieu-Daudé
chardev::read() depends of what chardev::can_read() returns, move the assertion to can_read(). Suggested-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé --- hw/usb/ccid-card-passthru.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/hw/usb/ccid-card-passthru.c

Re: [Qemu-devel] [PATCH] hw/rdma: another clang compilation fix

2019-02-14 Thread Kamal Heib
On 2/14/19 5:40 PM, Marcel Apfelbaum wrote: > Configuring QEMU with: >configure --target-list="x86_64-softmmu" --cc=clang --enable-pvrdma > Results in: >qemu/hw/rdma/rdma_rm_defs.h:108:3: error: redefinition of typedef > 'RdmaDeviceResources' is a C11 feature

Re: [Qemu-devel] [PATCH] hw/block: report when pflash backing file isn't aligned

2019-02-14 Thread Laszlo Ersek
On 02/14/19 16:57, Alex Bennée wrote: > It looks like there was going to be code to check we had some sort of > alignment so lets replace it with an actual check. This is a bit more > useful than the enigmatic "failed to read the initial flash content" > when we attempt to read the number of bytes

  1   2   3   4   5   >