Re: [PATCH v2 10/42] esp: introduce esp_get_stc()

2021-02-10 Thread Mark Cave-Ayland
On 10/02/2021 22:33, Philippe Mathieu-Daudé wrote: On 2/9/21 8:29 PM, Mark Cave-Ayland wrote: This simplifies reading the STC register value without having to manually shift each individual 8-bit value. If possible repeat the subject so the sentence is easier to understand. I've always read

Re: [PATCH 2/2] hw/nvme: move device-scoped functions

2021-02-10 Thread Klaus Jensen
On Feb 11 11:55, Minwoo Im wrote: > On 21-02-09 12:08:26, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Move a bunch of functions that are internal to a device out of the > > shared header. > > May I ask why? I think some kind of these helpers can stick onto the > header. I just thought t

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Klaus Jensen
On Feb 11 13:24, Keith Busch wrote: > On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > > On 21-02-11 12:00:11, Keith Busch wrote: > > > But I would prefer to see advanced retry tied to real errors that can be > > > retried, like if we got an EBUSY or EAGAIN errno or something like that.

Re: [RFC PATCH V2 02/11] hw/block/nvme: open code for volatile write cache

2021-02-10 Thread Sai Pavan Boddu
Hi Minwoo, Please ignore this mail, I see a fix already floating around in the list. Regards, Sai Pavan On Thu, Feb 11, 2021 at 12:15:57PM +0530, Sai Pavan Boddu wrote: > Hi Minwoo, > > On Sun, Jan 17, 2021 at 11:53:32PM +0900, Minwoo Im wrote: > > Volatile Write Cache(VWC) feature is set in nvm

Re: [PATCH v2] net/macos: implement vmnet-based network device

2021-02-10 Thread Howard Spoelstra
On Fri, Feb 5, 2021 at 5:54 PM wrote: > > From: Phillip Tennen > > This patch implements a new netdev device, reachable via -netdev > vmnet-macos, that’s backed by macOS’s vmnet framework. > > The vmnet framework provides native bridging support, and its usage in > this patch is intended as a rep

[PATCH v3 10/10] qtest/acpi/bios-tables-test: update acpi tables

2021-02-10 Thread Isaku Yamahata
update golden master acpi tables and empty bios-tables-test-allowed-diff.h. Signed-off-by: Isaku Yamahata --- tests/data/acpi/q35/DSDT| Bin 7801 -> 7892 bytes tests/data/acpi/q35/DSDT.acpihmat | Bin 9126 -> 9217 bytes tests/data/acpi/q35/DSDT.bridge |

[PATCH v3 04/10] acpi/core: always set SCI_EN when SMM isn't supported

2021-02-10 Thread Isaku Yamahata
If SMM is not supported, ACPI fixed hardware doesn't support legacy-mode. ACPI-only platform. Where SCI_EN in PM1_CNT register is always set. The bit tells OS legacy mode(SCI_EN cleared) or ACPI mode(SCI_EN set). With the next patch (setting fadt.smi_cmd = 0 when smm isn't enabled), guest Linux tr

[PATCH v3 09/10] acpi: add test case for -no-hpet

2021-02-10 Thread Isaku Yamahata
Reviewed-by: Igor Mammedov Signed-off-by: Isaku Yamahata --- tests/qtest/bios-tables-test.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 096d15db68..72c8765baf 100644 --- a/tests/qtest/bios-tables-test.c +

[PATCH v3 08/10] i386: acpi: Don't build HPET ACPI entry if HPET is disabled

2021-02-10 Thread Isaku Yamahata
From: Sean Christopherson Omit HPET AML if the HPET is disabled, QEMU is not emulating it and the guest may get confused by seeing HPET in the ACPI tables without a "physical" device present. The change of DSDT when -no-hpet is as follows. @@ -141,47 +141,6 @@ DefinitionBlock ("", "DSDT", 1, "B

[PATCH v3 07/10] hw/i386: declare ACPI mother board resource for MMCONFIG region

2021-02-10 Thread Isaku Yamahata
Declare PNP0C01 device to reserve MMCONFIG region to conform to the spec better and play nice with guest BIOSes/OSes. According to PCI Firmware Specification[0], MMCONFIG region must be reserved by declaring a motherboard resource. It's optional to reserve the region in memory map by Int 15 E820h

[PATCH v3 06/10] acpi: add test case for smm unsupported -machine smm=off

2021-02-10 Thread Isaku Yamahata
Reviewed-by: Igor Mammedov Signed-off-by: Isaku Yamahata --- tests/qtest/bios-tables-test.c | 12 1 file changed, 12 insertions(+) diff --git a/tests/qtest/bios-tables-test.c b/tests/qtest/bios-tables-test.c index 669202fc95..096d15db68 100644 --- a/tests/qtest/bios-tables-test.c +

[PATCH v3 03/10] i386: add properoty, x-smm-compat-5, to keep compatibility of SMM

2021-02-10 Thread Isaku Yamahata
The following patch will introduce incompatible behavior of SMM. Introduce a property to keep the old behavior for compatibility. To enable smm compat, use "-machine x-smm-compat-5=on" Signed-off-by: Isaku Yamahata --- hw/i386/pc_piix.c | 10 ++ hw/i386/pc_q35.c | 1 + hw/i386/

[PATCH v3 02/10] qtest: update tests/qtest/bios-tables-test-allowed-diff.h

2021-02-10 Thread Isaku Yamahata
The following tests will modify acpi tables. prepare qtests to allow acpi table change. add new tables for new tests. - tests/data/acpi/q35/DSDT.nosmm - tests/data/acpi/q35/FACP.nosmm - tests/data/acpi/q35/DSDT.nohpet Acked-by: Igor Mammedov Signed-off-by: Isaku Yamahata --- tests/data/acpi/q35

[PATCH v3 05/10] acpi: set fadt.smi_cmd to zero when SMM is not supported

2021-02-10 Thread Isaku Yamahata
>From table 5.9 SMI_CMD of ACPI spec > This field is reserved and must be zero on system > that does not support System Management mode. When smm is not enabled, set it to zero to comform to the spec. When -machine smm=off is passed, the change to FACP is as follows. @@ -1,46 +1,46 @@ /* * Int

[PATCH v3 00/10] ACPI related fixes to comform the spec better

2021-02-10 Thread Isaku Yamahata
Miscellaneous bug fixes related to ACPI to play nice with guest BIOSes/OSes by conforming to ACPI spec better. Changes from v2: - improved commit message - introduced compat property x-smm-compat-5 - _CRS for MMCONFIG resource, read MMCONFIG info from qemu, generate resource instead of dynamical

[PATCH v3 01/10] checkpatch: don't emit warning on newly created acpi data files

2021-02-10 Thread Isaku Yamahata
Newly created acpi data files(tests/data/acpi/) cause false positive warning. If file names are acpi expected file, don't emit warning. Fixes: e625ba2a41 ("checkpatch: fix acpi check with multiple file name") Signed-off-by: Isaku Yamahata --- scripts/checkpatch.pl | 4 +++- 1 file changed, 3 ins

Re: [RFC PATCH V2 02/11] hw/block/nvme: open code for volatile write cache

2021-02-10 Thread Sai Pavan Boddu
Hi Minwoo, On Sun, Jan 17, 2021 at 11:53:32PM +0900, Minwoo Im wrote: > Volatile Write Cache(VWC) feature is set in nvme_ns_setup() in the > initial time. This feature is related to block device backed, but this > feature is controlled in controller level via Set/Get Features command. > > This

Re: [PATCH v2] dbus-vmstate: Increase the size of input stream buffer used during load

2021-02-10 Thread priyankar jain
Hi Marc, Requesting you to please pull these changes. Without this fix, migration is failing in case any helper has more than 4KiB of data. Thanks and Regards, Priyankar Jain On 02/02/21 7:24 pm, Priyankar Jain wrote: This commit fixes an issue where migration is failing in the load phase be

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
On 21-02-11 13:24:22, Keith Busch wrote: > On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > > On 21-02-11 12:00:11, Keith Busch wrote: > > > But I would prefer to see advanced retry tied to real errors that can be > > > retried, like if we got an EBUSY or EAGAIN errno or something like

[PATCH v3 4/5] travis.yml: (Re-)move the --enable-debug jobs

2021-02-10 Thread Thomas Huth
We already have similar jobs in the gitlab-CI ("build-some-softmmu" and "build-user-plugins"), so let's switch one of them to use --enable-debug instead of --enable-debug-tcg, then we can simply drop these jobs from the Travis-CI. Reviewed-by: Alex Bennée Reviewed-by: Wainer dos Santos Moschetta

[PATCH v3 3/5] travis.yml: Move the --enable-modules test to the gitlab-CI

2021-02-10 Thread Thomas Huth
Simply add the flag to an existing job, no need for yet another job here. Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Alex Bennée Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 1 + .travis.yml| 6 -- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/.gitlab-ci.y

Re: Fwd: VirtioSound device emulation implementation

2021-02-10 Thread Shreyansh Chouhan
On Thu, 28 Jan 2021 at 23:04, Shreyansh Chouhan < chouhan.shreyansh2...@gmail.com> wrote: > I think I will give it a quick look :P > This certainly wasn't quick I admit. > Thanks a lot! > -- > Shreyansh > > Hey! I hope you people are doing fine. :) So colleges reopened and I was a bit busy for th

[PATCH v3 2/5] travis.yml: Move the -fsanitize=undefined test to the gitlab-CI

2021-02-10 Thread Thomas Huth
Add it to the existing Clang job and also add a job that covers the linux-user code with this compiler flag. To make sure that the detected problems are not simply ignored, let's also use "-fno-sanitize-recover=..." now instead. Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 16 +---

[Bug 1899082] Re: ReplayKernel.test_x86_64_pc fails intermittently

2021-02-10 Thread Cleber Rosa
I was able to run the reproducer from Beraldo Leal, and achieved the same results. Additionally, I got the following output from QEMU: qemu-system-x86_64: Missing character write event in the replay log Which seems to come from replay/replay-char.c:158. I then tested the record and replay se

[PATCH v3 1/5] travis.yml: Move gprof/gcov test across to gitlab

2021-02-10 Thread Thomas Huth
From: Philippe Mathieu-Daudé Similarly to commit 8cdb2cef3f1, move the gprof/gcov test to GitLab. The coverage-summary.sh script is not Travis-CI specific, make it generic. [thuth: Add gcovr and bsdmainutils which are required for the coverage-summary.sh script to the ubuntu docker file

[PATCH v3 5/5] travis.yml: Move the -fsanitize=thread testing to the gitlab-CI

2021-02-10 Thread Thomas Huth
Use clang-10, so we can also use the --enable-tsan configure option instead of only passing the flag via --extra-cflags. Reviewed-by: Alex Bennée Signed-off-by: Thomas Huth --- .gitlab-ci.yml | 9 + .travis.yml| 51 -- 2 files changed

[PATCH v3 0/5] Move remaining x86 Travis jobs to the gitlab-CI

2021-02-10 Thread Thomas Huth
Since Travis changed their policies, travis-ci.org will soon become completely useless for the QEMU project. We should now really make sure that we move the remaining tests as good as possible to the gitlab-CI instead. v3: - Use 'debian-all-test-cross' and 'check-tcg' in the 2nd patch - Adjusted

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Warner Losh
On Wed, Feb 10, 2021, 9:26 PM Keith Busch wrote: > On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > > On 21-02-11 12:00:11, Keith Busch wrote: > > > But I would prefer to see advanced retry tied to real errors that can > be > > > retried, like if we got an EBUSY or EAGAIN errno or som

[Bug 1906948] Re: Enabling OpenGL for GUI doesn't work on old laptop

2021-02-10 Thread Launchpad Bug Tracker
[Expired for QEMU because there has been no activity for 60 days.] ** Changed in: qemu Status: Incomplete => Expired -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1906948 Title: Enabling Op

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Keith Busch
On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > On 21-02-11 12:00:11, Keith Busch wrote: > > But I would prefer to see advanced retry tied to real errors that can be > > retried, like if we got an EBUSY or EAGAIN errno or something like that. > > I have seen a thread [1] about ACRE.

Re: [RFC PATCH 1/3] hw/block/nvme: set NVME_DNR in a single place

2021-02-10 Thread Minwoo Im
On 21-02-10 21:19:43, Klaus Jensen wrote: > On Feb 11 04:52, Minwoo Im wrote: > > @@ -945,6 +945,11 @@ static void nvme_post_cqes(void *opaque) > > static void nvme_enqueue_req_completion(NvmeCQueue *cq, NvmeRequest *req) > > { > > assert(cq->cqid == req->sq->cqid); > > + > > +if (req->s

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
On 21-02-11 12:00:11, Keith Busch wrote: > On Thu, Feb 11, 2021 at 04:52:52AM +0900, Minwoo Im wrote: > > nvme_inject_state command is to give a controller state to be. > > Human Monitor Interface(HMP) supports users to make controller to a > > specified state of: > > > > normal:

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Keith Busch
On Wed, Feb 10, 2021 at 08:06:46AM +0100, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Add support for marking blocks invalid with the Write Uncorrectable > command. Block status is tracked in a (non-persistent) bitmap that is > checked on all reads and written to on all writes. This is pote

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
On 21-02-10 21:33:50, Klaus Jensen wrote: > On Feb 11 04:52, Minwoo Im wrote: > > nvme_inject_state command is to give a controller state to be. > > Human Monitor Interface(HMP) supports users to make controller to a > > specified state of: > > > > normal: Normal state (no inje

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Keith Busch
On Thu, Feb 11, 2021 at 04:52:52AM +0900, Minwoo Im wrote: > nvme_inject_state command is to give a controller state to be. > Human Monitor Interface(HMP) supports users to make controller to a > specified state of: > > normal: Normal state (no injection) > cmd-interrup

Re: [PATCH 2/2] hw/nvme: move device-scoped functions

2021-02-10 Thread Minwoo Im
On 21-02-09 12:08:26, Klaus Jensen wrote: > From: Klaus Jensen > > Move a bunch of functions that are internal to a device out of the > shared header. May I ask why? I think some kind of these helpers can stick onto the header.

Re: [PATCH 1/2] hw/nvme: move nvme emulation out of hw/block

2021-02-10 Thread Minwoo Im
On 21-02-09 12:08:25, Klaus Jensen wrote: > From: Klaus Jensen > > With the introduction of the nvme-subsystem device we are really > cluttering up the hw/block directory. > > As suggested by Philippe previously, move the nvme emulation to > hw/nvme. > > Suggested-by: Philippe Mathieu-Daudé >

Re: [PATCH] hw/block/nvme: drain namespaces on sq deletion

2021-02-10 Thread Minwoo Im
On 21-01-27 14:15:05, Klaus Jensen wrote: > From: Klaus Jensen > > For most commands, when issuing an AIO, the BlockAIOCB is stored in the > NvmeRequest aiocb pointer when the AIO is issued. The purpose of storing > this is to allow the AIO to be cancelled when deleting submission > queues (it is

Re: [PATCH v6 09/11] arm/hvf: Add a WFI handler

2021-02-10 Thread Alexander Graf
On 10.02.21 23:17, Peter Maydell wrote: On Wed, 10 Feb 2021 at 20:25, Peter Collingbourne wrote: On Thu, Jan 28, 2021 at 8:25 AM Peter Maydell wrote: On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: +if (!seconds && nanos < 200) { +break; +

[Bug 1914667] Re: High cpu usage when guest is idle on qemu-system-i386

2021-02-10 Thread John Arbuckle
I found a way to fix the high host cpu usage issue. To fix this issue click on Start->All Programs->Accessories->System Tools->System Restore. Then pick a restore point that is set before you tried the smp option. After the VM restarts the high CPU usage issue will be gone :) -- You received this

Re: [PATCH v2 4/4] hw/timer/npcm7xx_timer: Use new clock_ns_to_ticks()

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 2:20 PM, Peter Maydell wrote: > Use the new clock_ns_to_ticks() function in npcm7xx_timer where > appropriate. > > Signed-off-by: Peter Maydell > --- > hw/timer/npcm7xx_timer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v2 3/4] clock: Add clock_ns_to_ticks() function

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 2:20 PM, Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running counter regis

[RFC PATCH] target/mips/cp0_timer: Use new clock_ns_to_ticks()

2021-02-10 Thread Philippe Mathieu-Daudé
Use the new clock_ns_to_ticks() function in cp0_timer where appropriate. This allows us to remove CPUMIPSState::cp0_count_ns and mips_cp0_period_set(). Signed-off-by: Philippe Mathieu-Daudé --- Based-on: <20210209132040.5091-1-peter.mayd...@linaro.org> RFC because this is just a starter patch to

Re: [PATCH v2 2/4] clock: Add ClockPreUpdate callback event type

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 2:20 PM, Peter Maydell wrote: > Add a new callback event type ClockPreUpdate, which is called on > period changes before the period is updated. > > Signed-off-by: Peter Maydell > --- > docs/devel/clocks.rst | 9 - > include/hw/clock.h| 1 + > hw/core/clock.c | 3 +++ >

Re: [PATCH v3 0/3]

2021-02-10 Thread Doug Evans
On Wed, Feb 10, 2021 at 8:49 AM Daniel P. Berrangé wrote: > On Wed, Feb 10, 2021 at 08:31:40AM -0800, Doug Evans wrote: > > On Wed, Feb 10, 2021 at 1:31 AM Daniel P. Berrangé > > wrote: > > > > > On Tue, Feb 09, 2021 at 06:16:57PM -0800, Doug Evans wrote: > > > > On Thu, Feb 4, 2021 at 10:25 AM

Re: Emulating sd card with hifive_u risc-v machine

2021-02-10 Thread Alistair Francis
On Wed, Feb 10, 2021 at 12:02 PM 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. Great! > > Best regards and thanks again! No worries! Alistair > > Pascal > > On 08.02.21 23:49

[Bug 1899082] Re: ReplayKernel.test_x86_64_pc fails intermittently

2021-02-10 Thread Beraldo Leal
I could reproduce this without Avocado: -- #!/bin/bash SOCKET="/tmp/qemu.sock" VMLINUZ_PATH="/tmp/vmlinuz" REPLAY_FILE="/tmp/replay.bin" function run_and_wait() { /usr/bin/qemu-system-x86_64 -display none \ -vga none \

[PATCH v2 16/21] accel/tcg: actually cache our partial icount TB

2021-02-10 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 v2 19/21] accel/tcg: remove CF_NOCACHE and special cases

2021-02-10 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: [PATCH v2 15/42] esp: introduce esp_pdma_read() and esp_pdma_write() functions

2021-02-10 Thread Philippe Mathieu-Daudé
Hi Mark, On 2/9/21 8:29 PM, Mark Cave-Ayland wrote: > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 28 > 1 file changed, 20 insertions(+), 8 deletions(-) > > diff --git a/hw/scsi/esp.c b/hw/scsi/esp.c > index e7cf36f4b8..b0cba889a9 100644 > --- a/hw/scsi/

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

2021-02-10 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 Message-Id: <20210209182749.31323-7-alex.ben...@linaro.org> --- tests/acceptance/tcg_plugins.py | 103 +++

Re: [PATCH v2 1/4] clock: Add ClockEvent parameter to callbacks

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 20:53, Hao Wu wrote: > > > > On Tue, Feb 9, 2021 at 5:24 AM Peter Maydell wrote: >> diff --git a/hw/adc/npcm7xx_adc.c b/hw/adc/npcm7xx_adc.c >> index 870a6d50c27..573f4876dc6 100644 >> --- a/hw/adc/npcm7xx_adc.c >> +++ b/hw/adc/npcm7xx_adc.c >> @@ -238,7 +238,7 @@ static vo

Re: [PATCH v6 07/11] hvf: Add Apple Silicon support

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 22:21, Alexander Graf wrote: > > > On 28.01.21 16:52, Peter Maydell wrote: > > On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: > >> +break; > >> +case EC_AA64_SMC: > >> +cpu_synchronize_state(cpu); > >> +if (arm_is_psci_call(a

Re: [PATCH v6 09/11] arm/hvf: Add a WFI handler

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 20:25, Peter Collingbourne wrote: > > On Thu, Jan 28, 2021 at 8:25 AM Peter Maydell > wrote: > > > > On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: > > > +if (!seconds && nanos < 200) { > > > +break; > > > +} >

Re: [PATCH v2 02/42] esp: rename existing ESP QOM type to SYSBUS_ESP

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 8:29 PM, Mark Cave-Ayland wrote: > The existing ESP QOM type currently represents a sysbus device with an > embedded > ESP state. Rename the type to SYSBUS_ESP accordingly. > > Signed-off-by: Mark Cave-Ayland > --- > hw/dma/sparc32_dma.c | 4 ++-- > hw/m68k/q800.c| 4 ++-- >

Re: [PATCH v2 12/42] esp: remove dma_counter from ESPState

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 8:29 PM, Mark Cave-Ayland wrote: > The value of dma_counter is set once at the start of the transfer and remains > the same until the transfer is complete. This allows the check in > esp_transfer_data > to be simplified since dma_left will always be non-zero until the transfer is > compl

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

2021-02-10 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 Message-Id: <20210209182749.31323-13-alex.ben...@linaro.org> --- tests/acceptance/tcg_plugins.py | 31 +++

Re: [PATCH v2 10/42] esp: introduce esp_get_stc()

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/9/21 8:29 PM, Mark Cave-Ayland wrote: > This simplifies reading the STC register value without having to manually > shift > each individual 8-bit value. If possible repeat the subject so the sentence is easier to understand. > > Signed-off-by: Mark Cave-Ayland > --- > hw/scsi/esp.c | 15

[PATCH v2 13/21] target/sh4: Create superh_io_recompile_replay_branch

2021-02-10 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 Message-Id: <20210208233906.479571-5-richard.hender...@linaro.org> Message-Id: <20210209182749.31323-5-alex.ben...@lin

Re: [PATCH v1 1/1] MAINTAINERS: Add a SiFIve machine section

2021-02-10 Thread Alistair Francis
On Mon, Feb 8, 2021 at 6:11 PM Alistair Francis wrote: > > Signed-off-by: Alistair Francis > Acked-by: Bin Meng Thanks! Applied to riscv-to-apply.next with the title fixed. Alistair > --- > MAINTAINERS | 9 + > 1 file changed, 9 insertions(+) > > diff --git a/MAINTAINERS b/MAINTAINE

Re: [PATCH v3 1/2] qemu-nbd: Use SOMAXCONN for socket listen() backlog

2021-02-10 Thread Eric Blake
On 2/10/21 10:58 AM, Nir Soffer wrote: > On Tue, Feb 9, 2021 at 5:28 PM Eric Blake wrote: >> >> Our default of a backlog of 1 connection is rather puny; it gets in >> the way when we are explicitly allowing multiple clients (such as >> qemu-nbd -e N [--shared], or nbd-server-start with its default

[PATCH v2 10/21] exec: Move TranslationBlock typedef to qemu/typedefs.h

2021-02-10 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 Message-Id: <20210208233906.479571-2-richard.hender...@linaro.org> Message-Id: <20210209182749.313

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 10:23, Bin Meng wrote: > > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] > trace_pci_nvme_getfeat_vwcache(result ? "enabled" :

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

2021-02-10 Thread Alistair Francis
On Tue, Feb 9, 2021 at 2:55 AM Bin Meng wrote: > > At the end of sdhci_send_command(), it starts a data transfer if > the command register indicates a data is associated. However the > data transfer should only be initiated when the command execution > has succeeded. > > Cc: qemu-sta...@nongnu.org

[PATCH v2 11/21] accel/tcg: Create io_recompile_replay_branch hook

2021-02-10 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 Message-Id: <20210208233906.479571-3-richard.hender...@linaro.org> Message-

[PATCH v2 12/21] target/mips: Create mips_io_recompile_replay_branch

2021-02-10 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 Message-Id: <20210208233906.479571-4-richard.hender...@linaro.org> Message-Id: <20210209182749.31323-4-alex.ben...@li

Re: [PATCH v6 07/11] hvf: Add Apple Silicon support

2021-02-10 Thread Alexander Graf
On 28.01.21 16:52, Peter Maydell wrote: On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: With Apple Silicon available to the masses, it's a good time to add support for driving its virtualization extensions from QEMU. This patch adds all necessary architecture specific code to get basic V

[PATCH v2 14/21] tests/plugin: expand insn test to detect duplicate instructions

2021-02-10 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 v2 07/21] contrib: space required after that ','

2021-02-10 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 v2 02/21] plugins: add API to return a name for a IO device

2021-02-10 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> --- v4 - use g_intern_static_string for stat

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

2021-02-10 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_NOINSTR cflag which disables instrumentation for the next TB. As this is part of the hashed compile flags we will only execute the generated TB while coming

[PATCH v2 18/21] accel/tcg: re-factor non-RAM execution code

2021-02-10 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 Message-Id: <20210209182749.31323-10-alex.ben...@linaro.org> --- accel/tcg/translate-all.c | 30 +

[PATCH v2 03/21] plugins: new hwprofile plugin

2021-02-10 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: [PATCH v2 6/9] hw/i386: declare ACPI mother board resource for MMCONFIG region

2021-02-10 Thread Isaku Yamahata
On Wed, Feb 10, 2021 at 03:31:57AM -0500, "Michael S. Tsirkin" wrote: > On Tue, Feb 09, 2021 at 12:02:58PM -0800, Isaku Yamahata wrote: > > > > + * When the method of _CRS is called to determine MMCONFIG region, > > > > + * only port io is allowed to access PCI configuration space. > > >

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

2021-02-10 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

Re: [RFC PATCH 0/6] vhost-user: Shutdown/Flush slave channel properly

2021-02-10 Thread Vivek Goyal
On Wed, Feb 10, 2021 at 04:39:06PM -0500, Michael S. Tsirkin wrote: > On Mon, Jan 25, 2021 at 01:01:09PM -0500, Vivek Goyal wrote: > > Hi, > > > > We are working on DAX support in virtiofs and have some patches out of > > the tree hosted here. > > > > https://gitlab.com/virtio-fs/qemu/-/commits/v

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

2021-02-10 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 3/5] hw/arm: Add I2C sensors and EEPROM for GSJ machine

2021-02-10 Thread Hao Wu via
Add AT24 EEPROM and temperature sensors for GSJ machine. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index be017b997a..4e6f4ffe90 100644 --- a/hw/arm/Kconfig +++ b/hw/arm/Kconfig @@ -370,6 +370,7 @@ config NPCM7XX bool

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

2021-02-10 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 v2 06/21] contrib: Add spaces around operator

2021-02-10 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 v2 00/21] plugins/next pre-PR (hwprofile, regression fixes, icount count fix)

2021-02-10 Thread Alex Bennée
Hi, OK time to start preparing a plugins PR with all the accumulated fixes over the last few months. Broadly they are: - a new API for HW access profiling - a bunch of style clean-ups - a fix for a regression caused by recent TCG updates - Richard's io_recompile clean-ups - a fix for an

[PATCH v3 5/5] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-02-10 Thread Hao Wu via
This patch implements the FIFO mode of the SMBus module. In FIFO, the user transmits or receives at most 16 bytes at a time. The FIFO mode allows the module to transmit large amount of data faster than single byte mode. Since we only added the device in a patch that is only a few commits away in t

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

2021-02-10 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> ---

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

2021-02-10 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> --- co

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

2021-02-10 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 4/5] hw/i2c: Add a QTest for NPCM7XX SMBus Device

2021-02-10 Thread Hao Wu via
This patch adds a QTest for NPCM7XX SMBus's single byte mode. It sends a byte to a device in the evaluation board, and verify the retrieved value is equivalent to the sent value. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell diff --git a/tests

[PATCH v3 1/5] hw/i2c: Implement NPCM7XX SMBus Module Single Mode

2021-02-10 Thread Hao Wu via
This commit implements the single-byte mode of the SMBus. Each Nuvoton SoC has 16 System Management Bus (SMBus). These buses compliant with SMBus and I2C protocol. This patch implements the single-byte mode of the SMBus. In this mode, the user sends or receives a byte each time. The SMBus device

[PATCH v3 2/5] hw/arm: Add I2C sensors for NPCM750 eval board

2021-02-10 Thread Hao Wu via
Add I2C temperature sensors for NPCM750 eval board. Reviewed-by: Doug Evans Reviewed-by: Tyrong Ting Signed-off-by: Hao Wu Reviewed-by: Peter Maydell diff --git a/hw/arm/npcm7xx_boards.c b/hw/arm/npcm7xx_boards.c index 3fdd5cab01..47a215bd01 100644 --- a/hw/arm/npcm7xx_boards.c +++ b/hw/arm/npc

[PATCH v3 0/5] hw/i2c: Add NPCM7XX SMBus Device

2021-02-10 Thread Hao Wu via
This patch set implements the System manager bus (SMBus) module in NPCM7XX SoC. Basically, it emulates the data transactions of the module, not the SDA/SCL levels. We have also added a QTest which contains read and write operations for both single-byte and FIFO mode, and added basic I2C devices for

Re: [PATCH v2 6/9] hw/i386: declare ACPI mother board resource for MMCONFIG region

2021-02-10 Thread Isaku Yamahata
On Wed, Feb 10, 2021 at 02:37:31PM +0100, Igor Mammedov wrote: > On Tue, 9 Feb 2021 12:02:58 -0800 > Isaku Yamahata wrote: > > > On Tue, Feb 09, 2021 at 04:52:41PM +0100, > > Igor Mammedov wrote: > > > > > On Mon, 8 Feb 2021 13:57:25 -0800 > > > isaku.yamah...@gmail.com wrote: > > > > > >

Re: Emulating sd card with hifive_u risc-v machine

2021-02-10 Thread Pascal Scholz
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 wrote: > On Mon, Feb 8, 2021 at 12:00 PM Pascal Scholz > wrote: >> Hi all, >> >> I'm ho

Re: [PATCH v2 6/6] hw/i2c: Implement NPCM7XX SMBus Module FIFO Mode

2021-02-10 Thread Hao Wu
On Mon, Feb 8, 2021 at 8:59 AM Peter Maydell wrote: > On Fri, 29 Jan 2021 at 01:04, Hao Wu wrote: > > > > This patch implements the FIFO mode of the SMBus module. In FIFO, the > > user transmits or receives at most 16 bytes at a time. The FIFO mode > > allows the module to transmit large amount

Re: [RFC PATCH 0/6] vhost-user: Shutdown/Flush slave channel properly

2021-02-10 Thread Michael S. Tsirkin
On Mon, Jan 25, 2021 at 01:01:09PM -0500, Vivek Goyal wrote: > Hi, > > We are working on DAX support in virtiofs and have some patches out of > the tree hosted here. > > https://gitlab.com/virtio-fs/qemu/-/commits/virtio-fs-dev > > These patches have not been proposed for merge yet, becasue Davi

Re: [PATCH v6 06/11] hvf: Simplify post reset/init/loadvm hooks

2021-02-10 Thread Alexander Graf
On 28.01.21 16:28, Peter Maydell wrote: On Wed, 20 Jan 2021 at 22:44, Alexander Graf wrote: The hooks we have that call us after reset, init and loadvm really all just want to say "The reference of all register state is in the QEMU vcpu struct, please push it". We already have a working push

Re: [PATCH v2 0/6] hw/i2c: Add NPCM7XX SMBus Device

2021-02-10 Thread Hao Wu
Thanks. I'll take patch 1 out of the next version. On Mon, Feb 8, 2021 at 9:01 AM Peter Maydell wrote: > On Fri, 29 Jan 2021 at 01:04, Hao Wu wrote: > > > > This patch set implements the System manager bus (SMBus) module in > NPCM7XX > > SoC. Basically, it emulates the data transactions of the

Re: [PATCH v3 2/2] qemu-nbd: Permit --shared=0 for unlimited clients

2021-02-10 Thread Nir Soffer
On Tue, Feb 9, 2021 at 5:28 PM Eric Blake wrote: > > This gives us better feature parity with QMP nbd-server-start, where > max-connections defaults to 0 for unlimited. Sound useful > Signed-off-by: Eric Blake > --- > docs/tools/qemu-nbd.rst | 4 ++-- > qemu-nbd.c | 7 +++ > 2

Re: [PATCH v2 3/4] clock: Add clock_ns_to_ticks() function

2021-02-10 Thread Hao Wu
On Tue, Feb 9, 2021 at 5:27 AM Peter Maydell wrote: > Add a clock_ns_to_ticks() function which does the opposite of > clock_ticks_to_ns(): given a duration in nanoseconds, it returns the > number of clock ticks that would happen in that time. This is useful > for devices that have a free running

Re: [PATCH] hw/block/nvme: drain namespaces on sq deletion

2021-02-10 Thread Klaus Jensen
On Jan 27 14:15, Klaus Jensen wrote: > From: Klaus Jensen > > For most commands, when issuing an AIO, the BlockAIOCB is stored in the > NvmeRequest aiocb pointer when the AIO is issued. The purpose of storing > this is to allow the AIO to be cancelled when deleting submission > queues (it is curr

Re: [PATCH v2 4/4] hw/timer/npcm7xx_timer: Use new clock_ns_to_ticks()

2021-02-10 Thread Hao Wu
On Tue, Feb 9, 2021 at 5:21 AM Peter Maydell wrote: > Use the new clock_ns_to_ticks() function in npcm7xx_timer where > appropriate. > > Signed-off-by: Peter Maydell > Reviewed-by: Hao Wu Thanks! > --- > hw/timer/npcm7xx_timer.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >

Re: [PATCH v2] hw/block/nvme: use locally assigned QEMU IEEE OUI

2021-02-10 Thread Klaus Jensen
On Feb 9 12:10, Philippe Mathieu-Daudé wrote: > On 2/9/21 11:45 AM, Klaus Jensen wrote: > > From: Gollu Appalanaidu > > > > Commit 6eb7a071292a ("hw/block/nvme: change controller pci id") changed > > the controller to use a Red Hat assigned PCI Device and Vendor ID, but > > did not change the IE

  1   2   3   4   >