Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 12 Nov 2018, at 18:50, Dr. David Alan Gilbert wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: >> On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bonzini wrote: >>> On 02/11/2018 17:54, Daniel P. Berrangé wrote: We have usually followed a rule that new machine types must

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: > > On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: >> * Daniel P. Berrangé (berra...@redhat.com) wrote: >>> On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo Bonzini wrote: On 02/11/2018 17:54, Daniel P.

Re: [Qemu-devel] How to emulate block I/O timeout on qemu side?

2018-11-12 Thread Dongli Zhang
On 11/13/2018 06:52 AM, Marc Olson via Qemu-devel wrote: > On 11/11/18 11:36 PM, Dongli Zhang wrote: >> On 11/12/2018 03:13 PM, Marc Olson via Qemu-devel wrote: >>> On 11/3/18 10:24 AM, Dongli Zhang wrote: The 'write' latency of sector=40960 is set to a very large value. When the I/O

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 11:37:07AM +0800, Peter Xu wrote: > On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > > > A 5-level paging capable VM may choose to use

Re: [Qemu-devel] [PATCH 0/2] linux-user/mips: Support the n32 ABI for the R5900

2018-11-12 Thread Maciej W. Rozycki
On Fri, 9 Nov 2018, Maciej W. Rozycki wrote: > > Some readelf results: > > > > mips64el/stretch > > > > Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 > > Class: ELF64 > > Flags: 0x8007, noreorder, pic, cpic, mips64r2 > > Hmm, that's weird -- what executable did you

Re: [Qemu-devel] [PATCH] 9p: write lock path in v9fs_co_open2()

2018-11-12 Thread zhibin hu
Sorry, i have no time to make poc recently. IMHO, the implementation of v9fs_path_copy is not secure, it first free the original value and than copy the new value, there is a race. So each caller must ensure the synchronization, maybe more locks are needed. thanks. On Mon, Nov 12, 2018 at

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > > E.g. guest applications like DPDK

Re: [Qemu-devel] [PATCH] nvme: fix oob access issue(CVE-2018-16847)

2018-11-12 Thread Li Qiang
Ping what't the status of this patch. I see Kevin's new pr doesn't contain this patch. Thanks, Li Qiang Li Qiang 于2018年11月2日周五 上午9:22写道: > Currently, the nvme_cmb_ops mr doesn't check the addr and size. > This can lead an oob access issue. This is triggerable in the guest. > Add check to

[Qemu-devel] [PULL for-3.1 2/2] qga: Add multiple include guard to guest-agent-core.h

2018-11-12 Thread Michael Roth
From: Peter Maydell The guest-agent-core.h header was missing the usual guards against multiple inclusion; add them. (Spotted by lgtm.com's static analyzer.) Signed-off-by: Peter Maydell Reviewed-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL for-3.1 1/2] qga-win: fix leaks of build_guest_disk_info()

2018-11-12 Thread Michael Roth
From: Marc-André Lureau Introduced in commit b1ba8890e63ce9432c41c5c3fc229f54c87c9c99, vol_h handle should be closed, and "out" cleanup should be done after DeviceIoControl() fails. Signed-off-by: Marc-André Lureau Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Michael Roth ---

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Liran Alon
> On 13 Nov 2018, at 2:07, Jim Mattson wrote: > > On Mon, Nov 12, 2018 at 4:00 PM, Liran Alon wrote: >> >> >>> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: >>> >>> On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: * Daniel P. Berrangé

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 01:04:51PM +0800, Peter Xu wrote: > On Tue, Nov 13, 2018 at 11:37:07AM +0800, Peter Xu wrote: > > On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > > > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu

Re: [Qemu-devel] [RFC PATCH 02/11] decodetree: Add multiple include guard

2018-11-12 Thread Philippe Mathieu-Daudé
On 12/11/18 23:30, Eduardo Habkost wrote: On Mon, Nov 12, 2018 at 12:36:13AM +0100, Philippe Mathieu-Daudé wrote: It is necessary when splitting an ISA, or when using multiple ISAs. Signed-off-by: Philippe Mathieu-Daudé --- TODO: explain why, use case TODO: escape full path? ---

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Tue, Nov 13, 2018 at 11:37:07AM +0800, Peter Xu wrote: > On Mon, Nov 12, 2018 at 05:42:01PM +0800, Yu Zhang wrote: > > On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > > > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > > > A 5-level paging capable VM may choose to use

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] ppc/spapr: Receive and store device tree blob from SLOF

2018-11-12 Thread Alexey Kardashevskiy
On 12/11/2018 20:05, Greg Kurz wrote: > On Mon, 12 Nov 2018 15:12:26 +1100 > Alexey Kardashevskiy wrote: > >> On 12/11/2018 05:10, Greg Kurz wrote: >>> Hi Alexey, >>> >>> Just a few remarks. See below. >>> >>> On Thu, 8 Nov 2018 12:44:06 +1100 >>> Alexey Kardashevskiy wrote: >>>

Re: [Qemu-devel] [PATCH for-3.2 1/7] tests/pvpanic: Make the pvpanic test independent of global_qtest

2018-11-12 Thread Eric Blake
On 11/12/18 1:08 PM, Thomas Huth wrote: We want to get rid of global_qtest in the long run, thus do not use the wrappers like inb() and outb() here anymore. Signed-off-by: Thomas Huth --- tests/pvpanic-test.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-)

[Qemu-devel] [PATCH] memory: check write/read_with_attrs in memory dispatch

2018-11-12 Thread Li Qiang
This can avoid the NULL-deref if the rm doesn't has a read/write nor write/read_with_attrs callback. Signed-off-by: Li Qiang --- memory.c | 8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/memory.c b/memory.c index d14c6dec1d..3baf5857b9 100644 --- a/memory.c +++

Re: [Qemu-devel] [PATCH v2] Acceptance tests: add Linux initrd checking test

2018-11-12 Thread Eduardo Habkost
On Fri, Nov 09, 2018 at 01:21:53PM -0500, Wainer dos Santos Moschetta wrote: > QEMU used to exits with a not accurate error message when > an initrd > 2GiB was passed. That was fixed on patch: > > commit f3839fda5771596152b75dd1e1a6d050e6e6e380 > Author: Li Zhijian > Date:

[Qemu-devel] [Bug 1802915] Re: GTK display refresh rate is throttled

2018-11-12 Thread Chen Zhang
** Description changed: Guest OS running with GL enabled GTK display shows a reduced refresh rate, e.g. moving cursor around with iGVT-g DMA Buf. - It seems that a default refresh interval GUI_REFRESH_INTERVAL_DEFAULT + Apparently, a default refresh interval GUI_REFRESH_INTERVAL_DEFAULT

Re: [Qemu-devel] [PATCH] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2018-11-12 Thread Wei Xu
Looks good, I can't recall the status of last version well but I remember Jason gave some comments about sanity check are quiet essential, have you addressed them? Reviewed by: Wei Xu On Fri, Nov 09, 2018 at 04:58:27PM +0200, Yuri Benditovich wrote: > This commit adds implementation of RX

Re: [Qemu-devel] [QEMU PATCH v2 0/2]: KVM: i386: Add support for save and restore nested state

2018-11-12 Thread Jim Mattson via Qemu-devel
On Mon, Nov 12, 2018 at 4:00 PM, Liran Alon wrote: > > >> On 12 Nov 2018, at 18:54, Daniel P. Berrangé wrote: >> >> On Mon, Nov 12, 2018 at 04:50:54PM +, Dr. David Alan Gilbert wrote: >>> * Daniel P. Berrangé (berra...@redhat.com) wrote: On Sun, Nov 04, 2018 at 11:19:57PM +0100, Paolo

[Qemu-devel] [PULL for-3.1 0/2] qemu-ga patch queue for 3.1.0

2018-11-12 Thread Michael Roth
The following changes since commit 160e5c22e55b3f775c2003dfc626fa872ee4a7a1: Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging (2018-11-09 10:54:10 +) are available in the Git repository at: git://github.com/mdroth/qemu.git tags/qga-pull-2018-11-12-tag for

Re: [Qemu-devel] [PATCH v1 3/3] intel-iommu: search iotlb for levels supported by the address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 01:18:54PM +0800, Peter Xu wrote: > On Mon, Nov 12, 2018 at 08:38:30PM +0800, Yu Zhang wrote: > > On Mon, Nov 12, 2018 at 05:36:38PM +0800, Peter Xu wrote: > > > On Mon, Nov 12, 2018 at 05:25:48PM +0800, Yu Zhang wrote: > > > > On Mon, Nov 12, 2018 at 04:51:22PM +0800,

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Tue, Nov 13, 2018 at 01:45:44PM +0800, Yu Zhang wrote: [...] > > > Since at it, another thing I thought about is making sure the IOMMU > > > capabilities will match between host and guest IOMMU, which I think > > > this series has ignorred so far. E.g., when we're having assigned > > >

Re: [Qemu-devel] [PATCH v1 3/3] intel-iommu: search iotlb for levels supported by the address width.

2018-11-12 Thread Peter Xu
On Mon, Nov 12, 2018 at 08:38:30PM +0800, Yu Zhang wrote: > On Mon, Nov 12, 2018 at 05:36:38PM +0800, Peter Xu wrote: > > On Mon, Nov 12, 2018 at 05:25:48PM +0800, Yu Zhang wrote: > > > On Mon, Nov 12, 2018 at 04:51:22PM +0800, Peter Xu wrote: > > > > On Fri, Nov 09, 2018 at 07:49:47PM +0800, Yu

Re: [Qemu-devel] [RFC PATCH 07/11] scripts/decodetree: Add add_func_check()

2018-11-12 Thread Richard Henderson
On 11/12/18 12:36 AM, Philippe Mathieu-Daudé wrote: > for n, f in self.fields.items(): > output(ind, 'u.f_', arg, '.', n, ' = ', f.str_extract(), ';\n') > +for f, a in self.check_funcs: > +output(ind, 'check_', f, '(ctx, ', a, ');\n') >

Re: [Qemu-devel] [RFC PATCH 08/11] target/mips: Add a decodetree stub

2018-11-12 Thread Richard Henderson
On 11/12/18 6:37 AM, Aleksandar Markovic wrote: >> Subject: [RFC PATCH 08/11] target/mips: Add a decodetree stub > > There is no plan to use decodetree for MIPS target. MIPS decoding engine is > mostly stable mature code that was well tested over many years, and there is > no > point in

Re: [Qemu-devel] [RFC] [PATCH] kvm: arm: Introduce error code KVM_EINVARIANT

2018-11-12 Thread Christoffer Dall
Hi Manish, On Sat, Nov 10, 2018 at 10:18:47PM +, Manish Jaggi wrote: > > CCing a larger audience. > Please review. > > On 10/23/2018 03:51 PM, Jaggi, Manish wrote: > > From: Manish Jaggi > > > > This patch introduces an error code KVM_EINVARIANT which is returned > > by KVM when userland

Re: [Qemu-devel] [Qemu-block] [PATCH] tests: Fix Python 3 detection on older GNU make versions

2018-11-12 Thread Markus Armbruster
Max Reitz writes: > On 08.11.18 13:43, Markus Armbruster wrote: >> Philippe Mathieu-Daudé writes: >> >>> Hi Markus, >>> >>> >>> Le jeu. 8 nov. 2018 09:46, Markus Armbruster a écrit : >>> Cleber Rosa writes: > On 11/7/18 1:05 AM, Markus Armbruster wrote: >> [...] >> PEP 394

Re: [Qemu-devel] [PATCH] edid: silence a stringop-overflow warning

2018-11-12 Thread Markus Armbruster
Marc-André Lureau writes: > Simplify the code that doesn't need strncpy() since length of string > is already computed. > > /home/elmarco/src/qemu/hw/display/edid-generate.c: In function > 'edid_desc_text': > /home/elmarco/src/qemu/hw/display/edid-generate.c:168:5: error: 'strncpy' > specified

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Mon, Nov 12, 2018 at 04:36:34PM +0800, Peter Xu wrote: > On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > > E.g. guest applications like DPDK prefer to use its VA as IOVA when > > performing VFIO map/unmap

Re: [Qemu-devel] [PATCH] hw/bt: drop bluetooth keyboard emulation.

2018-11-12 Thread Thomas Huth
On 2018-11-09 15:14, Gerd Hoffmann wrote: > Broken (segfaultson first keypress) and appearently unused. Broken since QEMU v2.1 (!) already, if I've got that right - please mention that version number, so that it is clear that it is broken since more than two releases (i.e. it has been

Re: [Qemu-devel] [PATCH v1 3/3] intel-iommu: search iotlb for levels supported by the address width.

2018-11-12 Thread Peter Xu
On Fri, Nov 09, 2018 at 07:49:47PM +0800, Yu Zhang wrote: > This patch updates vtd_lookup_iotlb() to search cached mappings only > for all page levels supported by address width of current vIOMMU. Also, > to cover 57-bit width, the shift of source id(VTD_IOTLB_SID_SHIFT) and > of page

[Qemu-devel] qdev has no maintainer (was: [PATCH] hw: set_netdev: remove useless code)

2018-11-12 Thread Markus Armbruster
Thomas Huth writes: > On 2018-11-09 09:21, Laurent Vivier wrote: >> On 09/11/2018 09:13, Li Qiang wrote: >>> In set_netdev(), the peers[i] is initialized >>> qemu_find_net_clients_except() when i is in >>> 0 between 'queues' it can't be NULL. >>> >>> Signed-off-by: Li Qiang >>> --- >>>

Re: [Qemu-devel] [RFC PATCH 08/11] target/mips: Add a decodetree stub

2018-11-12 Thread Aleksandar Markovic
Hello, Richard. I am a little taken aback by your tone. I hope we can communicate in much friendlier maner, as we used to do. >You have just this year added yet another encoding scheme for nanomips. Your >statement "well tested over many years" is a bit of a stretch. I wrote "mostly stable

Re: [Qemu-devel] [PATCH 0/2] virtio-9p: qmp interface for set/query io throttle for fsdev devices

2018-11-12 Thread Greg Kurz
On Mon, 12 Nov 2018 01:14:55 + xiezhide wrote: > These patches provide the qmp interface, to set/query the io throttle > status of the all fsdev devices that are present in a vm. > Some of the patches also remove the > duplicate code that was present in block and fsdev files. > > Zhide Xie

Re: [Qemu-devel] [PATCH v4 14/15] block: Remove assertions from update_flags_from_options()

2018-11-12 Thread Alberto Garcia
On Sun 11 Nov 2018 10:01:05 PM CET, Max Reitz wrote: > On 07.11.18 13:59, Alberto Garcia wrote: >> This function takes three options (cache.direct, cache.no-flush and >> read-only) from a QemuOpts object and updates the flags accordingly. > > and auto-read-only now Oops, will update. > Hm, seems

Re: [Qemu-devel] [PATCH v4 14/15] block: Remove assertions from update_flags_from_options()

2018-11-12 Thread Alberto Garcia
On Sun 11 Nov 2018 10:01:05 PM CET, Max Reitz wrote: >> -assert(qemu_opt_find(opts, BDRV_OPT_CACHE_DIRECT)); >> if (qemu_opt_get_bool_del(opts, BDRV_OPT_CACHE_DIRECT, false)) { >> *flags |= BDRV_O_NOCACHE; >> } >> >> *flags &= ~BDRV_O_RDWR; > > Unrelated to this

Re: [Qemu-devel] [PATCH] decodetree: Force Python to print unsigned values

2018-11-12 Thread Richard Henderson
On 11/12/18 12:06 AM, Philippe Mathieu-Daudé wrote: >> On 11/11/18 1:02 AM, Philippe Mathieu-Daudé wrote: >>> Python internal representation is signed, so unsigned values >>> bigger than 31-bit are interpreted as signed (and printed with >>> a '-' signed). >>> Mask out to force unsigned values.

Re: [Qemu-devel] [PATCH v2] pulseaudio: process audio data in smaller chunks

2018-11-12 Thread Gerd Hoffmann
On Sat, Nov 10, 2018 at 08:36:39PM +0100, Philippe Mathieu-Daudé wrote: > Hi Gerd, > > On 11/9/18 3:20 PM, Gerd Hoffmann wrote: > > The rate of pulseaudio absorbing the audio stream is used to control the > > the rate of the guests audio stream. When the emulated hardware uses > > small chunks

Re: [Qemu-devel] [PATCH] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2018-11-12 Thread Jason Wang
On 2018/11/12 下午4:57, Yuri Benditovich wrote: On Mon, Nov 12, 2018 at 4:54 AM Michael S. Tsirkin > wrote: On Sun, Nov 11, 2018 at 12:18:54PM +0200, Yuri Benditovich wrote: >     > @@ -66,12 +143,16 @@ typedef struct VirtIONet { >     >      VirtIONetQueue

Re: [Qemu-devel] [RFC PATCH 0/2] Acceptance tests for qemu-img

2018-11-12 Thread Kevin Wolf
Am 09.11.2018 um 23:12 hat Cleber Rosa geschrieben: > The initial goal of this RFC is to get feedback on tests not specific > to the QEMU main binary, but specific to other components such as > qemu-img. > > For this experiment, a small issue with the zero and negative number > of I/O operations

Re: [Qemu-devel] [Qemu-arm] [PATCH for-3.1] target/arm: Fix typo in tlbi_aa64_vmalle1_write

2018-11-12 Thread Alex Bennée
Richard Henderson writes: > This would cause an infinite recursion or loop. > > Signed-off-by: Richard Henderson I feel the title undersells the importance of the fix ;-) Reviewed-by: Alex Bennée > --- > target/arm/helper.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff

Re: [Qemu-devel] [Qemu-arm] [PATCH 1/2] target/arm: Hyp mode R14 is shared with User and System

2018-11-12 Thread Edgar E. Iglesias
On Fri, Nov 09, 2018 at 06:15:20PM +, Peter Maydell wrote: > On 9 November 2018 at 17:35, Peter Maydell wrote: > > Hyp mode is an exception to the general rule that each AArch32 > > mode has its own r13, r14 and SPSR -- it has a banked r13 and > > SPSR but shares its r14 with User and System

Re: [Qemu-devel] [PATCH v1 1/3] intel-iommu: differentiate host address width from IOVA address width.

2018-11-12 Thread Yu Zhang
On Mon, Nov 12, 2018 at 04:15:46PM +0800, Peter Xu wrote: > On Fri, Nov 09, 2018 at 07:49:45PM +0800, Yu Zhang wrote: > > Currently, vIOMMU is using the value of IOVA address width, instead of > > the host address width(HAW) to calculate the number of reserved bits in > > data structures such as

Re: [Qemu-devel] [PULL 0/4] slirp updates

2018-11-12 Thread Peter Maydell
On 10 November 2018 at 14:09, Samuel Thibault wrote: > The following changes since commit 160e5c22e55b3f775c2003dfc626fa872ee4a7a1: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into staging > (2018-11-09 10:54:10 +) > > are available in the Git repository at: > >

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-12 Thread Peter Maydell
On 10 November 2018 at 15:20, Mark Cave-Ayland wrote: > On 09/11/2018 10:31, Peter Maydell wrote: >> I think the code I saw that looked like a non-QOMified >> device was cpu_timer_create(). > Ah okay. The above timers are certainly internal CPU timers rather than > external, so > should they

Re: [Qemu-devel] [PATCH] 9p: write lock path in v9fs_co_open2()

2018-11-12 Thread Greg Kurz
On Mon, 12 Nov 2018 19:05:59 +0800 zhibin hu wrote: > yes, and this : > Yeah, all call sites of v9fs_path_copy() in v9fs_create() are called in the context of the main thread. They may race with any other access to the fid path performed by some other command in the context of a worker thread.

Re: [Qemu-devel] [RFC PATCH 11/11] target/mips: Port MIPS64 DCL[Z/O] to decodetree

2018-11-12 Thread Richard Henderson
On 11/12/18 12:36 AM, Philippe Mathieu-Daudé wrote: > +dclz011100 . . . . 100100 @rs_rt_rd > ?ctx->insn_flags_MIPS64 > +dclo011100 . . . . 100101 @rs_rt_rd > ?ctx->insn_flags_MIPS64 This syntax I do not like. I preferred your

Re: [Qemu-devel] [PATCH v1 3/3] intel-iommu: search iotlb for levels supported by the address width.

2018-11-12 Thread Peter Xu
On Mon, Nov 12, 2018 at 05:25:48PM +0800, Yu Zhang wrote: > On Mon, Nov 12, 2018 at 04:51:22PM +0800, Peter Xu wrote: > > On Fri, Nov 09, 2018 at 07:49:47PM +0800, Yu Zhang wrote: > > > This patch updates vtd_lookup_iotlb() to search cached mappings only > > > for all page levels supported by

Re: [Qemu-devel] [PATCH v2] pulseaudio: process audio data in smaller chunks

2018-11-12 Thread Philippe Mathieu-Daudé
On 12/11/18 10:12, Gerd Hoffmann wrote: On Sat, Nov 10, 2018 at 08:36:39PM +0100, Philippe Mathieu-Daudé wrote: Hi Gerd, On 11/9/18 3:20 PM, Gerd Hoffmann wrote: The rate of pulseaudio absorbing the audio stream is used to control the the rate of the guests audio stream. When the emulated

Re: [Qemu-devel] [PATCH] hw/bt: drop bluetooth keyboard emulation.

2018-11-12 Thread Peter Maydell
On 12 November 2018 at 09:16, Markus Armbruster wrote: > Peter Maydell writes: > >> On 9 November 2018 at 14:14, Gerd Hoffmann wrote: >>> Broken (segfaultson first keypress) and appearently unused. >>> >>> Signed-off-by: Gerd Hoffmann > > Please show the reproducer in the commit message.

Re: [Qemu-devel] [libvirt] [PATCH] bt: Mark the bluetooth subsystem as deprecated

2018-11-12 Thread Peter Krempa
On Mon, Nov 12, 2018 at 11:00:30 +0100, Thomas Huth wrote: > It has been unmaintained since years, and there were only trivial or > tree-wide changes to the related files since many years, so the > code is likely very bitrotten and broken. For example the following > segfaults as soon as as you

Re: [Qemu-devel] [RFC PATCH 03/11] target/mips: Move the !ISA_MIPS32R6 check out of decode_opc_special2_legacy

2018-11-12 Thread Richard Henderson
On 11/12/18 12:36 AM, Philippe Mathieu-Daudé wrote: > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH v1 1/3] intel-iommu: differentiate host address width from IOVA address width.

2018-11-12 Thread Peter Xu
On Fri, Nov 09, 2018 at 07:49:45PM +0800, Yu Zhang wrote: > Currently, vIOMMU is using the value of IOVA address width, instead of > the host address width(HAW) to calculate the number of reserved bits in > data structures such as root entries, context entries, and entries of > DMA paging

Re: [Qemu-devel] [RFC PATCH 06/11] scripts/decodetree: Allow empty specifications

2018-11-12 Thread Richard Henderson
On 11/12/18 12:36 AM, Philippe Mathieu-Daudé wrote: > Starting with empty specifications allow to write stubs/templates, > useful when testing/rebasing. > > This fixes: > > decode.inc.c: In function ‘decode’: > decode.inc.c:9:7: error: unused variable ‘u’ [-Werror=unused-variable] > }

Re: [Qemu-devel] [PATCH] virtio-net: support RSC v4/v6 tcp traffic for Windows HCK

2018-11-12 Thread Yuri Benditovich
On Mon, Nov 12, 2018 at 4:54 AM Michael S. Tsirkin wrote: > On Sun, Nov 11, 2018 at 12:18:54PM +0200, Yuri Benditovich wrote: > > > @@ -66,12 +143,16 @@ typedef struct VirtIONet { > > > VirtIONetQueue *vqs; > > > VirtQueue *ctrl_vq; > > > NICState *nic; > > > +

Re: [Qemu-devel] [RFC PATCH 05/11] decodetree: Force Python to print unsigned values

2018-11-12 Thread Philippe Mathieu-Daudé
On Mon, Nov 12, 2018 at 9:20 AM Richard Henderson wrote: > On 11/12/18 12:36 AM, Philippe Mathieu-Daudé wrote: > > Python internal representation is signed, so unsigned values > > bigger than 31-bit are interpreted as signed (and printed with > > a '-' signed). > > Mask out to force unsigned

Re: [Qemu-devel] [PATCH v1 0/3] intel-iommu: add support for 5-level virtual IOMMU.

2018-11-12 Thread Peter Xu
On Fri, Nov 09, 2018 at 07:49:44PM +0800, Yu Zhang wrote: > Intel's upcoming processors will extend maximum linear address width to > 57 bits, and introduce 5-level paging for CPU. Meanwhile, the platform > will also extend the maximum guest address width for IOMMU to 57 bits, > thus introducing

Re: [Qemu-devel] [Qemu-ppc] [PATCH qemu] ppc/spapr: Receive and store device tree blob from SLOF

2018-11-12 Thread Greg Kurz
On Mon, 12 Nov 2018 15:12:26 +1100 Alexey Kardashevskiy wrote: > On 12/11/2018 05:10, Greg Kurz wrote: > > Hi Alexey, > > > > Just a few remarks. See below. > > > > On Thu, 8 Nov 2018 12:44:06 +1100 > > Alexey Kardashevskiy wrote: > > > >> SLOF receives a device tree and updates it with

Re: [Qemu-devel] [PATCH 0/2] Fix the last Hyp mode bug and turn it on for A7, A15

2018-11-12 Thread Richard Henderson
On 11/9/18 6:35 PM, Peter Maydell wrote: > Not entirely sure what to do about this for 3.1 -- maybe > put in the bugfix patch but hold off on actually setting > the feature bit til 4.0? I would put them both in for 3.1. r~

Re: [Qemu-devel] [RFC] [PATCH] kvm: arm: Introduce error code KVM_EINVARIANT

2018-11-12 Thread Andrew Jones
On Sun, Nov 11, 2018 at 11:36:44AM +, Marc Zyngier wrote: > On Sat, 10 Nov 2018 22:18:47 +, > Manish Jaggi wrote: > > > > > > CCing a larger audience. > > Please review. > > > > On 10/23/2018 03:51 PM, Jaggi, Manish wrote: > > > From: Manish Jaggi > > > > > > This patch introduces an

Re: [Qemu-devel] [RFC PATCH 04/11] target/mips: Avoid access to CPUMIPSState from decode* functions

2018-11-12 Thread Richard Henderson
On 11/12/18 12:36 AM, Philippe Mathieu-Daudé wrote: > The DisasContext is already initialized from the CPUMIPSState in > mips_tr_init_disas_context(). > > Suggested-by: Richard Henderson > Signed-off-by: Philippe Mathieu-Daudé > --- > target/mips/translate.c | 4 ++-- > 1 file changed, 2

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Peter Xu
On Fri, Nov 09, 2018 at 07:49:46PM +0800, Yu Zhang wrote: > A 5-level paging capable VM may choose to use 57-bit IOVA address width. > E.g. guest applications like DPDK prefer to use its VA as IOVA when > performing VFIO map/unmap operations, to avoid the burden of managing the > IOVA space.

Re: [Qemu-devel] List of files containing devices which have not been QOMified

2018-11-12 Thread Thomas Huth
On 2018-11-09 14:16, Paolo Bonzini wrote: > On 09/11/2018 13:39, Thomas Huth wrote: >> On 2018-11-09 12:29, Gerd Hoffmann wrote: >>> On Fri, Nov 09, 2018 at 12:17:31PM +0100, Gerd Hoffmann wrote: Hi, > I am also suspicious about hw/bt/ but don't know enough > about that

Re: [Qemu-devel] [PATCH 1/2] target/arm: Hyp mode R14 is shared with User and System

2018-11-12 Thread Edgar E. Iglesias
On Fri, Nov 09, 2018 at 05:35:52PM +, Peter Maydell wrote: > Hyp mode is an exception to the general rule that each AArch32 > mode has its own r13, r14 and SPSR -- it has a banked r13 and > SPSR but shares its r14 with User and System mode. We were > incorrectly implementing it as banked,

Re: [Qemu-devel] [PATCH 2/2] target/arm/cpu: Give Cortex-A15 and -A7 the EL2 feature

2018-11-12 Thread Edgar E. Iglesias
On Fri, Nov 09, 2018 at 05:35:53PM +, Peter Maydell wrote: > The Cortex-A15 and Cortex-A7 both have EL2; now we've implemented > it properly we can enable the feature bit. > > Signed-off-by: Peter Maydell Reviewed-by: Edgar E. Iglesias > --- > target/arm/cpu.c | 2 ++ > 1 file changed,

[Qemu-devel] [PATCH v3 03/23] hw/rdma: Return qpn 1 if ibqp is NULL

2018-11-12 Thread Yuval Shaia
Device is not supporting QP0, only QP1. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_backend.h b/hw/rdma/rdma_backend.h index 86e8fe8ab6..3ccc9a2494 100644 --- a/hw/rdma/rdma_backend.h +++

[Qemu-devel] [PATCH v3 06/23] hw/pvrdma: Make function reset_device return void

2018-11-12 Thread Yuval Shaia
This function cannot fail - fix it to return void Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 6c8c0154fa..fc2abd34af

[Qemu-devel] [PATCH v3 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-11-12 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 7b0f440fda..3388be1926 100644

[Qemu-devel] [PATCH v3 16/23] hw/pvrdma: Fill all CQE fields

2018-11-12 Thread Yuval Shaia
Add ability to pass specific WC attributes to CQE such as GRH_BIT flag. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_backend.c | 59 +++-- hw/rdma/rdma_backend.h | 4 +-- hw/rdma/vmw/pvrdma_qp_ops.c | 31 +++ 3 files changed, 58

[Qemu-devel] [PATCH v3 07/23] hw/pvrdma: Make default pkey 0xFFFF

2018-11-12 Thread Yuval Shaia
Commit 6e7dba23af ("hw/pvrdma: Make default pkey 0x") exports default pkey as external definition but omit the change from 0x7FFF to 0x. Fixes: 6e7dba23af ("hw/pvrdma: Make default pkey 0x") Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma.h | 2 +- 1

[Qemu-devel] [PATCH v3 17/23] hw/pvrdma: Fill error code in command's response

2018-11-12 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 100644

[Qemu-devel] [PATCH v3 04/23] hw/rdma: Abort send-op if fail to create addr handler

2018-11-12 Thread Yuval Shaia
Function create_ah might return NULL, let's exit with an error. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/rdma_backend.c | 4 1 file changed, 4 insertions(+) diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c index d7a4bbd91f..1e148398a2 100644 ---

[Qemu-devel] [PATCH v3 06/23] hw/pvrdma: Make function reset_device return void

2018-11-12 Thread Yuval Shaia
This function cannot fail - fix it to return void Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_main.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c index 6c8c0154fa..fc2abd34af

[Qemu-devel] [PATCH v3 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-11-12 Thread Yuval Shaia
The control over the RDMA device's GID table is done by updating the device's Ethernet function addresses. Usually the first GID entry is determine by the MAC address, the second by the first IPv6 address and the third by the IPv4 address. Other entries can be added by adding more IP addresses.

[Qemu-devel] [PATCH v3 05/23] hw/rdma: Add support for MAD packets

2018-11-12 Thread Yuval Shaia
MAD (Management Datagram) packets are widely used by various modules both in kernel and in user space for example the rdma_* API which is used to create and maintain "connection" layer on top of RDMA uses several types of MAD packets. To support MAD packets the device uses an external utility

[Qemu-devel] [PATCH v3 08/23] hw/pvrdma: Set the correct opcode for recv completion

2018-11-12 Thread Yuval Shaia
The function pvrdma_post_cqe populates CQE entry with opcode from the given completion element. For receive operation value was not set. Fix it by setting it to IBV_WC_RECV. Signed-off-by: Yuval Shaia Reviewed-by: Marcel Apfelbaum --- hw/rdma/vmw/pvrdma_qp_ops.c | 3 ++- 1 file changed, 2

[Qemu-devel] [PATCH v3 14/23] hw/rdma: Initialize node_guid from vmxnet3 mac address

2018-11-12 Thread Yuval Shaia
node_guid should be set once device is load. Make node_guid be GID format (32 bit) of PCI function 0 vmxnet3 device's MAC. A new function was added to do the conversion. So for example the MAC 56:b6:44:e9:62:dc will be converted to GID 54b6:44ff:fee9:62dc. Signed-off-by: Yuval Shaia ---

[Qemu-devel] [PATCH v3 05/23] hw/rdma: Add support for MAD packets

2018-11-12 Thread Yuval Shaia
MAD (Management Datagram) packets are widely used by various modules both in kernel and in user space for example the rdma_* API which is used to create and maintain "connection" layer on top of RDMA uses several types of MAD packets. To support MAD packets the device uses an external utility

[Qemu-devel] [PATCH v3 13/23] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-11-12 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a..10a3c4fb7c 100644 --- a/hw/rdma/vmw/pvrdma.h

[Qemu-devel] [PATCH v3 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-11-12 Thread Yuval Shaia
In order to clean some external resources such as GIDs, QPs etc, register to receive notification when VM is shutdown. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git

[Qemu-devel] [PATCH v3 19/23] vl: Introduce shutdown_notifiers

2018-11-12 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia --- include/sysemu/sysemu.h | 1 + vl.c| 15 ++- 2

[Qemu-devel] [PATCH v3 20/23] hw/pvrdma: Clean device's resource when system is shutdown

2018-11-12 Thread Yuval Shaia
In order to clean some external resources such as GIDs, QPs etc, register to receive notification when VM is shutdown. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 12 2 files changed, 14 insertions(+) diff --git

[Qemu-devel] [PATCH v3 21/23] hw/rdma: Do not use bitmap_zero_extend to free bitmap

2018-11-12 Thread Yuval Shaia
bitmap_zero_extend is designed to work for extending, not for shrinking. Using g_free instead. Signed-off-by: Yuval Shaia --- hw/rdma/rdma_rm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/rdma_rm.c b/hw/rdma/rdma_rm.c index 0a5ab8935a..35a96d9a64 100644 ---

[Qemu-devel] [PATCH v3 09/23] hw/pvrdma: Set the correct opcode for send completion

2018-11-12 Thread Yuval Shaia
opcode for WC should be set by the device and not taken from work element. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_qp_ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/rdma/vmw/pvrdma_qp_ops.c b/hw/rdma/vmw/pvrdma_qp_ops.c index 7b0f440fda..3388be1926 100644

[Qemu-devel] [PATCH v3 13/23] hw/pvrdma: Make sure PCI function 0 is vmxnet3

2018-11-12 Thread Yuval Shaia
Guest driver enforces it, we should also. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma.h | 2 ++ hw/rdma/vmw/pvrdma_main.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/hw/rdma/vmw/pvrdma.h b/hw/rdma/vmw/pvrdma.h index b019cb843a..10a3c4fb7c 100644 --- a/hw/rdma/vmw/pvrdma.h

[Qemu-devel] [PATCH v3 01/23] contrib/rdmacm-mux: Add implementation of RDMA User MAD multiplexer

2018-11-12 Thread Yuval Shaia
RDMA MAD kernel module (ibcm) disallow more than one MAD-agent for a given MAD class. This does not go hand-by-hand with qemu pvrdma device's requirements where each VM is MAD agent. Fix it by adding implementation of RDMA MAD multiplexer service which on one hand register as a sole MAD agent with

Re: [Qemu-devel] [PATCH v5 01/14] qtest: Add set_irq_in command to set IRQ/GPIO level

2018-11-12 Thread Thomas Huth
On 2018-11-12 22:42, Steffen Görtz wrote: > Adds a new qtest command "set_irq_in" which allows > to set qemu gpio lines to a given level. > > Based on https://lists.gnu.org/archive/html/qemu-devel/2012-12/msg02363.html > which never got merged. > > Signed-off-by: Steffen Görtz > Originally-by:

[Qemu-devel] [PATCH v3 12/23] vmxnet3: Move some definitions to header file

2018-11-12 Thread Yuval Shaia
pvrdma setup requires vmxnet3 device on PCI function 0 and PVRDMA device on PCI function 1. pvrdma device needs to access vmxnet3 device object for several reasons: 1. Make sure PCI function 0 is vmxnet3. 2. To monitor vmxnet3 device state. 3. To configure node_guid accoring to vmxnet3 device's

[Qemu-devel] [PATCH v3 12/23] vmxnet3: Move some definitions to header file

2018-11-12 Thread Yuval Shaia
pvrdma setup requires vmxnet3 device on PCI function 0 and PVRDMA device on PCI function 1. pvrdma device needs to access vmxnet3 device object for several reasons: 1. Make sure PCI function 0 is vmxnet3. 2. To monitor vmxnet3 device state. 3. To configure node_guid accoring to vmxnet3 device's

[Qemu-devel] [PATCH v3 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-11-12 Thread Yuval Shaia
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] slirp: add tftp tracing

2018-11-12 Thread Liam Merwick
On 13/11/2018 07:03, Gerd Hoffmann wrote: Useful when debugging pxeboot, to see what the guest tries to do. Signed-off-by: Gerd Hoffmann Reviewed-by: Liam Merwick --- Makefile.objs | 1 + slirp/tftp.c | 3 +++ slirp/trace-events | 5 + 3 files changed, 9

[Qemu-devel] [PATCH v3 11/23] hw/pvrdma: Add support to allow guest to configure GID table

2018-11-12 Thread Yuval Shaia
The control over the RDMA device's GID table is done by updating the device's Ethernet function addresses. Usually the first GID entry is determine by the MAC address, the second by the first IPv6 address and the third by the IPv4 address. Other entries can be added by adding more IP addresses.

[Qemu-devel] [PATCH v3 23/23] docs: Update pvrdma device documentation

2018-11-12 Thread Yuval Shaia
Interface with the device is changed with the addition of support for MAD packets. Adjust documentation accordingly. While there fix a minor mistake which may lead to think that there is a relation between using RXE on host and the compatibility with bare-metal peers. Signed-off-by: Yuval Shaia

Re: [Qemu-devel] [PATCH v1 2/3] intel-iommu: extend VTD emulation to allow 57-bit IOVA address width.

2018-11-12 Thread Yu Zhang
On Tue, Nov 13, 2018 at 02:12:17PM +0800, Peter Xu wrote: > On Tue, Nov 13, 2018 at 01:45:44PM +0800, Yu Zhang wrote: > > [...] > > > > > Since at it, another thing I thought about is making sure the IOMMU > > > > capabilities will match between host and guest IOMMU, which I think > > > > this

[Qemu-devel] [PATCH v3 19/23] vl: Introduce shutdown_notifiers

2018-11-12 Thread Yuval Shaia
Notifier will be used for signaling shutdown event to inform system is shutdown. This will allow devices and other component to run some cleanup code needed before VM is shutdown. Signed-off-by: Yuval Shaia --- include/sysemu/sysemu.h | 1 + vl.c| 15 ++- 2

[Qemu-devel] [PATCH v3 15/23] hw/pvrdma: Make device state depend on Ethernet function state

2018-11-12 Thread Yuval Shaia
User should be able to control the device by changing Ethernet function state so if user runs 'ifconfig ens3 down' the PVRDMA function should be down as well. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v3 10/23] json: Define new QMP message for pvrdma

2018-11-12 Thread Yuval Shaia
pvrdma requires that the same GID attached to it will be attached to the backend device in the host. A new QMP messages is defined so pvrdma device can broadcast any change made to its GID table. This event is captured by libvirt which in turn will update the GID table in the backend device.

[Qemu-devel] [PATCH v3 17/23] hw/pvrdma: Fill error code in command's response

2018-11-12 Thread Yuval Shaia
Driver checks error code let's set it. Signed-off-by: Yuval Shaia --- hw/rdma/vmw/pvrdma_cmd.c | 67 1 file changed, 48 insertions(+), 19 deletions(-) diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c index 0d3c818c20..a326c5d470 100644

  1   2   3   4   >