[PATCH] target/loongarch: Support QMP dump-guest-memory

2024-08-21 Thread Bibo Mao
Add the support needed for creating prstatus elf notes. This allows us to use QMP dump-guest-memory. Now ELF notes of LoongArch only supports general elf notes, LSX and LASX is not supported, since it is mainly used to dump guest memory. Signed-off-by: Bibo Mao --- target/loongarch/arch_dump.c

Re: [PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test

2024-08-21 Thread Jeuk Kim
On 8/22/2024 3:00 PM, Yoochan Jeong wrote: On 8/22/2024, Jeuk Kim wrote: On 8/21/2024 11:32 AM, 정유찬 wrote:   static void ufs_send_query(QUfs *ufs, uint8_t slot, uint8_t query_function,                               uint8_t query_opcode, uint8_t idn, uint8_t index, +                         

Re: Re: [PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test

2024-08-21 Thread Yoochan Jeong
On 8/22/2024, Jeuk Kim wrote: > On 8/21/2024 11:32 AM, 정유찬 wrote: >>  From d0ae8e25aec4ae7d222a2ea667d5ddb61f14fe02 Mon Sep 17 00:00:00 2001 >> From: Yoochan Jeong >> Date: Wed, 21 Aug 2024 09:03:06 +0900 >> Subject: [PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test >> >> Minor bugs and erro

[PATCH] plugins: add plugin API to read guest memory

2024-08-21 Thread Rowan Hart
Signed-off-by: Rowan Hart --- docs/about/emulation.rst | 16 - include/qemu/qemu-plugin.h | 24 +++- plugins/api.c| 21 +++ plugins/qemu-plugins.symbols | 1 + tests/tcg/plugins/mem.c | 37 +++- tests/tcg/plugins/syscall.c | 113 ++

Re: [PATCH 2/5] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check

2024-08-21 Thread Doug Brown
Hi Pavel, (Dropping Vikram from the email chain; I received "recipient not found" errors from AMD's mail servers in response to all of my patches) On 8/20/2024 11:57 PM, Pavel Pisa wrote: > Hello Doug Brown, > > On Friday 16 of August 2024 18:35:02 Doug Brown wrote: >> -if (frame->flags

Re: [PATCH 4/4] hw/ufs: ufs descriptor read test implemented

2024-08-21 Thread Jeuk Kim
On 8/22/2024 10:39 AM, Yoochan Jeong wrote: From 936ef0a907bcf16809f9980c2d37e8fcb13697d2 Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 09:09:54 +0900 Subject: [PATCH 4/4] hw/ufs: ufs descriptor read test implemented Remove it. New test function "ufstest_desc_reque

Re: [PATCH v4] scripts/qcow2-to-stdout.py: Add script to write qcow2 images to stdout

2024-08-21 Thread Alberto Garcia
ping On Tue, Jul 30, 2024 at 04:15:52PM +0200, Alberto Garcia wrote: > This tool converts a disk image to qcow2, writing the result directly > to stdout. This can be used for example to send the generated file > over the network.

Re: [PATCH v6 12/16] target/riscv: AMO operations always raise store/AMO fault

2024-08-21 Thread Richard Henderson
On 8/22/24 10:58, Deepak Gupta wrote: On Thu, Aug 22, 2024 at 10:43:05AM +1000, Richard Henderson wrote: On 8/22/24 07:50, Deepak Gupta wrote: @@ -1779,13 +1780,25 @@ void riscv_cpu_do_interrupt(CPUState *cs) env->pc += 4; return; case RISCV_EXCP_LOAD_GUEST_AC

Re: [PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test

2024-08-21 Thread Jeuk Kim
On 8/21/2024 11:32 AM, 정유찬 wrote: From d0ae8e25aec4ae7d222a2ea667d5ddb61f14fe02 Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 09:03:06 +0900 Subject: [PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test Minor bugs and errors related to ufs-test are resolved. Some per

Re: [PATCH] vnc: fix crash when no console attached

2024-08-21 Thread Akihiko Odaki
On 2024/08/20 22:11, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Since commit e99441a3793b5 ("ui/curses: Do not use console_select()") qemu_text_console_put_keysym() no longer checks for NULL console argument, which leads to a later crash: Thread 1 "qemu-system-x86" received sig

[PATCH] target/loongarch/kvm: Add vCPU reset function

2024-08-21 Thread Bibo Mao
KVM provides interface KVM_REG_LOONGARCH_VCPU_RESET to reset vCPU, it can be used to clear internal state about kvm kernel. vCPU reset function is added here for kvm mode. Signed-off-by: Bibo Mao --- target/loongarch/cpu.c | 2 +- target/loongarch/kvm/kvm.c | 5 - tar

[PATCH 4/4] hw/ufs: ufs descriptor read test implemented

2024-08-21 Thread Yoochan Jeong
>From 936ef0a907bcf16809f9980c2d37e8fcb13697d2 Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 09:09:54 +0900 Subject: [PATCH 4/4] hw/ufs: ufs descriptor read test implemented New test function "ufstest_desc_request" added, which can check one's virtual UFS device can properly

Re: [PATCH 2/5] hw/net/can/xlnx-versal-canfd: Fix CAN FD flag check

2024-08-21 Thread Pavel Pisa
Hello Doug and Francisco, thanks for cooperation On Thursday 22 of August 2024 02:01:01 Doug Brown wrote: > (Dropping Vikram from the email chain; I received "recipient not found" > errors from AMD's mail servers in response to all of my patches) If the address Vikram Garhwal is not valid then

Re: [PATCH v6 13/16] target/riscv: implement zicfiss instructions

2024-08-21 Thread Deepak Gupta
On Thu, Aug 22, 2024 at 10:57:10AM +1000, Richard Henderson wrote: On 8/22/24 07:50, Deepak Gupta wrote: --- a/target/riscv/insn_trans/trans_rva.c.inc +++ b/target/riscv/insn_trans/trans_rva.c.inc @@ -18,6 +18,8 @@ * this program. If not, see . */ +#include "ex

Re: [PATCH v6 12/16] target/riscv: AMO operations always raise store/AMO fault

2024-08-21 Thread Deepak Gupta
On Thu, Aug 22, 2024 at 10:43:05AM +1000, Richard Henderson wrote: On 8/22/24 07:50, Deepak Gupta wrote: @@ -1779,13 +1780,25 @@ void riscv_cpu_do_interrupt(CPUState *cs) env->pc += 4; return; case RISCV_EXCP_LOAD_GUEST_ACCESS_FAULT: +if (always_sto

Re: [PATCH v6 13/16] target/riscv: implement zicfiss instructions

2024-08-21 Thread Richard Henderson
On 8/22/24 07:50, Deepak Gupta wrote: --- a/target/riscv/insn_trans/trans_rva.c.inc +++ b/target/riscv/insn_trans/trans_rva.c.inc @@ -18,6 +18,8 @@ * this program. If not, see . */ +#include "exec/memop.h" + Why? This will have been done long ago, withi

Re: [PATCH v6 12/16] target/riscv: AMO operations always raise store/AMO fault

2024-08-21 Thread Richard Henderson
On 8/22/24 07:50, Deepak Gupta wrote: @@ -1779,13 +1780,25 @@ void riscv_cpu_do_interrupt(CPUState *cs) env->pc += 4; return; case RISCV_EXCP_LOAD_GUEST_ACCESS_FAULT: +if (always_storeamo) { +cause = RISCV_EXCP_STORE_GUEST_AMO_ACCE

Re: [PATCH v6 11/16] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-21 Thread Richard Henderson
On 8/22/24 07:50, Deepak Gupta wrote: zicfiss protects shadow stack using new page table encodings PTE.W=0, PTE.R=0 and PTE.X=0. This encoding is reserved if zicfiss is not implemented or if shadow stack are not enabled. Loads on shadow stack memory are allowed while stores to shadow stack memory

Re: [PATCH v6 09/16] target/riscv: introduce ssp and enabling controls for zicfiss

2024-08-21 Thread Richard Henderson
On 8/22/24 07:50, Deepak Gupta wrote: zicfiss introduces a new state ssp ("shadow stack register") in cpu. ssp is expressed as a new unprivileged csr (CSR_SSP=0x11) and holds virtual address for shadow stack as programmed by software. Shadow stack (for each mode) is enabled via bit3 in *envcfg C

Re: [PATCH v6 05/16] target/riscv: tracking indirect branches (fcfi) for zicfilp

2024-08-21 Thread Richard Henderson
On 8/22/24 07:50, Deepak Gupta wrote: diff --git a/target/riscv/cpu_helper.c b/target/riscv/cpu_helper.c index 9f08a67a9e..3a56bea8b9 100644 --- a/target/riscv/cpu_helper.c +++ b/target/riscv/cpu_helper.c @@ -133,6 +133,18 @@ void cpu_get_tb_cpu_state(CPURISCVState *env, vaddr *pc, flag

[PATCH v6 02/16] target/riscv: Introduce elp state and enabling controls for zicfilp

2024-08-21 Thread Deepak Gupta
zicfilp introduces a new state elp ("expected landing pad") in cpu. During normal execution, elp is idle (NO_LP_EXPECTED) i.e not expecting landing pad. On an indirect call, elp moves LP_EXPECTED. When elp is LP_EXPECTED, only a subsquent landing pad instruction can set state back to NO_LP_EXPECTED

[PATCH v6 11/16] target/riscv: mmu changes for zicfiss shadow stack protection

2024-08-21 Thread Deepak Gupta
zicfiss protects shadow stack using new page table encodings PTE.W=0, PTE.R=0 and PTE.X=0. This encoding is reserved if zicfiss is not implemented or if shadow stack are not enabled. Loads on shadow stack memory are allowed while stores to shadow stack memory leads to access faults. Shadow stack ac

[PATCH v6 16/16] disas/riscv: enable disassembly for compressed sspush/sspopchk

2024-08-21 Thread Deepak Gupta
sspush and sspopchk have equivalent compressed encoding taken from zcmop. cmop.1 is sspush x1 while cmop.5 is sspopchk x5. Due to unusual encoding for both rs1 and rs2 from space bitfield, this required a new codec. Signed-off-by: Deepak Gupta --- disas/riscv.c | 19 ++- disas/ri

[PATCH v6 15/16] disas/riscv: enable disassembly for zicfiss instructions

2024-08-21 Thread Deepak Gupta
Enable disassembly for sspush, sspopchk, ssrdp & ssamoswap. Disasembly is only enabled if zimop and zicfiss ext is set to true. Signed-off-by: Deepak Gupta --- disas/riscv.c | 40 +++- disas/riscv.h | 1 + 2 files changed, 40 insertions(+), 1 deletion(-) dif

[PATCH v6 10/16] target/riscv: tb flag for shadow stack instructions

2024-08-21 Thread Deepak Gupta
Shadow stack instructions can be decoded as zimop / zcmop or shadow stack instructions depending on whether shadow stack are enabled at current privilege. This requires a TB flag so that correct TB generation and correct TB lookup happens. `DisasContext` gets a field indicating whether bcfi is enab

[PATCH v6 04/16] target/riscv: additional code information for sw check

2024-08-21 Thread Deepak Gupta
sw check exception support was recently added. This patch further augments sw check exception by providing support for additional code which is provided in *tval. Adds `sw_check_code` field in cpuarchstate. Whenever sw check exception is raised *tval gets the value deposited in `sw_check_code`. Si

[PATCH v6 03/16] target/riscv: save and restore elp state on priv transitions

2024-08-21 Thread Deepak Gupta
elp state is recorded in *status on trap entry (less privilege to higher privilege) and restored in elp from *status on trap exit (higher to less privilege). Additionally this patch introduces a forward cfi helper function to determine if current privilege has forward cfi is enabled or not based o

[PATCH v6 08/16] target/riscv: Add zicfiss extension

2024-08-21 Thread Deepak Gupta
zicfiss [1] riscv cpu extension enables backward control flow integrity. This patch sets up space for zicfiss extension in cpuconfig. And imple- ments dependency on A, zicsr, zimop and zcmop extensions. [1] - https://github.com/riscv/riscv-cfi Signed-off-by: Deepak Gupta Co-developed-by: Jim Sh

[PATCH v6 01/16] target/riscv: Add zicfilp extension

2024-08-21 Thread Deepak Gupta
zicfilp [1] riscv cpu extension enables forward control flow integrity. If enabled, all indirect calls must land on a landing pad instruction. This patch sets up space for zicfilp extension in cpuconfig. zicfilp is dependend on zicsr. [1] - https://github.com/riscv/riscv-cfi Signed-off-by: Deepa

[PATCH v4] ptp: Add vDSO-style vmclock support

2024-08-21 Thread David Woodhouse
From: David Woodhouse The vmclock "device" provides a shared memory region with precision clock information. By using shared memory, it is safe across Live Migration. Like the KVM PTP clock, this can convert TSC-based cross timestamps into KVM clock values. Unlike the KVM PTP clock, it does so o

[PATCH v6 06/16] target/riscv: zicfilp `lpad` impl and branch tracking

2024-08-21 Thread Deepak Gupta
Implements setting lp expected when `jalr` is encountered and implements `lpad` instruction of zicfilp. `lpad` instruction is taken out of auipc x0, . This is an existing HINTNOP space. If `lpad` is target of an indirect branch, cpu checks for 20 bit value in x7 upper with 20 bit value embedded in

[PATCH v6 05/16] target/riscv: tracking indirect branches (fcfi) for zicfilp

2024-08-21 Thread Deepak Gupta
zicfilp protects forward control flow (if enabled) by enforcing all indirect call and jmp must land on a landing pad instruction `lpad`. If target of an indirect call or jmp is not `lpad` then cpu/hart must raise a sw check exception with tval = 2. This patch implements the mechanism using TCG. Ta

[PATCH v6 12/16] target/riscv: AMO operations always raise store/AMO fault

2024-08-21 Thread Deepak Gupta
This patch adds one more word for tcg compile which can be obtained during unwind time to determine fault type for original operation (example AMO). Depending on that, fault can be promoted to store/AMO fault. Signed-off-by: Deepak Gupta Suggested-by: Richard Henderson --- target/riscv/cpu.h

[PATCH v6 00/16] riscv support for control flow integrity extensions

2024-08-21 Thread Deepak Gupta
v6 for riscv zicfilp and zicfiss extensions support in qemu. Links for previous versions [1] - v1 https://lists.nongnu.org/archive/html/qemu-devel/2024-07/msg06017.html [2] - v2 https://lore.kernel.org/all/ed23bcbc-fdc4-4492-803c-daa958803...@linaro.org/T/ [3] - v3 https://lists.nongnu.org/archiv

[PATCH v6 09/16] target/riscv: introduce ssp and enabling controls for zicfiss

2024-08-21 Thread Deepak Gupta
zicfiss introduces a new state ssp ("shadow stack register") in cpu. ssp is expressed as a new unprivileged csr (CSR_SSP=0x11) and holds virtual address for shadow stack as programmed by software. Shadow stack (for each mode) is enabled via bit3 in *envcfg CSRs. Shadow stack can be enabled for a m

[PATCH v6 13/16] target/riscv: implement zicfiss instructions

2024-08-21 Thread Deepak Gupta
zicfiss has following instructions - sspopchk: pops a value from shadow stack and compares with x1/x5. If they dont match, reports a sw check exception with tval = 3. - sspush: pushes value in x1/x5 on shadow stack - ssrdp: reads current shadow stack - ssamoswap: swaps contents of shadow sta

[PATCH v6 14/16] target/riscv: compressed encodings for sspush and sspopchk

2024-08-21 Thread Deepak Gupta
sspush/sspopchk have compressed encodings carved out of zcmops. compressed sspush is designated as c.mop.1 while compressed sspopchk is designated as c.mop.5. Note that c.sspush x1 exists while c.sspush x5 doesn't. Similarly c.sspopchk x5 exists while c.sspopchk x1 doesn't. Signed-off-by: Deepak

[PATCH v6 07/16] disas/riscv: enable `lpad` disassembly

2024-08-21 Thread Deepak Gupta
Signed-off-by: Deepak Gupta Co-developed-by: Jim Shu Co-developed-by: Andy Chiu Reviewed-by: Richard Henderson --- disas/riscv.c | 18 +- disas/riscv.h | 2 ++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/disas/riscv.c b/disas/riscv.c index c8364c2b07..c7c92a

Re: [PATCH v3 09/14] migration/multifd: Isolate ram pages packet data

2024-08-21 Thread Peter Xu
On Thu, Aug 01, 2024 at 09:35:11AM -0300, Fabiano Rosas wrote: > @@ -1554,7 +1577,6 @@ static void *multifd_recv_thread(void *opaque) > qemu_sem_wait(&p->sem_sync); > } > } else { > -p->total_normal_pages += p->data->size / qemu_target_page_size();

Re: [PATCH v3 07/14] migration/multifd: Replace p->pages with an union pointer

2024-08-21 Thread Peter Xu
On Thu, Aug 01, 2024 at 09:35:09AM -0300, Fabiano Rosas wrote: > We want multifd to be able to handle more types of data than just ram > pages. To start decoupling multifd from pages, replace p->pages > (MultiFDPages_t) with the new type MultiFDSendData that hides the > client payload inside an uni

Re: [PATCH v5 11/13] migration/multifd: Add migration option set packet size.

2024-08-21 Thread Peter Xu
On Wed, Jul 17, 2024 at 11:59:50AM -0300, Fabiano Rosas wrote: > Yichen Wang writes: > > > From: Hao Xiang > > > > During live migration, if the latency between sender and receiver is > > high and bandwidth is also high (a long and fat pipe), using a bigger > > packet size can help reduce migrat

Re: [PATCH for-9.2 3/9] tests/qtest/migration-test: Fix leaks in calc_dirtyrate_ready()

2024-08-21 Thread Fabiano Rosas
Peter Maydell writes: > In calc_dirtyrate_ready() we g_strdup() a string but then never free it: > > Direct leak of 19 byte(s) in 2 object(s) allocated from: > #0 0x55ead613413e in malloc > (/mnt/nvmedisk/linaro/qemu-from-laptop/qemu/build/asan/tests/qtest/migration-test+0x22f13e) > (BuildI

Re: [PATCH for-9.2 2/9] tests/qtest/migration-test: Don't leak resp in multifd_mapped_ram_fdset_end()

2024-08-21 Thread Fabiano Rosas
Peter Maydell writes: > In multifd_mapped_ram_fdset_end() we call qtest_qmp() but forgot > to unref the response QDict we get back, which means it is leaked: > > Indirect leak of 4120 byte(s) in 1 object(s) allocated from: > #0 0x55c0c095d318 in __interceptor_calloc > (/mnt/nvmedisk/linaro/q

Re: [PATCH for-9.2 1/9] tests/qtest/migration-test: Fix bootfile cleanup handling

2024-08-21 Thread Fabiano Rosas
Peter Maydell writes: > If you invoke the migration-test binary in such a way that it doesn't run > any tests, then we never call bootfile_create(), and at the end of > main() bootfile_delete() will try to unlink(NULL), which is not valid. > This can happen if for instance you tell the test binar

Re: [External] Re: [PATCH v8 3/5] migration: Add migration parameters for QATzip

2024-08-21 Thread Yichen Wang
On Wed, Aug 21, 2024 at 4:56 AM Prasad Pandit wrote: > > On Tue, 20 Aug 2024 at 22:40, Yichen Wang wrote: > > Adds support for migration parameters to control QATzip compression > > level and to enable/disable software fallback when QAT hardware is > > unavailable. This is a preparatory commit fo

Re: [PATCH v3 06/14] migration/multifd: Make MultiFDPages_t:offset a flexible array member

2024-08-21 Thread Peter Xu
On Thu, Aug 01, 2024 at 09:35:08AM -0300, Fabiano Rosas wrote: > We're about to use MultiFDPages_t from inside the MultiFDSendData > payload union, which means we cannot have pointers to allocated data > inside the pages structure, otherwise we'd lose the reference to that > memory once another pay

Re: [PATCH v3 03/14] migration/multifd: Remove pages->allocated

2024-08-21 Thread Peter Xu
On Thu, Aug 01, 2024 at 09:35:05AM -0300, Fabiano Rosas wrote: > This value never changes and is always the same as page_count. We > don't need a copy of it per-channel plus one in the extra slot. Remove > it. > > Signed-off-by: Fabiano Rosas Reviewed-by: Peter Xu -- Peter Xu

Re: [PATCH v3 02/14] migration/multifd: Inline page_size and page_count

2024-08-21 Thread Peter Xu
On Thu, Aug 01, 2024 at 09:35:04AM -0300, Fabiano Rosas wrote: > The MultiFD*Params structures are for per-channel data. Constant > values should not be there because that needlessly wastes cycles and > storage. The page_size and page_count fall into this category so move > them inline in multifd.h

Re: [PATCH RFC 2/2] migration: abort on destination if switchover limit exceeded

2024-08-21 Thread Peter Xu
On Fri, Jul 26, 2024 at 12:41:57AM -0700, Elena Ufimtseva wrote: > On Wed, Jun 26, 2024 at 02:41:34PM -0400, Peter Xu wrote: > > On Wed, Jun 26, 2024 at 12:04:43PM +0100, Joao Martins wrote: > > > Are you thinking in something specifically? > > > > Not really. I don't think I have any idea on how

Re: [PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-21 Thread Peter Maydell
On Wed, 21 Aug 2024 at 19:56, Arman Nabiev wrote: > > In my example in https://gitlab.com/qemu-project/qemu/-/issues/2522 the > .needed function returns true for vmstate_tlbemb, but not for vmstate_tlb6xx. > I tried to do some tests without fixing the typo. When I changed the .fields > in the t

Re: [PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-21 Thread Arman Nabiev
In my example in https://gitlab.com/qemu-project/qemu/-/issues/2522 the .needed function returns true for vmstate_tlbemb, but not for vmstate_tlb6xx. I tried to do some tests without fixing the typo. When I changed the .fields in the two structures to the same value so that the size of the data the

Re: [PATCH V2 00/11] Live update: cpr-exec

2024-08-21 Thread Peter Xu
On Fri, Aug 16, 2024 at 01:09:23PM -0400, Steven Sistare wrote: > On 8/16/2024 12:17 PM, Peter Xu wrote: > > On Fri, Aug 16, 2024 at 05:00:32PM +0100, Daniel P. Berrangé wrote: > > > On Fri, Aug 16, 2024 at 11:34:10AM -0400, Peter Xu wrote: > > > > On Fri, Aug 16, 2024 at 04:16:50PM +0100, Daniel P

Re: [PATCH] softmmu: Support concurrent bounce buffers

2024-08-21 Thread Peter Xu
On Mon, Aug 19, 2024 at 06:54:54AM -0700, Mattias Nissler wrote: > When DMA memory can't be directly accessed, as is the case when > running the device model in a separate process without shareable DMA > file descriptors, bounce buffering is used. > > It is not uncommon for device models to reques

Re: [PATCH] hw/char: suppress sunmouse events with no changes

2024-08-21 Thread Carl Hauser via
More on whether the sunmouse_prev_state needs to be migrated. I think that if it were NOT included in the migration state the following would hold, assuming that it would be initialized to 0 in the "to" environment: 1. If prev_state is 0 in the "from" environment the prev_state in the "to" environm

Re: [PATCH V2 06/11] migration: fix mismatched GPAs during cpr

2024-08-21 Thread Peter Xu
On Fri, Aug 16, 2024 at 01:10:02PM -0400, Steven Sistare wrote: > On 8/16/2024 10:43 AM, Peter Xu wrote: > > On Thu, Aug 15, 2024 at 04:54:58PM -0400, Steven Sistare wrote: > > > On 8/13/2024 4:43 PM, Peter Xu wrote: > > > > On Wed, Aug 07, 2024 at 05:04:26PM -0400, Steven Sistare wrote: > > > > >

Re: Issue with QEMU Live Migration

2024-08-21 Thread Arisetty, Chakri
Hi, Thank you for getting back to me. Yes, I have opened the ticket https://urldefense.com/v3/__https://gitlab.com/qemu-project/qemu/-/issues/2482__;!!GjvTz_vk!SCg-a5LiuAGlWyQ6Opd9urNAW4_Z-tUtzPZARWB1d3Ulg_ws87yL3iJcxuZPktLeHNNtPztJTJZNJdE$

Re: [PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-21 Thread Peter Maydell
On Wed, 21 Aug 2024 at 15:08, Physics Набиев wrote: > > Sorry for not providing enough argumentation for my patch. I found a > configuration where this error occurs. Please take a look at > https://gitlab.com/qemu-project/qemu/-/issues/2522. Hmm. I don't understand why fixing this field name wo

[PATCH] tests/avocado: Allow running user-mode tests

2024-08-21 Thread Philippe Mathieu-Daudé
Commit 816d4201ea ("tests/avocado: Move LinuxTest related code into a separate file") removed the Avocado 'process' import which is used by the QemuUserTest class, restore it. Fixes: 816d4201ea ("tests/avocado: Move LinuxTest ...") Signed-off-by: Philippe Mathieu-Daudé --- Unfortunately the singl

Re: [PATCH] tests/avocado: Move LinuxTest related code into a separate file

2024-08-21 Thread Thomas Huth
On 21/08/2024 17.11, Philippe Mathieu-Daudé wrote: On 19/7/24 11:50, Thomas Huth wrote: Only some few tests are using the LinuxTest class. Move the related code into a separate file so that this does not pollute the main namespace. Signed-off-by: Thomas Huth ---   tests/avocado/avocado_qemu/__

Re: [PATCH] tests/avocado: Move LinuxTest related code into a separate file

2024-08-21 Thread Philippe Mathieu-Daudé
On 19/7/24 11:50, Thomas Huth wrote: Only some few tests are using the LinuxTest class. Move the related code into a separate file so that this does not pollute the main namespace. Signed-off-by: Thomas Huth --- tests/avocado/avocado_qemu/__init__.py | 239 +- tests/avoc

Re: [PATCH v4 14/35] tests/functional: add a module for handling asset download & caching

2024-08-21 Thread Philippe Mathieu-Daudé
On 21/8/24 10:27, Thomas Huth wrote: From: Daniel P. Berrangé The 'Asset' class is a simple module that declares a downloadable asset that can be cached locally. Downloads are stored in the user's home dir at ~/.cache/qemu/download, using a sha256 sum of the URL. Signed-off-by: Daniel P. Berra

Re: [PATCH 5/5] hw/char: Extract serial-mm

2024-08-21 Thread Mark Cave-Ayland
On 14/08/2024 19:15, Bernhard Beschow wrote: hw/char/serial currently contains the implementation of both TYPE_SERIAL and TYPE_SERIAL_MM. According to serial_class_init(), TYPE_SERIAL is an internal class while TYPE_SERIAL_MM is used by numerous machine types directly. Let's move the latter into

Re: [PATCH v5 0/3] hw/i386/acpi: Pre-compute the _PRT table

2024-08-21 Thread Igor Mammedov
On Wed, 14 Aug 2024 11:56:08 + Ricardo Ribalda wrote: > Today for x86 the _PRT() table is computed in runtime. > Under some configurations, computing the _PRT table can take more than > 30 seconds and the ACPI timeout is violated. > > This patchset modifies _PRT() to return a pre-computed ta

Re: [PATCH 4/5] hw/char/serial.h: Extract serial-isa.h

2024-08-21 Thread Mark Cave-Ayland
On 14/08/2024 19:15, Bernhard Beschow wrote: The includes where updated based on compile errors. Now, the inclusion of the header roughly matches Kconfig dependencies: # grep -r -e "select SERIAL_ISA" hw/ppc/Kconfig:select SERIAL_ISA hw/isa/Kconfig:select SERIAL_ISA hw/sparc

Re: [PATCH v5 3/3] tests/acpi: pc: update golden masters for DSDT

2024-08-21 Thread Igor Mammedov
On Wed, 14 Aug 2024 11:56:11 + Ricardo Ribalda wrote: > Signed-off-by: Ricardo Ribalda Acked-by: Igor Mammedov > --- > tests/data/acpi/x86/pc/DSDT | Bin 6830 -> 8527 bytes > tests/data/acpi/x86/pc/DSDT.acpierst| Bin 6741 -> 8438 bytes > tests/data/acpi/x86/pc/DSD

Re: [PATCH 3/5] hw/ppc/Kconfig: Add missing SERIAL_ISA dependency to POWERNV machine

2024-08-21 Thread Mark Cave-Ayland
On 14/08/2024 19:15, Bernhard Beschow wrote: The machine calls serial_hds_isa_init() which is provided by serial-isa.c, guarded by SERIAL_ISA. Signed-off-by: Bernhard Beschow --- hw/ppc/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/Kconfig b/hw/ppc/Kconfig index c235519

Re: [PATCH 1/5] hw: Remove unused inclusion of hw/char/serial.h

2024-08-21 Thread Mark Cave-Ayland
On 14/08/2024 19:15, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- hw/char/riscv_htif.c | 1 - hw/ppc/prep.c| 1 - hw/riscv/sifive_e.c | 1 - hw/riscv/sifive_u.c | 1 - 4 files changed, 4 deletions(-) diff --git a/hw/char/riscv_htif.c b/hw/char/riscv_htif.c index

Re: [PATCH v4 11/35] tests/functional: Prepare the meson build system for the functional tests

2024-08-21 Thread Philippe Mathieu-Daudé
On 21/8/24 10:27, Thomas Huth wrote: Provide a meson.build file for the upcoming python-based functional tests, and add some wrapper glue targets to the tests/Makefile.include file. We are going to use two "speed" modes for the functional tests: The "quick" tests can be run at any time (i.e. also

Re: [PATCH v5 1/3] tests/acpi: pc: allow DSDT acpi table changes

2024-08-21 Thread Igor Mammedov
On Wed, 14 Aug 2024 11:56:09 + Ricardo Ribalda wrote: > Signed-off-by: Ricardo Ribalda Reviewed-by: Igor Mammedov > --- > tests/qtest/bios-tables-test-allowed-diff.h | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/tests/qtest/bios-tables-test-allowed-diff.h >

Re: [PATCH] hw/char: suppress sunmouse events with no changes

2024-08-21 Thread Mark Cave-Ayland
On 20/08/2024 08:34, Richard Henderson wrote: On 8/20/24 09:18, Carl Hauser wrote: @@ -959,6 +960,15 @@ static void sunmouse_event(void *opaque,   int ch;   trace_escc_sunmouse_event(dx, dy, buttons_state); + +    /* Don't send duplicate events without motion */ +    if (dx == 0 && +  

Re: [PATCH] ppc: fixed incorrect name filed in vmstate_tlbemb_entry

2024-08-21 Thread Physics Набиев
Sorry for not providing enough argumentation for my patch. I found a configuration where this error occurs. Please take a look at https://gitlab.com/qemu-project/qemu/-/issues/2522. вт, 20 авг. 2024 г. в 19:20, Peter Maydell : > On Tue, 20 Aug 2024 at 17:03, wrote: > > > > From: armanincredible

Re: [PATCH v4 1/2] cxl/core: introduce device reporting poison hanlding

2024-08-21 Thread Shiyang Ruan via
在 2024/8/9 2:28, Fan Ni 写道: On Thu, Aug 08, 2024 at 11:13:27PM +0800, Shiyang Ruan wrote: CXL device can find&report memory problems, even before MCE is detected by CPU. AFAIK, the current kernel only traces POISON error event from FW-First/OS-First path, but it doesn't handle them, neither

Re: Issue with QEMU Live Migration

2024-08-21 Thread Fabiano Rosas
"Arisetty, Chakri" writes: > Hello, > > I’m having trouble with live migration and I’m using QEMU 7.2.0 on Debian 11. > > Migration state switches to pre-switchover state during the RAM migration. > > My assumption is that disks are already migrated and there are no further > dirty pages to be t

[PATCH 0/2] tests/functional: Convert MIPS Malta avocado tests

2024-08-21 Thread Philippe Mathieu-Daudé
Based-on: <20240821082748.65853-1-th...@redhat.com> Philippe Mathieu-Daudé (2): tests/functional: Convert mips64el Malta I6400 avocado tests tests/functional: Convert mipsel Malta YAMON avocado test MAINTAINERS | 3 +- tests/functional/meson.build

[RFC 1/2] vhost-vdpa: Decouple the IOVA allocator

2024-08-21 Thread Jonah Palmer
Decouples the IOVA allocator from the IOVA->HVA tree and instead adds the allocated IOVA range to an IOVA-only tree (iova_map). This IOVA tree will hold all IOVA ranges that have been allocated (e.g. in the IOVA->HVA tree) and are removed when any IOVA ranges are deallocated. A new API function vh

Re: [PATCH v4 4/6] machine/nitro-enclave: Add built-in Nitro Secure Module device

2024-08-21 Thread Dorjoy Chowdhury
Hey Daniel, The libvirt-ci repository has been updated with the libcbor dependency. Should I just update my submodule locally to point to the new master branch and then do a separate commit i.e., "Updated submodule..." and _then_ do this[1] as part of whatever commit introduces the libcbor dependen

Re: [PATCH v2] hw/acpi/ich9: Add periodic and swsmi timer

2024-08-21 Thread Dominic Prinz
Ping https://patchew.org/QEMU/1e4d59a49e7f2e02cf522e799a7bf5f3fa3fba1f.1722414006.git@dprinz.de/ https://lore.kernel.org/qemu-devel/1e4d59a49e7f2e02cf522e799a7bf5f3fa3fba1f.1722414006.git@dprinz.de/ On Wed Jul 31, 2024 at 10:28 AM CEST, Dominic Prinz wrote: > This patch implements the per

[RFC 2/2] vhost-vdpa: Implement GPA->IOVA & IOVA->SVQ HVA trees

2024-08-21 Thread Jonah Palmer
Implements a GPA->IOVA and IOVA->SVQ HVA tree for handling mapping, unmapping, and translations for guest and host-only memory, respectively. By splitting up a full IOVA->HVA tree (containing both guest and host-only memory mappings) into a GPA->IOVA tree (containing only guest memory mappings) an

[PATCH v2 3/3] tests/functional: Convert mipsel Malta YAMON avocado test

2024-08-21 Thread Philippe Mathieu-Daudé
Straight forward conversion using the Python standard zipfile module instead of avocado.utils package. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- tests/avocado/

[PATCH v2 1/3] tests/functional: Convert mips fuloong2e avocado test

2024-08-21 Thread Philippe Mathieu-Daudé
Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Since the asset is expected locally and the test is guarded with QEMU_TEST_ALLOW_UNTRUSTED_CODE, keep it under the 'quick' category. $ RESCUE_YL_PATH=/path/to/rescue-yl QEMU_TEST

[PATCH v2 2/3] tests/functional: Convert mips64el Malta I6400 avocado tests

2024-08-21 Thread Philippe Mathieu-Daudé
Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + tests/avocado/machine_mips_malta.py | 108

[PATCH v2 0/3] tests/functional: Convert few MIPS avocado tests

2024-08-21 Thread Philippe Mathieu-Daudé
1/4 qemu:func-quick+func-mipsel / func-mipsel-empty_cpu_model OK 0.64s 1 subtests passed 2/4 qemu:func-quick+func-mipsel / func-mipsel-version OK 0.65s 1 subtests passed 3/4 qemu:func-quick+func-mipsel / func-mipsel-info_

Re: [PATCH RFC V3 17/29] arm/virt: Release objects for *disabled* possible vCPUs after init

2024-08-21 Thread Gavin Shan
Hi Salil, On 8/21/24 8:23 PM, Salil Mehta wrote: On 8/21/24 2:40 AM, Salil Mehta wrote: > > I don’t understand this clearly. Are you suggesting to reuse only > single vCPU object to initialize all KVM vCPUs not yet plugged? If > yes, then I'm not sure what do we gain here by adding

Issue with QEMU Live Migration

2024-08-21 Thread Arisetty, Chakri
Hello, I’m having trouble with live migration and I’m using QEMU 7.2.0 on Debian 11. Migration state switches to pre-switchover state during the RAM migration. My assumption is that disks are already migrated and there are no further dirty pages to be transferred from source host to destination

Re: [PATCH] tests/functional: Convert mips fuloong2e avocado test

2024-08-21 Thread Philippe Mathieu-Daudé
On 21/8/24 13:46, Thomas Huth wrote: On 21/08/2024 13.29, Philippe Mathieu-Daudé wrote: Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Since the asset is expected locally and the test is guarded with QEMU_TEST_ALLOW_UNTRUSTED

[RFC 0/2] Handling aliased guest memory maps in vhost-vDPA SVQs

2024-08-21 Thread Jonah Palmer
The guest may overlap guest memory regions when mapping IOVA to HVA translations in the IOVA->HVA tree. This means that different HVAs, that correspond to different guest memory region mappings, may translate to the same IOVA. This can cause conflicts when a mapping is incorrectly referenced. For

[PATCH 2/2] tests/functional: Convert mipsel Malta YAMON avocado test

2024-08-21 Thread Philippe Mathieu-Daudé
Straight forward conversion using the Python standard zipfile module instead of avocado.utils package. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 2 +- tests/avocado/

Re: [PATCH v10 1/8] memory: prevent dma-reentracy issues

2024-08-21 Thread Igor Mammedov
On Thu, 27 Apr 2023 17:10:06 -0400 Alexander Bulekov wrote: > Add a flag to the DeviceState, when a device is engaged in PIO/MMIO/DMA. > This flag is set/checked prior to calling a device's MemoryRegion > handlers, and set when device code initiates DMA. The purpose of this > flag is to prevent

[PATCH 1/2] tests/functional: Convert mips64el Malta I6400 avocado tests

2024-08-21 Thread Philippe Mathieu-Daudé
Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + tests/avocado/machine_mips_malta.py | 108 --- tests/functional/

Re: [PATCH 1/2] tests/functional: Convert mips64el Malta I6400 avocado tests

2024-08-21 Thread Thomas Huth
On 21/08/2024 14.57, Philippe Mathieu-Daudé wrote: Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Signed-off-by: Philippe Mathieu-Daudé --- MAINTAINERS | 1 + tests/avocado/machine_mips_malta.

[PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test

2024-08-21 Thread 정유찬
>From d0ae8e25aec4ae7d222a2ea667d5ddb61f14fe02 Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 09:03:06 +0900 Subject: [PATCH 1/4] hw/ufs: minor bug fixes related to ufs-test Minor bugs and errors related to ufs-test are resolved. Some permissions and code implementations that

[PATCH 3/4] hw/ufs: ufs attribute read/write test implemented

2024-08-21 Thread 정유찬
>From 3341c347a70783c5e60a963501e63cb5da8f2e1f Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 09:09:32 +0900 Subject: [PATCH 3/4] hw/ufs: ufs attribute read/write test implemented New test function "ufstest_attr_request" added, which can check one's virtual UFS device can pro

[PATCH 0/4] hw/ufs: ufs device testing function added and modified

2024-08-21 Thread 정유찬
From 936ef0a907bcf16809f9980c2d37e8fcb13697d2 Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 10:45:28 +0900 Subject: [PATCH 0/4] hw/ufs: ufs device testing function added and modified Previously, it was only able to test virtual UFS devices if they properly read a

[PATCH 0/4] hw/ufs: ufs device testing function added and modified

2024-08-21 Thread 정유찬
>From 936ef0a907bcf16809f9980c2d37e8fcb13697d2 Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 10:45:28 +0900 Subject: [PATCH 0/4] hw/ufs: ufs device testing function added and modified Previously, it was only able to test virtual UFS devices if they properly read and write st

[PATCH 2/4] hw/ufs: ufs flag read/write test implemented

2024-08-21 Thread 정유찬
>From fa2187660e82e7772c2061b22ba9eab95e92f77c Mon Sep 17 00:00:00 2001 From: Yoochan Jeong Date: Wed, 21 Aug 2024 09:08:18 +0900 Subject: [PATCH 2/4] hw/ufs: ufs flag read/write test implemented New test function "ufstest_flag_request" added, which can check one's virtual UFS device can properly

Re: [RFC v3 3/3] vhost: Allocate memory for packed vring

2024-08-21 Thread Sahil
Hi, Sorry for the late reply. On Tuesday, August 13, 2024 12:23:55 PM GMT+5:30 Eugenio Perez Martin wrote: > [...] > > I think I have understood what's going on in "vhost_vdpa_svq_map_rings", > > "vhost_vdpa_svq_map_ring" and "vhost_vdpa_dma_map". But based on > > what I have understood it looks

Re: [PATCH v8 3/5] migration: Add migration parameters for QATzip

2024-08-21 Thread Prasad Pandit
On Tue, 20 Aug 2024 at 22:40, Yichen Wang wrote: > Adds support for migration parameters to control QATzip compression > level and to enable/disable software fallback when QAT hardware is > unavailable. This is a preparatory commit for a subsequent commit that > will actually use QATzip compressio

Re: [PATCH v4 26/35] tests/functional: Convert the ppc_hv avocado test into a standalone test

2024-08-21 Thread Philippe Mathieu-Daudé
On 21/8/24 10:27, Thomas Huth wrote: A straight forward conversion, we just also have to remove the decorator @skipUnless(os.getenv('SPEED')) since all non-trivial functional tests are running in SPEED=thorough mode now. Also make sure that the extracted assets are writable, so that the test does

Re: [PATCH] tests/functional: Convert mips fuloong2e avocado test

2024-08-21 Thread Thomas Huth
On 21/08/2024 13.29, Philippe Mathieu-Daudé wrote: Straight forward conversion. Update the SHA1 hashes to SHA256 hashes since SHA1 should not be used anymore nowadays. Since the asset is expected locally and the test is guarded with QEMU_TEST_ALLOW_UNTRUSTED_CODE, keep it under the 'quick' categ

Re: [PATCH for-9.2 v6 04/12] pci-ids.rst: add Red Hat pci-id for RISC-V IOMMU device

2024-08-21 Thread Gerd Hoffmann
On Thu, Aug 01, 2024 at 12:43:25PM GMT, Daniel Henrique Barboza wrote: > The RISC-V IOMMU PCI device we're going to add next is a reference > implementation of the riscv-iommu spec [1], which predicts that the > IOMMU can be implemented as a PCIe device. > > However, RISC-V International (RVI), th

  1   2   >