Re: [PATCH v2 0/2] accel: kvm: Some bugfixes for kvm dirty log

2021-01-24 Thread Keqian Zhu
Hi Paolo, Any suggestions on this patch series :-) ? Thanks, Keqian On 2020/12/17 9:49, Keqian Zhu wrote: > Hi all, > > This series fixes memory waste and adds alignment check for unmatched > qemu_real_host_page_size and TARGET_PAGE_SIZE. > > Thanks. > > Keqian Zhu (2): > accel: kvm: Fix

Re: [PULL 29/31] qemu-option: clean up id vs. list->merge_lists

2021-01-24 Thread Markus Armbruster
Paolo Bonzini writes: > Looking at all merge-lists QemuOptsList, here is how they access their > QemuOpts: > > reopen_opts in qemu-io-cmds.c ("qemu-img reopen -o") > qemu_opts_find(_opts, NULL) > > empty_opts in qemu-io.c ("qemu-io open -o") > qemu_opts_find(_opts, NULL) > >

[PATCH v2 2/2] build-sys: make libslirp a meson subproject

2021-01-24 Thread marcandre . lureau
From: Marc-André Lureau Remove the manual build. Signed-off-by: Marc-André Lureau --- configure | 2 +- meson.build | 62 +++ .gitmodules | 4 +-- slirp => subprojects/libslirp | 0 4 files changed, 7

[PATCH v2 0/2] Update libslirp & make it a subproject

2021-01-24 Thread marcandre . lureau
From: Marc-André Lureau Hi, Here is a few patches to update libslirp to git upstream. Since it now supports meson subproject(), adapt the build system to use it, and related fixes. v2: - fix unused variables on macos - fork_exec_child_setup: improve signal handling Marc-André Lureau (2):

[PATCH v2 1/2] slirp: update to git master

2021-01-24 Thread marcandre . lureau
From: Marc-André Lureau git cherry-diff: Commits on bacb71f1c3ed5f40e393afd8be81bedfba13a401 branch that is not on 8f43a99191afb47ca3f3c6972f6306209f367ece branch + 1021b0dc38d39f1dc95a296fe3e05a24a087cdc6 disable_dns option + 0f94ceec752592e4ac632a24e3c64a97dd09bf4c limit vnameserver_addr to

[Bug 1913012] Re: Installed firmware descriptor files contain (invalid) relative paths

2021-01-24 Thread Alain Kalker
I think this needs to be fixed in QEMU source. The `configure_file()` action needs both an absolute path for `configuration` (to substitute into the descriptor files) _and_ a relative path for use with the `install_dir` keyword argument. -- You received this bug notification because you are a

Re: [PATCH 0/2] hw/block/nvme: zoned fixes

2021-01-24 Thread Klaus Jensen
On Jan 19 14:54, Klaus Jensen wrote: > From: Klaus Jensen > > Patch [1/2] fixes the zone append bug reported by Niklas. [2/2] > refactors the zone write check function to return status codes in a > different order if there are multiple zone write violations that apply. > > Klaus Jensen (2): >

[Bug 1913012] Re: Installed firmware descriptor files contain (invalid) relative paths

2021-01-24 Thread Alain Kalker
There is an issue on Void Linux packages issue tracker about this bug[1] # Steps to verify the issue on a fresh Git clone of QEMU source $ git clone https://github.com/qemu/qemu $ cd qemu $ make DEBUG=1 docker-test-misc@alpine [...] COPYRUNNER RUN test-misc in qemu/alpine * Prepared

Re: [PATCH] replay: fix replay of the interrupts

2021-01-24 Thread Paolo Bonzini
In general I agree, but != means that rr disabled returns true. In general it seems to me that rr disabled should work more or less the same as record mode, because there is no replay log to provide the checkpoints. Paolo Il lun 25 gen 2021, 06:38 Pavel Dovgalyuk ha scritto: > On 23.01.2021

Re: [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied

2021-01-24 Thread Nathan Chancellor
On Mon, Jan 25, 2021 at 01:41:50PM +0800, Yang Weijiang wrote: > On Sun, Jan 24, 2021 at 02:08:29PM -0700, Nathan Chancellor wrote: > > On Wed, Jan 13, 2021 at 05:04:30PM +0800, Yang Weijiang wrote: > > > QEMU option -cpu max(max_features) means "Enables all features supported > > > by > > > the

Re: [PATCH] util/log: flush TB cache when log level changes

2021-01-24 Thread Pavel Dovgalyuk
On 22.01.2021 14:42, Alex Bennée wrote: Pavel Dovgalyuk writes: Sometimes we need to collect the translation logs starting from some point of the execution. Some TB listings may be missed in this case, when blocks were translated before. This patch clears TB cache to allow re-translation of

[Bug 1913012] [NEW] Installed firmware descriptor files contain (invalid) relative paths

2021-01-24 Thread Alain Kalker
Public bug reported: Unless the Qemu build is configured using `./configure --datadir= where is some absolute path which is a subdirectory of , the resulting installed firmware descriptor files contain relative paths for their `mapping.filename` properties. These relative paths will not be

Re: [PATCH] configure: Only build s390-ccw BIOS for system emulation

2021-01-24 Thread Thomas Huth
On 24/01/2021 17.17, Philippe Mathieu-Daudé wrote: It is pointless to build the s390-ccw BIOS when only user-mode emulation is built. Only build it when system mode emulation is selected. Signed-off-by: Philippe Mathieu-Daudé --- configure | 2 +- 1 file changed, 1 insertion(+), 1

Re: Fwd: VirtioSound device emulation implementation

2021-01-24 Thread Shreyansh Chouhan
Just a follow up. Still working on device initialization. I am trying to understand the relation between virtio-net and net device in qemu in hopes of recreating something similar with the audio device. Once I have the device initialization part ready I will send in a couple of patches for review.

Re: [PATCH] replay: fix replay of the interrupts

2021-01-24 Thread Pavel Dovgalyuk
On 23.01.2021 21:15, Paolo Bonzini wrote: On 19/01/21 13:39, Pavel Dovgalyuk wrote: Sometimes interrupt event comes at the same time with the virtual timers. In this case replay tries to proceed the timers, because deadline for them is zero. This patch allows processing interrupts and

Re: [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied

2021-01-24 Thread Yang Weijiang
On Sun, Jan 24, 2021 at 02:08:29PM -0700, Nathan Chancellor wrote: > On Wed, Jan 13, 2021 at 05:04:30PM +0800, Yang Weijiang wrote: > > QEMU option -cpu max(max_features) means "Enables all features supported by > > the accelerator in the current host", this looks true for all the features > >

Re: [PATCH v2 2/2] net/eth: Fix stack-buffer-overflow in _eth_get_rss_ex_dst_addr()

2021-01-24 Thread Jason Wang
On 2021/1/15 下午11:11, Philippe Mathieu-Daudé wrote: QEMU fuzzer reported a buffer overflow in _eth_get_rss_ex_dst_addr() reproducible as: Want to apply but it doesn't apply on master: Applying: net/eth: Fix stack-buffer-overflow in _eth_get_rss_ex_dst_addr() error: sha1 information is

Re: [PATCH 0/6] target/mips: Convert Loongson LEXT opcodes to decodetree

2021-01-24 Thread Jiaxun Yang
在 2021/1/22 上午4:07, Richard Henderson 写道: On 1/12/21 11:54 AM, Philippe Mathieu-Daudé wrote: Based-on: <20210112184156.2014305-1-f4...@amsat.org> "decodetree: Allow 'dot' in opcode names" I'm still unconvinced about this. I've reviewed the code without regard to the spelling in the

Re: [PATCH v4 0/7] block: Add retry for werror=/rerror= mechanism

2021-01-24 Thread Ying Fang
Kindly ping for it. Thanks for Stefan's suggestion, we have re-implement the concept by introducing the 'retry' feature base on the werror=/rerror= mechanism. Hope this thread won't be missed. Any comments and reviews are wellcome. Thanks. Ying Fang. On 12/15/2020 8:30 PM, Jiahui Cen wrote:

Re: [PATCH v3 0/6] hw/sd: Support block write in SPI mode

2021-01-24 Thread Bin Meng
On Mon, Jan 25, 2021 at 4:28 AM Philippe Mathieu-Daudé wrote: > > These are Bin's SD patches from his v2, rebased on sd-next. Looks good to me. Thanks! > > v2: > https://www.mail-archive.com/qemu-devel@nongnu.org/msg775712.html > > Based-on: <20210124201106.2602238-1-f4...@amsat.org> > > Bin

Re: [PATCH] virtio: Add corresponding memory_listener_unregister to unrealize

2021-01-24 Thread Jason Wang
On 2021/1/23 上午4:08, Eugenio Pérez wrote: Cannot destroy address spaces of IOMMU-aware virtio devices without it, since they can contain memory listeners. It's better to explain why the one in finalize doesn't work here. Thanks Fixes: c611c76417f ("virtio: add MemoryListener to cache

Re: [PATCH] tests: Fix memory leak in tpm-util.c

2021-01-24 Thread Stefan Berger
On 1/21/21 10:44 AM, Philippe Mathieu-Daudé wrote: On 1/15/21 9:46 PM, Stefan Berger wrote: This patch fixes the following memory leak detected by asan: Indirect leak of 560320 byte(s) in 136 object(s) allocated from: #0 0x556b3b3f9b57 in calloc

Re: [PATCH v2 18/25] hw/sd: ssi-sd: Bump up version ids of VMStateDescription

2021-01-24 Thread Bin Meng
On Mon, Jan 25, 2021 at 12:59 AM Philippe Mathieu-Daudé wrote: > > On 1/23/21 11:40 AM, Bin Meng wrote: > > From: Bin Meng > > > > With all these fixes and improvements, there is no way for the > > VMStateDescription to keep backward compatibility. We will have > > to bump up version ids. > >

Re: [PATCH v2 09/25] hw/sd: ssi-sd: Fix the wrong command index for STOP_TRANSMISSION

2021-01-24 Thread Bin Meng
On Mon, Jan 25, 2021 at 8:33 AM Bin Meng wrote: > > On Mon, Jan 25, 2021 at 1:33 AM Philippe Mathieu-Daudé > wrote: > > > > On 1/23/21 11:40 AM, Bin Meng wrote: > > > From: Bin Meng > > > > > > This fixes the wrong command index for STOP_TRANSMISSION, the > > > required command to interrupt

Re: [PATCH v2 09/25] hw/sd: ssi-sd: Fix the wrong command index for STOP_TRANSMISSION

2021-01-24 Thread Bin Meng
On Mon, Jan 25, 2021 at 1:33 AM Philippe Mathieu-Daudé wrote: > > On 1/23/21 11:40 AM, Bin Meng wrote: > > From: Bin Meng > > > > This fixes the wrong command index for STOP_TRANSMISSION, the > > required command to interrupt the multiple block read command, > > in the old codes. It should be

Re: [PATCH v2 06/25] util: Add CRC16 (CCITT) calculation routines

2021-01-24 Thread Richard Henderson
On 1/24/21 10:24 AM, Philippe Mathieu-Daudé wrote: > On 1/24/21 9:07 PM, Richard Henderson wrote: >> Doesn't this get put in libutil, where it is only pulled from the archive >> when >> needed? Also, libutil is built once, not per-target. > > Hmm I just sent a pull request with this change

Re: [PATCH] configure: Fix --enable-tcg-interpreter

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/24/21 10:20 PM, Philippe Mathieu-Daudé wrote: > On 1/24/21 10:13 PM, Richard Henderson wrote: >> On 1/24/21 11:11 AM, Richard Henderson wrote: >>> The configure option was backward, and we failed to >>> pass the value on to meson. > > o_O > >>> >>> Fixes: 23a77b2d18b >>> Signed-off-by:

Re: [PATCH] configure: Fix --enable-tcg-interpreter

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/24/21 10:13 PM, Richard Henderson wrote: > On 1/24/21 11:11 AM, Richard Henderson wrote: >> The configure option was backward, and we failed to >> pass the value on to meson. o_O >> >> Fixes: 23a77b2d18b >> Signed-off-by: Richard Henderson >> --- >> configure| 5 +++-- >>

Re: [PATCH] configure: Fix --enable-tcg-interpreter

2021-01-24 Thread Richard Henderson
On 1/24/21 11:11 AM, Richard Henderson wrote: > The configure option was backward, and we failed to > pass the value on to meson. > > Fixes: 23a77b2d18b > Signed-off-by: Richard Henderson > --- > configure| 5 +++-- > tcg/tci/tcg-target.c.inc | 2 +- > 2 files changed, 4

[PATCH] configure: Fix --enable-tcg-interpreter

2021-01-24 Thread Richard Henderson
The configure option was backward, and we failed to pass the value on to meson. Fixes: 23a77b2d18b Signed-off-by: Richard Henderson --- configure| 5 +++-- tcg/tci/tcg-target.c.inc | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/configure b/configure index

Re: [Qemu-devel][PATCH] x86/cpu: Use max host physical address if -cpu max option is applied

2021-01-24 Thread Nathan Chancellor
On Wed, Jan 13, 2021 at 05:04:30PM +0800, Yang Weijiang wrote: > QEMU option -cpu max(max_features) means "Enables all features supported by > the accelerator in the current host", this looks true for all the features > except guest max physical address width, so add this patch to enable it. > >

[Bug 1892441] Re: "No zIPL section in IPL2 record" error when emulating Debian 10.5.0 on s390x

2021-01-24 Thread Bruno Haible
Yes. For booting Debian images using QEMU (<= 5.0.0) I use this recipe: machine_args="-M s390-ccw-virtio -m 512" disk_args="-drive file=debian86.img,if=none,format=raw,id=hd0 -device virtio-blk-ccw,drive=hd0" net_args="" display_args="-display gtk -monitor stdio" common_args="$machine_args

[PATCH v3 4/6] hw/sd: Introduce receive_ready() callback

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng At present there is a data_ready() callback for the SD data read path. Let's add a receive_ready() for the SD data write path. Signed-off-by: Bin Meng Reviewed-by: Philippe Mathieu-Daudé Acked-by: Alistair Francis Message-Id: <20210123104016.17485-16-bmeng...@gmail.com>

[PATCH v3 6/6] hw/sd: ssi-sd: Support multiple block write

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng For a multiple block write operation, each block begins with a multi write start token. Unlike the SD mode that the multiple block write ends when receiving a STOP_TRAN command (CMD12), a special stop tran token is used to signal the card. Emulating this by manually sending a

[PATCH v3 2/6] hw/sd: sd: Remove duplicated codes in single/multiple block read/write

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng The single block read (CMD17) codes are the same as the multiple block read (CMD18). Merge them into one. The same applies to single block write (CMD24) and multiple block write (CMD25). Signed-off-by: Bin Meng Acked-by: Alistair Francis Message-Id:

[PATCH v3 3/6] hw/sd: sd: Allow single/multiple block write for SPI mode

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng At present the single/multiple block write in SPI mode is blocked by sd_normal_command(). Remove the limitation. Signed-off-by: Bin Meng Acked-by: Alistair Francis Message-Id: <20210123104016.17485-14-bmeng...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c |

[PATCH v3 5/6] hw/sd: ssi-sd: Support single block write

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng Add 2 more states for the block write operation. The SPI host needs to send a data start token to start the transfer, and the data block written to the card will be acknowledged by a data response token. Signed-off-by: Bin Meng Acked-by: Alistair Francis Message-Id:

[PATCH v3 1/6] hw/sd: ssi-sd: Support multiple block read

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng In the case of a multiple block read operation every transferred block has its suffix of CRC16. Update the state machine logic to handle multiple block read. Signed-off-by: Bin Meng Acked-by: Alistair Francis Message-Id: <20210123104016.17485-11-bmeng...@gmail.com> [PMD: Change

[PATCH v3 0/6] hw/sd: Support block write in SPI mode

2021-01-24 Thread Philippe Mathieu-Daudé
These are Bin's SD patches from his v2, rebased on sd-next. v2: https://www.mail-archive.com/qemu-devel@nongnu.org/msg775712.html Based-on: <20210124201106.2602238-1-f4...@amsat.org> Bin Meng (6): hw/sd: ssi-sd: Support multiple block read hw/sd: sd: Remove duplicated codes in

Re: [PATCH v2 06/25] util: Add CRC16 (CCITT) calculation routines

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/24/21 9:07 PM, Richard Henderson wrote: > On 1/24/21 8:59 AM, Philippe Mathieu-Daudé wrote: >> On 1/23/21 11:39 AM, Bin Meng wrote: >>> From: Bin Meng >>> >>> Import CRC16 calculation routines from Linux kernel v5.10: >>> >>> include/linux/crc-ccitt.h >>> lib/crc-ccitt.c >>> >>> to QEMU:

[PULL 9/9] hw/sd: sd.h: Cosmetic change of using spaces

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng QEMU coding convention prefers spaces over tabs. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210123104016.17485-15-bmeng...@gmail.com> Signed-off-by: Philippe Mathieu-Daudé --- include/hw/sd/sd.h | 42

[PULL 4/9] util: Add CRC16 (CCITT) calculation routines

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng Import CRC16 calculation routines from Linux kernel v5.10: include/linux/crc-ccitt.h lib/crc-ccitt.c to QEMU: include/qemu/crc-ccitt.h util/crc-ccitt.c Signed-off-by: Bin Meng Acked-by: Alistair Francis Message-Id: <20210123104016.17485-7-bmeng...@gmail.com>

[PULL 8/9] hw/sd: ssi-sd: Use macros for the dummy value and tokens in the transfer

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng At present the codes use hardcoded numbers (0xff/0xfe) for the dummy value and block start token. Replace them with macros. Signed-off-by: Bin Meng Reviewed-by: Alistair Francis Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210123104016.17485-12-bmeng...@gmail.com>

[PULL 3/9] hw/sd: sd: Drop sd_crc16()

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng commit f6fb1f9b319f ("sdcard: Correct CRC16 offset in sd_function_switch()") changed the 16-bit CRC to be stored at offset 64. In fact, this CRC calculation is completely wrong. From the original codes, it wants to calculate the CRC16 of the first 64 bytes of sd->data[], however

[PULL 6/9] hw/sd: ssi-sd: Add a state representing Nac

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng Per the "Physical Layer Specification Version 8.00" chapter 7.5.2, "Data Read", there is a minimum 8 clock cycles (Nac) after the card response and before data block shows up on the data out line. This applies to both single and multiple block read operations. Current

[PULL 1/9] hw/sd: ssi-sd: Fix incorrect card response sequence

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng Per the "Physical Layer Specification Version 8.00" chapter 7.5.1, "Command/Response", there is a minimum 8 clock cycles (Ncr) before the card response shows up on the data out line. However current implementation jumps directly to the sending response state after all 6 bytes

[PULL 7/9] hw/sd: ssi-sd: Fix the wrong command index for STOP_TRANSMISSION

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng This fixes the wrong command index for STOP_TRANSMISSION, the required command to interrupt the multiple block read command, in the old codes. It should be CMD12 (0x4c), not CMD13 (0x4d). Fixes: 775616c3ae8c ("Partial SD card SPI mode support") Signed-off-by: Bin Meng

[PULL 5/9] hw/sd: ssi-sd: Suffix a data block with CRC16

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng Per the SD spec, a valid data block is suffixed with a 16-bit CRC generated by the standard CCITT polynomial x16+x12+x5+1. This part is currently missing in the ssi-sd state machine. Without it, all data block transfer fails in guest software because the expected CRC16 is missing

[PULL 2/9] hw/sd: sd: Support CMD59 for SPI mode

2021-01-24 Thread Philippe Mathieu-Daudé
From: Bin Meng After the card is put into SPI mode, CRC check for all commands including CMD0 will be done according to CMD59 setting. But this command is currently unimplemented. Simply allow the decoding of CMD59, but the CRC remains unchecked. Signed-off-by: Bin Meng Tested-by: Pragnesh

[PULL 0/9] SD/MMC patches for 2021-01-24

2021-01-24 Thread Philippe Mathieu-Daudé
The following changes since commit e93c65a6c64fa18b0c61fb9338d364cbea32b6ef: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20210122-pull-request' into staging (2021-01-23 14:40:45 +) are available in the Git repository at: https://gitlab.com/philmd/qemu.git tags/sdmmc-20210124

Re: [PATCH v2 06/25] util: Add CRC16 (CCITT) calculation routines

2021-01-24 Thread Richard Henderson
On 1/24/21 8:59 AM, Philippe Mathieu-Daudé wrote: > On 1/23/21 11:39 AM, Bin Meng wrote: >> From: Bin Meng >> >> Import CRC16 calculation routines from Linux kernel v5.10: >> >> include/linux/crc-ccitt.h >> lib/crc-ccitt.c >> >> to QEMU: >> >> include/qemu/crc-ccitt.h >> util/crc-ccitt.c

Re: [PATCH v2 00/25] hw/riscv: sifive_u: Add missing SPI support

2021-01-24 Thread Philippe Mathieu-Daudé
Hi Bin, On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > This adds the missing SPI support to the `sifive_u` machine in the QEMU > mainline. With this series, upstream U-Boot for the SiFive HiFive Unleashed > board can boot on QEMU `sifive_u` out of the box. This allows users to >

Re: [PATCH] target/ppc: Fix truncation of env->hflags

2021-01-24 Thread Richard Henderson
On 1/23/21 6:46 PM, David Gibson wrote: > On Sat, Jan 23, 2021 at 05:24:22PM -1000, Richard Henderson wrote: >> Use the cs_base field, because it happens to be the same >> size as hflags (and MSR, from which hflags is derived). >> >> In translate, extract most bits from a local hflags variable. >>

Re: [PATCH v2 06/25] util: Add CRC16 (CCITT) calculation routines

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > Import CRC16 calculation routines from Linux kernel v5.10: > > include/linux/crc-ccitt.h > lib/crc-ccitt.c > > to QEMU: > > include/qemu/crc-ccitt.h > util/crc-ccitt.c > > Signed-off-by: Bin Meng > Acked-by: Alistair Francis

Re: [PATCH v2 07/25] hw/sd: ssi-sd: Suffix a data block with CRC16

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > Per the SD spec, a valid data block is suffixed with a 16-bit CRC > generated by the standard CCITT polynomial x16+x12+x5+1. This part > is currently missing in the ssi-sd state machine. Without it, all > data block transfer fails in

Re: [PATCH v3] sphinx: adopt kernel readthedoc theme

2021-01-24 Thread Marc-André Lureau
Hi On Fri, Jan 22, 2021 at 12:59 AM John Snow wrote: > > On 1/20/21 5:25 AM, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > The default "alabaster" sphinx theme has a couple shortcomings: > > - the navbar moves along the page > > - the search bar is not always at the

Re: [PATCH v2 05/25] hw/sd: sd: Drop sd_crc16()

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > commit f6fb1f9b319f ("sdcard: Correct CRC16 offset in sd_function_switch()") > changed the 16-bit CRC to be stored at offset 64. In fact, this CRC > calculation is completely wrong. From the original codes, it wants > to calculate the

[PULL v2 10/10] tcg: Restart code generation when we run out of temps

2021-01-24 Thread Richard Henderson
Some large translation blocks can generate so many unique constants that we run out of temps to hold them. In this case, longjmp back to the start of code generation and restart with a smaller translation block. Buglink: https://bugs.launchpad.net/bugs/1912065 Tested-by: BALATON Zoltan

[PULL v2 00/10] tcg patch queue

2021-01-24 Thread Richard Henderson
repository at: https://gitlab.com/rth7680/qemu.git tags/pull-tcg-20210124 for you to fetch changes up to ae30e86661b0f48562cd95918d37cbeec5d02262: tcg: Restart code generation when we run out of temps (2021-01-24 08:03:27 -1000) Fix

Re: [PATCH v2 03/25] hw/sd: ssi-sd: Fix incorrect card response sequence

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > Per the "Physical Layer Specification Version 8.00" chapter 7.5.1, > "Command/Response", there is a minimum 8 clock cycles (Ncr) before > the card response shows up on the data out line. However current > implementation jumps directly to

Re: [PATCH v2 08/25] hw/sd: ssi-sd: Add a state representing Nac

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > Per the "Physical Layer Specification Version 8.00" chapter 7.5.2, > "Data Read", there is a minimum 8 clock cycles (Nac) after the card > response and before data block shows up on the data out line. This > applies to both single and

Re: [PATCH v2 14/25] hw/sd: sd.h: Cosmetic change of using spaces

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:40 AM, Bin Meng wrote: > From: Bin Meng > > QEMU coding convention prefers spaces over tabs. > > Signed-off-by: Bin Meng > Reviewed-by: Alistair Francis > > --- > > Changes in v2: > - Correct the "coding" typo in the commit message > > include/hw/sd/sd.h | 42

Re: [PATCH v2 11/25] hw/sd: ssi-sd: Use macros for the dummy value and tokens in the transfer

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:40 AM, Bin Meng wrote: > From: Bin Meng > > At present the codes use hardcoded numbers (0xff/0xfe) for the dummy > value and block start token. Replace them with macros. > > Signed-off-by: Bin Meng > Reviewed-by: Alistair Francis > > --- > > Changes in v2: > - Move multiple

Re: [PATCH v2 09/25] hw/sd: ssi-sd: Fix the wrong command index for STOP_TRANSMISSION

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/24/21 6:33 PM, Philippe Mathieu-Daudé wrote: > On 1/23/21 11:40 AM, Bin Meng wrote: >> From: Bin Meng >> >> This fixes the wrong command index for STOP_TRANSMISSION, the >> required command to interrupt the multiple block read command, >> in the old codes. It should be CMD12 (0x4c), not

Re: [PATCH v2 09/25] hw/sd: ssi-sd: Fix the wrong command index for STOP_TRANSMISSION

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:40 AM, Bin Meng wrote: > From: Bin Meng > > This fixes the wrong command index for STOP_TRANSMISSION, the > required command to interrupt the multiple block read command, > in the old codes. It should be CMD12 (0x4c), not CMD13 (0x4d). > > Fixes: 775616c3ae8c ("Partial SD card SPI

Re: [PATCH v2 08/25] hw/sd: ssi-sd: Add a state representing Nac

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > Per the "Physical Layer Specification Version 8.00" chapter 7.5.2, > "Data Read", there is a minimum 8 clock cycles (Nac) after the card > response and before data block shows up on the data out line. This > applies to both single and

Re: [PATCH v2 04/25] hw/sd: sd: Support CMD59 for SPI mode

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:39 AM, Bin Meng wrote: > From: Bin Meng > > After the card is put into SPI mode, CRC check for all commands > including CMD0 will be done according to CMD59 setting. But this > command is currently unimplemented. Simply allow the decoding of > CMD59, but the CRC remains unchecked.

Re: [PATCH v2 18/25] hw/sd: ssi-sd: Bump up version ids of VMStateDescription

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/24/21 5:59 PM, Philippe Mathieu-Daudé wrote: > On 1/23/21 11:40 AM, Bin Meng wrote: >> From: Bin Meng >> >> With all these fixes and improvements, there is no way for the >> VMStateDescription to keep backward compatibility. We will have >> to bump up version ids. > > Unfortunately this

Re: [PULL v2 00/30] Misc patches for 2021-01-21

2021-01-24 Thread Peter Maydell
On Sat, 23 Jan 2021 at 21:01, Paolo Bonzini wrote: > > The following changes since commit fef80ea073c4862bc9eaddb6ddb0ed970b8ad7c4: > > Merge remote-tracking branch 'remotes/ericb/tags/pull-nbd-2021-01-20' into > staging (2021-01-21 10:44:28 +) > > are available in the Git repository at: >

Re: [PATCH v2 18/25] hw/sd: ssi-sd: Bump up version ids of VMStateDescription

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 11:40 AM, Bin Meng wrote: > From: Bin Meng > > With all these fixes and improvements, there is no way for the > VMStateDescription to keep backward compatibility. We will have > to bump up version ids. Unfortunately this breaks bisectability (think about downstream distributions

Re: [PATCH v2 4/7] m68k: add an interrupt controller

2021-01-24 Thread Philippe Mathieu-Daudé
On 12/20/20 12:26 PM, Laurent Vivier wrote: > Signed-off-by: Laurent Vivier > --- > include/hw/intc/m68k_irqc.h | 28 + > hw/intc/m68k_irqc.c | 120 Missing MAINTAINERS entries? > hw/intc/Kconfig | 3 + > hw/intc/meson.build

[PATCH] configure: Only build s390-ccw BIOS for system emulation

2021-01-24 Thread Philippe Mathieu-Daudé
It is pointless to build the s390-ccw BIOS when only user-mode emulation is built. Only build it when system mode emulation is selected. Signed-off-by: Philippe Mathieu-Daudé --- configure | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure b/configure index

Re: KVM guests reading/writing guest memory directly and accurately

2021-01-24 Thread Peter Maydell
On Sun, 24 Jan 2021 at 07:22, Berto Furth wrote: > Can anyone give me some advice on how a machine or device can read and write > kvm guest ram memory and get a guaranteed up to date result? Can someone > point me at an example in the latest QEMU source code? I'm working with an > ARM-32 guest

Re: [PATCH v3 4/4] configure: Reword --enable-tcg-interpreter as --disable-native-tcg

2021-01-24 Thread Philippe Mathieu-Daudé
On 1/23/21 7:13 PM, Paolo Bonzini wrote: > On 22/01/21 14:30, Philippe Mathieu-Daudé wrote: >> Users might want to enable all features, without realizing some >> features have negative effect. Rename '--enable-tcg-interpreter' >> as '--disable-native-tcg' to avoid user selecting this feature >>

Re: [PATCH] tcg: Restart code generation when we run out of temps

2021-01-24 Thread BALATON Zoltan
On Sat, 23 Jan 2021, Richard Henderson wrote: Some large translation blocks can generate so many unique constants that we run out of temps to hold them. In this case, longjmp back to the start of code generation and restart with a smaller translation block. Buglink:

Re: [PATCH 21/25] tests/qtest/cmsdk-apb-watchdog-test: Test clock changes

2021-01-24 Thread Luc Michel
On 19:06 Thu 21 Jan , Peter Maydell wrote: > Now that the CMSDK APB watchdog uses its Clock input, it will > correctly respond when the system clock frequency is changed using > the RCC register on in the Stellaris board system registers. Test > that when the RCC register is written it causes

Re: [PATCH 05/25] tests: Add a simple test of the CMSDK APB dual timer

2021-01-24 Thread Luc Michel
On 19:06 Thu 21 Jan , Peter Maydell wrote: > Add a simple test of the CMSDK dual timer, since we're about to do > some refactoring of how it is clocked. > > Signed-off-by: Peter Maydell > --- > tests/qtest/cmsdk-apb-dualtimer-test.c | 131 + > MAINTAINERS

Re: [PATCH 04/25] tests: Add a simple test of the CMSDK APB watchdog

2021-01-24 Thread Luc Michel
On 19:06 Thu 21 Jan , Peter Maydell wrote: > Add a simple test of the CMSDK watchdog, since we're about to do some > refactoring of how it is clocked. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > tests/qtest/cmsdk-apb-watchdog-test.c | 80 +++ >

Re: [PATCH 03/25] tests: Add a simple test of the CMSDK APB timer

2021-01-24 Thread Luc Michel
On 19:06 Thu 21 Jan , Peter Maydell wrote: > Add a simple test of the CMSDK APB timer, since we're about to do > some refactoring of how it is clocked. > > Signed-off-by: Peter Maydell Reviewed-by: Luc Michel > --- > tests/qtest/cmsdk-apb-timer-test.c | 76 ++

Re: [PATCH] target/ppc: Fix truncation of env->hflags

2021-01-24 Thread Ivan Warren
Richard, Reviewed-by:  Ivan Warren  Thanks a million ! --Ivan On 1/24/2021 4:24 AM, Richard Henderson wrote: Use the cs_base field, because it happens to be the same size as hflags (and MSR, from which hflags is derived). In translate, extract most bits from a local hflags variable. Mark

Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-24 Thread Yuri Benditovich
On Sun, Jan 24, 2021 at 10:24 AM Yuri Benditovich wrote: > > Hi Jason, > > I've prepared a POC of graceful switch to 'vhost off' if respective > features are acked by the guest. > Such a way we do not need to silently clear RSS and hash report > features in case of 'vhost on'. > Can you please

Re: [RFC PATCH] gitlab-ci.yml: Speed up CI by using "meson test --no-rebuild"

2021-01-24 Thread Paolo Bonzini
check-block is not run by "meson test". Paolo Il dom 24 gen 2021, 08:58 Thomas Huth ha scritto: > Currently, our check-system-* jobs are recompiling the whole sources > again. This happens due to the fact that the jobs are checking out > the whole source tree and required submodules again, and

Re: [PATCH v2 7/7] m68k: add Virtual M68k Machine

2021-01-24 Thread Laurent Vivier
Le 24/01/2021 à 01:18, Philippe Mathieu-Daudé a écrit : > On 12/20/20 12:26 PM, Laurent Vivier wrote: >> The machine is based on Goldfish interfaces defined by Google >> for Android simulator. It uses Goldfish-rtc (timer and RTC), >> Goldfish-pic (PIC) and Goldfish-tty (for serial port and early

[Bug 1912934] [NEW] QEMU emulation of fmadds instruction on powerpc64le is buggy

2021-01-24 Thread Bruno Haible
Public bug reported: The attached program test-fmadds.c tests the fmadds instruction on powerpc64le. Result on real hardware (POWER8E processor): $ ./a.out ; echo $? 0 Result in Alpine Linux 3.13/powerpcle, emulated by QEMU 5.0.0 on Ubuntu 16.04: $ ./a.out ; echo $? 32 Result in Debian

Re: [RFC PATCH v3 5/6] virtio-net: Added eBPF RSS to virtio-net.

2021-01-24 Thread Yuri Benditovich
Hi Jason, I've prepared a POC of graceful switch to 'vhost off' if respective features are acked by the guest. Such a way we do not need to silently clear RSS and hash report features in case of 'vhost on'. Can you please review it and provide your feedback? I think the only open question is