Re: [PATCH] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled

2022-06-15 Thread Gerd Hoffmann
On Wed, Jun 15, 2022 at 11:45:01AM +0800, Zhenzhong Duan wrote: > According to spec: > "TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space > only. When G_SMRAME = 1 and TSEG_EN = 1, the TSEG is enabled to appear > in the appropriate physical address space. Note that once D_LCK is

Re: [PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-15 Thread Alexey Kardashevskiy
On 6/15/22 14:48, Cédric Le Goater wrote: Hello Alexey, On 6/8/22 05:01, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org/pr

Re: [PATCH] target/ppc: cpu_init: Clean up stop state on cpu reset

2022-06-15 Thread Frederic Barrat
On 15/06/2022 07:23, Cédric Le Goater wrote: On 6/14/22 10:29, Frederic Barrat wrote: The 'resume_as_sreset' attribute of a cpu can be set when a thread is entering a stop state on ppc books. It causes the thread to be re-routed to vector 0x100 when woken up by an exception. So it must be cle

Re: New "IndustryStandard" fw_cfg?

2022-06-15 Thread Gerd Hoffmann
Hi, > > There's a new UEFI feature in v2.9 of the specification (March 2021) that > > allows for memory ranges to be classified as "unaccepted", since both TDX > > and SEV-SNP require that the guest VM accept any host-made changes to > > page state. We should expect newer technologies on non-x86

Re: [PATCH v4 2/4] datadir: Use bundle mechanism

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 06:07:44AM +0900, Akihiko Odaki wrote: > softmmu/datadir.c had its own implementation to find files in the > build tree, but now bundle mechanism provides the unified > implementation which works for datadir and the other files. > > Signed-off-by: Akihiko Odaki > --- > .t

Re: [PATCH] build: fix check for -fsanitize-coverage-allowlist

2022-06-15 Thread Paolo Bonzini
On 6/14/22 17:54, Alexander Bulekov wrote: The existing check has two problems: 1. Meson uses a private directory for the get_supported_arguments check. ./instrumentation-filter does not exist in that private directory (it is copied into the root of the build-directory). 2. fsanitize-coverage-al

Re: [PATCH v4 2/4] datadir: Use bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/14/22 23:07, Akihiko Odaki wrote: ) + roms = [] if unpack_edk2_blobs fds = [ @@ -20,6 +22,9 @@ if unpack_edk2_blobs install: get_option('install_blobs'), install_dir: qemu_datadir, command: [ bzip2, '-dc', '@INPUT0@' ]) + +

Re: [PATCH v4 1/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/14/22 23:07, Akihiko Odaki wrote: diff --git a/util/cutils.c b/util/cutils.c index a58bcfd80e7..fe3bbb1c4eb 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -1086,3 +1086,36 @@ char *get_relocated_path(const char *dir) } return g_string_free(result, false); } + +static const c

Re: [PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-06-15 Thread David Hildenbrand
On 14.06.22 14:13, Julia Suvorova wrote: > On Tue, Jun 14, 2022 at 11:50 AM David Hildenbrand wrote: >> >> On 14.06.22 10:54, Igor Mammedov wrote: >>> On Mon, 13 Jun 2022 16:09:53 +0100 >>> Stefan Hajnoczi wrote: >>> On Mon, Jun 13, 2022 at 05:01:10PM +0200, Julia Suvorova wrote: > On Tu

Re: [PATCH v4 0/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 06:07:42AM +0900, Akihiko Odaki wrote: > Developers often run QEMU without installing. The bundle mechanism > allows to look up files which should be present in installation even in > such a situation. > > It is a general mechanism and can find any files located relative >

Re: [PATCH v12 00/14] vfio-user server in QEMU

2022-06-15 Thread Stefan Hajnoczi
On Tue, 14 Jun 2022 at 17:38, Stefan Hajnoczi wrote: > > On Tue, Jun 14, 2022 at 02:37:02PM +, Jag Raman wrote: > > > On Jun 14, 2022, at 3:06 AM, Stefan Hajnoczi wrote: > > > > > > On Mon, Jun 13, 2022 at 04:26:20PM -0400, Jagannathan Raman wrote: > > >> This is v12 of the server side change

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread Klaus Jensen
On Jun 14 08:41, Keith Busch wrote: > It's a pretty nasty hack, and definitely not in compliance with the spec: the > db_addr is supposed to be read-only from the device side, though I do think > it's safe for this environment. Unless Klaus or anyone finds something I'm > missing, I feel this is an

Re: [PATCH v4 0/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/14/22 23:07, Akihiko Odaki wrote: Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The buil

Re: [PATCH] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled

2022-06-15 Thread Paolo Bonzini
Queued, thanks. Paolo

Re: [PATCH] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled

2022-06-15 Thread Paolo Bonzini
On 6/15/22 05:45, Zhenzhong Duan wrote: According to spec: "TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space only. When G_SMRAME = 1 and TSEG_EN = 1, the TSEG is enabled to appear in the appropriate physical address space. Note that once D_LCK is set, this bit becomes read on

Re: [PATCH 0/2] Two sets of trivials

2022-06-15 Thread Klaus Jensen
On Jun 14 11:40, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > I've sent the 3 char set last month, but have updated > it a little; I cleaned up a comment style that was already > broken so checkpatch is happy. > > The 'namesapce' is a new patch; it's amazing how many

Re: [PATCH v6 3/8] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-06-15 Thread Chao Peng
On Tue, Jun 14, 2022 at 08:23:46PM +, Sean Christopherson wrote: > On Thu, Jun 02, 2022, Chao Peng wrote: > > On Wed, Jun 01, 2022 at 02:11:42PM +0200, Gupta, Pankaj wrote: > > > > > > > > > Introduce a new memfd_create() flag indicating the content of the > > > > > > created memfd is inaccess

Re: [PATCH v6 0/8] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-06-15 Thread Chao Peng
On Tue, Jun 14, 2022 at 01:59:41PM -0700, Andy Lutomirski wrote: > On Tue, Jun 14, 2022 at 12:09 PM Sean Christopherson > wrote: > > > > On Tue, Jun 14, 2022, Andy Lutomirski wrote: > > > On Tue, Jun 14, 2022 at 12:32 AM Chao Peng > > > wrote: > > > > > > > > On Thu, Jun 09, 2022 at 08:29:06PM

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread John Levon
On Wed, Jun 15, 2022 at 10:48:26AM +0200, Klaus Jensen wrote: > > By the way, I noticed that the patch never updates the cq's ei_addr value. > > Is > > that on purpose? > > Yeah, I also mentioned this previously[1] and I still think we need to > update the event index. Otherwise (and my testing

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread Klaus Jensen
On Jun 15 10:07, John Levon wrote: > On Wed, Jun 15, 2022 at 10:48:26AM +0200, Klaus Jensen wrote: > > > > By the way, I noticed that the patch never updates the cq's ei_addr > > > value. Is > > > that on purpose? > > > > Yeah, I also mentioned this previously[1] and I still think we need to > >

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread Klaus Jensen
On Jun 15 11:58, Jinhao Fan wrote: > > > On Jun 14, 2022, at 11:41 PM, Keith Busch wrote: > > > > It's a pretty nasty hack, and definitely not in compliance with the spec: > > the > > db_addr is supposed to be read-only from the device side, though I do think > > it's safe for this environment.

Re: [PATCH] target/ppc: cpu_init: Clean up stop state on cpu reset

2022-06-15 Thread Cédric Le Goater
On 6/15/22 09:17, Frederic Barrat wrote: On 15/06/2022 07:23, Cédric Le Goater wrote: On 6/14/22 10:29, Frederic Barrat wrote: The 'resume_as_sreset' attribute of a cpu can be set when a thread is entering a stop state on ppc books. It causes the thread to be re-routed to vector 0x100 when wo

Re: [PATCH v16 3/9] linux-user: Add LoongArch elf support

2022-06-15 Thread gaosong
Hi Richard. On 2022/6/15 上午12:21, Richard Henderson wrote: On 6/14/22 02:05, Song Gao wrote: +#define ELF_HWCAP get_elf_hwcap() + +static uint32_t get_elf_hwcap(void) +{ +    return 0; +} This should not be zero.  See cpu_probe_common in the kernel.  At minimum HWCAP_LOONGARCH_CRC32 and HWCA

Re: [PULL 00/10] Block jobs & NBD patches

2022-06-15 Thread Vladimir Sementsov-Ogievskiy
On 6/14/22 21:05, Richard Henderson wrote: On 6/14/22 03:29, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60:    Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) a

Re: [PATCH v16 7/9] target/loongarch: Adjust functions and structure to support user-mode

2022-06-15 Thread gaosong
On 2022/6/15 上午12:43, Richard Henderson wrote: On 6/14/22 02:05, Song Gao wrote: @@ -172,17 +173,20 @@ static void loongarch_cpu_do_interrupt(CPUState *cs)   update_badinstr = 0;   break;   case EXCCODE_ADEM: +    case EXCCODE_BCE:   case EXCCODE_SYS:   case EXCCOD

Re: [PATCH v16 2/9] linux-user: Add LoongArch signal support

2022-06-15 Thread gaosong
On 2022/6/15 上午12:15, Richard Henderson wrote: +static void *get_ctx(struct target_sctx_info *info) +{ +    return (void *)((char *)info + sizeof(struct target_sctx_info)); +} Return type should be struct target_sctx_info *. I wonder that if we return target_fpu_context * and rename get_ctx

Re: [RFC PATCH v8 00/21] Net Control VQ support with asid in vDPA SVQ

2022-06-15 Thread Eugenio Perez Martin
On Wed, Jun 15, 2022 at 5:04 AM Jason Wang wrote: > > On Tue, Jun 14, 2022 at 5:32 PM Eugenio Perez Martin > wrote: > > > > On Tue, Jun 14, 2022 at 10:20 AM Jason Wang wrote: > > > > > > On Tue, Jun 14, 2022 at 4:14 PM Eugenio Perez Martin > > > wrote: > > > > > > > > On Tue, Jun 14, 2022 at 10

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread John Levon
On Wed, Jun 15, 2022 at 11:33:02AM +0200, Klaus Jensen wrote: > > BTW I'm surprised that this patch has just this: > > > > +static void nvme_update_sq_eventidx(const NvmeSQueue *sq) > > +{ > > +pci_dma_write(&sq->ctrl->parent_obj, sq->ei_addr, &sq->tail, > > + sizeof(sq->tail

[PATCH v3 0/4] softmmu: make qemu_find_file more flexible wrt build dir layout

2022-06-15 Thread Daniel P . Berrangé
The qemu_find_file method impl is rather crude with a variety of problems (detailed in commit message of first patch). This series addresses those problems, making qemu_find_file much more flexible and able to be trivially extended to find any type of file, both in a (optionally relocated) install

[PATCH v3 1/4] softmmu: rewrite handling of qemu_find_file

2022-06-15 Thread Daniel P . Berrangé
The qemu_find_file method has a couple of flaws in its current implementation: * The configure time 'qemu-firmware' search path is mistakenly also used to find keymaps * The configure time 'qemu-firmware' search path is mistakenly relocated even when running from build dir resulting in

[PATCH v3 3/4] ui: find icons using qemu_find_file

2022-06-15 Thread Daniel P . Berrangé
The SDL/GTK/Cocoa UIs currently fail to load icons when run from the build directory as get_resource returns a bogus path. To address this we first re-arrange the ui/icons sub-directory so that its layout reflects the contents that will be installed. Then we introduce QEMU_FILE_TYPE_ICON to qemu_

Re: [PATCH v4 0/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 10:39:29AM +0200, Paolo Bonzini wrote: > On 6/14/22 23:07, Akihiko Odaki wrote: > > Developers often run QEMU without installing. The bundle mechanism > > allows to look up files which should be present in installation even in > > such a situation. > > > > It is a general m

[PATCH v3 4/4] net: convert to use qemu_find_file to locate bridge helper

2022-06-15 Thread Daniel P . Berrangé
The TAP device code currently uses get_relocate_path to find the bridge helper, however, this fails when run from the build dir. Adding support to qemu_find_file for helper binaries, allows it to work from both the (relocated) install tree and build dir. Signed-off-by: Daniel P. Berrangé --- inc

[PATCH v3 2/4] ui: move 'pc-bios/keymaps' to 'ui/keymaps'

2022-06-15 Thread Daniel P . Berrangé
The 'keymaps' directory contents is nothing to do with the firmware blobs. The 'pc-bios/keymaps' directory appears to have been used previously as a convenience for getting the files installed into a subdir of the firmware install dir, as well as to make it easier to launch QEMU directly from the b

Re: [PATCH v4 0/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/15/22 10:30, Daniel P. Berrangé wrote: I don't think this is an attractive approach to the problem, because it results in us adding a bunch of meson rules to simulate 'make install' within the build dir. This is undesirable clutter IMHO, and can be solved more simply by just modifying the qe

Re: [PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-06-15 Thread Xiao Guangrong
On Wed, Jun 15, 2022 at 4:24 PM David Hildenbrand wrote: > >> Is that a temporary or a permanent thing? Do we know? > > > > No idea. But his last signed-off was three years ago. > > I sent a patch to Xiao, asking if he's still active in QEMU. If I don't > get a reply this week, I'll move forward

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread Jinhao Fan
> On Jun 15, 2022, at 6:11 PM, John Levon wrote: > > On Wed, Jun 15, 2022 at 11:33:02AM +0200, Klaus Jensen wrote: > >>> BTW I'm surprised that this patch has just this: >>> >>> +static void nvme_update_sq_eventidx(const NvmeSQueue *sq) >>> +{ >>> +pci_dma_write(&sq->ctrl->parent_obj, sq

Re: [PATCH v4 0/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 01:02:08PM +0200, Paolo Bonzini wrote: > On 6/15/22 10:30, Daniel P. Berrangé wrote: > > I don't think this is an attractive approach to the problem, > > because it results in us adding a bunch of meson rules to > > simulate 'make install' within the build dir. This is undes

Re: [PATCH v3 4/4] net: convert to use qemu_find_file to locate bridge helper

2022-06-15 Thread Paolo Bonzini
On 6/15/22 12:52, Daniel P. Berrangé wrote: +case QEMU_FILE_TYPE_HELPER: +rel_install_dir = ""; +rel_build_dir = ""; +default_install_dir = default_helper_dir; +break; + You're replacing ad hoc rules in Akihiko's meson.build with an ad hoc enum + the corr

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread John Levon
On Wed, Jun 15, 2022 at 07:22:22PM +0800, Jinhao Fan wrote: > >>> Isn't this racy against the driver? Compare > >>> https://github.com/spdk/spdk/blob/master/lib/nvmf/vfio_user.c#L1317 > >> > >> QEMU has full memory barriers on dma read/write, so I believe this is > >> safe? > > > > But don't you

Re: [RFC PATCH v2 3/8] qapi: net: add stream and dgram netdevs

2022-06-15 Thread Markus Armbruster
Laurent Vivier writes: > On 13/05/2022 13:44, Markus Armbruster wrote: >> Laurent Vivier writes: >> >>> Copied from socket netdev file and modified to use SocketAddress >>> to be able to introduce new features like unix socket. >>> >>> "udp" and "mcast" are squashed into dgram netdev, multicast

Re: [PATCH] hw/mem/nvdimm: fix error message for 'unarmed' flag

2022-06-15 Thread David Hildenbrand
On 15.06.22 13:17, Xiao Guangrong wrote: > On Wed, Jun 15, 2022 at 4:24 PM David Hildenbrand wrote: > Is that a temporary or a permanent thing? Do we know? >>> >>> No idea. But his last signed-off was three years ago. >> >> I sent a patch to Xiao, asking if he's still active in QEMU. If I do

Re: [RFC PATCH v2 2/8] qapi: net: introduce a way to bypass qemu_opts_parse_noisily()

2022-06-15 Thread Markus Armbruster
Laurent Vivier writes: > On 13/05/2022 13:21, Markus Armbruster wrote: >> Laurent Vivier writes: >> >>> As qemu_opts_parse_noisily() flattens the QAPI structures ("type" field >>> of Netdev structure can collides with "type" field of SocketAddress), >> >> To remember how this works, I have to

Re: [PULL 20/33] configure: handle host compiler in probe_target_compiler

2022-06-15 Thread Matheus Kowalczuk Ferst
On 01/06/2022 15:05, Alex Bennée wrote: > From: Paolo Bonzini > > In preparation for handling more binaries than just cc, handle > the case of "probe_target_compiler $cpu" directly in the function, > setting the target_* variables based on the ones that are used to > build QEMU. The clang check

Re: [PATCH v3 4/4] net: convert to use qemu_find_file to locate bridge helper

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 01:42:58PM +0200, Paolo Bonzini wrote: > On 6/15/22 12:52, Daniel P. Berrangé wrote: > > +case QEMU_FILE_TYPE_HELPER: > > +rel_install_dir = ""; > > +rel_build_dir = ""; > > +default_install_dir = default_helper_dir; > > +break; > > + > >

Re: [PATCH 2/9] target/riscv: debug: Introduce build_tdata1() to build tdata1 register content

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:14 PM wrote: > > From: Frank Chang > > Introduce build_tdata1() to build tdata1 register content, which can be > shared among all types of triggers. > > Signed-off-by: Frank Chang > --- > target/riscv/debug.c | 15 ++- > 1 file changed, 10 insertions(+), 5

Re: [PATCH 3/9] target/riscv: debug: Introduce tdata1, tdata2, and tdata3 CSRs

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:15 PM wrote: > > From: Frank Chang > > Replace type2_trigger_t with the real tdata1, tdata2, and tdata3 CSRs, > which allows us to support more types of triggers in the future. > > Signed-off-by: Frank Chang > --- > target/riscv/cpu.h | 6 ++- > target/riscv/debu

Re: [PATCH 4/9] target/riscv: debug: Restrict the range of tselect value can be written

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:14 PM wrote: > > From: Frank Chang > > The value of tselect CSR can be written should be limited within the > range of supported triggers number. > > Signed-off-by: Frank Chang > --- > target/riscv/debug.c | 9 +++-- > 1 file changed, 3 insertions(+), 6 deletions(-

[PATCH] MAINTAINERS: Add softmmu/runstate.c to "Main loop"

2022-06-15 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 4cf6174f9f..4c921c07db 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2745,6 +2745,7 @@ F: softmmu/cpu-throttle.c F: softmmu/cpu-timers.c F: softmmu/icount.c F:

Re: [PATCH 5/9] target/riscv: debug: Introduce tinfo CSR

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:21 PM wrote: > > From: Frank Chang > > tinfo.info: > One bit for each possible type enumerated in tdata1. > If the bit is set, then that type is supported by the currently > selected trigger. > > Signed-off-by: Frank Chang > --- > target/riscv/cpu_bits.h | 1 + >

Re: [PATCH 6/9] target/riscv: debug: Create common trigger actions function

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:21 PM wrote: > > From: Frank Chang > > Trigger actions are shared among all triggers. Extract to a common > function. > > Signed-off-by: Frank Chang > --- > target/riscv/debug.c | 55 ++-- > target/riscv/debug.h | 13 +++

Re: [PATCH 7/9] target/riscv: debug: Check VU/VS modes for type 2 trigger

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:25 PM wrote: > > From: Frank Chang > > Type 2 trigger cannot be fired in VU/VS modes. > > Signed-off-by: Frank Chang > --- > target/riscv/debug.c | 10 ++ > 1 file changed, 10 insertions(+) > Reviewed-by: Bin Meng

[PATCH v5 2/4] datadir: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by: Akihiko Odaki --- .travis.yml | 2 +- meson.build | 2 +- pc-bi

[PATCH v5 1/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The build tree must have a new directory, qemu-bu

[PATCH v5 0/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The build tree must have a new directory, qemu-bu

Re: [PATCH 0/2] Make local migration with TAP network device possible

2022-06-15 Thread Stefan Hajnoczi
On Tue, Jun 14, 2022 at 02:18:41PM +0300, Andrey Ryabinin wrote: > Hi > > These couple patches aims to make possible local migration (within one host) > on the same TAP device used by source and destination QEMU > > The scenario looks like this > 1. Create TAP devices and pass file descriptors

[PATCH v5 3/4] ui/icons: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- meson.build | 2 +- ui/cocoa.m | 29 - ui/gtk.c | 6 +- ui/icons/meson.build | 32 ui/sdl2.c| 18 +++--- 5 files changed, 57 insertions(+), 30

Re: [PATCH v4 1/4] cutils: Introduce bundle mechanism

2022-06-15 Thread Akihiko Odaki
On 2022/06/15 17:19, Paolo Bonzini wrote: On 6/14/22 23:07, Akihiko Odaki wrote: diff --git a/util/cutils.c b/util/cutils.c index a58bcfd80e7..fe3bbb1c4eb 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -1086,3 +1086,36 @@ char *get_relocated_path(const char *dir)   }   return g_string

[PATCH v5 4/4] net: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- include/net/net.h | 2 +- meson.build | 4 +++- net/tap.c | 6 +- qemu-options.hx | 4 ++-- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 523136c7acb..4a5ed27a4b7 100644 --- a/includ

Re: [PATCH 1/2] chardev: don't set O_NONBLOCK on SCM_RIGHTS file descriptors.

2022-06-15 Thread Stefan Hajnoczi
On Tue, Jun 14, 2022 at 02:18:42PM +0300, Andrey Ryabinin wrote: > This reverts commit 9b938c7262e4 ("chardev: clear O_NONBLOCK on SCM_RIGHTS > file descriptors"). > File descriptor passed to QEMU via 'getfd' QMP command always > changed to blocking mode. Instead of that, change blocking mode by Q

Re: [PATCH 9/9] target/riscv: debug: Add initial support of type 6 trigger

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:25 PM wrote: > > From: Frank Chang > > Type 6 trigger is similar to a type 2 trigger, but provides additional > functionality and should be used instead of type 2 in newer > implementations. > > Signed-off-by: Frank Chang > --- > target/riscv/debug.c | 174

regarding QEMU ACPI table generation and passing acpi tables/methods to guest OS

2022-06-15 Thread ritul guru
Came across below link about QEMU to pass acpi tables to guest OS. https://wiki.qemu.org/Features/ACPITableGeneration Can I get more docs with respect to acpi tables/devices passing to guest OS from hypervisor or dom0? Looking for an example how an asl file which gets added in the SSDT table can

Re: [PATCH 8/9] target/riscv: debug: Return 0 if previous value written to tselect >= number of triggers

2022-06-15 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:24 PM wrote: > > From: Frank Chang > > If the value written to tselect is greater than or equal to the number > of supported triggers, then the following reads of tselect would return > value 0. Where is this behavior documented? > > Signed-off-by: Frank Chang > --- >

Re: [PATCH 2/5] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-15 Thread John Snow
On Tue, Jun 14, 2022 at 10:30 AM John Snow wrote: > > On Tue, Jun 14, 2022 at 4:59 AM Daniel P. Berrangé > wrote: > > > > On Tue, Jun 14, 2022 at 06:46:35AM +0200, Thomas Huth wrote: > > > On 14/06/2022 03.50, John Snow wrote: > > > > In certain container environments we may not have FUSE at all

Re: regarding QEMU ACPI table generation and passing acpi tables/methods to guest OS

2022-06-15 Thread Igor Mammedov
On Wed, 15 Jun 2022 18:23:28 +0530 ritul guru wrote: > Came across below link about QEMU to pass acpi tables to guest OS. > https://wiki.qemu.org/Features/ACPITableGeneration that link a bit outdated (project was completed but than later QEMU moved on to built-in library for composing ACPI table

Re: [PATCH v6 0/8] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-06-15 Thread Sean Christopherson
On Wed, Jun 15, 2022, Chao Peng wrote: > On Tue, Jun 14, 2022 at 01:59:41PM -0700, Andy Lutomirski wrote: > > On Tue, Jun 14, 2022 at 12:09 PM Sean Christopherson > > wrote: > > > > > > On Tue, Jun 14, 2022, Andy Lutomirski wrote: > > > > This patch series is fairly close to implementing a rather

Re: [PULL 00/10] Block jobs & NBD patches

2022-06-15 Thread Richard Henderson
On 6/15/22 02:47, Vladimir Sementsov-Ogievskiy wrote: Also, could/should I run all these test pipelines on gitlab by hand before sending a PULL request? Or can I rerun them on my qemu fork for debugging? The first thing I'd try is make vm-build- and make docker-test-full@. Either or both will

Re: [External] [PATCH v13 3/8] QIOChannelSocket: Implement io_writev zero copy flag & io_flush for CONFIG_LINUX

2022-06-15 Thread chuang xu
On 2022/6/14 下午10:14, Dr. David Alan Gilbert wrote: I don't think we can tell which one of them triggered the error; so the only thing I can suggest is that we document the need for optmem_max setting; I wonder how we get a better answer than 'a few 100KB'? I guess it's something like the number

Re: [PATCH v16 3/9] linux-user: Add LoongArch elf support

2022-06-15 Thread Richard Henderson
On 6/15/22 02:44, gaosong wrote: Hi Richard. On 2022/6/15 上午12:21, Richard Henderson wrote: On 6/14/22 02:05, Song Gao wrote: +#define ELF_HWCAP get_elf_hwcap() + +static uint32_t get_elf_hwcap(void) +{ +    return 0; +} This should not be zero.  See cpu_probe_common in the kernel.  At minim

[PATCH v2 0/2] hw/nvme: Add shadow doorbell buffer support

2022-06-15 Thread Jinhao Fan
This patch adds shadow doorbell buffer support in NVMe 1.3 to QEMU NVMe. The Doorbell Buffer Config admin command is implemented for the guest to enable shadow doobell buffer. When this feature is enabled, each SQ/CQ is associated with two buffers, i.e., Shadow Doorbell buffer and EventIdx buffer.

[PATCH v2 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread Jinhao Fan
Implement Doorbel Buffer Config command (Section 5.7 in NVMe Spec 1.3) and Shadow Doorbel buffer & EventIdx buffer handling logic (Section 7.13 in NVMe Spec 1.3). For queues created before the Doorbell Buffer Config command, the nvme_dbbuf_config function tries to associate each existing SQ and CQ

[PATCH v2 2/2] hw/nvme: Add trace events for shadow doorbell buffer

2022-06-15 Thread Jinhao Fan
When shadow doorbell buffer is enabled, doorbell registers are lazily updated. The actual queue head and tail pointers are stored in Shadow Doorbell buffers. Add trace events for updates on the Shadow Doorbell buffers and EventIdx buffers. Also add trace event for the Doorbell Buffer Config comman

[PATCH V8 00/39] Live Update

2022-06-15 Thread Steve Sistare
Provide the cpr-save, cpr-exec, and cpr-load commands for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cpr-save stops the VM and saves vmstate to an ordinary file. It supports any type of guest image and bloc

[PATCH V8 02/39] migration: qemu file wrappers

2022-06-15 Thread Steve Sistare
Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix files and file descriptors. Signed-off-by: Steve Sistare --- migration/qemu-file-channel.c | 36 migration/qemu-file-channel.h | 6 ++ 2 files changed, 42 insertions(+) diff --git a

[PATCH V8 08/39] cpr: blockers

2022-06-15 Thread Steve Sistare
Add an interface to register a blocker for cpr-save for one or more modes. Devices and options that do not support a cpr mode can register a blocker, and cpr-save will fail with a descriptive error message. Conversely, if such a device is deleted and un-registers its blocker, cpr will be allowed a

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-15 Thread Jinhao Fan
> On Jun 15, 2022, at 5:38 PM, Klaus Jensen wrote: > > I prefer we use the NVMe terminology to minimize misunderstandings, so > "host" means the driver and "device" means the qemu side of things > Thanks for helping me disambiguate this! Now that we have resolved all issues in v1, I’ve subm

[PATCH V8 12/39] memory: flat section iterator

2022-06-15 Thread Steve Sistare
Add an iterator over the sections of a flattened address space. Signed-off-by: Steve Sistare Reviewed-by: Marc-André Lureau --- include/exec/memory.h | 31 +++ softmmu/memory.c | 20 2 files changed, 51 insertions(+) diff --git a/include/ex

[PATCH V8 10/39] cpr: cpr-enable option

2022-06-15 Thread Steve Sistare
Add the '-cpr-enable ' command-line option as a pre-requisite for using cpr-save and cpr-load for the mode. Multiple -cpr-enable options may be specified, one per mode. Requiring -cpr-enable allows qemu to initialize objects differently, if necessary, so that cpr-save is not blocked. Signed-off-

[PATCH V8 25/39] cpr: notifiers

2022-06-15 Thread Steve Sistare
Add an interface to register notifiers for cpr transitions. It is used to support vfio cpr in a subsequent patch. Signed-off-by: Steve Sistare --- include/migration/cpr.h | 13 + migration/cpr.c | 25 + stubs/cpr.c | 10 ++ 3 files

[PATCH V8 03/39] migration: simplify savevm

2022-06-15 Thread Steve Sistare
Use qemu_file_open to simplify a few functions in savevm.c. No functional change. Signed-off-by: Steve Sistare Reviewed-by: Dr. David Alan Gilbert --- migration/savevm.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/migration/savevm.c b/migration/save

[PATCH V8 19/39] cpr: preserve extra state

2022-06-15 Thread Steve Sistare
cpr must save state that is needed after qemu is restarted, when devices are realized. Thus the extra state cannot be saved in the cpr-load vmstate file, as objects must already exist before that file can be loaded. Instead, define auxilliary state structures and vmstate descriptions, not associa

[PATCH V8 17/39] qapi: strList unit tests

2022-06-15 Thread Steve Sistare
Signed-off-by: Steve Sistare --- MAINTAINERS | 1 + tests/unit/meson.build| 1 + tests/unit/test-strlist.c | 81 +++ 3 files changed, 83 insertions(+) create mode 100644 tests/unit/test-strlist.c diff --git a/MAINTAINERS b/MAINTAIN

[PATCH V8 11/39] cpr: save ram blocks

2022-06-15 Thread Steve Sistare
Add a vmstate handler to save volatile ram blocks in the state file. This is used to preserve secondary guest ram blocks (those that cannot be specified on the command line) such as video ram and roms for cpr reboot, as there is no option to allocate them in shared memory. For efficiency, the use

[PATCH V8 06/39] cpr: reboot mode

2022-06-15 Thread Steve Sistare
Provide the cpr-save and cpr-load functions for live update. These save and restore VM state, with minimal guest pause time, so that qemu may be updated to a new version in between. cpr-save stops the VM and saves vmstate to an ordinary file. It supports any type of guest image and block device,

[PATCH V8 13/39] oslib: qemu_clear_cloexec

2022-06-15 Thread Steve Sistare
Define qemu_clear_cloexec, analogous to qemu_set_cloexec. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Steve Sistare --- include/qemu/osdep.h | 1 + util/oslib-posix.c | 9 + util/oslib-win32.c | 4 3 files changed, 14 insertions(+) diff --git a/include/qemu/osdep.h b/in

[PATCH V8 31/39] vhost: reset vhost devices for cpr

2022-06-15 Thread Steve Sistare
A vhost device is implicitly preserved across re-exec because its fd is not closed, and the value of the fd is specified on the command line for the new qemu to find. However, new qemu issues an VHOST_RESET_OWNER ioctl, which fails because the device already has an owner. To fix, reset the owner

[PATCH V8 18/39] vl: helper to request re-exec

2022-06-15 Thread Steve Sistare
Add a qemu_system_exec_request() hook that causes the main loop to exit and re-exec qemu using the specified arguments. Signed-off-by: Steve Sistare --- include/sysemu/runstate.h | 1 + softmmu/runstate.c| 26 ++ 2 files changed, 27 insertions(+) diff --git a/in

[PATCH V8 09/39] cpr: register blockers

2022-06-15 Thread Steve Sistare
Register the known cpr blockers. Signed-off-by: Steve Sistare --- accel/xen/xen-all.c| 3 +++ backends/hostmem-epc.c | 6 ++ migration/migration.c | 6 ++ replay/replay.c| 4 4 files changed, 19 insertions(+) diff --git a/accel/xen/xen-all.c b/accel/xen/xen-all.c index

[PATCH V8 22/39] cpr: ram block blockers

2022-06-15 Thread Steve Sistare
Unlike reboot mode, restart mode cannot save volatile ram blocks in the vmstate file and recreate them later, because the physical memory for the blocks is pinned and registered for vfio. Add a restart-mode blocker for volatile ram blocks. Signed-off-by: Steve Sistare --- include/exec/memory.h

[PATCH V8 14/39] qapi: strList_from_string

2022-06-15 Thread Steve Sistare
Generalize strList_from_comma_list() to take any delimiter character, rename as strList_from_string(), and move it to qapi/util.c. No functional change. Signed-off-by: Steve Sistare --- include/qapi/util.h | 9 + monitor/hmp-cmds.c | 29 ++--- qapi/qapi-util.c

[PATCH V8 29/39] vfio-pci: cpr part 3 (intx)

2022-06-15 Thread Steve Sistare
Preserve vfio INTX state across cpr restart. Preserve VFIOINTx fields as follows: pin : Recover this from the vfio config in kernel space interrupt : Preserve its eventfd descriptor across exec. unmask : Ditto route.irq : This could perhaps be recovered in vfio_pci_post_load by calling

[PATCH V8 32/39] loader: suppress rom_reset during cpr

2022-06-15 Thread Steve Sistare
Reported-by: Zheng Chuan Signed-off-by: Steve Sistare --- hw/core/loader.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/core/loader.c b/hw/core/loader.c index 0548830..7b39c07 100644 --- a/hw/core/loader.c +++ b/hw/core/loader.c @@ -51,6 +51,7 @@ #include "hw/hw.h"

[PATCH V8 20/39] cpr: restart mode

2022-06-15 Thread Steve Sistare
Provide the cpr-save restart mode, which preserves the guest VM across a restart of the qemu process. After cpr-save, the caller passes qemu command-line arguments to cpr-exec, which directly exec's the new qemu binary. The arguments must include -S so new qemu starts in a paused state. The calle

[PATCH V8 23/39] hostmem-memfd: cpr for memory-backend-memfd

2022-06-15 Thread Steve Sistare
Preserve memory-backend-memfd memory objects during cpr. Signed-off-by: Steve Sistare --- backends/hostmem-memfd.c | 21 - hmp-commands.hx | 2 +- qapi/cpr.json| 2 +- 3 files changed, 14 insertions(+), 11 deletions(-) diff --git a/backends/hostmem-mem

[PATCH V8 21/39] cpr: restart HMP interfaces

2022-06-15 Thread Steve Sistare
cpr-save mode may be "restart" cpr-exec Call qmp_cpr_exec(). Arguments: command : command line to execute, with space-separated arguments Signed-off-by: Steve Sistare --- hmp-commands.hx | 29 ++--- include/monitor/hmp.h | 1 + monitor/hmp-cmds.c|

[PATCH V8 27/39] vfio-pci: cpr part 1 (fd and dma)

2022-06-15 Thread Steve Sistare
Enable vfio-pci devices to be saved and restored across an exec restart of qemu. At vfio creation time, save the value of vfio container, group, and device descriptors in cpr state. In the container pre_save handler, suspend the use of virtual addresses in DMA mappings with VFIO_DMA_UNMAP_FLAG_VA

[PATCH V8 33/39] chardev: cpr framework

2022-06-15 Thread Steve Sistare
Add QEMU_CHAR_FEATURE_CPR for devices that support cpr by preserving an open descriptor across exec. Add the chardev reopen-on-cpr option for devices that should be closed on cpr and reopened after exec. Enable cpr for a chardev if it has QEMU_CHAR_FEATURE_CPR and reopen-on-cpr is false. Allow c

[PATCH V8 24/39] pci: export export msix_is_pending

2022-06-15 Thread Steve Sistare
Export msix_is_pending for use by cpr. No functional change. Signed-off-by: Steve Sistare --- hw/pci/msix.c | 2 +- include/hw/pci/msix.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/pci/msix.c b/hw/pci/msix.c index ae9331c..e492ce0 100644 --- a/hw/pci/msix.c

[PATCH V8 36/39] chardev: cpr for sockets

2022-06-15 Thread Steve Sistare
Save accepted socket fds before cpr-save, and look for them after cpr-load. Block cpr-exec if a socket enables the TLS or websocket option. Allow a monitor socket by closing it on exec. Signed-off-by: Mark Kanda Signed-off-by: Steve Sistare --- chardev/char-socket.c | 45 ++

[PATCH V8 30/39] vfio-pci: recover from unmap-all-vaddr failure

2022-06-15 Thread Steve Sistare
If vfio_cpr_save fails to unmap all vaddr's, then recover by walking all flat sections to restore the vaddr for each. Do so by invoking the vfio listener callback, and passing a new "replay" flag that tells it to replay a mapping without re-allocating new userland data structures. Signed-off-by:

  1   2   3   >