Re: [PATCH] hw/sd: sdhci: Do not transfer any data when command fails

2021-02-13 Thread Bin Meng
Hi Alexander, On Fri, Feb 12, 2021 at 5:25 AM Alexander Bulekov wrote: > > On 210211 1154, Alexander Bulekov wrote: > ... > > I applied this along with <20210208193450.2689517-1-f4...@amsat.org> > > "hw/sd/sdhci: Do not modify BlockSizeRegister if transaction in progress" > > > > I ran through th

Re: Emulating sd card with hifive_u risc-v machine

2021-02-13 Thread Bin Meng
Hi Pascal, On Thu, Feb 11, 2021 at 5:47 AM Pascal Scholz wrote: > > Hi Alistair, > > thanks for your quick and helpful reply. :) > > I'll see, if I can try them out on the weekend and will report my results. > > Best regards and thanks again! > > Pascal > > On 08.02.21 23:49, Alistair Francis wro

Re: hifive-unleashed board

2021-02-13 Thread Bin Meng
Hello Sanskar, On Sat, Feb 13, 2021 at 7:27 PM Sanskar Khandelwal wrote: > > Hii there, > > I want to know, what are the devices(e.g., networking, UART, flash, etc?) > qemu support for the platform sifive risc-v hifive unleashed board .Also if > you can share any document related to this will b

Guest network access not working on M1 Macs

2021-02-13 Thread Programmingkid
Is guest networking working for users of M1 Macs? None of my VMs are able to connect to the internet. I'm using an M1 Mac with Mac OS 11.1. My QEMU is currently at commit f4ceebdec531243dd72e38f85f085287e6e63258.

Re: [PATCH v1 1/5] tpm: mark correct memory region range dirty when clearing RAM

2021-02-13 Thread Stefan Berger
On 2/10/21 12:15 PM, David Hildenbrand wrote: We might not start at the beginning of the memory region. We could also calculate via the difference in the host address; however, memory_region_set_dirty() also relies on memory_region_get_ram_addr() internally, so let's just use that. Fixes: ffab1b

Re: [PATCH-for-5.2?] MAINTAINERS: Fix default-configs/ entries

2021-02-13 Thread Laurent Vivier
Le 17/11/2020 à 12:46, Philippe Mathieu-Daudé a écrit : > Update the F: line after the Meson refactor. > > Fixes: 1bb4cb1c338..73362fc0b0c ("default-configs: ...") > Signed-off-by: Philippe Mathieu-Daudé > --- > MAINTAINERS | 20 ++-- > 1 file changed, 10 insertions(+), 10 deleti

Re: [PATCH] target/avr/cpu: Use device_class_set_parent_realize()

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 09:03, Philippe Mathieu-Daudé a écrit : > Change generated automatically using the Coccinelle > patch included in commit bf853881690 ("qdev: use > device_class_set_parent_realize/unrealize/reset()") > > Signed-off-by: Philippe Mathieu-Daudé > --- > target/avr/cpu.c | 4 +--- > 1

Re: [PATCH-for-5.2?] MAINTAINERS: Fix default-configs/ entries

2021-02-13 Thread Laurent Vivier
Le 17/11/2020 à 12:46, Philippe Mathieu-Daudé a écrit : > Update the F: line after the Meson refactor. > > Fixes: 1bb4cb1c338..73362fc0b0c ("default-configs: ...") > Signed-off-by: Philippe Mathieu-Daudé > --- > MAINTAINERS | 20 ++-- > 1 file changed, 10 insertions(+), 10 deleti

Re: [PATCH 0/4] qga: Fix some style problems

2021-02-13 Thread Laurent Vivier
Le 04/11/2020 à 08:46, Marc-André Lureau a écrit : > > > On Mon, Oct 26, 2020 at 1:16 PM AlexChen > wrote: > > Fix some error style problems found by checkpatch.pl > . > > alexchen (4): >   qga: Add spaces around operator >  

Re: [PATCH] hw/scsi/megasas: Remove pointless parenthesis

2021-02-13 Thread Laurent Vivier
Le 11/10/2020 à 21:50, Philippe Mathieu-Daudé a écrit : > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/scsi/megasas.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c > index e24c12d7eed..d57402c9b09 100644 > --- a/hw/scsi/meg

Re: [PATCH v2 09/12] u2f-passthru: put it into the 'misc' category

2021-02-13 Thread Laurent Vivier
Le 30/11/2020 à 09:36, Gan Qixin a écrit : > The category of the u2f-passthru device is not set, put it into the 'misc' > category. > > Signed-off-by: Gan Qixin > --- > Cc: Gerd Hoffmann > Cc: Philippe Mathieu-Daudé > --- > hw/usb/u2f-passthru.c | 1 + > 1 file changed, 1 insertion(+) > > dif

Re: [PATCH v2 07/12] tpm: put some tpm devices into the correct category

2021-02-13 Thread Laurent Vivier
Le 30/11/2020 à 09:36, Gan Qixin a écrit : > Some tpm devices have no category, put them into the correct category. > > Signed-off-by: Gan Qixin > --- > Cc: Stefan Berger > --- > hw/tpm/tpm_tis_isa.c| 1 + > hw/tpm/tpm_tis_sysbus.c | 1 + > 2 files changed, 2 insertions(+) > > diff --git a

Re: [PATCH v2 04/12] nvdimm: put it into the 'storage' category

2021-02-13 Thread Laurent Vivier
Le 30/11/2020 à 09:36, Gan Qixin a écrit : > The category of the nvdimm device is not set, put it into the 'storage' > category. > > Signed-off-by: Gan Qixin > --- > Cc: Xiao Guangrong > --- > hw/mem/nvdimm.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/mem/nvdimm.c b/hw/mem/nvd

Re: [PATCH v2 03/12] vmmouse: put it into the 'input' category

2021-02-13 Thread Laurent Vivier
Le 30/11/2020 à 09:36, Gan Qixin a écrit : > The category of the vmmouse device is not set, put it into the 'input' > category. > > Signed-off-by: Gan Qixin > Reviewed-by: Philippe Mathieu-Daudé > --- > Cc: Michael S. Tsirkin > --- > hw/i386/vmmouse.c | 1 + > 1 file changed, 1 insertion(+) >

Re: [PATCH v2 02/12] virtio-pmem: put it into the 'storage' category

2021-02-13 Thread Laurent Vivier
Le 30/11/2020 à 09:36, Gan Qixin a écrit : > The category of the virtio-pmem device is not set, put it into the 'storage' > category. > > Signed-off-by: Gan Qixin > Reviewed-by: Pankaj Gupta > --- > Cc: Michael S. Tsirkin > --- > hw/virtio/virtio-pmem.c | 1 + > 1 file changed, 1 insertion(+)

Re: [PATCH] linux-user: Add support for pivot_root syscall

2021-02-13 Thread Laurent Vivier
Le 12/10/2020 à 09:14, David Leonard a écrit : > > Tested on Ubuntu 20.04 x86_64 against arm-linux-gnueabi toolchain. > > Signed-off-by: David Leonard > --- >  linux-user/syscall.c | 20 >  1 file changed, 20 insertions(+) > > diff --git a/linux-user/syscall.c b/linux-user/s

Re: [PATCH] hw/scsi/megasas: Remove pointless parenthesis

2021-02-13 Thread Laurent Vivier
Le 11/10/2020 à 21:50, Philippe Mathieu-Daudé a écrit : > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/scsi/megasas.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c > index e24c12d7eed..d57402c9b09 100644 > --- a/hw/scsi/meg

Re: [PATCH] MAINTAINERS: add my github tree URL

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 12:08, qemu_oss--- via a écrit : > On Montag, 1. Februar 2021 11:08:10 CET Greg Kurz wrote: >> On Sat, 30 Jan 2021 15:39:14 +0100 >> >> Christian Schoenebeck wrote: >>> I already used this github URL for PRs before and will continue to use it >>> in foreseeable future. >>> >>> Sign

Re: [PATCH] Fix SPDX-License-Identifier typos

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 21:01, Ryan Finnie a écrit : > Several SPDX headers contain "SPDX-License-Identifer" (note the > missing "i" before "er"); fix these typos. > > Signed-off-by: Ryan Finnie > Cc: qemu-triv...@nongnu.org > --- > hw/misc/aspeed_xdma.c | 2 +- > hw/misc/sbsa_ec.c |

Re: [PATCH] docs/user: Remove outdated 'Quick Start' section

2021-02-13 Thread Laurent Vivier
Le 22/11/2020 à 01:01, Peter Maydell a écrit : > The 'Quick Start' section of the userspace emulator documentation is > very old and outdated. In particular: > - it suggests running x86-on-x86 emulation, which is the least >interesting possible use case > - it recommends that users download t

Re: [PATCH 2/4] hw/block/fdc: Remove the check_media_rate property

2021-02-13 Thread Laurent Vivier
Le 08/02/2021 à 08:05, Thomas Huth a écrit : > On 05/02/2021 21.15, John Snow wrote: >> On 2/5/21 1:37 AM, Thomas Huth wrote: >>> On 05/02/2021 01.40, John Snow wrote: On 2/3/21 12:18 PM, Thomas Huth wrote: > This was only required for the pc-1.0 and earlier machine types. > Now that t

Re: [PATCH] hw/i386/xen: Remove dead code

2021-02-13 Thread Laurent Vivier
Le 02/02/2021 à 16:56, Philippe Mathieu-Daudé a écrit : > 'drivers_blacklisted' is never accessed, remove it. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/i386/xen/xen_platform.c | 13 ++--- > 1 file changed, 2 insertions(+), 11 deletions(-) > > diff --git a/hw/i386/xen/xen_plat

Re: [PATCH v2 0/2] block: Use 'read-zeroes=true' mode by default with 'null-co' driver

2021-02-13 Thread Fam Zheng
On 2021-02-11 15:26, Philippe Mathieu-Daudé wrote: > The null-co driver doesn't zeroize buffer in its default config, > because it is designed for testing and tests want to run fast. > However this confuses security researchers (access to uninit > buffers). I'm a little surprised. Is changing def

Re: [PATCH] linux-user/elfload: fix address calculation in fallback scenario

2021-02-13 Thread Laurent Vivier
Le 31/01/2021 à 07:19, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, guest_loaddr was not taken into account when returning an > address from pgb_find_hole when /proc/self/maps was unavailable which > caused an improper guest_base address to be calculated. > > This could cause a

Re: [PATCH] linux-user/elfload: do not assume MAP_FIXED_NOREPLACE kernel support

2021-02-13 Thread Laurent Vivier
Le 31/01/2021 à 07:19, Vincent Fazio a écrit : > From: Vincent Fazio > > Previously, pgd_find_hole_fallback assumed that if the build host's libc > had MAP_FIXED_NOREPLACE defined that the address returned by mmap would > match the requested address. This is not a safe assumption for Linux > kern

Re: [PATCH] linux-user/elfload: munmap proper address in pgd_find_hole_fallback

2021-02-13 Thread Laurent Vivier
Le 31/01/2021 à 07:18, Vincent Fazio a écrit : > From: Vincent Fazio Please, use the same email address to send your patch. > > Previously, if the build host's libc did not define MAP_FIXED_NOREPLACE > or if the running kernel didn't support that flag, it was possible for > pgd_find_hole_fallba

Re: [PULL 0/7] M68k for 6.0 patches

2021-02-13 Thread Peter Maydell
On Fri, 12 Feb 2021 at 21:18, Laurent Vivier wrote: > > The following changes since commit 5b19cb63d9dfda41b412373b8c9fe14641bcab60: > > Merge remote-tracking branch 'remotes/rth-gitlab/tags/pull-tcg-20210205' in= > to staging (2021-02-05 22:59:12 +) > > are available in the Git repository a

Re: [PATCH] linux-user: target: signal: Support TARGET_SS_AUTODISARM

2021-02-13 Thread Laurent Vivier
Le 08/10/2020 à 06:31, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Add definitions to pass building. > > Signed-off-by: Chen Gang > --- > linux-user/alpha/target_signal.h | 6 ++ > linux-user/hppa/target_signal.h | 5 + > linux-user/mips/target_signal.h | 6 ++ >

Re: [PATCH] linux-user: add TARGET_SO_{DOMAIN,PROTOCOL}

2021-02-13 Thread Laurent Vivier
Le 04/02/2021 à 16:39, Jason A. Donenfeld a écrit : > These were defined for other platforms but mistakenly left out of mips > and generic, so this commit adds them to the places missing. Then it > makes them be translated in getsockopt. > > Signed-off-by: Jason A. Donenfeld > --- > linux-user/g

Re: [PATCH] linux-user: add TARGET_SO_{DOMAIN,PROTOCOL}

2021-02-13 Thread Laurent Vivier
Le 04/02/2021 à 16:39, Jason A. Donenfeld a écrit : > These were defined for other platforms but mistakenly left out of mips > and generic, so this commit adds them to the places missing. Then it > makes them be translated in getsockopt. > > Signed-off-by: Jason A. Donenfeld > --- > linux-user/g

Re: [PATCH 1/1] linux-user/syscall: Fix do_ioctl_ifconf() for 64 bit targets.

2021-02-13 Thread Laurent Vivier
Le 09/01/2021 à 19:59, Stefan a écrit : > The sizeof(struct ifreq) is 40 for 64 bit and 32 for 32 bit architectures. > This structure contains a union of other structures, of which struct ifmap > is the biggest for 64 bit architectures. Calling ioclt(…, SIOCGIFCONF, …) > fills a struct sockaddr of

Re: [PATCH] linux-user: fix O_NONBLOCK in signalfd4() and eventfd2() syscalls

2021-02-13 Thread Laurent Vivier
Le 10/02/2021 à 07:12, Helge Deller a écrit : > On the hppa target userspace binaries may call signalfd4() and > eventfd2() with an old TARGET_O_NONBLOCK value of 00024 instead of > 00020 for the "mask" syscall parameter, in which case the current > emulation doesn't handle the translation

Re: [PATCH] linux-user: fix O_NONBLOCK in signalfd4() and eventfd2() syscalls

2021-02-13 Thread Laurent Vivier
Le 13/02/2021 à 20:05, Helge Deller a écrit : > On 2/13/21 5:38 PM, Laurent Vivier wrote: >> Le 10/02/2021 à 07:12, Helge Deller a écrit : >>> On the hppa target userspace binaries may call signalfd4() and >>> eventfd2() with an old TARGET_O_NONBLOCK value of 00024 instead of >>> 00020 for

Re: [PATCH 1/1] linux-user/syscall: Fix do_ioctl_ifconf() for 64 bit targets.

2021-02-13 Thread Laurent Vivier
Le 09/01/2021 à 19:59, Stefan a écrit : > The sizeof(struct ifreq) is 40 for 64 bit and 32 for 32 bit architectures. > This structure contains a union of other structures, of which struct ifmap > is the biggest for 64 bit architectures. Calling ioclt(…, SIOCGIFCONF, …) > fills a struct sockaddr of

Re: [PATCH] linux-user: fix O_NONBLOCK in signalfd4() and eventfd2() syscalls

2021-02-13 Thread Helge Deller
On 2/13/21 5:38 PM, Laurent Vivier wrote: Le 10/02/2021 à 07:12, Helge Deller a écrit : On the hppa target userspace binaries may call signalfd4() and eventfd2() with an old TARGET_O_NONBLOCK value of 00024 instead of 00020 for the "mask" syscall parameter, in which case the current emul

Re: [PATCH] linux-user: signal: Support TARGET_SS_AUTODISARM

2021-02-13 Thread Laurent Vivier
Le 08/10/2020 à 06:25, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Microsoft sqlserver 2017 x86_64 uses it. The implementation references > from the linux kernel. > > Signed-off-by: Chen Gang > --- > linux-user/generic/signal.h | 6 ++ > linux-user/signal.c | 23

Re: [PATCH] linux-user: target: signal: Support TARGET_SS_AUTODISARM

2021-02-13 Thread Laurent Vivier
Le 08/10/2020 à 06:31, cheng...@emindsoft.com.cn a écrit : > From: Chen Gang > > Add definitions to pass building. > > Signed-off-by: Chen Gang > --- > linux-user/alpha/target_signal.h | 6 ++ > linux-user/hppa/target_signal.h | 5 + > linux-user/mips/target_signal.h | 6 ++ >

Re: [PULL 00/14] NBD patches through 2021-02-12

2021-02-13 Thread Peter Maydell
On Fri, 12 Feb 2021 at 20:23, Eric Blake wrote: > > The following changes since commit eac92d316351b855ba79eb374dd21cc367f1f9c1: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20210211-1' into staging (2021-02-11 > 19:57:50 +) > > are available in the Git reposit

Re: [PATCH] linux-user/mmap: Avoid asserts for out of range mremap calls

2021-02-13 Thread Laurent Vivier
Le 08/01/2021 à 18:42, Richard Purdie a écrit : > If mremap() is called without the MREMAP_MAYMOVE flag with a start address > just before the end of memory (reserved_va) where new_size would exceed > it (and GUEST_ADDR_MAX), the assert(end - 1 <= GUEST_ADDR_MAX) in  > page_set_flags() would trigg

Re: [RFC PATCH] linux-user/mmap: Return EFAULT for invalid addresses

2021-02-13 Thread Laurent Vivier
Le 08/01/2021 à 18:46, Richard Purdie a écrit : > When using qemu-i386 to run gobject introspection parts of a webkitgtk  > build using musl as libc on a 64 bit host, it sits in an infinite loop  > of mremap calls of ever decreasing/increasing addresses. > > I suspect something in the musl memory

Re: [PATCH] linux-user/mmap: Avoid asserts for out of range mremap calls

2021-02-13 Thread Laurent Vivier
Le 08/01/2021 à 18:42, Richard Purdie a écrit : > If mremap() is called without the MREMAP_MAYMOVE flag with a start address > just before the end of memory (reserved_va) where new_size would exceed > it (and GUEST_ADDR_MAX), the assert(end - 1 <= GUEST_ADDR_MAX) in  > page_set_flags() would trigg

Re: [PATCH] linux-user: Fix loading of BSS segments

2021-02-13 Thread Laurent Vivier
Le 17/12/2020 à 11:17, Giuseppe Musacchio a écrit : > Some ELF binaries encode the .bss section as an extension of the data > ones by setting the segment p_memsz > p_filesz. Some other binaries take > a different route and encode it as a stand-alone PT_LOAD segment with > p_filesz = 0 and p_memsz >

Re: [PATCH] linux-user: fix O_NONBLOCK in signalfd4() and eventfd2() syscalls

2021-02-13 Thread Laurent Vivier
Le 10/02/2021 à 07:12, Helge Deller a écrit : > On the hppa target userspace binaries may call signalfd4() and > eventfd2() with an old TARGET_O_NONBLOCK value of 00024 instead of > 00020 for the "mask" syscall parameter, in which case the current > emulation doesn't handle the translation

Re: [PATCH v3 17/23] accel/tcg: cache single instruction TB on pending replay exception

2021-02-13 Thread Richard Henderson
On 2/13/21 5:03 AM, Alex Bennée wrote: > Again there is no reason to jump through the nocache hoops to execute > a single instruction block. We do have to add an additional wrinkle to > the cpu_handle_interrupt case to ensure we let through a TB where we > have specifically disabled icount for the

Re: [PATCH v3 14/23] tests/plugin: expand insn test to detect duplicate instructions

2021-02-13 Thread Richard Henderson
On 2/13/21 5:03 AM, Alex Bennée wrote: > A duplicate insn is one that is appears to be executed twice in a row. > This is currently possible due to -icount and cpu_io_recompile() > causing a re-translation of a block. On it's own this won't trigger > any tests though. > > The heuristics that the p

Re: [PATCH v2] linux-user: fix O_NONBLOCK usage for hppa target

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 23:05, Helge Deller a écrit : > Historically the parisc linux port tried to be compatible with HP-UX > userspace and as such defined the O_NONBLOCK constant to 024 to > emulate separate NDELAY & NONBLOCK values. > > Since parisc was the only Linux platform which had two bits se

Re: [PATCH v2] linux-user: fix O_NONBLOCK usage for hppa target

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 23:05, Helge Deller a écrit : > Historically the parisc linux port tried to be compatible with HP-UX > userspace and as such defined the O_NONBLOCK constant to 024 to > emulate separate NDELAY & NONBLOCK values. > > Since parisc was the only Linux platform which had two bits se

Re: [PATCH] linux-user: Add missing TARGET___O_TMPFILE for hppa and alpha

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 16:59, Helge Deller a écrit : > The hppa and alpha targets miss the #define of the TARGET___O_TMPFILE > and as such fail to run a trivial symlink command like > > ln -s /bin/bash /tmp > > which results in an -EINVAL return code. > > Adding the define fixes the problem. > > S

Re: [PATCH v2 1/1] linux-user/signal: Decode waitid si_code

2021-02-13 Thread Laurent Vivier
Le 19/01/2021 à 19:24, Alistair Francis a écrit : > When mapping the host waitid status to the target status we previously > just used decoding information in the status value. This doesn't follow > what the waitid documentation describes, which instead suggests using > the si_code value for the de

Re: [PATCH] linux-user: Add missing TARGET___O_TMPFILE for hppa and alpha

2021-02-13 Thread Laurent Vivier
Le 01/02/2021 à 16:59, Helge Deller a écrit : > The hppa and alpha targets miss the #define of the TARGET___O_TMPFILE > and as such fail to run a trivial symlink command like > > ln -s /bin/bash /tmp > > which results in an -EINVAL return code. > > Adding the define fixes the problem. > > S

Re: [PATCH v2 1/1] linux-user/signal: Decode waitid si_code

2021-02-13 Thread Laurent Vivier
Le 19/01/2021 à 19:24, Alistair Francis a écrit : > When mapping the host waitid status to the target status we previously > just used decoding information in the status value. This doesn't follow > what the waitid documentation describes, which instead suggests using > the si_code value for the de

Re: [PATCH v3 23/23] tests/acceptance: add a memory callback check

2021-02-13 Thread Philippe Mathieu-Daudé
On 2/13/21 2:03 PM, Alex Bennée wrote: > This test makes sure that the inline and callback based memory checks > count the same number of accesses. > > Signed-off-by: Alex Bennée > --- > tests/acceptance/tcg_plugins.py | 31 +++ > 1 file changed, 31 insertions(+) Rev

Re: About creating machines on the command line

2021-02-13 Thread Luc Michel
On 2/10/21 1:13 PM, Alexander Graf wrote: On 05.02.21 11:43, Luc Michel wrote: On 2/3/21 6:09 PM, Alexander Graf wrote: On 03.02.21 17:55, Philippe Mathieu-Daudé wrote: On 1/11/21 3:50 PM, Luc Michel wrote: Hi, We would like to work on improving QEMU to be able to create custom machine

[PATCH v3 22/23] tests/plugin: allow memory plugin to do both inline and callbacks

2021-02-13 Thread Alex Bennée
This is going to be useful for acceptance tests that check both types are being called the same number of times, especially when icount is enabled. Signed-off-by: Alex Bennée --- tests/plugin/mem.c | 27 --- 1 file changed, 20 insertions(+), 7 deletions(-) diff --git a/t

[PATCH v3 20/23] accel/tcg: allow plugin instrumentation to be disable via cflags

2021-02-13 Thread Alex Bennée
When icount is enabled and we recompile an MMIO access we end up double counting the instruction execution. To avoid this we introduce the CF_MEMI cflag which only allows memory instrumentation for the next TB (which won't yet have been counted). As this is part of the hashed compile flags we will

Re: [RFC PATCH 02/15] sd: add eMMC support

2021-02-13 Thread Luc Michel
On 2/11/21 9:17 AM, Sai Pavan Boddu wrote: From: Vincent Palatin The parameters mimick a real 4GB eMMC, but it can be set to various sizes. Signed-off-by: Vincent Palatin [SPB: Rebased the patch over qemu 5.1, Mark eMMC to support all timing modes] Signed-off-by: Sai Pavan Boddu Signe

[PATCH v3 19/23] accel/tcg: remove CF_NOCACHE and special cases

2021-02-13 Thread Alex Bennée
Now we no longer generate CF_NOCACHE blocks we can remove a bunch of the special case handling for them. While we are at it we can remove the unused tb->orig_tb field and save a few bytes on the TB structure. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20210209182749.3

Re: Qemu mipssim patches, mips malta and virtio bugs

2021-02-13 Thread Philippe Mathieu-Daudé
On 2/13/21 11:05 AM, Reinoud Zandijk wrote: > On Fri, Feb 12, 2021 at 10:44:55AM +0100, Philippe Mathieu-Daudé wrote: i'd like to get the following simple patches to the MIPS/mipssim target adding virtio-mmio devices to it. >> >> Please submit your patches as a series so we can revi

[PATCH v3 14/23] tests/plugin: expand insn test to detect duplicate instructions

2021-02-13 Thread Alex Bennée
A duplicate insn is one that is appears to be executed twice in a row. This is currently possible due to -icount and cpu_io_recompile() causing a re-translation of a block. On it's own this won't trigger any tests though. The heuristics that the plugin use can't deal with the x86 rep instruction w

[PATCH v3 16/23] accel/tcg: actually cache our partial icount TB

2021-02-13 Thread Alex Bennée
When we exit a block under icount with instructions left to execute we might need a shorter than normal block to take us to the next deterministic event. Instead of creating a throwaway block on demand we use the existing compile flags mechanism to ensure we fetch (or compile and fetch) a block wit

[PATCH v3 06/23] contrib: Add spaces around operator

2021-02-13 Thread Alex Bennée
From: zhouyang I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: spaces required around that '*' Signed-off-by: zhouyang Signed-off-by: Alex Bennée Message-Id: <20210118031004.1662363-4-zhouyang...

[PATCH v3 17/23] accel/tcg: cache single instruction TB on pending replay exception

2021-02-13 Thread Alex Bennée
Again there is no reason to jump through the nocache hoops to execute a single instruction block. We do have to add an additional wrinkle to the cpu_handle_interrupt case to ensure we let through a TB where we have specifically disabled icount for the block. As the last user of cpu_exec_nocache we

[PATCH v3 21/23] tests/acceptance: add a new tests to detect counting errors

2021-02-13 Thread Alex Bennée
The insn plugin has a simple heuristic to detect if an instruction is detected running twice in a row. Check the plugin log after the run and pass accordingly. Signed-off-by: Alex Bennée Tested-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210210221053.18050

[PATCH v3 09/23] accel/tcg/plugin-gen: fix the call signature for inline callbacks

2021-02-13 Thread Alex Bennée
A recent change to the handling of constants in TCG changed the pattern of ops emitted for a constant add. We no longer emit a mov and the constant can be applied directly to the TCG_op_add arguments. This was causing SEGVs when running the insn plugin with arg=inline. Fix this by updating copy_add

[PATCH v3 15/23] tests/acceptance: add a new set of tests to exercise plugins

2021-02-13 Thread Alex Bennée
This is just a simple test to count the instructions executed by a kernel. However a later test will detect a failure condition when icount is enabled. Signed-off-by: Alex Bennée Tested-by: Wainer dos Santos Moschetta Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210210221053.18050-16-alex

[PATCH v3 23/23] tests/acceptance: add a memory callback check

2021-02-13 Thread Alex Bennée
This test makes sure that the inline and callback based memory checks count the same number of accesses. Signed-off-by: Alex Bennée --- tests/acceptance/tcg_plugins.py | 31 +++ 1 file changed, 31 insertions(+) diff --git a/tests/acceptance/tcg_plugins.py b/tests/acc

[PATCH v3 13/23] target/sh4: Create superh_io_recompile_replay_branch

2021-02-13 Thread Alex Bennée
From: Richard Henderson Move the code from accel/tcg/translate-all.c to target/sh4/cpu.c. Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210208233906.479571-5-richard.hender...@linaro.org> Message-Id: <2

[PATCH v3 04/23] contrib: Don't use '#' flag of printf format

2021-02-13 Thread Alex Bennée
From: zhouyang I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the misuse of '#' flag of printf format Signed-off-by: zhouyang Signed-off-by: Alex Bennée Message-Id: <20210118031004.1662363-2-zhouyang...@huawei.com> Mes

[PATCH v3 10/23] exec: Move TranslationBlock typedef to qemu/typedefs.h

2021-02-13 Thread Alex Bennée
From: Richard Henderson This also means we don't need an extra declaration of the structure in hw/core/cpu.h. Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210208233906.479571-2-richard.hender...@linaro

[PATCH v3 05/23] contrib: Fix some code style problems, ERROR: "foo * bar" should be "foo *bar"

2021-02-13 Thread Alex Bennée
From: zhouyang I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: "foo * bar" should be "foo *bar" Signed-off-by: zhouyang Signed-off-by: Alex Bennée Message-Id: <20210118031004.1662363-3-zhouyang..

[PATCH v3 18/23] accel/tcg: re-factor non-RAM execution code

2021-02-13 Thread Alex Bennée
There is no real need to use CF_NOCACHE here. As long as the TB isn't linked to other TBs or included in the QHT or jump cache then it will only get executed once. Signed-off-by: Alex Bennée Reviewed-by: Richard Henderson Message-Id: <20210209182749.31323-10-alex.ben...@linaro.org> Message-Id: <

[PATCH v3 02/23] plugins: add API to return a name for a IO device

2021-02-13 Thread Alex Bennée
This may well end up being anonymous but it should always be unique. Signed-off-by: Alex Bennée Reviewed-by: Clement Deschamps Reviewed-by: Emilio G. Cota Reviewed-by: Richard Henderson Message-Id: <20200713200415.26214-11-alex.ben...@linaro.org> Message-Id: <20210210221053.18050-3-alex.ben...

[PATCH v3 11/23] accel/tcg: Create io_recompile_replay_branch hook

2021-02-13 Thread Alex Bennée
From: Richard Henderson Create a hook in which to split out the mips and sh4 ifdefs from cpu_io_recompile. [AJB: s/stoped/stopped/] Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210208233906.479571-3-r

[PATCH v3 12/23] target/mips: Create mips_io_recompile_replay_branch

2021-02-13 Thread Alex Bennée
From: Richard Henderson Move the code from accel/tcg/translate-all.c to target/mips/cpu.c. Signed-off-by: Richard Henderson Signed-off-by: Alex Bennée Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210208233906.479571-4-richard.hender...@linaro.org> Message-Id: <

[PATCH v3 01/23] hw/virtio/pci: include vdev name in registered PCI sections

2021-02-13 Thread Alex Bennée
When viewing/debugging memory regions it is sometimes hard to figure out which PCI device something belongs to. Make the names unique by including the vdev name in the name string. Signed-off-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Michael S. Tsirkin Message-Id: <20200

[PATCH v3 07/23] contrib: space required after that ','

2021-02-13 Thread Alex Bennée
From: zhouyang I am reading contrib related code and found some style problems while check the code using checkpatch.pl. This commit fixs the issue below: ERROR: space required after that ',' Signed-off-by: zhouyang Signed-off-by: Alex Bennée Message-Id: <20210118031004.1662363-5-zhouyang...@h

[PATCH v3 08/23] contrib: Open brace '{' following struct go on the same line

2021-02-13 Thread Alex Bennée
From: zhouyang I found some style problems whil check the code using checkpatch.pl. This commit fixs the issue below: ERROR: that open brace { should be on the previous line Signed-off-by: zhouyang Signed-off-by: Alex Bennée Message-Id: <20210118031004.1662363-6-zhouyang...@huawei.com> Message

[PATCH v3 00/23] plugins/next pre-PR (hwprofile, regression fixes, icount count fix)

2021-02-13 Thread Alex Bennée
Hi, Hopefully the final round for the current plugins queue. I've added a slightly more finessed version of the io_recompile handling for plugins which is now call CF_MEMI_ONLY - which allows memory instrumentation but nothing else. I've added an additional acceptance test to ensure inline/cb base

[PATCH v3 03/23] plugins: new hwprofile plugin

2021-02-13 Thread Alex Bennée
This is a plugin intended to help with profiling access to various bits of system hardware. It only really makes sense for system emulation. It takes advantage of the recently exposed helper API that allows us to see the device name (memory region name) associated with a device. You can specify a

Re: [RFC PATCH 11/15] sd: emmc: Add Extended CSD register definitions

2021-02-13 Thread Luc Michel
On 2/11/21 9:17 AM, Sai Pavan Boddu wrote: From: Cédric Le Goater Add user friendly macros for EXT_CSD register. > Signed-off-by: Cédric Le Goater [spb: Rebased over versal emmc series, updated commit message] Signed-off-by: Sai Pavan Boddu Hi, If Cédric agrees, maybe you can squash

hifive-unleashed board

2021-02-13 Thread Sanskar Khandelwal
Hii there, I want to know, what are the devices(e.g., networking, UART, flash, etc?) qemu support for the platform sifive risc-v hifive unleashed board .Also if you can share any document related to this will be a big help. Actually I am new to embedded systems and this is for my project where I

Re: [PATCH v13 0/5] UFFD write-tracking migration/snapshots

2021-02-13 Thread David Hildenbrand
> Am 13.02.2021 um 10:34 schrieb Andrey Gruzdev : > >  >> On 12.02.2021 19:11, Peter Xu wrote: On Fri, Feb 12, 2021 at 09:52:52AM +0100, David Hildenbrand wrote: > On 12.02.21 04:06, Peter Xu wrote: >> On Thu, Feb 11, 2021 at 10:09:58PM +0100, David Hildenbrand wrote: >> The is

[PATCH] acpi: Remove duplicated code handling OEM ID and OEM table ID fields

2021-02-13 Thread Marian Postevca
The code handling OEM ID and OEM table ID fields had some duplicated code and was using unnecessary dynamically allocated memory. This change fixes that. Signed-off-by: Marian Postevca --- hw/acpi/hmat.h | 2 +- hw/i386/acpi-common.h| 2 +- include/hw/acpi/acpi-bu

Qemu mipssim patches, mips malta and virtio bugs

2021-02-13 Thread Reinoud Zandijk
Hi, On Fri, Feb 12, 2021 at 10:44:55AM +0100, Philippe Mathieu-Daudé wrote: > >> i'd like to get the following simple patches to the MIPS/mipssim target > >> adding > >> virtio-mmio devices to it. > > Please submit your patches as a series so we can review them on > the list: > https://wiki.qemu

Re: [PATCH v13 0/5] UFFD write-tracking migration/snapshots

2021-02-13 Thread Andrey Gruzdev
On 12.02.2021 19:11, Peter Xu wrote: On Fri, Feb 12, 2021 at 09:52:52AM +0100, David Hildenbrand wrote: On 12.02.21 04:06, Peter Xu wrote: On Thu, Feb 11, 2021 at 10:09:58PM +0100, David Hildenbrand wrote: The issue is when the discard happened before starting the snapshot. Write-protection w

hifive-unleashed board

2021-02-13 Thread Sanskar Khandelwal
Hii there, I want to know, what are the devices(e.g., networking, UART, flash, etc?) qemu support for the platform sifive risc-v hifive unleashed board .Also if you can share any document related to this will be a big help. Actually I am new to embedded systems and this is for my project where I