Re: [PATCH v2 08/86] arm:aspeed: actually check RAM size

2020-01-16 Thread Cédric Le Goater
On 1/16/20 6:35 PM, Igor Mammedov wrote: > On Thu, 16 Jan 2020 09:41:03 +0100 > Cédric Le Goater wrote: > >> On 1/15/20 4:06 PM, Igor Mammedov wrote: >>> It's supposed that SOC will check if "-m" provided >>> RAM size is valid by setting "ram-size" property and >>> then board would read back

Re: [PATCH v3 1/4] qapi: Add a 'coroutine' flag for commands

2020-01-16 Thread Markus Armbruster
Kevin Wolf writes: > Am 16.01.2020 um 14:00 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> > I have no idea if we will eventually get a case where the command wants >> > to behave different between the two modes and actually has use for a >> > coroutine. I hope not. >> > >> > But

[PATCH 2/2] virtio-scsi: convert to new virtio_delete_queue

2020-01-16 Thread pannengyuan
From: Pan Nengyuan Use virtio_delete_queue to make it more clear. Signed-off-by: Pan Nengyuan --- hw/scsi/virtio-scsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/scsi/virtio-scsi.c b/hw/scsi/virtio-scsi.c index 858b3aaccb..d3af42ef92 100644 ---

[PATCH 1/2] virtio-scsi: delete vqs in unrealize to avoid memleaks

2020-01-16 Thread pannengyuan
From: Pan Nengyuan This patch fix memleaks when attaching/detaching virtio-scsi device, the memory leak stack is as follow: Direct leak of 21504 byte(s) in 3 object(s) allocated from: #0 0x7f491f2f2970 (/lib64/libasan.so.5+0xef970) ??:? #1 0x7f491e94649d (/lib64/libglib-2.0.so.0+0x5249d)

[PATCH 0/2] delete virtio queues in virtio_scsi_unrealize

2020-01-16 Thread pannengyuan
From: Pan Nengyuan This serie patch fix memleaks when detaching virtio-scsi device. 1. use old virtio_del_queue to fix memleaks, it's easier for stable branches to merge. As the discussion in https://lists.nongnu.org/archive/html/qemu-devel/2020-01/msg02903.html 2. replace

Re: [PATCH v3 1/4] qapi: Add a 'coroutine' flag for commands

2020-01-16 Thread Markus Armbruster
Markus Armbruster writes: > Kevin Wolf writes: > >> Am 15.01.2020 um 15:59 hat Markus Armbruster geschrieben: >>> Kevin Wolf writes: >>> >>> > This patch adds a new 'coroutine' flag to QMP command definitions that >>> > tells the QMP dispatcher that the command handler is safe to be run in a

Re: [PATCH v1] vnc: fix VNC artifacts

2020-01-16 Thread Cameron Esfahani via
Yes. Personally, I'd also take the change to vnc-enc-zrle.c: because vs->zrle->zlib is reset at the top of the function, using vs->zrle->zlib.offset in determining zstream->next_out and zstream->avail_out is useless. Cameron Esfahani di...@apple.com "All that is necessary for the triumph of

Re: [PATCH v1] vnc: fix VNC artifacts

2020-01-16 Thread Gerd Hoffmann
On Thu, Jan 16, 2020 at 07:50:58PM -0800, Cameron Esfahani wrote: > Remove VNC optimization to reencode framebuffer update as raw if it's > smaller than the default encoding. QEMU's implementation was naive and > didn't account for the ZLIB z_stream mutating with each compression. Just > saving

[Bug 1860056] Re: mips binaries segfault

2020-01-16 Thread Aleksandar Markovic
Does the problem exist using c hello world and gcc? -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1860056 Title: mips binaries segfault Status in QEMU: New Bug description: Hello World

Re: [PATCH v2] uas: fix super speed bMaxPacketSize0

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/17/20 8:37 AM, Gerd Hoffmann wrote: For usb2 bMaxPacketSize0 is "n", for usb3 it is "1 << n", so it must be 9 not 64 ... rom "Universal Serial Bus 3.1 Specification": Oops typo "From" ;) You can obviously fix that directly on your tree, no need for v3. Thanks for the v2! If the

Re: [PATCH v22 5/9] ACPI: Record the Generic Error Status Block address

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/8/20 12:32 PM, Dongjiu Geng wrote: Record the GHEB address via fw_cfg file, when recording a error to CPER, it will use this address to find out Generic Error Data Entries and write the error. Make the HEST GHES to a GED device. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng ---

[PATCH v2] uas: fix super speed bMaxPacketSize0

2020-01-16 Thread Gerd Hoffmann
For usb2 bMaxPacketSize0 is "n", for usb3 it is "1 << n", so it must be 9 not 64 ... rom "Universal Serial Bus 3.1 Specification": If the device is operating at Gen X speed, the bMaxPacketSize0 field shall be set to 09H indicating a 512-byte maximum packet. An Enhanced SuperSpeed device

Re: [PATCH v2 85/86] numa: make exit() usage consistent

2020-01-16 Thread Thomas Huth
On 16/01/2020 18.10, Igor Mammedov wrote: > On Thu, 16 Jan 2020 17:43:30 +0100 > Thomas Huth wrote: > >> On 15/01/2020 16.07, Igor Mammedov wrote: >>> Signed-off-by: Igor Mammedov >>> --- >>> CC: ehabk...@redhat.com >>> --- >>> hw/core/numa.c | 4 ++-- >>> 1 file changed, 2 insertions(+), 2

Re: [PATCH v22 9/9] MAINTAINERS: Add ACPI/HEST/GHES entries

2020-01-16 Thread Philippe Mathieu-Daudé
Hi Peter, On 1/16/20 5:46 PM, Peter Maydell wrote: On Wed, 8 Jan 2020 at 11:32, Dongjiu Geng wrote: I and Xiang are willing to review the APEI-related patches and volunteer as the reviewers for the HEST/GHES part. Signed-off-by: Dongjiu Geng Signed-off-by: Xiang Zheng --- MAINTAINERS |

Re: [PATCH] qapi: Fix code generation with Python 3.5

2020-01-16 Thread Markus Armbruster
John Snow writes: > On 1/16/20 3:25 PM, Markus Armbruster wrote: >> Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" >> modules" switched QAPISchema.visit() from >> >> for entity in self._entity_list: >> >> effectively to >> >> for mod in

Re: [PATCH] uas: fix super speed bMaxPacketSize0

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/17/20 7:27 AM, Gerd Hoffmann wrote: For usb2 bMaxPacketSize0 is "n", for usb3 it is "1 << n", so it must be 9 not 64 ... Maybe add in description: From "Universal Serial Bus 3.1 Specification": If the device is operating at Gen X speed, the bMaxPacketSize0 field shall be set to 09H

[Bug 1860053] Re: Possible lack of precision when calling clock_gettime via vDSO on user mode ppc64le

2020-01-16 Thread Philippe Mathieu-Daudé
** Tags added: linux-user ppc -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1860053 Title: Possible lack of precision when calling clock_gettime via vDSO on user mode ppc64le Status in QEMU:

[Bug 1859418] Re: disk driver with iothread setting hangs live migrations

2020-01-16 Thread Mark Zealey
I will try the newest version as you suggest. However please note that this is a redhat/centos 2.12 version which means it has a load of the newest patches on it so probably closer to a 4-series than real 2.12... Mark -- You received this bug notification because you are a member of qemu-

Re: [PATCH 2/4] tests/tcg/aarch64: Fix compilation parameters for pauth-%

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/17/20 12:08 AM, Richard Henderson wrote: Hiding the required architecture within asm() is not correct. Add it to the cflags of the (cross-) compiler. Signed-off-by: Richard Henderson --- tests/tcg/aarch64/pauth-1.c | 2 -- tests/tcg/aarch64/pauth-2.c | 2 --

[PATCH v2] hw/arm: Adjust some coding styles about memory hotplug

2020-01-16 Thread Keqian Zhu
From: zhukeqian There is extra indent in ACPI GED plug cb. And we can use existing helper function to trigger hotplug handler plug. Reviewed-by: Igor Mammedov Signed-off-by: Keqian Zhu --- v1->v2: - Add Igor's R-b Cc: Shameer Kolothum Cc: "Michael S. Tsirkin" Cc: Igor Mammedov Cc: Peter

Re: [PATCH v2 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/16/20 8:43 PM, Richard Henderson wrote: The page isn't (necessarily) present in the host /proc/self/maps, and even if it might be it isn't present in page_flags, and even if it was it might not have the same set of page permissions. The easiest thing to do, particularly when it comes to

Re: [PATCH v2 5/5] linux-user: Flush out implementation of gettimeofday

2020-01-16 Thread Philippe Mathieu-Daudé
On 1/16/20 8:43 PM, Richard Henderson wrote: The first argument, timeval, is allowed to be NULL. The second argument, timezone, was missing. While its use is deprecated, it is still present in the syscall. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 27

[PATCH] uas: fix super speed bMaxPacketSize0

2020-01-16 Thread Gerd Hoffmann
For usb2 bMaxPacketSize0 is "n", for usb3 it is "1 << n", so it must be 9 not 64 ... Reported-by: f...@fysnet.net Signed-off-by: Gerd Hoffmann --- hw/usb/dev-uas.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/usb/dev-uas.c b/hw/usb/dev-uas.c index

[PATCH v2 2/2] virtio-9p-device: convert to new virtio_delete_queue

2020-01-16 Thread pannengyuan
From: Pan Nengyuan Use virtio_delete_queue to make it more clear. Signed-off-by: Pan Nengyuan --- Changes V2 to V1: - replace virtio_del_queue to virtio_delete_queue to make it more clear. --- hw/9pfs/virtio-9p-device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH v2 0/2] fix memleaks in virtio_9p_device_unrealize

2020-01-16 Thread pannengyuan
From: Pan Nengyuan v1: fix memleaks in virtio_9p_device_unrealize v2: split patch to make it easier for stable branches to merge Pan Nengyuan (2): virtio-9p-device: fix memleak in virtio_9p_device_unrealize virtio-9p-device: convert to new virtio_delete_queue hw/9pfs/virtio-9p-device.c |

[PATCH v2 1/2] virtio-9p-device: fix memleak in virtio_9p_device_unrealize

2020-01-16 Thread pannengyuan
From: Pan Nengyuan v->vq forgot to cleanup in virtio_9p_device_unrealize, the memory leak stack is as follow: Direct leak of 14336 byte(s) in 2 object(s) allocated from: #0 0x7f819ae43970 (/lib64/libasan.so.5+0xef970) ??:? #1 0x7f819872f49d (/lib64/libglib-2.0.so.0+0x5249d) ??:? #2

Re: [PATCH] spapr: Fail CAS if option vector table cannot be parsed

2020-01-16 Thread David Gibson
On Thu, Jan 16, 2020 at 04:34:06PM +0100, Philippe Mathieu-Daudé wrote: > Hi Greg, > > On 1/16/20 4:05 PM, Greg Kurz wrote: > > Most of the option vector helpers have assertions to check their > > arguments aren't null. The guest can provide an arbitrary address > > for the CAS structure that

Re: [PATCH v3 4/4] block: Mark 'block_resize' as coroutine

2020-01-16 Thread Markus Armbruster
Kevin Wolf writes: > Am 16.01.2020 um 16:13 hat Markus Armbruster geschrieben: >> Kevin Wolf writes: >> >> > Am 16.01.2020 um 10:45 hat Markus Armbruster geschrieben: >> >> Kevin Wolf writes: >> >> > block_resize is safe to run in a coroutine, so use it as an example for >> >> > the new

[PATCH v1] vnc: fix VNC artifacts

2020-01-16 Thread Cameron Esfahani via
Remove VNC optimization to reencode framebuffer update as raw if it's smaller than the default encoding. QEMU's implementation was naive and didn't account for the ZLIB z_stream mutating with each compression. Just saving and restoring the output buffer offset wasn't sufficient to "rewind" the

[Bug 1860056] Re: mips binaries segfault

2020-01-16 Thread Aleksandar Markovic
Could you attach the version of g++ and qemu? In other words, can you capture the output of: mips-linux-gnu-g++ --version and qemu-mips --version ? Does the problem happen if you compile with "-static" option? Yours, Aleksandar ** Tags added: mips -- You received this bug notification

[PATCH 4/4] linux-user: Fix some constants in remaining termbits.h

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Some constants were defined in terms of host, instead of target, as they should be. Signed-off-by: Aleksandar Markovic --- linux-user/aarch64/termbits.h| 4 ++-- linux-user/arm/termbits.h| 4 ++-- linux-user/cris/termbits.h | 4 ++--

[PATCH 2/4] linux-user: mips: Synchronize termbits.h with kernel

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Synchronize all elements of mips' termbits.h with kernel and make sure that all applicable macros and other definitions are expressed in terms of target, not the host. Signed-off-by: Aleksandar Markovic --- linux-user/mips/termbits.h | 140

[PATCH 3/4] linux-user: xtensa: Fix some constants in termbits.h

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Some constants were defined in terms of host, instead of target, as they should be. Some additional trivial changes in this patch were forced by checkpatch.pl. Reviewed-by: Max Filippov Signed-off-by: Aleksandar Markovic --- linux-user/xtensa/termbits.h | 207

[PATCH 1/4] linux-user: alpha: Synchronize termbits.h with kernel

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Synchronize all elements of alpha's termbits.h with kernel and make sure that all applicable macros and other definitions are expressed in terms of target, not the host. Signed-off-by: Aleksandar Markovic --- linux-user/alpha/termbits.h | 82

[PATCH 0/4] linux-user: Fix some issues in termbits.h files

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic This series is a spin-off of v5 of earlier series "linux-user: Misc patches for 5.0", that became too large to manage. I will submit the rest of that large series separately. Files linux-user//termbits.h seem to be in a very bad shape: unsynchronized with kernel,

Re: [PATCH 2/2] arm/virt/acpi: remove _ADR from devices identified by _HID

2020-01-16 Thread Guoheyi
在 2020/1/16 20:24, Peter Maydell 写道: On Wed, 15 Jan 2020 at 10:55, Michael S. Tsirkin wrote: Here's a hopefully better patch. Peter does this address the issue? Signed-off-by: Michael S. Tsirkin diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index

Re: [PATCH 2/2] arm/virt/acpi: remove _ADR from devices identified by _HID

2020-01-16 Thread Guoheyi
在 2020/1/16 21:25, Igor Mammedov 写道: On Thu, 16 Jan 2020 19:56:19 +0800 Guoheyi wrote: 在 2020/1/5 20:53, Michael S. Tsirkin 写道: On Sun, Jan 05, 2020 at 07:34:01AM -0500, Michael S. Tsirkin wrote: On Thu, Dec 19, 2019 at 02:47:59PM +0800, Heyi Guo wrote: According to ACPI spec, _ADR

[PATCH] target/hppa: Allow, but diagnose, LDCW aligned only mod 4

2020-01-16 Thread Richard Henderson
The PA-RISC 1.1 specification says that LDCW must be aligned mod 16 or the operation is undefined. However, real hardware only generates an unaligned access trap for unaligned mod 4. Match real hardware, but diagnose with GUEST_ERROR a violation of the specification. Reported-by: Helge Deller

RE: [PATCH RFC 04/12] migration/rdma: Create multiRDMA migration threads

2020-01-16 Thread fengzhimin
Thanks for your review. I will merge this with multifd. -Original Message- From: Juan Quintela [mailto:quint...@redhat.com] Sent: Thursday, January 16, 2020 9:25 PM To: fengzhimin Cc: dgilb...@redhat.com; arm...@redhat.com; ebl...@redhat.com; qemu-devel@nongnu.org; Zhanghailiang ;

RE: [PATCH RFC 01/12] migration: Add multiRDMA capability support

2020-01-16 Thread fengzhimin
Thanks for your review. I will modify its according to your suggestions. -Original Message- From: Juan Quintela [mailto:quint...@redhat.com] Sent: Thursday, January 16, 2020 9:19 PM To: Dr. David Alan Gilbert Cc: fengzhimin ; arm...@redhat.com; ebl...@redhat.com; qemu-devel@nongnu.org;

Re: [PATCH v2 0/3] hw/hppa/machine: Restrict the total memory size to 3GB

2020-01-16 Thread Richard Henderson
On 1/8/20 2:05 PM, Philippe Mathieu-Daudé wrote: > Following the discussion of Igor's patch "hppa: allow max > ram size upto 4Gb" [1] I tried to simplify the current > code so Igor's series doesn't change the CLI with this > machine. > > v2: Simplify by limiting to 3GB (Helge review) > > [1]

[Bug 1860056] [NEW] mips binaries segfault

2020-01-16 Thread mcandre
Public bug reported: Hello World appears to segfault with qemu mips, on a Debian 10.0.0 Buster amd64 host. Example: $ cat mips/test/hello.cpp #include using std::cout; int main() { cout << "Hello World!\n"; return 0; } $ mips-linux-gnu-g++ -o hello hello.cpp && ./hello qemu:

[PULL 0/1] target/openrisc patch queue

2020-01-16 Thread Richard Henderson
The following changes since commit 28b58f19d269633b3d14b6aebf1e92b3cd3ab56e: ui/gtk: Get display refresh rate with GDK version 3.22 or later (2020-01-16 14:03:45 +) are available in the Git repository at: https://github.com/rth7680/qemu.git tags/pull-or1k-20200116 for you to fetch

[PULL 1/1] target/openrisc: Fix FPCSR mask to allow setting DZF

2020-01-16 Thread Richard Henderson
From: Stafford Horne The mask used when setting FPCSR allows setting bits 10 to 1. However, OpenRISC has flags and config bits in 11 to 1, 11 being Divide by Zero Flag (DZF). This seems like an off-by-one bug. This was found when testing the GLIBC test suite which has test cases to set and

Re: [PATCH] target/openrisc: Fix FPCSR mask to allow setting DZF

2020-01-16 Thread Richard Henderson
On 1/10/20 11:28 AM, Stafford Horne wrote: > The mask used when setting FPCSR allows setting bits 10 to 1. However, > OpenRISC has flags and config bits in 11 to 1, 11 being Divide by Zero > Flag (DZF). This seems like an off-by-one bug. > > This was found when testing the GLIBC test suite

RE: [PATCH 093/104] virtiofsd: introduce inode refcount to prevent use-after-free

2020-01-16 Thread misono.tomoh...@fujitsu.com
> > On Thu, Jan 16, 2020 at 09:25:42PM +0900, Misono Tomohiro wrote: > > > > From: Stefan Hajnoczi > > > > > > > > If thread A is using an inode it must not be deleted by thread B > > > > when processing a FUSE_FORGET request. > > > > > > > > The FUSE protocol itself already has a counter called

[PATCH v2 1/2] target/arm: Return correct IL bit in merge_syn_data_abort

2020-01-16 Thread Richard Henderson
From: Jeff Kubascik The IL bit is set for 32-bit instructions, thus passing false with the is_16bit parameter to syn_data_abort_with_iss() makes a syn mask that always has the IL bit set. Pass is_16bit as true to make the initial syn mask have IL=0, so that the final IL value comes from or'ing

[PATCH v2 0/2] target/arm: Fix ISSIs16Bit

2020-01-16 Thread Richard Henderson
Changes in v2: - Include the merge_syn_data_abort fix, as a self-contained patch. r~ Jeff Kubascik (1): target/arm: Return correct IL bit in merge_syn_data_abort Richard Henderson (1): target/arm: Set ISSIs16Bit in make_issinfo target/arm/tlb_helper.c | 2 +- target/arm/translate.c |

[PATCH v2 2/2] target/arm: Set ISSIs16Bit in make_issinfo

2020-01-16 Thread Richard Henderson
During the conversion to decodetree, the setting of ISSIs16Bit got lost. This causes the guest os to incorrectly adjust trapping memory operations. Cc: qemu-sta...@nongnu.org Fixes: 46beb58efbb8a2a32 ("target/arm: Convert T16, load (literal)") Reported-by: Jeff Kubascik Signed-off-by: Richard

Re: [PATCH V2] vhost-user-test: fix a memory leak

2020-01-16 Thread Pan Nengyuan
On 1/16/2020 9:29 PM, Thomas Huth wrote: > On 15/01/2020 10.13, Thomas Huth wrote: >> On 15/01/2020 04.10, Pan Nengyuan wrote: >>> >>> On 1/13/2020 10:32 AM, Pan Nengyuan wrote: On 1/12/2020 6:39 PM, Thomas Huth wrote: >> [...] > ... and now I had to unqueue the patch again. It is

Re: [PATCH v3 0/2] Fix hyperv synic on vhost

2020-01-16 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20200116202414.157959-1-dgilb...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Message-id: 20200116202414.157959-1-dgilb...@redhat.com Type: series Subject: [PATCH v3 0/2] Fix hyperv synic on

Re: [PATCH] util/cacheinfo: fix crash when compiling with uClibc

2020-01-16 Thread Richard Henderson
On 12/16/19 1:18 AM, Carlos Santos wrote: > On Thu, Oct 17, 2019 at 8:06 PM Carlos Santos wrote: >> >> On Thu, Oct 17, 2019 at 9:47 AM Peter Maydell >> wrote: >>> >>> On Thu, 17 Oct 2019 at 13:39, wrote: From: Carlos Santos uClibc defines _SC_LEVEL1_ICACHE_LINESIZE and

[Bug 1860053] [NEW] Possible lack of precision when calling clock_gettime via vDSO on user mode ppc64le

2020-01-16 Thread Patrick Meiring
Public bug reported: Occurs on QEMU v4.2.0 run on docker (via the qemu-user-static:v4.2.0-2 image) on an AMD64 Ubuntu 18.04.3 LTS machine provided by travis-ci.org. >From golang's https://github.com/golang/go/issues/36592: It was discovered that golang's time.NewTicker() and time.Sleep()

Re: [PATCH v2 4/4] qcow2: Use BDRV_SECTOR_SIZE instead of the hardcoded value

2020-01-16 Thread Alberto Garcia
On Tue 14 Jan 2020 03:15:48 PM CET, Max Reitz wrote: >> @@ -219,7 +219,7 @@ static int l2_load(BlockDriverState *bs, uint64_t offset, >> * Writes one sector of the L1 table to the disk (can't update single >> entries >> * and we really don't want bdrv_pread to perform a read-modify-write) >>

[PATCH 1/4] target/arm: Fix PAuth sbox functions

2020-01-16 Thread Richard Henderson
From: Vincent Dehors In the PAC computation, sbox was applied over wrong bits. As this is a 4-bit sbox, bit index should be incremented by 4 instead of 16. Test vector from QARMA paper (https://eprint.iacr.org/2016/444.pdf) was used to verify one computation of the pauth_computepac() function

Re: [PATCH 0/4] migration: Replace gemu_log with qemu_log

2020-01-16 Thread Josh Kunz
On Mon, Jan 13, 2020 at 7:06 PM Warner Losh wrote: > The bsd-user that is in tree doesn't work. I've been trying to catch up to > qemu head of tree, but I'm only up to 3.2... chances are the bsd-user > changes will not change the state of things... > Ah good to know. Would you all prefer I

Re: [PATCH 0/4] migration: Replace gemu_log with qemu_log

2020-01-16 Thread Josh Kunz
On Tue, Jan 14, 2020 at 3:02 AM Alex Bennée wrote: > > Josh Kunz writes: > > > > > > Not tested: > > * Build/logging with bsd-user. I do not have easy access to a BSD > > system. > > If you have the time we have vm-build-netbsd: > > make vm-build-netbsd

[PATCH 2/4] tests/tcg/aarch64: Fix compilation parameters for pauth-%

2020-01-16 Thread Richard Henderson
Hiding the required architecture within asm() is not correct. Add it to the cflags of the (cross-) compiler. Signed-off-by: Richard Henderson --- tests/tcg/aarch64/pauth-1.c | 2 -- tests/tcg/aarch64/pauth-2.c | 2 -- tests/tcg/aarch64/Makefile.target | 1 + 3 files changed, 1

[PATCH 4/4] tests/tcg/aarch64: Add pauth-4

2020-01-16 Thread Richard Henderson
Perform the set of operations and test described in LP 1859713. Suggested-by: Adrien GRASSEIN Signed-off-by: Richard Henderson --- tests/tcg/aarch64/pauth-4.c | 25 + tests/tcg/aarch64/Makefile.target | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-)

[PATCH 3/4] tests/tcg/aarch64: Add pauth-3

2020-01-16 Thread Richard Henderson
This is the test vector from the QARMA paper, run through PACGA. Suggested-by: Vincent Dehors Signed-off-by: Richard Henderson --- tests/tcg/aarch64/system/pauth-3.c| 40 +++ tests/tcg/aarch64/Makefile.softmmu-target | 5 ++- 2 files changed, 44 insertions(+), 1

[PATCH 0/4] target/arm: Fix ComputePAC (LP 1859713)

2020-01-16 Thread Richard Henderson
Thanks to Vincent and Adrien for both reporting the bug and providing the solution. I've converted their manual testing into executable tests. r~ Richard Henderson (3): tests/tcg/aarch64: Fix compilation parameters for pauth-% tests/tcg/aarch64: Add pauth-3 tests/tcg/aarch64: Add

[PATCH 04/12] linux-user: Add support for FS_IOC_FSXATTR ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Both FS_IOC_FSGETXATTR and FS_IOC_FSSETXATTR accept a pointer to the structure struct fsxattr { __u32 fsx_xflags; /* xflags field value (get/set) */ __u32 fsx_extsize;/* extsize field value (get/set)*/ __u32 fsx_nextents;

[PATCH 08/12] linux-user: Add support for FDFMT ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic FDFMTBEG, FDFMTTRK, and FDFMTEND ioctls provide means for controlling formatting of a floppy drive. FDFMTTRK's third agrument is a pointer to the structure: struct format_descr { unsigned int device,head,track; }; defined in Linux kernel header . Since all

[PATCH 09/12] linux-user: Add support for FDGETFDCSTAT ioctl

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic FDGETFDCSTAT's third agrument is a pointer to the structure: struct floppy_fdc_state { int spec1; int spec2; int dtr; unsigned char version; unsigned char dor; unsigned long address; unsigned int rawcmd:2; unsigned int reset:1;

[PATCH 11/12] linux-user: Add support for KCOV_ ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic KCOV_ENABLE and KCOV_DISABLE play the role in kernel coverage tracing. These ioctls do not use the third argument of ioctl() system call and are straightforward to implement in QEMU. Reviewed-by: Laurent Vivier Signed-off-by: Aleksandar Markovic ---

[PATCH 10/12] configure: Detect kcov support and introduce CONFIG_KCOV

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic kcov is kernel code coverage tracing tool. It requires kernel 4.4+ compiled with certain kernel options. This patch checks if kcov header "sys/kcov.h" is present on build machine, and stores the result in variable CONFIG_KCOV, meant to be used in linux-user code

[PATCH 07/12] linux-user: Add support for FD ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic FDSETEMSGTRESH, FDSETMAXERRS, and FDGETMAXERRS ioctls are commands for controlling error reporting of a floppy drive. FDSETEMSGTRESH's third agrument is a pointer to the structure: struct floppy_max_errors { unsigned int abort, /* number of errors to be

[PATCH 01/12] linux-user: Add support for FS_IOC_VERSION ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic A very specific thing for these two ioctls is that their code implies that their third argument is of type 'long', but the kernel uses that argument as if it is of type 'int'. This anomaly is recognized also in commit 6080723 (linux-user: Implement FS_IOC_GETFLAGS and

[PATCH 06/12] linux-user: Add support for FIFREEZE and FITHAW ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic Both FIFREEZE and FITHAW ioctls accept an integer as their third argument. All ioctls in this group (FI* ioctl) are guarded with "#ifdef", so the guards are used in this implementation too for consistency (however, many of ioctls in FI* group became old enough that

[PATCH 05/12] linux-user: Add support for FITRIM ioctl

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic FITRIM ioctl accepts a pointer to the structure struct fstrim_range { __u64 start; __u64 len; __u64 minlen; }; as its third argument. All ioctls in this group (FI* ioctl) are guarded with "#ifdef", so the guards are used in this implementation too for

[PATCH 00/12] linux-user: Add support for fs, fd,and kcov ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic This series is a spin-off of v5 of earlier series "linux-user: Misc patches for 5.0", that became too large to manage. I will submit the rest of that large series separately. The only difference between patches in this series and in the former series is that all

[PATCH 02/12] linux-user: Add support for FS_IOC32_FLAGS ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic These FS_IOC32_FLAGS ioctls are identical to FS_IOC_FLAGS ioctls, but without the anomaly of their number defined as if their third argument is of type long, while it is treated internally in kernel as is of type int. Reviewed-by: Laurent Vivier Signed-off-by:

[PATCH 03/12] linux-user: Add support for FS_IOC32_VERSION ioctls

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic These FS_IOC32_VERSION ioctls are identical to FS_IOC_VERSION ioctls, but without the anomaly of their number defined as if their third argument is of type long, while it is treated internally in kernel as is of type int. Reviewed-by: Laurent Vivier Signed-off-by:

[PATCH 12/12] linux-user: Add support for KCOV_INIT_TRACE ioctl

2020-01-16 Thread Aleksandar Markovic
From: Aleksandar Markovic KCOV_INIT_TRACE ioctl plays the role in kernel coverage tracing. This ioctl's third argument is of type 'unsigned long', and the implementation in QEMU is straightforward. Reviewed-by: Laurent Vivier Signed-off-by: Aleksandar Markovic --- linux-user/ioctls.h |

[Bug 1859713] Re: ARM v8.3a pauth not working

2020-01-16 Thread Richard Henderson
Oops again. The test case has the parts of the key the wrong way around. I'll submit the pair of patches to the mailing list. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1859713 Title: ARM

[Bug 1859713] Re: ARM v8.3a pauth not working

2020-01-16 Thread Richard Henderson
Ooof. Good catch on the sbox error. That said, how did you test pauth_computepac? I still do not get the C5 result above, but 0x99d88f4472f3be39. The following test case sets up the parameters. ** Patch added: "test case"

Re: [PATCH v3 02/11] 9pfs: require msize >= 4096

2020-01-16 Thread Christian Schoenebeck
On Donnerstag, 16. Januar 2020 19:07:48 CET Greg Kurz wrote: > > The point here was that there must be some kind of absolute minimum msize, > > Then the absolute minimum size is 7, the size of the header part that is > common to all messages: > > size[4] Message tag[2] > > > even though the

Re: [PATCH] qapi: Fix code generation with Python 3.5

2020-01-16 Thread John Snow
On 1/16/20 3:25 PM, Markus Armbruster wrote: > Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" > modules" switched QAPISchema.visit() from > > for entity in self._entity_list: > > effectively to > > for mod in self._module_dict.values(): > for entity in

Re: qemu-4.0.1: vhost_region_add_section:Section rounded to 0 prior to previous a0000

2020-01-16 Thread Peter Lieven
> Am 16.01.2020 um 21:26 schrieb Dr. David Alan Gilbert : > > * Peter Lieven (p...@kamp.de) wrote: >> Am 16.01.20 um 13:47 schrieb Peter Lieven: >>> Am 13.01.20 um 17:25 schrieb Peter Lieven: Am 09.01.20 um 19:44 schrieb Dr. David Alan Gilbert: > * Peter Lieven (p...@kamp.de) wrote:

[PATCH v2 2/4] vl: Reduce scope of variables in configure_accelerators

2020-01-16 Thread Richard Henderson
The accel_list and tmp variables are only used when manufacturing -machine accel, options based on -accel. Acked-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed by: Aleksandar Markovic Signed-off-by: Richard Henderson --- v2: The freeing of accel_list was fixed in adb464ff671d. --- vl.c

[PATCH v2 3/4] vl: Remove useless test in configure_accelerators

2020-01-16 Thread Richard Henderson
The result of g_strsplit is never NULL. Acked-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed by: Aleksandar Markovic Signed-off-by: Richard Henderson --- vl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vl.c b/vl.c index

[PATCH v2 4/4] vl: Only choose enabled accelerators in configure_accelerators

2020-01-16 Thread Richard Henderson
By choosing "tcg:kvm" when kvm is not enabled, we generate an incorrect warning: "invalid accelerator kvm". At the same time, use g_str_has_suffix rather than open-coding the same operation. Presumably the inverse is also true with --disable-tcg. Fixes: 28a0961757fc Acked-by: Paolo Bonzini

[PATCH v2 1/4] vl: Remove unused variable in configure_accelerators

2020-01-16 Thread Richard Henderson
The accel_initialised variable no longer has any setters. Fixes: 6f6e1698a68c Acked-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed by: Aleksandar Markovic Signed-off-by: Richard Henderson --- vl.c | 3 +-- 1 file changed, 1 insertion(+), 2

[PATCH v2 0/4] vl: Fixes for cleanups to -accel

2020-01-16 Thread Richard Henderson
Running qemu-system-foo with no options should not generate a warning for "invalid accelerator bar". Changes in v2: * Rebase on master, getting the free accel_list fix from upstream. Re-word the resulting patch 2 to merely reduce the scope of the local variables. * Use

[Bug 1859713] Re: ARM v8.3a pauth not working

2020-01-16 Thread Vincent Dehors
Hi, Here is a patch for this bug. The sbox function was using "b+=16" instead of "b+=4". Also, you check test vector using : ```c uint64_t P = 0xfb623599da6e8127ull; uint64_t T = 0x477d469dec0b8762ull; uint64_t w0 = 0x84be85ce9804e94bull; uint64_t k0 = 0xec2802d4e0a488e9ull;

Re: [PATCH] target/s390x/kvm: Enable adapter interruption suppression again

2020-01-16 Thread Cornelia Huck
On Thu, 16 Jan 2020 15:19:13 -0500 Matthew Rosato wrote: > On 1/16/20 7:20 AM, Thomas Huth wrote: > > The AIS feature has been disabled late in the v2.10 development > > cycle since there were some issues with migration (see commit > > 3f2d07b3b01ea61126b - "s390x/ais: for 2.10 stable: disable

Re: qemu-4.0.1: vhost_region_add_section:Section rounded to 0 prior to previous a0000

2020-01-16 Thread Dr. David Alan Gilbert
* Peter Lieven (p...@kamp.de) wrote: > Am 16.01.20 um 13:47 schrieb Peter Lieven: > > Am 13.01.20 um 17:25 schrieb Peter Lieven: > > > Am 09.01.20 um 19:44 schrieb Dr. David Alan Gilbert: > > > > * Peter Lieven (p...@kamp.de) wrote: > > > > > Am 08.01.20 um 16:04 schrieb Dr. David Alan Gilbert: >

[PATCH] qapi: Fix code generation with Python 3.5

2020-01-16 Thread Markus Armbruster
Recent commit 3e7fb5811b "qapi: Fix code generation for empty modules" modules" switched QAPISchema.visit() from for entity in self._entity_list: effectively to for mod in self._module_dict.values(): for entity in mod._entity_list: Visits in the same order as long as .values()

[PATCH v3 2/2] vhost: Only align sections for vhost-user

2020-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" I added hugepage alignment code in c1ece84e7c9 to deal with vhost-user + postcopy which needs aligned pages when using userfault. However, on x86 the lower 2MB of address space tends to be shotgun'd with small fragments around the 512-640k range - e.g. video RAM,

[PATCH v3 0/2] Fix hyperv synic on vhost

2020-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hyperv's synic (that we emulate) is a feature that allows the guest to place some magic (4k) pages of RAM anywhere it likes in GPA. This confuses vhost's RAM section merging when these pages land over the top of hugepages. This v3 takes a different approach to v2

[PATCH v3 1/2] vhost: Add names to section rounded warning

2020-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Add the memory region names to section rounding/alignment warnings. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/hw/virtio/vhost.c b/hw/virtio/vhost.c index

Re: [PATCH] target/s390x/kvm: Enable adapter interruption suppression again

2020-01-16 Thread Matthew Rosato
On 1/16/20 7:20 AM, Thomas Huth wrote: The AIS feature has been disabled late in the v2.10 development cycle since there were some issues with migration (see commit 3f2d07b3b01ea61126b - "s390x/ais: for 2.10 stable: disable ais facility"). We originally wanted to enable it again for newer

Re: [PATCH 3/3] linux-user/i386: Emulate x86_64 vsyscalls

2020-01-16 Thread Alex Bennée
Richard Henderson writes: > On 1/16/20 6:26 AM, Alex Bennée wrote: >>> +/* >>> + * Perform the syscall. None of the vsyscalls should need restarting, >>> + * and all faults should have been caught above. >>> + */ >>> +ret = do_syscall(env, syscall, env->regs[R_EDI],

[PATCH v2 3/5] linux-user/i386: Emulate x86_64 vsyscalls

2020-01-16 Thread Richard Henderson
Notice the magic page during translate, much like we already do for the arm32 commpage. At runtime, raise an exception to return cpu_loop for emulation. Reviewed-by: Paolo Bonzini Signed-off-by: Richard Henderson --- target/i386/cpu.h | 1 + linux-user/i386/cpu_loop.c | 105

Re: [PATCH v2 0/5] linux-user: Implement x86_64 vsyscalls

2020-01-16 Thread Richard Henderson
On 1/16/20 9:43 AM, Richard Henderson wrote: > Changes since v2: > > * Add /proc/self/maps line > > I'm not sure this is really necessary. The linux kernel > self-test checks for it, and modifies the set of tests that > it runs based on it. But otherwise I think it's

[PATCH v2 4/5] linux-user: Add x86_64 vsyscall page to /proc/self/maps

2020-01-16 Thread Richard Henderson
The page isn't (necessarily) present in the host /proc/self/maps, and even if it might be it isn't present in page_flags, and even if it was it might not have the same set of page permissions. The easiest thing to do, particularly when it comes to the "[vsyscall]" note at the end of line, is to

[PATCH v2 1/5] target/i386: Renumber EXCP_SYSCALL

2020-01-16 Thread Richard Henderson
We are not short of numbers for EXCP_*. There is no need to confuse things by having EXCP_VMEXIT and EXCP_SYSCALL overlap, even though the former is only used for system mode and the latter is only used for user mode. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe

[PATCH v2 5/5] linux-user: Flush out implementation of gettimeofday

2020-01-16 Thread Richard Henderson
The first argument, timeval, is allowed to be NULL. The second argument, timezone, was missing. While its use is deprecated, it is still present in the syscall. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 27 +-- 1 file changed, 25 insertions(+), 2

[PATCH v2 2/5] linux-user/i386: Split out gen_signal

2020-01-16 Thread Richard Henderson
This is a bit tidier than open-coding the 5 lines necessary to initialize the target_siginfo_t. In addition, this zeros the remaining bytes of the target_siginfo_t, rather than passing in garbage. Reviewed-by: Paolo Bonzini Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé

[PATCH v2 0/5] linux-user: Implement x86_64 vsyscalls

2020-01-16 Thread Richard Henderson
Changes since v2: * Add /proc/self/maps line I'm not sure this is really necessary. The linux kernel self-test checks for it, and modifies the set of tests that it runs based on it. But otherwise I think it's unused. * Fix errors in base gettimeofday syscall

  1   2   3   4   >