Re: [RFC PATCH v5 1/4] target/riscv: Add smstateen support

2022-06-15 Thread Alistair Francis
On Sat, Jun 4, 2022 at 2:13 AM Mayuresh Chitale wrote: > > Smstateen extension specifies a mechanism to close > the potential covert channels that could cause security issues. > > This patch adds the CSRs defined in the specification and > the corresponding predicates and read/write functions. >

Re: New "IndustryStandard" fw_cfg?

2022-06-15 Thread Xiaoyao Li
On 6/16/2022 1:37 PM, Gerd Hoffmann wrote: Hi, Per my understanding, Unaccepted Memory in UEFI is introduced for confidential VMs, i.e., for Intel TDX and AMD SEV-SNP. The only reason UEFI/OVMF reports "Unaccepted Memory" to OS, is a confidential VM is desired. No. Reporting "Unaccepted

Re: New "IndustryStandard" fw_cfg?

2022-06-15 Thread Gerd Hoffmann
Hi, > Per my understanding, Unaccepted Memory in UEFI is introduced for > confidential VMs, i.e., for Intel TDX and AMD SEV-SNP. The only reason > UEFI/OVMF reports "Unaccepted Memory" to OS, is a confidential VM is > desired. No. Reporting "Unaccepted Memory" to the OS is not a hard

Re: [PATCH] target/riscv/pmp: guard against PMP ranges with a negative size

2022-06-15 Thread Alistair Francis
On Thu, Jun 16, 2022 at 7:12 AM Nicolas Pitre wrote: > > For a TOR entry to match, the stard address must be lower than the end > address. Normally this is always the case, but correct code might still > run into the following scenario: > > Initial state: > > pmpaddr3 = 0x2000

Re: [PATCH v5 2/3] target/riscv: Add stimecmp support

2022-06-15 Thread Anup Patel
On Thu, Jun 16, 2022 at 8:08 AM Alistair Francis wrote: > > On Thu, Jun 16, 2022 at 4:21 AM Atish Kumar Patra wrote: > > > > On Wed, Jun 8, 2022 at 12:19 AM Alistair Francis > > wrote: > > > > > > On Mon, Jun 6, 2022 at 2:23 AM Atish Patra wrote: > > > > > > > > On Thu, Jun 2, 2022 at 12:02

[PATCH 1/2] target/riscv: Remove CSRs that set/clear an IMSIC interrupt file bits

2022-06-15 Thread Anup Patel
Based on architecture review committee feedback, the [m|s|vs]seteienum, [m|s|vs]clreienum, [m|s|vs]seteipnum, and [m|s|vs]clreipnum CSRs are removed in the latest AIA draft v0.3.0 specification. (Refer, https://github.com/riscv/riscv-aia/releases/tag/0.3.0-draft.31) These CSRs were mostly for

[PATCH 2/2] target/riscv: Update default priority table for local interrupts

2022-06-15 Thread Anup Patel
The latest AIA draft v0.3.0 defines a relatively simpler scheme for default priority assignments where: 1) local interrupts 24 to 31 and 48 to 63 are reserved for custom use and have implementation specific default priority. 2) remaining local interrupts 0 to 23 and 32 to 47 have a recommended

[PATCH 0/2] AIA draft v0.3.0 support for QEMU RISC-V

2022-06-15 Thread Anup Patel
The latest AIA draft v0.3.0 addresses comments from the architecture review committee. (Refer, https://github.com/riscv/riscv-aia/releases/tag/0.3.0-draft.31) There are primarily two changes: 1) Removing various [m|s|vs]seteienum, [m|s|vs]clreienum, [m|s|vs]seteipnum, and [m|s|vs]clrei;num

Re: [PATCH 1/3] target/riscv: Remove the redundant initialization of env->misa_mxl

2022-06-15 Thread Bin Meng
On Thu, Jun 16, 2022 at 10:34 AM Alistair Francis wrote: > > On Mon, Jun 13, 2022 at 10:30 PM Bin Meng wrote: > > > > On Mon, Jun 13, 2022 at 8:33 AM Alistair Francis > > wrote: > > > > > > On Thu, Jun 9, 2022 at 11:08 AM Bin Meng wrote: > > > > > > > > env->misa_mxl was already set in the

Re: [PATCH v5 2/3] target/riscv: Add stimecmp support

2022-06-15 Thread Alistair Francis
On Thu, Jun 16, 2022 at 4:21 AM Atish Kumar Patra wrote: > > On Wed, Jun 8, 2022 at 12:19 AM Alistair Francis wrote: > > > > On Mon, Jun 6, 2022 at 2:23 AM Atish Patra wrote: > > > > > > On Thu, Jun 2, 2022 at 12:02 AM Alistair Francis > > > wrote: > > > > > > > > On Wed, Jun 1, 2022 at 4:16

Re: [PATCH 1/3] target/riscv: Remove the redundant initialization of env->misa_mxl

2022-06-15 Thread Alistair Francis
On Mon, Jun 13, 2022 at 10:30 PM Bin Meng wrote: > > On Mon, Jun 13, 2022 at 8:33 AM Alistair Francis wrote: > > > > On Thu, Jun 9, 2022 at 11:08 AM Bin Meng wrote: > > > > > > env->misa_mxl was already set in the RISC-V cpu init routine, and > > > validated at the beginning of

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-15 Thread Alistair Francis
On Wed, Jun 15, 2022 at 2:07 PM Bin Meng wrote: > > On Mon, Jun 13, 2022 at 8:08 PM Jason A. Donenfeld wrote: > > > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > > initialize early. Set this using the usual guest random number > > generation function. This is

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

2022-06-15 Thread Guoyi Tu
On 2022/6/15 22:51, Steve Sistare wrote: Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix files and file descriptors. the function names should be updated. -- Guoyi Signed-off-by: Steve Sistare --- migration/qemu-file-channel.c | 36

Re: [PATCH 0/3] target/riscv: Fix issue 1060

2022-06-15 Thread Alistair Francis
On Sun, Jun 5, 2022 at 9:12 AM Richard Henderson wrote: > > This issue concerns the value of mtval for illegal > instruction exceptions, and came with a great test case. > The fix is just two lines, in the first patch, but > I noticed some cleanups on the way. > > > r~ > > > Richard Henderson

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

2022-06-15 Thread Alex Bennée
Matheus Kowalczuk Ferst writes: > 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

[PATCH 3/4] slirp: Add mfr-id to -netdev options

2022-06-15 Thread Peter Delevoryas
This lets you set the manufacturer's ID for a slirp netdev, which can be queried from the guest through the Get Version ID NC-SI command. For example, by setting the manufacturer's ID to 0x8119: wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd

[PATCH 4/4] slirp: Add oob-eth-addr to -netdev options

2022-06-15 Thread Peter Delevoryas
With this change, you can now request the out-of-band MAC address from slirp in fby35-bmc: wget https://github.com/facebook/openbmc/releases/download/openbmc-e2294ff5d31d/fby35.mtd qemu-system-arm -machine fby35-bmc \ -drive file=fby35.mtd,format=raw,if=mtd \ -nographic \

[PATCH 1/4] slirp: Update submodule to include NC-SI updates

2022-06-15 Thread Peter Delevoryas
There hasn't been a new libslirp release yet, but I don't see any reason in particular why we couldn't update to this commit to support the new NC-SI functionality added in !122 and !125, as long as it doesn't break backwards compatibility with anything. [1]

[PATCH 2/4] slirp: Update SlirpConfig version to 5

2022-06-15 Thread Peter Delevoryas
I think we probably need a new Slirp release (4.8.0) and a switch statement here instead, right? So that we can preserve the behavior for 4.7.0? Signed-off-by: Peter Delevoryas --- net/slirp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/slirp.c b/net/slirp.c index

[PATCH 0/4] slirp: Update submodule to include NC-SI features

2022-06-15 Thread Peter Delevoryas
I recently submitted some NC-SI changes ([1], [2]) to libslirp, and I'd like to include them as netdev options in QEMU now. I'm guessing that before we can do that though, there probably needs to be a new libslirp release, right? Right now we're on 4.7.0, with SlirpConfig version 4. I guess I'd

[PATCH v2 1/2] ui/gtk: detach VCS for additional guest displays

2022-06-15 Thread Dongwon Kim
Detaching any addtional guest displays in case there are multiple displays assigned to the guest OS (e.g. max_outputs=n) so that all of them are visible upon lauching. v2: - check if the type of VC is GD_VC_GFX before qemu_console_is_graphic (Gerd Hoffman) - vc[0] is always primary

[PATCH v2 2/2] ui/gtk: a new array param monitor to specify the target displays

2022-06-15 Thread Dongwon Kim
New integer array parameter, 'monitor' is for specifying the target displays where individual QEMU windows are placed upon launching. The array contains a series of numbers representing the monitor where QEMU windows are placed. Numbers in the array are mapped to QEMU windows like, [1st

[PATCH v2 0/2] handling guest multiple displays

2022-06-15 Thread Dongwon Kim
This patch seires is for adding some useful features for the guest os with multi-displays. First patch is to make all of guest displays visible when guest os is launched using "detach". Second patch is for providing a method to assign each guest display to specific physical monitor, which would be

Re: [PULL 00/18] Block patches

2022-06-15 Thread Richard Henderson
On 6/15/22 08:51, Stefan Hajnoczi wrote: The following changes since commit 8e6c70b9d4a1b1f3011805947925cfdb31642f7f: Merge tag 'kraxel-20220614-pull-request' of git://git.kraxel.org/qemu into staging (2022-06-14 06:21:46 -0700) are available in the Git repository at:

[PATCH] target/riscv/pmp: guard against PMP ranges with a negative size

2022-06-15 Thread Nicolas Pitre
For a TOR entry to match, the stard address must be lower than the end address. Normally this is always the case, but correct code might still run into the following scenario: Initial state: pmpaddr3 = 0x2000 pmp3cfg = OFF pmpaddr4 = 0x3000 pmp4cfg = TOR Execution:

Re: [PATCH V8 04/39] memory: RAM_ANON flag

2022-06-15 Thread David Hildenbrand
On 15.06.22 16:51, Steve Sistare wrote: > A memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED > flag set is not migrated when migrate_ignore_shared() is true, but this > is wrong, because it has no named backing store, and its contents will be > lost. Define a new flag

[PATCH 10/11] target/ppc: Move slbsync to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/insn32.decode | 2 ++ target/ppc/translate.c | 17 - target/ppc/translate/storage-ctrl-impl.c.inc | 14 ++ 3 files changed, 16 insertions(+), 17 deletions(-) diff --git

Re: [PATCH v2] docs: add PCIe root bus for VGA compat guideline

2022-06-15 Thread Alex Williamson
On Tue, 14 Jun 2022 10:52:52 +0200 Gerd Hoffmann wrote: > On Mon, Jun 13, 2022 at 03:47:04PM +0200, Laszlo Ersek wrote: > > On 06/12/22 19:32, Kevin Locke wrote: > > > PCI Express devices which use legacy VGA compatibility should be placed > > > on the Root Complex. This simplifies ioport

[PATCH 08/11] target/ppc: Move slbmfee to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 1 + target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 13 -

[PATCH 05/11] target/ppc: Move slbia to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 5 + target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 17 -

[PATCH 04/11] target/ppc: Move slbieg to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 1 + target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 13 -

[PATCH 03/11] target/ppc: Move slbie to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 7 +++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 13 -

[PATCH 00/11] target/ppc: Implement slbiag move slb* to decodetree

2022-06-15 Thread Lucas Coutinho
Implement the following PowerISA v3.0 instuction: slbiag: SLB Invalidate All Global X-form Move the following PowerISA v3.0 instuction to decodetree: slbie: SLB Invalidate Entry X-form slbieg: SLB Invalidate Entry Global X-form slbia: SLB Invalidate All X-form slbmte: SLB Move To Entry X-form

[PATCH 07/11] target/ppc: Move slbmfev to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 2 ++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 12

[PATCH 02/11] target/ppc: add macros to check privilege level

2022-06-15 Thread Lucas Coutinho
From: Matheus Ferst Equivalent to CHK_SV and CHK_HV, but can be used in decodetree methods. Signed-off-by: Matheus Ferst Signed-off-by: Lucas Coutinho --- target/ppc/translate.c | 21 + target/ppc/translate/fixedpoint-impl.c.inc | 7 ++- 2 files

[PATCH 11/11] target/ppc: Implement slbiag

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 1 + target/ppc/insn32.decode | 4 +++ target/ppc/mmu-hash64.c | 27 target/ppc/translate/storage-ctrl-impl.c.inc | 14 ++ 4 files changed, 46

[PATCH 06/11] target/ppc: Move slbmte to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 2 ++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 14 --

[PATCH 01/11] target/ppc: receive DisasContext explicitly in GEN_PRIV

2022-06-15 Thread Lucas Coutinho
From: Matheus Ferst GEN_PRIV and related CHK_* macros just assumed that variable named "ctx" would be in scope when they are used, and that it would be a pointer to DisasContext. Change these macros to receive the pointer explicitly. Signed-off-by: Matheus Ferst Signed-off-by: Lucas Coutinho

[PATCH 09/11] target/ppc: Move slbfee to decodetree

2022-06-15 Thread Lucas Coutinho
Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 2 ++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 26 ---

Re: [PATCH v7 0/6] cutils: Introduce bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/15/22 19:33, 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

Re: [PATCH v6 0/7] cutils: Introduce bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/15/22 17:56, 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

Re: [PATCH v6 4/7] cutils: Introduce bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/15/22 17:56, Akihiko Odaki wrote: +void list_bundle_candidates(const char *path) +{ +const char *dir = qemu_get_exec_dir(); +int i; + +for (i = 0; i < ARRAY_SIZE(bundle_formats); i++) { +printf(bundle_formats[i], dir, path); +putc('\n', stdout); +} This is

Re: [PATCH v6 3/7] Remove prefixes from path configuration macros

2022-06-15 Thread Paolo Bonzini
On 6/15/22 17:56, Akihiko Odaki wrote: The path configuration macros are often supplied to get_relocated_path(), and the function had some logics to remove the prefixes. With this change, the prefixes are removed from those macros and get_relocated_path() is also simplified. Signed-off-by:

Re: New "IndustryStandard" fw_cfg?

2022-06-15 Thread Dionna Amalie Glaze
> > > For Qemu, the main code I see for adding config is here, but I'm not sure > > > what y'all's preferred external configuration method is to get a value > > > from an > > Ideally no external configuration, although I suspect we need something > at least temporarily. Yes, whereas TDX can

Re: [PATCH v6 5/7] datadir: Use bundle mechanism

2022-06-15 Thread Paolo Bonzini
On 6/15/22 17:56, Akihiko Odaki wrote: diff --git a/tests/vm/fedora b/tests/vm/fedora index 92b78d6e2c9..4ccd31bba61 100755 --- a/tests/vm/fedora +++ b/tests/vm/fedora @@ -79,7 +79,7 @@ class FedoraVM(basevm.BaseVM): self.exec_qemu_img("create", "-f", "qcow2", img_tmp, self.size)

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-15 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: > > > > On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: > > > On Thu, Jun 09, 2022 at 07:33:01AM +, Het Gala wrote: > > > > As of now, the multi-FD feature supports connection

Re: [PATCH v5 2/3] target/riscv: Add stimecmp support

2022-06-15 Thread Atish Kumar Patra
On Wed, Jun 8, 2022 at 12:19 AM Alistair Francis wrote: > > On Mon, Jun 6, 2022 at 2:23 AM Atish Patra wrote: > > > > On Thu, Jun 2, 2022 at 12:02 AM Alistair Francis > > wrote: > > > > > > On Wed, Jun 1, 2022 at 4:16 AM Atish Patra wrote: > > > > > > > > stimecmp allows the supervisor mode

[PATCH v7 6/6] net: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- meson.build | 2 ++ net/tap.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 8961df266d1..5e0e08801c9 100644 --- a/meson.build +++ b/meson.build @@ -3574,6 +3574,8 @@ if have_tools

[PATCH v7 1/6] qga: Relocate a path emitted in the help text

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index c373fec3ee6..06e507b9979 100644 --- a/qga/main.c +++ b/qga/main.c @@ -270,7 +270,7 @@ QEMU_HELP_BOTTOM "\n" , cmd, QGA_VIRTIO_PATH_DEFAULT,

[PATCH v7 5/6] ui/icons: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 2 +- ui/gtk.c | 2 +- ui/icons/meson.build | 32 ui/sdl2.c| 4 ++-- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index

[PATCH v7 3/6] 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,

[PATCH v7 4/6] 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 +- pc-bios/keymaps/meson.build | 2 ++

[PATCH v7 2/6] Remove prefixes from path configuration macros

2022-06-15 Thread Akihiko Odaki
The path configuration macros are often supplied to get_relocated_path(), and the function had some logics to remove the prefixes. With this change, the prefixes are removed from those macros and get_relocated_path() is also simplified. This also fixes --firmwarepath configuration option. The

[PATCH v7 0/6] 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,

RE: [PATCH] virtio/vhost-user: Fix wrong vhost notifier GPtrArray size

2022-06-15 Thread Dong, Eddie
Reviewed-by: Eddie Dong > -Original Message- > From: Qemu-devel bounces+eddie.dong=intel@nongnu.org> On Behalf Of Yajun Wu > Sent: Wednesday, May 25, 2022 8:49 PM > To: qemu-devel@nongnu.org; m...@redhat.com; alex.ben...@linaro.org; > yaj...@nvidia.com > Cc: Parav Pandit > Subject:

[python-qemu-qmp MR #7] readme: small fixes commands

2022-06-15 Thread GitLab Bot
Author: Beraldo Leal - https://gitlab.com/beraldoleal Merge Request: https://gitlab.com/qemu-project/python-qemu-qmp/-/merge_requests/7 ... from: beraldoleal/python-qemu-qmp:docs/readme ... into: qemu-project/python-qemu-qmp:main Just some small fixes that will make easier to copy and paste from

Re: [PATCH v6 1/7] datadir: Simplify firmware directory search

2022-06-15 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 12:56:28AM +0900, Akihiko Odaki wrote: > The old implementation had some code to accept multiple firmware > directories, but it is not used. It is used by distros. In Fedora builds for example:

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

2022-06-15 Thread Akihiko Odaki
On 2022/06/15 21:04, Daniel P. Berrangé wrote: 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 =

Re: New "IndustryStandard" fw_cfg?

2022-06-15 Thread Tom Lendacky
On 6/15/22 10:19, Xiaoyao Li wrote: On 6/15/2022 8:46 AM, Xu, Min M wrote: I would like to add more engineers (Confidential Computing Reviewers in EDK2 community and Intel's QEMU engineers) in this mail thread. -Original Message- From: Dionna Amalie Glaze Sent: Wednesday, June 15,

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-15 Thread Daniel P . Berrangé
On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: > > On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: > > On Thu, Jun 09, 2022 at 07:33:01AM +, Het Gala wrote: > > > As of now, the multi-FD feature supports connection over the default > > > network > > > only. This Patchset

[PATCH V8 04/39] memory: RAM_ANON flag

2022-06-15 Thread Steve Sistare
A memory-backend-ram or a memory-backend-memfd block with the RAM_SHARED flag set is not migrated when migrate_ignore_shared() is true, but this is wrong, because it has no named backing store, and its contents will be lost. Define a new flag RAM_ANON to distinguish this case. Cpr will also test

misaligned-pointer-use libslirp/src/tcp_input.c

2022-06-15 Thread Patrick Venture
Hey - I wanted to ask if someone else has seen this or has suggestions on how to fix it in libslirp / qemu. libslirp version: 3ad1710a96678fe79066b1469cead4058713a1d9 The blow is line: https://gitlab.freedesktop.org/slirp/libslirp/-/blob/master/src/tcp_input.c#L310 I0614 13:44:44.3040872040

[PATCH] softmmu: Always initialize xlat in address_space_translate_for_iotlb

2022-06-15 Thread Richard Henderson
The bug is an uninitialized memory read, along the translate_fail path, which results in garbage being read from iotlb_to_section, which can lead to a crash in io_readx/io_writex. The bug may be fixed by writing any value with zero in ~TARGET_PAGE_MASK, so that the call to iotlb_to_section using

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

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 11:48:02AM -0400, John Snow wrote: > On Wed, Jun 15, 2022 at 11:33 AM Daniel P. Berrangé > wrote: > > > > On Wed, Jun 15, 2022 at 09:41:32AM -0400, John Snow wrote: > > > On Tue, Jun 14, 2022 at 10:30 AM John Snow wrote: > > > > > > > > On Tue, Jun 14, 2022 at 4:59 AM

Re: [PATCH v4 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-06-15 Thread Christian Schoenebeck
On Mittwoch, 15. Juni 2022 17:52:49 CEST Greg Kurz wrote: > On Tue, 15 Mar 2022 11:08:39 +0100 > > Christian Schoenebeck wrote: > > Current implementation of 'Twalk' request handling always sends an > > 'Rerror' > > > > response if any error occured. The 9p2000 protocol spec says though: > >

Re: [PATCH v4 7/7] tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent

2022-06-15 Thread Greg Kurz
On Tue, 15 Mar 2022 11:08:47 +0100 Christian Schoenebeck wrote: > Extend previously added test case by checking that fid was unaffected > by 'Twalk' request (i.e. when 2nd path component of request being > invalid). Do that by subsequently sending a 'Tgetattr' request with > the fid previously

[PATCH v6 6/7] ui/icons: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 2 +- ui/gtk.c | 2 +- ui/icons/meson.build | 32 ui/sdl2.c| 4 ++-- 4 files changed, 28 insertions(+), 12 deletions(-) diff --git a/ui/cocoa.m b/ui/cocoa.m index

Re: [PATCH v7 04/13] migration: Export ram_transferred_ram()

2022-06-15 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert > --- > migration/ram.h | 2 ++ > migration/ram.c | 2 +- > 2 files changed, 3 insertions(+), 1 deletion(-) > > diff --git a/migration/ram.h b/migration/ram.h > index

[PATCH v6 7/7] net: Use bundle mechanism

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- meson.build | 2 ++ net/tap.c | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index ab5ab85bf4e..72e42048cbe 100644 --- a/meson.build +++ b/meson.build @@ -3574,6 +3574,8 @@ if have_tools

[PATCH v6 2/7] qga: Relocate a path emitted in the help text

2022-06-15 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- qga/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/main.c b/qga/main.c index c373fec3ee6..06e507b9979 100644 --- a/qga/main.c +++ b/qga/main.c @@ -270,7 +270,7 @@ QEMU_HELP_BOTTOM "\n" , cmd, QGA_VIRTIO_PATH_DEFAULT,

[PULL 18/18] linux-aio: explain why max batch is checked in laio_io_unplug()

2022-06-15 Thread Stefan Hajnoczi
It may not be obvious why laio_io_unplug() checks max batch. I discussed this with Stefano and have added a comment summarizing the reason. Cc: Stefano Garzarella Cc: Kevin Wolf Signed-off-by: Stefan Hajnoczi Reviewed-by: Stefano Garzarella Message-id:

[PULL 15/18] vfio-user: handle device interrupts

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Forward remote device's interrupts to the guest Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Message-id: 9523479eaafe050677f4de2af5dd0df18c27cfd9.1655151679.git.jag.ra...@oracle.com Signed-off-by: Stefan Hajnoczi ---

[PATCH v6 5/7] 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 +- pc-bios/keymaps/meson.build | 2 ++

[PATCH v6 0/7] 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,

[PATCH v6 3/7] Remove prefixes from path configuration macros

2022-06-15 Thread Akihiko Odaki
The path configuration macros are often supplied to get_relocated_path(), and the function had some logics to remove the prefixes. With this change, the prefixes are removed from those macros and get_relocated_path() is also simplified. Signed-off-by: Akihiko Odaki --- include/qemu/cutils.h |

[PATCH v6 4/7] 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,

[PULL 13/18] vfio-user: handle DMA mappings

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Define and register callbacks to manage the RAM regions used for device DMA Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 16/18] vfio-user: handle reset of remote device

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Adds handler to reset a remote device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id: 112eeadf3bc4c6cdb100bc3f9a6fcfc20b467c1b.1655151679.git.jag.ra...@oracle.com Signed-off-by:

[PATCH v6 1/7] datadir: Simplify firmware directory search

2022-06-15 Thread Akihiko Odaki
The old implementation had some code to accept multiple firmware directories, but it is not used. Signed-off-by: Akihiko Odaki --- softmmu/datadir.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/softmmu/datadir.c b/softmmu/datadir.c index

[PULL 17/18] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-15 Thread Stefan Hajnoczi
Every laio_io_plug() call has a matching laio_io_unplug() call. There is a plugged counter that tracks the number of levels of plugging and allows for nesting. The plugged counter must reflect the balance between laio_io_plug() and laio_io_unplug() calls accurately. Otherwise I/O stalls occur

[PULL 11/18] vfio-user: handle PCI config space accesses

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Define and register handlers for PCI config space accesses Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 14/18] vfio-user: handle PCI BAR accesses

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Determine the BARs used by the PCI device and register handlers to manage the access to the same. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 12/18] vfio-user: IOMMU support for remote device

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Assign separate address space for each device in the remote processes. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 07/18] vfio-user: define vfio-user-server object

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Define vfio-user object which is remote process server for QEMU. Setup object initialization functions and properties necessary to instantiate the object Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan

[PULL 02/18] Use io_uring_register_ring_fd() to skip fd operations

2022-06-15 Thread Stefan Hajnoczi
From: Sam Li Linux recently added a new io_uring(7) optimization API that QEMU doesn't take advantage of yet. The liburing library that QEMU uses has added a corresponding new API calling io_uring_register_ring_fd(). When this API is called after creating the ring, the io_uring_submit() library

[PULL 10/18] vfio-user: run vfio-user context

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Setup a handler to run vfio-user context. The context is driven by messages to the file descriptor associated with it - get the fd for the context and hook up the handler with it Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan

[PULL 05/18] remote/machine: add vfio-user property

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Add vfio-user to x-remote machine. It is a boolean, which indicates if the machine supports vfio-user protocol. The machine configures the bus differently vfio-user and multiprocess protocols, so this property informs it on how to configure the bus. This property should

[PULL 09/18] vfio-user: find and init PCI device

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Find the PCI device with specified id. Initialize the device context with the QEMU PCI device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 04/18] remote/machine: add HotplugHandler for remote machine

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Allow hotplugging of PCI(e) devices to remote machine Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id: d1e6cfa0afb528ad343758f9b1d918be0175c5e5.1655151679.git.jag.ra...@oracle.com

[PULL 08/18] vfio-user: instantiate vfio-user context

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman create a context with the vfio-user library to run a PCI device Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL 03/18] qdev: unplug blocker for devices

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman Add blocker to prevent hot-unplug of devices TYPE_VFIO_USER_SERVER, which is introduced shortly, attaches itself to a PCIDevice on which it depends. If the attached PCIDevice gets removed while the server in use, it could cause it crash. To prevent this,

[PULL 06/18] vfio-user: build library

2022-06-15 Thread Stefan Hajnoczi
From: Jagannathan Raman add the libvfio-user library as a submodule. build it as a meson subproject. libvfio-user is distributed with BSD 3-Clause license and json-c with MIT (Expat) license Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman

[PULL 01/18] MAINTAINERS: update Vladimir's address and repositories

2022-06-15 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20220526115432.138384-1-vsement...@yandex-team.ru Signed-off-by: Stefan Hajnoczi --- MAINTAINERS | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/MAINTAINERS

[PULL 00/18] Block patches

2022-06-15 Thread Stefan Hajnoczi
The following changes since commit 8e6c70b9d4a1b1f3011805947925cfdb31642f7f: Merge tag 'kraxel-20220614-pull-request' of git://git.kraxel.org/qemu into staging (2022-06-14 06:21:46 -0700) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git tags/block-pull-request

Re: [PATCH v4 5/7] 9pfs: fix 'Twalk' to only send error if no component walked

2022-06-15 Thread Greg Kurz
On Tue, 15 Mar 2022 11:08:39 +0100 Christian Schoenebeck wrote: > Current implementation of 'Twalk' request handling always sends an 'Rerror' > response if any error occured. The 9p2000 protocol spec says though: > > " > If the first element cannot be walked for any reason, Rerror is

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

2022-06-15 Thread John Snow
On Wed, Jun 15, 2022 at 11:33 AM Daniel P. Berrangé wrote: > > On Wed, Jun 15, 2022 at 09:41:32AM -0400, John Snow wrote: > > 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

Re: [PATCH] target/riscv: Update tval for hardware watchpoint

2022-06-15 Thread Richard Henderson
On 6/14/22 21:08, Bin Meng wrote: From: Bin Meng When watchpoint is hit, the breakpoint exception should update tval to point to the faulting virtual address. Signed-off-by: Bin Meng --- target/riscv/cpu.h| 1 + target/riscv/cpu_helper.c | 6 ++ target/riscv/debug.c | 2

Re: [PATCH] tests/vm: allow running tests in an unconfigured source tree

2022-06-15 Thread John Snow
On Tue, Jun 14, 2022 at 12:51 PM Paolo Bonzini wrote: > > tests/vm/Makefile.include used to assume that it could run in an unconfigured > source tree, and Cirrus CI relies on that. It was however broken by commit > f4c66f1705 ("tests: use tests/venv to run basevm.py-based scripts", >

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

2022-06-15 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 09:41:32AM -0400, John Snow wrote: > 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

Re: [PATCH v4 3/7] tests/9pfs: compare QIDs in fs_walk_none() test

2022-06-15 Thread Greg Kurz
On Tue, 15 Mar 2022 11:08:35 +0100 Christian Schoenebeck wrote: > Extend previously added fs_walk_none() test by comparing the QID > of the root fid with the QID of the cloned fid. They should be > equal. > > Signed-off-by: Christian Schoenebeck > --- LGTM. Reviewed-by: Greg Kurz >

  1   2   3   >