Re: [PATCH v4] Use io_uring_register_ring_fd() to skip fd operations

2022-05-30 Thread Stefan Hajnoczi
On Fri, 22 Apr 2022 at 16:40, olc wrote: > > Hi Stefan, > I've tested the code and it behaves as you expected. Should I add this to a > new patch version or leave it as is? Hi Sam, Sorry I missed this email. Please send a new version of the patch with CONFIG_LIBURING_REGISTER_RING_FD. Thanks, S

Re: [PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-30 Thread Cédric Le Goater
On 5/30/22 21:37, Philippe Mathieu-Daudé wrote: From: Philippe Mathieu-Daudé Rebase/respin of Cédric RFC: https://lore.kernel.org/qemu-devel/20220318132824.1134400-1-...@kaod.org/ (sorry it took me so long guys...) Pushed at https://gitlab.com/philmd/qemu/-/commits/emmc-v2 I plan to queue pat

[PATCH] hw/nvme: add command set independent identify namespace

2022-05-30 Thread Klaus Jensen
From: Klaus Jensen Add support for the command set independent identify namespace data structure (CNS 0x8). Signed-off-by: Klaus Jensen --- hw/nvme/ctrl.c | 28 hw/nvme/trace-events | 1 + include/block/nvme.h | 16 3 files changed, 45 inser

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Cédric Le Goater
On 5/30/22 20:29, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object c

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Cédric Le Goater
On 5/30/22 19:40, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object c

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Cédric Le Goater
On 5/30/22 19:02, Philippe Mathieu-Daudé wrote: Hi Cédric, On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new

Re: [PATCH 2/2] hw/vhost-user-scsi|blk: set `supports_config` flag correctly

2022-05-30 Thread Raphael Norwitz
On Wed, May 25, 2022 at 08:55:40PM +0800, Changpeng Liu wrote: > Currently vhost-user-scsi driver doesn't allow to change > the configuration space of virtio_scsi, while vhost-user-blk > support that, so here we set the flag in vhost-user-blk driver > and unset it in vhost-user-scsi. > > Signed-of

RE: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter

2022-05-30 Thread Zhang, Chen
> -Original Message- > From: Qemu-devel bounces+chen.zhang=intel@nongnu.org> On Behalf Of Haochen Tong > Sent: Saturday, May 28, 2022 3:07 AM > To: qemu-devel@nongnu.org > Cc: qemu-triv...@nongnu.org; Haochen Tong > Subject: [PATCH] ebpf: replace deprecated bpf_program__set_socket_

Re: [PATCH 1/2] hw/virtio/vhost-user: don't use uninitialized variable

2022-05-30 Thread Raphael Norwitz
On Wed, May 25, 2022 at 08:55:39PM +0800, Changpeng Liu wrote: > Variable `vdev` in `struct vhost_dev` will not be ready > until start the device, so let's not use it for the error > output here. > > Fixes: 5653493 ("hw/virtio/vhost-user: don't suppress F_CONFIG when > supported") > > Signed-off

Re: [PATCH v2 01/15] contrib/vhost-user-blk: fix 32 bit build and enable

2022-05-30 Thread Raphael Norwitz
On Tue, May 24, 2022 at 04:40:42PM +0100, Alex Bennée wrote: > We were not building the vhost-user-blk server due to 32 bit > compilation problems. The problem was due to format string types so > fix that and then enable the build. Tweak the rule to follow the same > rules as other vhost-user daemo

Re: Re: [PATCH 0/3] recover hardware corrupted page by virtio balloon

2022-05-30 Thread Jue Wang
On Mon, May 30, 2022 at 8:49 AM Peter Xu wrote: > > On Mon, May 30, 2022 at 07:33:35PM +0800, zhenwei pi wrote: > > A VM uses RAM of 2M huge page. Once a MCE(@HVAy in [HVAx,HVAz)) occurs, the > > 2M([HVAx,HVAz)) of hypervisor becomes unaccessible, but the guest poisons 4K > > (@GPAy in [GPAx, GPAz

Re: [PATCH v5 40/43] hw/loongarch: Add LoongArch ls7a acpi device support

2022-05-30 Thread maobibo
Ignor, Thanks for guidance, I reply inline. 在 2022/5/30 下午6:21, Igor Mammedov 写道: On Fri, 27 May 2022 06:18:43 +0800 maobibo wrote: On 5/26/22 16:42, Igor Mammedov wrote: On Tue, 24 May 2022 16:18:01 +0800 Xiaojuan Yang wrote: commit message needs pointers to specification, + in patch com

[PATCH] tcg: Add tcg_gen_mov_ptr

2022-05-30 Thread Richard Henderson
Add an interface to perform moves between TCGv_ptr. Signed-off-by: Richard Henderson --- This will be required for target/arm FEAT_SME. r~ --- include/tcg/tcg-op.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/tcg/tcg-op.h b/include/tcg/tcg-op.h index b09b8b4a05..209e168305

[PATCH v3] target/riscv: add support for zmmul extension v0.1

2022-05-30 Thread Weiwei Li
- includes all multiplication operations for M extension Signed-off-by: Weiwei Li Signed-off-by: Junqiang Wang Reviewed-by: Víctor Colombo Reviewed-by: Alistair Francis v2: * disable M when both M and Zmmul are enabled v3: * add reviewed-by info, rebase to upstream/master --- target/riscv

Re: Accelerating non-standard disk types

2022-05-30 Thread Raphael Norwitz
On Wed, May 25, 2022 at 05:00:04PM +0100, Stefan Hajnoczi wrote: > On Thu, May 19, 2022 at 06:39:39PM +, Raphael Norwitz wrote: > > On Tue, May 17, 2022 at 03:53:52PM +0200, Paolo Bonzini wrote: > > > On 5/16/22 19:38, Raphael Norwitz wrote: > > > > [1] Keep using the SCSI translation in QEMU b

Re: [RFC PATCH v4 22/36] i386/tdx: Track RAM entries for TDX VM

2022-05-30 Thread Xiaoyao Li
On 5/30/2022 7:59 PM, Gerd Hoffmann wrote: Hi, tdx_add_ram_entry() increments tdx_guest->nr_ram_entries. I think it's worth for comments why this is safe regarding to this for-loop. The for-loop is to find the valid existing RAM entry (from E820 table). It will update the RAM entry and in

Re: RE: [PATCH v8 1/1] crypto: Introduce RSA algorithm

2022-05-30 Thread zhenwei pi
On 5/30/22 21:31, Gonglei (Arei) wrote: -Original Message- From: zhenwei pi [mailto:pizhen...@bytedance.com] Sent: Friday, May 27, 2022 4:48 PM To: m...@redhat.com; Gonglei (Arei) Cc: qemu-devel@nongnu.org; virtualizat...@lists.linux-foundation.org; helei.si...@bytedance.com; berra...

Re: [PATCH] MAINTAINERS: Add myself as hw/core/uboot_image.h maintainer

2022-05-30 Thread Alistair Francis
On Tue, May 31, 2022 at 1:38 AM Philippe Mathieu-Daudé wrote: > > On 9/5/22 11:13, Alistair Francis via wrote: > > Signed-off-by: Alistair Francis > > --- > > MAINTAINERS | 1 + > > 1 file changed, 1 insertion(+) > > > > diff --git a/MAINTAINERS b/MAINTAINERS > > index 662ec47246..9ba30cec8a 1

Re: [PATCH v1 01/33] .gitlab-ci.d/container-cross: Fix RISC-V container dependencies / stages

2022-05-30 Thread Alistair Francis
On Sat, May 28, 2022 at 1:36 AM Alex Bennée wrote: > > From: Thomas Huth > > The "riscv64-debian-cross-container" job does not depend on any other > container job from the first stage, so we can move it to the first > stage, too. > > The "riscv64-debian-test-cross-container" job needs the debian1

Re: [PATCH v2] target/riscv: add support for zmmul extension v0.1

2022-05-30 Thread Alistair Francis
On Tue, May 24, 2022 at 2:54 PM Weiwei Li wrote: > > - includes all multiplication operations for M extension > > Signed-off-by: Weiwei Li > Signed-off-by: Junqiang Wang Do you mind rebasing this on the latest master branch and sending a v3? Alistair > > v2: > * disable M when both M and Zmm

Re: [PATCH v9 12/12] target/riscv: Update the privilege field for sscofpmf CSRs

2022-05-30 Thread Alistair Francis
On Tue, May 24, 2022 at 9:59 AM Atish Patra wrote: > > The sscofpmf extension was ratified as a part of priv spec v1.12. > Mark the csr_ops accordingly. > > Signed-off-by: Atish Patra Reviewed-by: Alistair Francis Alistair > --- > target/riscv/csr.c | 90 ++---

Re: [PATCH v9 11/12] hw/riscv: virt: Add PMU DT node to the device tree

2022-05-30 Thread Alistair Francis
On Tue, May 24, 2022 at 10:10 AM Atish Patra wrote: > > Qemu virt machine can support few cache events and cycle/instret counters. > It also supports counter overflow for these events. > > Add a DT node so that OpenSBI/Linux kernel is aware of the virt machine > capabilities. There are some dummy

Re: [PATCH v5 05/10] cutils: add functions for IEC and SI prefixes

2022-05-30 Thread Philippe Mathieu-Daudé via
On 30/5/22 17:07, Paolo Bonzini wrote: Extract the knowledge of IEC and SI prefixes out of size_to_str and freq_to_str, so that it can be reused when printing statistics. Signed-off-by: Paolo Bonzini --- include/qemu/cutils.h| 18 ++ tests/unit/test-cutils.c | 32

Re: [PATCH v5 04/10] cutils: fix case for "kilo" and "kibi"

2022-05-30 Thread Philippe Mathieu-Daudé via
On 30/5/22 17:07, Paolo Bonzini wrote: The correct abbreviations use a lowercase k, so adjust freq_to_str and size_to_str accordingly and add tests. Signed-off-by: Paolo Bonzini --- tests/unit/test-cutils.c | 20 util/cutils.c| 6 +++--- 2 files changed, 23

Re: [PULL 0/2] Add myself as the maintainer for Hyper-V VMBus

2022-05-30 Thread Richard Henderson
https://github.com/maciejsszmigiero/qemu.git tags/vmbus-maint-20220530 for you to fetch changes up to 6ede46b910ac66fd10bc169fb0a6f681429a9c5c: hw/hyperv/vmbus: Remove unused vmbus_load/save_req() (2022-05-30 19:49:42 +0200) As di

Re: [PATCH v2 09/11] scsi-disk: allow MODE SELECT block descriptor to set the ROM device block size

2022-05-30 Thread Mark Cave-Ayland
On 26/05/2022 13:08, Paolo Bonzini wrote: On 4/24/22 18:49, Mark Cave-Ayland wrote: Whilst CDROM drives usually have a 2048 byte sector size, older drives have the ability to switch between 2048 byte and 512 byte sector sizes by specifying a block descriptor in the MODE SELECT command. If a MO

Re: [PATCH v2 07/11] scsi-disk: allow truncated MODE SELECT requests

2022-05-30 Thread Mark Cave-Ayland
On 26/05/2022 13:06, Paolo Bonzini wrote: On 4/24/22 18:49, Mark Cave-Ayland wrote: According to [1] this truncated request is accepted on real hardware whereas in QEMU it generates an INVALID_PARAM_LEN sense code which causes A/UX to get stuck in a loop retrying the command in an attempt to su

Re: [PATCH v3 4/7] hw/isa/piix{3,4}: QOM'ify PCI device creation and wiring

2022-05-30 Thread Bernhard Beschow
Am 30. Mai 2022 13:17:12 UTC schrieb "Philippe Mathieu-Daudé" : >Hi Bernhard, Hi Philippe, >On 28/5/22 21:20, Bernhard Beschow wrote: >> PCI interrupt wiring and device creation (piix4 only) were performed >> in create() functions which are obsolete. Move these tasks into QOM >> functions to mode

Re: [PATCH 07/12] hw/acpi/piix4: introduce piix4_pm_init() instance init function

2022-05-30 Thread Mark Cave-Ayland
On 29/05/2022 20:06, Bernhard Beschow wrote: Am 28. Mai 2022 09:19:29 UTC schrieb Mark Cave-Ayland : Use the new piix4_pm_init() instance init function to initialise 2 separate qdev gpios for the SCI and SMI IRQs. Signed-off-by: Mark Cave-Ayland --- hw/acpi/piix4.c | 9 + 1 file chang

Re: [PATCH v3 6/7] hw/isa/piix4: QOM'ify PIIX4 PM creation

2022-05-30 Thread Mark Cave-Ayland
On 29/05/2022 19:05, Bernhard Beschow wrote: On Sun, May 29, 2022 at 11:25 AM Mark Cave-Ayland < mark.cave-ayl...@ilande.co.uk> wrote: On 28/05/2022 20:20, Bernhard Beschow wrote: Just like the real hardware, create the PIIX4 ACPI controller as part of the PIIX4 southbridge. This also mirror

Re: [PATCH 00/12] hw/acpi/piix4: remove legacy piix4_pm_init() function

2022-05-30 Thread Mark Cave-Ayland
On 29/05/2022 19:05, Philippe Mathieu-Daudé via wrote: On 28/5/22 11:19, Mark Cave-Ayland wrote: Whilst reviewing Bernhard's PIIX Southbridge QOMifcation patches at https://lists.gnu.org/archive/html/qemu-devel/2022-05/msg04329.html, I noticed that we should first eliminate the legacy device in

Re: [PATCH 05/12] hw/acpi/piix4: alter piix4_pm_init() to return PIIX4PMState

2022-05-30 Thread Mark Cave-Ayland
On 29/05/2022 19:24, Bernhard Beschow wrote: Am 28. Mai 2022 09:19:27 UTC schrieb Mark Cave-Ayland : This exposes the PIIX4_PM device to the caller to allow any qdev gpios to be mapped outside of piix4_pm_init(). Signed-off-by: Mark Cave-Ayland --- hw/acpi/piix4.c | 11

Re: [PATCH 01/18] target/arm: Allow raise_exception to handle finding target EL

2022-05-30 Thread Richard Henderson
On 5/30/22 12:01, Peter Maydell wrote: I'll have another go at this reorg this week. If it still doesn't feel cleaner, we can drop it, and I'll make some changes to the SME patch set building on this. I was wondering if it would work better the other way around, so that raise_exception() does

Re: [PATCH v3 0/7] QOM'ify PIIX southbridge creation

2022-05-30 Thread Philippe Mathieu-Daudé via
On 30/5/22 21:11, Mark Cave-Ayland wrote: On 29/05/2022 14:02, Bernhard Beschow wrote:     Oh wait - I see now it's just the cover letter which is missing the additional     maintainer addresses :)  If you could add them into the cover letter for your next     revision that would be great, si

[PATCH v2 25/25] hw/sd: Add boot config support

2022-05-30 Thread Philippe Mathieu-Daudé
From: Joel Stanley Introduced "boot-config" property to set CSD 179, the boot config register. With this correctly set we can use the enable bit to detect if partition support is enabled. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- h

[PATCH v2 22/25] hw/sd: Add sd_emmc_cmd_SEND_EXT_CSD() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater The parameters mimick a real 4GB eMMC, but it can be set to various sizes. Initially from Vincent Palatin Signed-off-by: Cédric Le Goater [PMD: Remove CMD8 (SEND_EXT_CSD) case in sd_read_byte()] Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 101 +++

[PATCH v2 23/25] hw/sd: Support boot area in emmc image

2022-05-30 Thread Philippe Mathieu-Daudé
From: Joel Stanley This assumes a specially constructued image: dd if=/dev/zero of=mmc-bootarea.img count=2 bs=1M dd if=u-boot-spl.bin of=mmc-bootarea.img conv=notrunc dd if=u-boot.bin of=mmc-bootarea.img conv=notrunc count=64 bs=1K cat mmc-bootarea.img obmc-phosphor-image.wic > mmc.img

[PATCH v2 20/25] hw/sd: Add CMD21 tuning sequence

2022-05-30 Thread Philippe Mathieu-Daudé
From: Sai Pavan Boddu MMC cards support different tuning sequence for entering HS200 mode. Signed-off-by: Sai Pavan Boddu Signed-off-by: Edgar E. Iglesias [ clg: - ported on QEMU 7.0 ] Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 39

[PATCH v2 21/25] hw/sd: Add mmc switch function support

2022-05-30 Thread Philippe Mathieu-Daudé
From: Sai Pavan Boddu switch operation in mmc cards, updated the ext_csd register to request changes in card operations. Here we implement similar sequence but requests are mostly dummy and make no change. Implement SWITCH_ERROR if the write operation offset goes beyond length of ext_csd. Signe

[PATCH v2 19/25] hw/sd: add sd_emmc_cmd_SEND_TUNING_BLOCK() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 90da24ad2d..d38ee5094d 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2207,6 +2207,17 @@ sta

[PATCH v2 17/25] hw/sd: Add sd_emmc_cmd_SEND_RELATIVE_ADDR() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 5e315f171c..100fe191a7 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1048,6 +1048,2

[PATCH v2 16/25] hw/sd: Add sd_emmc_cmd_ALL_SEND_CID() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 538231dbab..5e315f171c 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2172,11 +2172,23 @@ st

[PATCH v2 18/25] hw/sd: Add sd_emmc_cmd_APP_CMD() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 100fe191a7..90da24ad2d 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2202,6 +2202,11 @@ static sd_r

[PATCH v2 09/25] hw/sd: Add sd_cmd_SEND_OP_CMD() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé [ clg: Update cmd_abbrev ] Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 18 +- hw/sd/sdmmc-internal.c | 2 +- 2 files changed, 10 insertion

[PATCH v2 24/25] hw/sd: Subtract bootarea size from blk

2022-05-30 Thread Philippe Mathieu-Daudé
From: Joel Stanley The userdata size is derived from the file the user passes on the command line, but we must take into account the boot areas. Signed-off-by: Joel Stanley Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 5 + 1 file changed, 5 inser

[PATCH v2 12/25] hw/sd: Add sd_cmd_SEND_TUNING_BLOCK() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Joel Stanley Signed-off-by: Joel Stanley Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Cédric Le Goater [PMD: Rebased] Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 28 +--- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/hw/sd/sd.c

[PATCH v2 15/25] hw/sd: Add sd_emmc_cmd_SEND_OP_CMD() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index 8b178aa261..538231dbab 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -2166,10 +2166,17 @@ static co

Re: [PULL 000/117] target-arm queue

2022-05-30 Thread Richard Henderson
e tag 'misc-pull-request' of gitlab.com:marcandre.lureau/qemu into staging (2022-05-29 16:34:56 -0700) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220530 for you to fetch changes up to b1071174d2a2ab371082b7d4b

[PATCH v2 11/25] hw/sd: Add sd_cmd_SEND_RELATIVE_ADDR() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-11-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 28 +++- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/hw

[PATCH v2 13/25] hw/sd: Add sd_cmd_SET_BLOCK_COUNT() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 30 -- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index a9130155be..b2f16dbb73 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd.c @@ -1078,6 +1078,2

[PATCH v2 06/25] hw/sd: Add sd_cmd_illegal() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Log illegal commands as GUEST_ERROR. Note: we are logging back the SDIO commands (CMD5, CMD52-54). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-6-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c |

[PATCH v2 14/25] hw/sd: Basis for eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. Signed-off-by: Cédric Le Goater Signed-off-by: Philippe Mathieu-Daudé --- TODO: Do not inherit TYPE_SD_CARD, duplicate sd_class_init() --- hw/sd/sd.c | 42

[PATCH v2 10/25] hw/sd: Add sd_cmd_ALL_SEND_CID() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-10-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 23 --- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/hw/sd/s

[PATCH v2 08/25] hw/sd: Add sd_cmd_GO_IDLE_STATE() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-8-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hw/sd/s

[PATCH v2 04/25] hw/sd: Move proto_name to SDProto structure

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Introduce a new structure to hold the bus protocol specific fields: SDProto. The first field is the protocol name. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <20210624142209.1193073-4-f4...@amsat.org> Signed-off-by: Cédric Le Goater --

[PATCH v2 05/25] hw/sd: Introduce sd_cmd_handler type

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add 2 command handler arrays in SDProto, for CMD and ACMD. Have sd_normal_command() / sd_app_command() use these arrays: if an command handler is registered, call it, otherwise fall back to current code base. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Me

[PATCH v2 02/25] hw/sd: When card is in wrong state, log which state it is

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé We report the card is in an inconsistent state, but don't precise in which state it is. Add this information, as it is useful when debugging problems. Since we will reuse this code, extract as sd_invalid_state_for_cmd() helper. Signed-off-by: Philippe Mathieu-Daudé

[PATCH v2 07/25] hw/sd: Add sd_cmd_unimplemented() handler

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé [ clg: Fix redundant assignment of .cmd ] Message-Id: <20210624142209.1193073-7-f4...@amsat.org> Signed-off-by: Cédric Le Goater --- hw/sd/sd.c | 21 - 1 file changed, 12 insertions(+), 9 deletions(-) diff

[PATCH v2 03/25] hw/sd: When card is in wrong state, log which spec version is used

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Add the sd_version_str() helper. Signed-off-by: Philippe Mathieu-Daudé --- hw/sd/sd.c | 18 -- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/hw/sd/sd.c b/hw/sd/sd.c index b0e7a7e6d0..b3e61b9f84 100644 --- a/hw/sd/sd.c +++ b/hw/sd/sd

[PATCH v2 01/25] hw/sd/sdcard: Return ILLEGAL for CMD19/CMD23 prior SD spec v3.01

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé CMD19 (SEND_TUNING_BLOCK) and CMD23 (SET_BLOCK_COUNT) were added in the Physical Layer Simplified Specification v3.01. When earlier spec version is requested, we should return ILLEGAL. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Bin Meng Message-Id: <2022050

[PATCH v2 00/25] hw/sd: Rework models for eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Rebase/respin of Cédric RFC: https://lore.kernel.org/qemu-devel/20220318132824.1134400-1-...@kaod.org/ (sorry it took me so long guys...) Pushed at https://gitlab.com/philmd/qemu/-/commits/emmc-v2 I plan to queue patches 1-12 via sdmmc-next later this week. Cédric,

Re: [PATCH] hw/nvme: deprecate the use-intel-id compatibility parameter

2022-05-30 Thread Klaus Jensen
On May 30 16:37, Philippe Mathieu-Daudé wrote: > On 29/4/22 07:41, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Since version 5.2 commit 6eb7a071292a ("hw/block/nvme: change controller > > pci id"), the emulated NVMe controller has defaulted to a non-Intel PCI > > identifier. > > > > Depre

Re: [PATCH] tests/tcg/s390x: Test overflow conditions

2022-05-30 Thread Gautam Agrawal
Hi, On Mon, 30 May 2022 at 16:05, Thomas Huth wrote: > > Hi! > > On 30/05/2022 11.50, David Hildenbrand wrote: > > On 27.05.22 12:11, Gautam Agrawal wrote: > >> Add a test to check for overflow conditions in s390x. > >> This patch is based on the following patches : > >> * https://git.qemu.org/?

Re: Help: How do I make a machine with 2 separate ARM SoC's?

2022-05-30 Thread Peter Delevoryas
> On May 30, 2022, at 11:15 AM, Cédric Le Goater wrote: > > On 5/30/22 18:53, Peter Maydell wrote: >> On Thu, 26 May 2022 at 23:14, Peter Delevoryas wrote: >>> Hey QEMU developers, >>> >>> Cedric mentioned here[1] that QEMU can support emulating a >>> more complete board, e.g. a machine with

Re: [PATCH v3 0/7] QOM'ify PIIX southbridge creation

2022-05-30 Thread Mark Cave-Ayland
On 29/05/2022 14:02, Bernhard Beschow wrote: On Sun, May 29, 2022 at 12:06 PM Mark Cave-Ayland > wrote: On 29/05/2022 10:46, Mark Cave-Ayland wrote: > On 28/05/2022 20:20, Bernhard Beschow wrote: > >> v3: >> * Rebase onto 'hw/acpi/p

Re: [PATCH 01/18] target/arm: Allow raise_exception to handle finding target EL

2022-05-30 Thread Peter Maydell
On Mon, 30 May 2022 at 17:39, Richard Henderson wrote: > > On 5/30/22 05:44, Peter Maydell wrote: > >> G_NORETURN void raise_exception(CPUARMState *env, uint32_t excp, > >> -uint32_t syndrome, uint32_t target_el); > >> +uint32_t syn

[PULL 2/2] hw/hyperv/vmbus: Remove unused vmbus_load/save_req()

2022-05-30 Thread Maciej S. Szmigiero
From: Philippe Mathieu-Daudé vmbus_save_req() and vmbus_load_req() are not used. Remove them to avoid maintaining dead code. This essentially reverts commit 4dd8a7064b8a6527f99a62be11 ("vmbus: add infrastructure to save/load vmbus requests"). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <

[PULL 1/2] MAINTAINERS: Add myself as the maintainer for Hyper-V VMBus

2022-05-30 Thread Maciej S. Szmigiero
From: "Maciej S. Szmigiero" This way there is some contact point for incoming patches, and somebody to review and pick up them. Signed-off-by: Maciej S. Szmigiero --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index dff0200f70..00dc4a8ecb 10

[PULL 0/2] Add myself as the maintainer for Hyper-V VMBus

2022-05-30 Thread Maciej S. Szmigiero
mbus-maint-20220530 for you to fetch changes up to 6ede46b910ac66fd10bc169fb0a6f681429a9c5c: hw/hyperv/vmbus: Remove unused vmbus_load/save_req() (2022-05-30 19:49:42 +0200) As discussed in https://lore.kernel.org/qemu-devel/4e0

Re: Help: How do I make a machine with 2 separate ARM SoC's?

2022-05-30 Thread Cédric Le Goater
On 5/30/22 18:53, Peter Maydell wrote: On Thu, 26 May 2022 at 23:14, Peter Delevoryas wrote: Hey QEMU developers, Cedric mentioned here[1] that QEMU can support emulating a more complete board, e.g. a machine with an AST2600 *and* an AST1030. This is true, as long as all the CPUs are the sam

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by: Vincent Pa

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé via
On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by: Vincent Pa

Re: [PATCH v10 02/45] hw/cxl/component: Introduce CXL components (8.1.x, 8.2.5)

2022-05-30 Thread Jonathan Cameron via
On Fri, 29 Apr 2022 15:40:27 +0100 Jonathan Cameron wrote: > From: Ben Widawsky > > A CXL 2.0 component is any entity in the CXL topology. All components > have a analogous function in PCIe. Except for the CXL host bridge, all > have a PCIe config space that is accessible via the common PCIe >

Re: [PATCH 4/4] hw/ide/piix: Ignore writes of hardwired PCI command register bits

2022-05-30 Thread Michael S. Tsirkin
On Mon, May 30, 2022 at 03:33:18PM +0200, Philippe Mathieu-Daudé wrote: > On 28/5/22 22:47, Lev Kujawski wrote: > > One method to enable PCI bus mastering for IDE controllers, often used > > by x86 firmware, is to write 0x7 to the PCI command register. Neither > > the PIIX3 specification nor actua

[PATCH v2 07/11] vfio/migration: Implement VFIO migration protocol v2

2022-05-30 Thread Avihai Horon
Add implementation of VFIO migration protocol v2. The two protocols, v1 and v2, will co-exist and in next patch v1 protocol will be removed. There are several main differences between v1 and v2 protocols: - VFIO device state is now represented as a finite state machine instead of a bitmap. - Mi

Re: [RFC PATCH 11/17] hw/sd: Add eMMC support

2022-05-30 Thread Philippe Mathieu-Daudé via
Hi Cédric, On 18/3/22 14:28, Cédric Le Goater wrote: The initial eMMC support from Vincent Palatin was largely reworked to match the current SD framework. The parameters mimick a real 4GB eMMC, but it can be set to various sizes. This adds a new QOM object class for EMMC devices. Signed-off-by

[PATCH v2 05/11] vfio/migration: Move migration v1 logic to vfio_migration_init()

2022-05-30 Thread Avihai Horon
Move vfio_dev_get_region_info() logic from vfio_migration_probe() to vfio_migration_init(). This logic is specific to v1 protocol and moving it will make it easier to add the v2 protocol implementation later. No functional changes intended. Signed-off-by: Avihai Horon --- hw/vfio/migration.c |

[PATCH v2 03/11] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-30 Thread Avihai Horon
Add new function qemu_file_get_to_fd() that allows reading data from QEMUFile and writing it straight into a given fd. This will be used later in VFIO migration code. Signed-off-by: Avihai Horon --- migration/qemu-file.c | 34 ++ migration/qemu-file.h | 1 + 2 f

[PULL 097/117] target/arm: Move null function and sve check into do_frint_mode

2022-05-30 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-95-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 52 +- 1 file changed, 23 insertions(+), 29 d

Re: [PATCH v2 02/11] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-30 Thread Avihai Horon
On 5/30/2022 8:07 PM, Avihai Horon wrote: Currently, if IOMMU of a VFIO container doesn't support dirty page tracking, migration is blocked completely. This is because a DMA-able VFIO device can dirty RAM pages without updating QEMU about it, thus breaking the migration. However, this doesn't

[PULL 089/117] target/arm: Use TRANS_FEAT for DO_FP3

2022-05-30 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-87-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 7 ++- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/target/a

Re: [RFC PATCH 07/17] hw/sd: Add sd_cmd_SEND_OP_CMD() handler

2022-05-30 Thread Philippe Mathieu-Daudé via
On 10/5/22 08:57, Cédric Le Goater wrote: On 5/9/22 23:12, Philippe Mathieu-Daudé wrote: On 18/3/22 14:28, Cédric Le Goater wrote: From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20210624142209.1193073-9-f4...@amsat.org> Signed-off-by: Cédric Le Goater ---  

[PATCH v2 11/11] docs/devel: Align vfio-migration docs to VFIO migration v2

2022-05-30 Thread Avihai Horon
Align the vfio-migration documentation to VFIO migration protocol v2. Signed-off-by: Avihai Horon --- docs/devel/vfio-migration.rst | 77 +++ 1 file changed, 33 insertions(+), 44 deletions(-) diff --git a/docs/devel/vfio-migration.rst b/docs/devel/vfio-migration.

[PATCH v2 10/11] vfio: Alphabetize migration section of VFIO trace-events file

2022-05-30 Thread Avihai Horon
Sort the migration section of VFIO trace events file alphabetically and move two misplaced traces to common.c section. Signed-off-by: Avihai Horon --- hw/vfio/trace-events | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/hw/vfio/trace-events b/hw/vfio/tr

Re: Help: How do I make a machine with 2 separate ARM SoC's?

2022-05-30 Thread Peter Maydell
On Thu, 26 May 2022 at 23:14, Peter Delevoryas wrote: > Hey QEMU developers, > > Cedric mentioned here[1] that QEMU can support emulating a > more complete board, e.g. a machine with an AST2600 *and* an AST1030. This is true, as long as all the CPUs are the same architecture family, e.g. all Arm

[PULL 080/117] target/arm: Introduce gen_gvec_{ptr,fpst}_zzzz

2022-05-30 Thread Peter Maydell
From: Richard Henderson Use these for the several varieties of floating-point multiply-add instructions. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-78-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c |

[PATCH v2 00/11] vfio/migration: Implement VFIO migration protocol v2

2022-05-30 Thread Avihai Horon
Hello, Following VFIO migration protocol v2 acceptance in kernel, this series implements VFIO migration according to the new v2 protocol and replaces the now deprecated v1 implementation. The main differences between v1 and v2 migration protocols are: 1. VFIO device state is represented as a fini

[PULL 076/117] target/arm: Reject copy w/ shifted byte early

2022-05-30 Thread Peter Maydell
From: Richard Henderson Remove the unparsed extractions in trans_CPY_{m,z}_i which are intended to reject an 8-bit shift of an 8-bit constant for 8-bit element. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-74-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-

[PATCH v2 09/11] vfio/migration: Reset device if setting recover state fails

2022-05-30 Thread Avihai Horon
If vfio_migration_set_state() fails to set the device in the requested state it tries to put it in a recover state. If setting the device in the recover state fails as well, hw_error is triggered and the VM is aborted. To improve user experience and avoid VM data loss, reset the device with VFIO_R

[PATCH v2 06/11] vfio/migration: Rename functions/structs related to v1 protocol

2022-05-30 Thread Avihai Horon
To avoid name collisions, rename functions and structs related to VFIO migration protocol v1. This will allow the two protocols to co-exist when v2 protocol is added, until v1 is removed. No functional changes intended. Signed-off-by: Avihai Horon --- hw/vfio/common.c | 6 +-- hw/v

[PULL 075/117] target/arm: Reject add/sub w/ shifted byte early

2022-05-30 Thread Peter Maydell
From: Richard Henderson Remove the unparsed extractions in trans_ADD_zzi, trans_SUBR_zzi, and do_zzi_sat which are intended to reject an 8-bit shift of an 8-bit constant for 8-bit element. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-73-richard.hender...@linaro.org Reviewe

[PULL 082/117] target/arm: Move sve check into gen_gvec_fn_ppp

2022-05-30 Thread Peter Maydell
From: Richard Henderson Combined with the check already present in gen_mov_p, we can simplify some special cases in trans_AND_ and trans_BIC_. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-80-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Pe

[PATCH v2 08/11] vfio/migration: Remove VFIO migration protocol v1

2022-05-30 Thread Avihai Horon
Now that v2 protocol implementation has been added, remove the deprecated v1 implementation. Signed-off-by: Avihai Horon --- hw/vfio/common.c | 19 +- hw/vfio/migration.c | 698 +- hw/vfio/trace-events | 5 - include/hw/vfio/vfio

[PATCH v2 01/11] vfio/migration: Fix NULL pointer dereference bug

2022-05-30 Thread Avihai Horon
As part of its error flow, vfio_vmstate_change() accesses MigrationState->to_dst_file without any checks. This can cause a NULL pointer dereference if the error flow is taken and MigrationState->to_dst_file is not set. For example, this can happen if VM is started or stopped not during migration a

[PULL 064/117] target/arm: Use TRANS_FEAT for do_clast_fp

2022-05-30 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-62-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tar

[PULL 095/117] target/arm: Expand frint_fns for MO_8

2022-05-30 Thread Peter Maydell
From: Richard Henderson Simplify indexing of this array. This will allow folding of the illegal esz == 0 into the normal fn == NULL check. Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-93-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell

[PATCH v2 04/11] vfio/common: Change vfio_devices_all_running_and_saving() logic to equivalent one

2022-05-30 Thread Avihai Horon
vfio_devices_all_running_and_saving() is used to check if migration is in pre-copy phase. This is done by checking if migration is in setup or active states and if all VFIO devices are in pre-copy state, i.e. _SAVING | _RUNNING. VFIO migration protocol v2 currently doesn't support pre-copy phase,

Re: [RESEND PATCH] hw/dma: fix crash caused by race condition

2022-05-30 Thread David Hildenbrand
On 27.04.22 22:51, Tong Zhang wrote: > assert(dbs->acb) is meant to check the return value of io_func per > documented in commit 6bee44ea34 ("dma: the passed io_func does not > return NULL"). However, there is a chance that after calling > aio_context_release(dbs->ctx); the dma_blk_cb function is c

[PULL 066/117] target/arm: Use TRANS_FEAT for do_last_fp

2022-05-30 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-64-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/tar

[PULL 092/117] target/arm: Move null function and sve check into do_reduce

2022-05-30 Thread Peter Maydell
From: Richard Henderson Signed-off-by: Richard Henderson Message-id: 20220527181907.189259-90-richard.hender...@linaro.org Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- target/arm/translate-sve.c | 30 +- 1 file changed, 17 insertions(+), 13 deletions

  1   2   3   4   >