[RFC PATCH 03/26] machine: Add auxcpus=N suboption to -smp

2021-03-02 Thread Dov Murik
Add a notion of auxiliary vcpus to CpuTopology, which will allow to designate a few vcpus (normally 1) to helper tasks not related to main guest VM execution. Example usage for starting a 4-vcpu guest, of which 1 vcpu is marked as auxiliary: qemu-system-x86_64 -smp 4,auxcpus=1 ... Signed-off

[RFC PATCH 19/26] migration: Don't sync vcpus when migrating confidential guests

2021-03-02 Thread Dov Murik
When loading incoming VM state to the migration target, don't sync the vcpus because it'll prevent the migration handler to keep running. Signed-off-by: Dov Murik --- migration/savevm.c | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/migration/savevm.c b/migration

[RFC PATCH 25/26] target/i386: SEV: Allow migration unless there are no aux vcpus

2021-03-02 Thread Dov Murik
Memory-encrypted guests require a migration helper running on an auxiliary vcpu inside the guest in order to migrate RAM to the target. When there are no auxiliary vcpus, block migration attempts. Signed-off-by: Dov Murik --- target/i386/sev.c | 23 +++ 1 file changed, 15 ins

[RFC PATCH 07/26] cpu: Add boolean aux field to CPUState

2021-03-02 Thread Dov Murik
The aux field indicates auxiliary CPUs. This will allow QEMU to act differently on auxilirary CPUs, for example pausing the VM while keeping the auxiliary CPUs running. Signed-off-by: Dov Murik --- include/hw/core/cpu.h | 2 ++ hw/core/cpu.c | 1 + 2 files changed, 3 insertions(+) diff

[RFC PATCH 12/26] migration: Add helpers to save confidential RAM

2021-03-02 Thread Dov Murik
QEMU cannot read the memory of memory-encrypted guests, which is required for sending RAM to the migration target. Instead, QEMU asks a migration helper running on an auxiliary vcpu in the guest to extract pages from memory; these pages are encrypted with a transfer key that is known to the source

[RFC PATCH 09/26] softmmu: Don't sync aux vcpus in pre_loadvm

2021-03-02 Thread Dov Murik
When preparing to load state into a migration target VM, don't sync the auxiliary vcpus to allow the migration helper to keep running there (it is used during the migration). Signed-off-by: Dov Murik --- softmmu/cpus.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/softmm

[RFC PATCH 16/26] migration: Load confidential guest RAM using migration helper

2021-03-02 Thread Dov Murik
When loading encrypted RAM pages of a confidential guest, ask the in-guest migration helper to decrypt the incoming page and place it correctly in the guest memory at the appropriate address. This way the page's plaintext content remains inaccessible to the host. Signed-off-by: Dov Murik --- mi

[RFC PATCH 02/26] kvm: add support to sync the page encryption state bitmap

2021-03-02 Thread Dov Murik
From: Brijesh Singh The SEV VMs have concept of private and shared memory. The private memory is encrypted with guest-specific key, while shared memory may be encrypted with hyperivosr key. The KVM_GET_PAGE_ENC_BITMAP can be used to get a bitmap indicating whether the guest page is private or sha

[RFC PATCH 06/26] hw/acpi: Don't include auxiliary vcpus in ACPI tables

2021-03-02 Thread Dov Murik
From: Tobin Feldman-Fitzthum By excluding auxiliary vcpus from the ACPI tables, we hide them from the guest OS. This in turn allows OVMF to execute code on the auxiliary vcpus in parallel to the OS. Signed-off-by: Tobin Feldman-Fitzthum Signed-off-by: Dov Murik --- hw/acpi/cpu.c | 10

[RFC PATCH 11/26] softmmu: Add pause_all_vcpus_except_aux

2021-03-02 Thread Dov Murik
From: Tobin Feldman-Fitzthum Introduce a function to pause all CPUs except the auxiliary CPUs. This will be used during migration when a migration handler is running on the auxiliary CPU. Co-Author: Dov Murik Signed-off-by: Dov Murik Signed-off-by: Tobin Feldman-Fitzthum --- include/sysemu/

[RFC PATCH 01/26] linux-headers: Add definitions of KVM page encryption bitmap ioctls

2021-03-02 Thread Dov Murik
Add support for two ioctls KVM_GET_PAGE_ENC_BITMAP and KVM_SET_PAGE_ENC_BITMAP used to record the encryption state of each guest page. This patch will be replaced by a new implementation based on shared regions list, or by user-space handling of the regions list. However, these changes do not aff

[RFC PATCH 04/26] hw/boards: Add aux flag to CPUArchId

2021-03-02 Thread Dov Murik
The aux flag indicates whether a vcpu is auxiliary. Signed-off-by: Dov Murik --- include/hw/boards.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/hw/boards.h b/include/hw/boards.h index 7ee5c73510..4458b359c3 100644 --- a/include/hw/boards.h +++ b/include/hw/boards.h @@ -51,6 +5

Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-03-02 Thread Eric Blake
On 3/2/21 12:32 PM, Kevin Wolf wrote: > Am 26.02.2021 um 20:42 hat Eric Blake geschrieben: >> On 2/24/21 7:52 AM, Kevin Wolf wrote: >>> This adds a QAPI schema for the properties of the can-* objects. >>> >>> can-bus doesn't have any properties, so it only needs to be added to the >>> ObjectType en

Re: [PATCH] qom: Check for wellformed id in user_creatable_add_type()

2021-03-02 Thread Paolo Bonzini
On 02/03/21 18:16, Kevin Wolf wrote: Most code paths for creating a user creatable object go through QemuOpts, which ensures that the provided 'id' option is actually a valid identifier. However, there are some code paths that don't go through QemuOpts: qemu-storage-daemon --object (since commit

Re: Plugin Address Translations Inconsistent/Incorrect?

2021-03-02 Thread Aaron Lindsay via
On Mar 02 16:06, Alex Bennée wrote: > > Aaron Lindsay writes: > > > On Feb 23 15:53, Aaron Lindsay wrote: > >> On Feb 22 15:48, Aaron Lindsay wrote: > >> > On Feb 22 19:30, Alex Bennée wrote: > >> > > Aaron Lindsay writes: > >> > > That said I think we could add an additional helper to translat

Re: [PATCH v2 27/31] qom: Add user_creatable_add_from_str()

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 23:21 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This is a version of user_creatable_process_cmdline() with an Error > > parameter that never calls exit() and is therefore usable in HMP. > > > > Signed-off-by: Kevin Wolf > > --- > > include/qom/objec

Re: [PATCH v2 18/42] esp: accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf

2021-03-02 Thread Mark Cave-Ayland
On 02/03/2021 17:59, Laurent Vivier wrote: Le 02/03/2021 à 18:34, Mark Cave-Ayland a écrit : On 02/03/2021 17:02, Laurent Vivier wrote: Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : ESP SCSI commands are already accumulated in cmdbuf and so there is no need to keep a separate pdma_buf bu

[PATCH] target/s390x: Implement the MVPG condition-code-option bit

2021-03-02 Thread Thomas Huth
If the CCO bit is set, MVPG should not generate an exception but report page translation faults via a CC code, so we have to check the translation in this case before calling the access_prepare() function. Signed-off-by: Thomas Huth --- This patch is required to get Claudio's new kvm-unit-tests

Re: [PATCH v6 1/5] qapi: net: Add query-netdev command

2021-03-02 Thread Eric Blake
On 3/2/21 12:02 PM, Alexey Kirillov wrote: > The query-netdev command is used to get the configuration of the current > network device backends (netdevs). > This is the QMP analog of the HMP command "info network" but only for netdevs > (i.e. excluding NIC and hubports). > > The query-netdev comma

Re: [PATCH v1 8/9] util/mmap-alloc: support RAM_NORESERVE via MAP_NORESERVE

2021-03-02 Thread David Hildenbrand
On 02.03.21 18:51, Peter Xu wrote: On Tue, Feb 09, 2021 at 02:49:38PM +0100, David Hildenbrand wrote: +#define OVERCOMMIT_MEMORY_PATH "/proc/sys/vm/overcommit_memory" +static bool map_noreserve_effective(int fd, bool shared) +{ +#if defined(__linux__) +gchar *content = NULL; +const char

Re: [PATCH 2/3] qapi, audio: respect build time conditions in audio schema

2021-03-02 Thread Eric Blake
On 3/2/21 11:55 AM, Daniel P. Berrangé wrote: > Currently the -audiodev accepts any audiodev type regardless of what is > built in to QEMU. An error only occurs later at runtime when a sound > device tries to use the audio backend. > > With this change QEMU will immediately reject -audiodev args t

Re: [PATCH v2 19/31] qapi/qom: QAPIfy object-add

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 22:18 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This converts object-add from 'gen': false to the ObjectOptions QAPI > > type. As an immediate benefit, clients can now use QAPI schema > > introspection for user creatable QOM objects. > > > > It is als

Re: [PATCH 1/3] qapi, audio: add query-audiodev command

2021-03-02 Thread Eric Blake
On 3/2/21 11:55 AM, Daniel P. Berrangé wrote: > Way back in QEMU 4.0, the -audiodev command line option was introduced > for configuring audio backends. This CLI option does not use QemuOpts > so it is not visible for introspection in 'query-command-line-options', > instead using the QAPI Audiodev

Re: [PATCH v2 17/31] qapi/qom: Add ObjectOptions for input-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 21:55 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the input-* objects. > > > > ui.json cannot be included in qom.json because the storage daemon can't > > use it, so move GrabToggleKeys to common.json. > >

Re: [PATCH] target/s390x: Implement the MVPG condition-code-option bit

2021-03-02 Thread David Hildenbrand
On 02.03.21 20:12, Thomas Huth wrote: If the CCO bit is set, MVPG should not generate an exception but report page translation faults via a CC code, so we have to check the translation in this case before calling the access_prepare() function. Signed-off-by: Thomas Huth --- This patch is requ

Re: [PATCH v1 7/9] memory: introduce RAM_NORESERVE and wire it up in qemu_ram_mmap()

2021-03-02 Thread David Hildenbrand
On 02.03.21 18:32, Peter Xu wrote: On Tue, Feb 09, 2021 at 02:49:37PM +0100, David Hildenbrand wrote: @@ -899,13 +899,17 @@ int kvm_s390_mem_op_pv(S390CPU *cpu, uint64_t offset, void *hostbuf, * to grow. We also have to use MAP parameters that avoid * read-only mapping of guest pages.

Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-03-02 Thread Pankaj Gupta
Hi Babu, I confirm I can see both the ssbd & irbs features in guest with the below patch. There was some issue at my end, Sorry! for the confusion. Can you please post the official patch for inclusion. Best regards, Pankaj On Mon, Mar 1, 2021 at 9:38 PM Babu Moger wrote: > > > > > -Original

Re: [RFC v2 04/24] target/arm: move psci.c into tcg/sysemu/

2021-03-02 Thread Claudio Fontana
On 3/2/21 12:54 PM, Peter Maydell wrote: > On Mon, 1 Mar 2021 at 16:49, Claudio Fontana wrote: >> >> Signed-off-by: Claudio Fontana >> --- > > I note that the not-yet-landed aarch64 support for the hvf accelerator > is hoping to share the tcg psci implementation... > > -- PMM > Hi Peter, int

Re: [PATCH v3] vl: deprecate -writeconfig

2021-03-02 Thread Thomas Huth
On 02/03/2021 19.00, Paolo Bonzini wrote: The functionality of -writeconfig is limited and the code does not even try to detect cases where it prints incorrect syntax (for example if values have a quote in them, since qemu_config_parse does not support any kind of escaping) so remove it. Signed-

Re: [PATCH v1] acpi: increase maximum size for "etc/table-loader" blob

2021-03-02 Thread David Hildenbrand
The resizeable memory region that is created for the cmd blob has a maximum size of ACPI_BUILD_ALIGN_SIZE - 4k. This used to be sufficient, however, The expression "ACPI_BUILD_ALIGN_SIZE - 4k" makes no sense to me. ACPI_BUILD_ALIGN_SIZE is #defined in "hw/i386/acpi-build.c" as 0x1000, so the dif

Re: [PATCH] vfio-ccw: Do not read region ret_code after write

2021-03-02 Thread Cornelia Huck
On Mon, 1 Mar 2021 20:51:43 +0100 Eric Farman wrote: > A pwrite() call returns the number of bytes written (or -1 on error), > and vfio-ccw compares this number with the size of the region to > determine if an error had occurred or not. If they are equal, the > code reads the ret_code field from

Re: [RFC PATCH 06/27] virtio: Add virtio_queue_get_used_notify_split

2021-03-02 Thread Eugenio Perez Martin
On Tue, Mar 2, 2021 at 12:22 PM Stefan Hajnoczi wrote: > > On Tue, Jan 12, 2021 at 07:21:27PM +0100, Eugenio Perez Martin wrote: > > On Mon, Dec 7, 2020 at 5:58 PM Stefan Hajnoczi wrote: > > > > > > On Fri, Nov 20, 2020 at 07:50:44PM +0100, Eugenio Pérez wrote: > > > > This function is just used

Re: [RFC v2 22/24] target/arm: cpu64: wrap arm cpregs with CONFIG_TCG

2021-03-02 Thread Claudio Fontana
On 3/2/21 5:58 PM, Richard Henderson wrote: > On 3/1/21 8:49 AM, Claudio Fontana wrote: >> these cpregs should be moved to tcg/ later on. >> >> Signed-off-by: Claudio Fontana >> --- >> target/arm/cpu64.c | 8 >> 1 file changed, 8 insertions(+) > > What is this in aid of? It's certainl

Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-03-02 Thread Pankaj Gupta
> Pankaj, Sure. > > I will add signoff from you if it is fine with you. Sure. Thank you! > > Signed-off-by: Pankaj Gupta Please use: Pankaj Gupta Thanks, Pankaj

Re: [PATCH v2 12/31] qapi/qom: Add ObjectOptions for can-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:42 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the can-* objects. > > > > can-bus doesn't have any properties, so it only needs to be added to the > > ObjectType enum without adding a new branch to Object

Re: [PATCH v2 11/31] qapi/qom: Add ObjectOptions for tls-*, deprecate 'loaded'

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:33 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the tls-* objects. > > > > The 'loaded' property doesn't seem to make sense as an external > > interface: It is automatically set to true in ucc->complete, a

Re: [PATCH 3/3] qapi: provide a friendly string representation of QAPI classes

2021-03-02 Thread Eric Blake
On 3/2/21 11:55 AM, Daniel P. Berrangé wrote: > If printing a QAPI schema object for debugging we get the classname and > a hex value for the instance. With this change we instead get the > classname and the human friendly name of the QAPI type instance. > > Signed-off-by: Daniel P. Berrangé > --

Re: [PATCH v2 10/31] qapi/qom: Add ObjectOptions for secret*, deprecate 'loaded'

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 20:17 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > diff --git a/qapi/qom.json b/qapi/qom.json > > index 449dca8ec5..2668ad8369 100644 > > --- a/qapi/qom.json > > +++ b/qapi/qom.json > > @@ -7,6 +7,7 @@ > > { 'include': 'authz.json' } > > { 'include': 'b

Re: [PATCH v2] i386: Add the support for AMD EPYC 3rd generation processors

2021-03-02 Thread Babu Moger
Pankaj, Sure. I will add signoff from you if it is fine with you. Signed-off-by: Pankaj Gupta Let me know. Thanks Babu On 3/2/21 12:38 PM, Pankaj Gupta wrote: > Hi Babu, > > I confirm I can see both the ssbd & irbs features in guest with the > below patch. There was some issue at my end, Sorr

Re: [PATCH v2 09/31] qapi/qom: Add ObjectOptions for throttle-group

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 18:26 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the throttle-group object. > > > > The only purpose of the x-* properties is to make the nested options in > > 'limits' available for a command line parser t

Re: [PATCH] qom: Check for wellformed id in user_creatable_add_type()

2021-03-02 Thread Eric Blake
On 3/2/21 11:16 AM, Kevin Wolf wrote: > Most code paths for creating a user creatable object go through > QemuOpts, which ensures that the provided 'id' option is actually a > valid identifier. > > However, there are some code paths that don't go through QemuOpts: > qemu-storage-daemon --object (s

Re: [PATCH v2 07/31] qapi/qom: Add ObjectOptions for memory-backend-*

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 17:23 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the memory-backend-* > > objects. > > > > HostMemPolicy has to be moved to an include file that can be used by the > > storage daemon, too, because ObjectOpt

Re: [PATCH v3] vl: deprecate -writeconfig

2021-03-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210302180023.54555-1-pbonz...@redhat.com/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210302180023.54555-1-pbonz...@redhat.com Subject: [PATCH v3] vl: deprecate -writeconfig

Re: [PATCH 00/27] tcg patch queue

2021-03-02 Thread no-reply
Patchew URL: https://patchew.org/QEMU/20210302175741.1079851-1-richard.hender...@linaro.org/ Hi, This series seems to have some coding style problems. See output below for more information: Type: series Message-id: 20210302175741.1079851-1-richard.hender...@linaro.org Subject: [PATCH 00/27] t

Re: [RFC v2 21/24] target/arm: cpu64: wrap TCG-only parts of aarch64_cpu_dump_state

2021-03-02 Thread Richard Henderson
On 3/2/21 10:01 AM, Claudio Fontana wrote: On 3/2/21 5:56 PM, Richard Henderson wrote: On 3/1/21 8:49 AM, Claudio Fontana wrote: -if (cpu_isar_feature(aa64_sve, cpu) && sve_exception_el(env, el) == 0) { +if (tcg_enabled() && +cpu_isar_feature(aa64_sve, cpu) && sve_exception_el(e

Re: [RFC v2 21/24] target/arm: cpu64: wrap TCG-only parts of aarch64_cpu_dump_state

2021-03-02 Thread Claudio Fontana
On 3/2/21 5:56 PM, Richard Henderson wrote: > On 3/1/21 8:49 AM, Claudio Fontana wrote: >> -if (cpu_isar_feature(aa64_sve, cpu) && sve_exception_el(env, el) == 0) { >> +if (tcg_enabled() && >> +cpu_isar_feature(aa64_sve, cpu) && sve_exception_el(env, el) == 0) { > > There's nothing

[PATCH v3] vl: deprecate -writeconfig

2021-03-02 Thread Paolo Bonzini
The functionality of -writeconfig is limited and the code does not even try to detect cases where it prints incorrect syntax (for example if values have a quote in them, since qemu_config_parse does not support any kind of escaping) so remove it. Signed-off-by: Paolo Bonzini --- docs/system/depr

Re: [PATCH v2 18/42] esp: accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf

2021-03-02 Thread Laurent Vivier
Le 02/03/2021 à 18:34, Mark Cave-Ayland a écrit : > On 02/03/2021 17:02, Laurent Vivier wrote: > >> Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : >>> ESP SCSI commands are already accumulated in cmdbuf and so there is no need >>> to >>> keep a separate pdma_buf buffer. Accumulate SCSI command

[PATCH v6 5/5] net: Do not fill legacy info_str for backends

2021-03-02 Thread Alexey Kirillov
As we use QAPI NetClientState->stored_config to store and get information about backend network devices, we can drop fill of legacy field info_str for them. We still use info_str field for NIC and hubports, so we can not completely remove it. Signed-off-by: Alexey Kirillov --- net/l2tpv3.c

[PATCH 23/27] accel/tcg: rename tb_lookup__cpu_state and hoist state extraction

2021-03-02 Thread Richard Henderson
From: Alex Bennée Having a function return either and valid TB and some system state seems excessive. It will make the subsequent re-factoring easier if we lookup the current state where we are. Signed-off-by: Alex Bennée Message-Id: <20210224165811.11567-2-alex.ben...@linaro.org> Signed-off-by

[PATCH 19/27] tcg/tci: Merge basic arithmetic operations

2021-03-02 Thread Richard Henderson
This includes add, sub, mul, and, or, xor. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 83 +-- 1 file changed, 25 insertions(+), 58 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 9efe69d05f..d0b

[PATCH v6 2/5] tests: Add tests for query-netdev command

2021-03-02 Thread Alexey Kirillov
A simply qtest that checks for correct number of netdevs in the response of the query-netdev. Signed-off-by: Alexey Kirillov Acked-by: Thomas Huth --- tests/qtest/meson.build | 3 + tests/qtest/test-query-netdev.c | 120 2 files changed, 123 insertions

[PATCH 18/27] tcg/tci: Reduce use of tci_read_r64

2021-03-02 Thread Richard Henderson
In all cases restricted to 64-bit hosts, tcg_read_r is identical. We retain the 64-bit symbol for the single case of INDEX_op_qemu_st_i64. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 93 +-- 1 file cha

[PATCH 17/27] tcg/tci: Remove tci_read_r32s

2021-03-02 Thread Richard Henderson
Use explicit casts for ext32s opcodes. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index a5aaa763f8..cef12f263d 100644 --- a/tcg/tci.c +++ b/tcg

[PATCH 15/27] tcg/tci: Remove tci_read_r16s

2021-03-02 Thread Richard Henderson
Use explicit casts for ext16s opcodes. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 26 -- 1 file changed, 4 insertions(+), 22 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 2440da1746..8b91e6efc3 100644 --- a/tcg/tci.c +++

[PATCH v6 0/5] Introducing QMP query-netdev command

2021-03-02 Thread Alexey Kirillov
This patch series introduces a new QMP command "query-netdev" to get information about currently attached backend network devices (netdevs). Also, since the "info_str" field of "NetClientState" is now deprecated, we no longer use it for netdevs, only for NIC/hubports. The HMP command "info networ

[PATCH 13/27] tcg/tci: Remove tci_read_r8s

2021-03-02 Thread Richard Henderson
Use explicit casts for ext8s opcodes. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 25 - 1 file changed, 4 insertions(+), 21 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 4ade0ccaf9..7325c8bfd0 100644 --- a/tcg/tci.c +++ b

[PATCH v6 1/5] qapi: net: Add query-netdev command

2021-03-02 Thread Alexey Kirillov
The query-netdev command is used to get the configuration of the current network device backends (netdevs). This is the QMP analog of the HMP command "info network" but only for netdevs (i.e. excluding NIC and hubports). The query-netdev command returns an array of objects of the NetdevInfo type,

[PATCH 27/27] accel/tcg: Precompute curr_cflags into cpu->tcg_cflags

2021-03-02 Thread Richard Henderson
The primary motivation is to remove a dozen insns along the fast-path in tb_lookup. As a byproduct, this allows us to completely remove parallel_cpus. Signed-off-by: Richard Henderson --- accel/tcg/tcg-accel-ops.h | 1 + include/exec/exec-all.h | 7 +-- include/hw/core/cpu.h

[PATCH 11/27] tcg/tci: Merge identical cases in generation (load/store opcodes)

2021-03-02 Thread Richard Henderson
Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210217202036.1724901-5-richard.hender...@linaro.org> [PMD: Split patch as 5/5] Signed-off-by: Philip

[PATCH v6 4/5] hmp: Use QAPI NetdevInfo in hmp_info_network

2021-03-02 Thread Alexey Kirillov
Replace usage of legacy field info_str of NetClientState for backend network devices with QAPI NetdevInfo stored_config that already used in QMP query-netdev. This change increases the detail of the "info network" output and takes a more general approach to composing the output. NIC and hubports

[PATCH 26/27] include/exec: lightly re-arrange TranslationBlock

2021-03-02 Thread Richard Henderson
From: Alex Bennée Lets make sure all the flags we compare when looking up blocks are together in the same place. Signed-off-by: Alex Bennée Message-Id: <20210224165811.11567-5-alex.ben...@linaro.org> Signed-off-by: Richard Henderson --- include/exec/exec-all.h | 8 +--- 1 file changed, 5

[PATCH 10/27] tcg/tci: Merge identical cases in generation (conditional opcodes)

2021-03-02 Thread Richard Henderson
Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210217202036.1724901-5-richard.hender...@linaro.org> [PMD: Split patch as 4/5] Signed-off-by: Philip

[PATCH 25/27] accel/tcg: drop the use of CF_HASH_MASK and rename params

2021-03-02 Thread Richard Henderson
From: Alex Bennée We don't really deal in cf_mask most of the time. The one time it's relevant is when we want to remove an invalidated TB from the QHT lookup. Everywhere else we should be looking up things without CF_INVALID set. Signed-off-by: Alex Bennée Message-Id: <20210224165811.11567-4-a

[PATCH v6 3/5] net: Move NetClientState.info_str to dynamic allocations

2021-03-02 Thread Alexey Kirillov
The info_str field of the NetClientState structure is static and has a size of 256 bytes. This amount is often unclaimed, and the field itself is used exclusively for HMP "info network". The patch translates info_str to dynamic memory allocation. This action is also allows us to painlessly discar

[PATCH 24/27] accel/tcg: move CF_CLUSTER calculation to curr_cflags

2021-03-02 Thread Richard Henderson
From: Alex Bennée There is nothing special about this compile flag that doesn't mean we can't just compute it with curr_cflags() which we should be using when building a new set. Signed-off-by: Alex Bennée Message-Id: <20210224165811.11567-3-alex.ben...@linaro.org> Signed-off-by: Richard Hender

[PATCH 08/27] tcg/tci: Merge identical cases in generation (exchange opcodes)

2021-03-02 Thread Richard Henderson
Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210217202036.1724901-5-richard.hender...@linaro.org> [PMD: Split patch as 2/5] Signed-off-by: Philip

[PATCH 21/27] tcg/tci: Merge bswap operations

2021-03-02 Thread Richard Henderson
This includes bswap16 and bswap32. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 22 -- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 73f639d23a..66f2962d6e 100644 --- a/tcg/tci.c +++ b/tcg/t

[PATCH 12/27] tcg/tci: Remove tci_read_r8

2021-03-02 Thread Richard Henderson
Use explicit casts for ext8u opcodes, and allow truncation to happen with the store for st8 opcodes. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 23 +-- 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/tcg/tci.c b/tcg/tc

[PATCH 22/27] tcg/tci: Merge mov, not and neg operations

2021-03-02 Thread Richard Henderson
Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 29 + 1 file changed, 5 insertions(+), 24 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index 66f2962d6e..3ccd30c39c 100644 --- a/tcg/tci.c +++ b/tcg/tci.c @@ -387,7 +387,7 @@ uint

[PATCH 07/27] tcg/tci: Merge identical cases in generation (arithmetic opcodes)

2021-03-02 Thread Richard Henderson
Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210217202036.1724901-5-richard.hender...@linaro.org> [PMD: Split patch as 1/5] Signed-off-by: Philip

[PATCH 06/27] tcg: Manage splitwx in tc_ptr_to_region_tree by hand

2021-03-02 Thread Richard Henderson
The use in tcg_tb_lookup is given a random pc that comes from the pc of a signal handler. Do not assert that the pointer is already within the code gen buffer at all, much less the writable mirror of it. Fixes: db0c51a3803 Signed-off-by: Richard Henderson --- tcg/tcg.c | 20 ++--

[PATCH 14/27] tcg/tci: Remove tci_read_r16

2021-03-02 Thread Richard Henderson
Use explicit casts for ext16u opcodes, and allow truncation to happen with the store for st16 opcodes, and with the call for bswap16 opcodes. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 28 +++- 1 file changed, 7 insertions(+), 21

[PATCH 02/27] tcg/aarch64: Fix I3617_CMLE0

2021-03-02 Thread Richard Henderson
Fix a typo in the encodeing of the cmle (zero) instruction. Fixes: 14e4c1e2355 ("tcg/aarch64: Add vector operations") Signed-off-by: Richard Henderson --- tcg/aarch64/tcg-target.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/aarch64/tcg-target.c.inc b/tcg/aarch64/t

[PATCH 20/27] tcg/tci: Merge extension operations

2021-03-02 Thread Richard Henderson
This includes ext8s, ext8u, ext16s, ext16u. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 44 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/tcg/tci.c b/tcg/tci.c index d0bf810781..73f639d23a 100

[PATCH 04/27] tcg/tci: Use exec/cpu_ldst.h interfaces

2021-03-02 Thread Richard Henderson
Use the provided cpu_ldst.h interfaces. This fixes the build vs the unconverted uses of g2h(), adds missed memory trace events, and correctly recognizes when a SIGSEGV belongs to the guest via set_helper_retaddr(). Fixes: 3e8f1628e864 Tested-by: Philippe Mathieu-Daudé Signed-off-by: Richard Hend

[PATCH 05/27] tcg: Split out tcg_raise_tb_overflow

2021-03-02 Thread Richard Henderson
Allow other places in tcg to restart with a smaller tb. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tcg.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 63a12b197b..bbe3dcee03 100644 --- a/tcg/tcg.c +++ b

[PATCH 16/27] tcg/tci: Remove tci_read_r32

2021-03-02 Thread Richard Henderson
Use explicit casts for ext32u opcodes, and allow truncation to happen for other users. Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Richard Henderson --- tcg/tci.c | 122 -- 1 file changed, 54 insertions(+), 68 deletions(-) diff --git a

[PATCH 01/27] tcg/aarch64: Fix constant subtraction in tcg_out_addsub2

2021-03-02 Thread Richard Henderson
An hppa guest executing 0xe05c: ldil L%1,r4 0xe060: ldo 0(r4),r4 0xe064: sub r3,r4,sp produces e064 e068 sub2_i32 tmp0,tmp4,r3,$0x1,$0x1,$0x0 after folding and constant propagation. Then we hit tcg-target.c.inc:640:

[PATCH 00/27] tcg patch queue

2021-03-02 Thread Richard Henderson
Pulling together some cleanups, fixes, and prepatory tci stuff. Most of this has been reviewed, but not all. Those lacking review: 01-tcg-aarch64-Fix-constant-subtraction-in-tcg_out_adds.patch 02-tcg-aarch64-Fix-I3617_CMLE0.patch 03-tcg-aarch64-Fix-generation-of-scalar-vector-operatio.patch 04-tc

[PATCH 09/27] tcg/tci: Merge identical cases in generation (deposit opcode)

2021-03-02 Thread Richard Henderson
Use CASE_32_64 and CASE_64 to reduce ifdefs and merge cases that are identical between 32-bit and 64-bit hosts. Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20210217202036.1724901-5-richard.hender...@linaro.org> [PMD: Split patch as 3/5] Signed-off-by: Philip

Re: [PATCH v1 9/9] hostmem: wire up RAM_NORESERVE via "reserve" property

2021-03-02 Thread Peter Xu
On Tue, Feb 09, 2021 at 02:49:39PM +0100, David Hildenbrand wrote: > Let's provide a way to control the use of RAM_NORESERVE via memory > backends using the "reserve" property which defaults to true (old > behavior). > > Only POSIX supports setting the flag (and Linux support is checked at > runti

[PATCH 03/27] tcg/aarch64: Fix generation of "scalar" vector operations

2021-03-02 Thread Richard Henderson
For some vector operations, "1D" is not a valid type, and there are separate instructions for the 64-bit scalar operation. Tested-by: Stefan Weil Buglink: https://bugs.launchpad.net/qemu/+bug/1916112 Fixes: 14e4c1e2355 ("tcg/aarch64: Add vector operations") Signed-off-by: Richard Henderson ---

[PATCH 0/3] audio: make audiodev introspectable by mgmt apps

2021-03-02 Thread Daniel P . Berrangé
The Audiodev QAPI type is not introspectable via query-qmp-schema as nothing in QEMU uses it. -audiodev is not introspectable via query-command-line-options because it avoided legacy QemuOpts Even once that is fixed, the introspection lies about what is actually possible because nearly all the aud

[PATCH 1/3] qapi, audio: add query-audiodev command

2021-03-02 Thread Daniel P . Berrangé
Way back in QEMU 4.0, the -audiodev command line option was introduced for configuring audio backends. This CLI option does not use QemuOpts so it is not visible for introspection in 'query-command-line-options', instead using the QAPI Audiodev type. Unfortunately there is also no QMP command that

[PATCH 3/3] qapi: provide a friendly string representation of QAPI classes

2021-03-02 Thread Daniel P . Berrangé
If printing a QAPI schema object for debugging we get the classname and a hex value for the instance. With this change we instead get the classname and the human friendly name of the QAPI type instance. Signed-off-by: Daniel P. Berrangé --- scripts/qapi/schema.py | 3 +++ 1 file changed, 3 inser

[PATCH 2/3] qapi, audio: respect build time conditions in audio schema

2021-03-02 Thread Daniel P . Berrangé
Currently the -audiodev accepts any audiodev type regardless of what is built in to QEMU. An error only occurs later at runtime when a sound device tries to use the audio backend. With this change QEMU will immediately reject -audiodev args that are not compiled into the binary. The QMP schema wil

Re: [PATCH v1] acpi: increase maximum size for "etc/table-loader" blob

2021-03-02 Thread Laszlo Ersek
On 03/02/21 17:23, Igor Mammedov wrote: > On Mon, 1 Mar 2021 11:48:33 +0100 > David Hildenbrand wrote: > > CCing Laszlo, > > to make sure there is no complications from firmware side (especially > when migration is progress, we've ironed it out for main tables blob > but my memory is a bit fussy

Re: [PATCH v1 8/9] util/mmap-alloc: support RAM_NORESERVE via MAP_NORESERVE

2021-03-02 Thread Peter Xu
On Tue, Feb 09, 2021 at 02:49:38PM +0100, David Hildenbrand wrote: > +#define OVERCOMMIT_MEMORY_PATH "/proc/sys/vm/overcommit_memory" > +static bool map_noreserve_effective(int fd, bool shared) > +{ > +#if defined(__linux__) > +gchar *content = NULL; > +const char *endptr; > +unsigned i

[PATCH v3 1/1] hw/s390x: modularize virtio-gpu-ccw

2021-03-02 Thread Halil Pasic
Since the virtio-gpu-ccw device depends on the hw-display-virtio-gpu module, which provides the type virtio-gpu-device, packaging the hw-display-virtio-gpu module as a separate package that may or may not be installed along with the qemu package leads to problems. Namely if the hw-display-virtio-gp

Re: [PATCH v2 06/31] qapi/qom: Add ObjectOptions for dbus-vmstate

2021-03-02 Thread Kevin Wolf
Am 26.02.2021 um 16:58 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > This adds a QAPI schema for the properties of the dbus-vmstate object. > > > > A list represented as a comma separated string is clearly not very > > QAPI-like, but for now just describe the existing int

Re: [PATCH v2 18/42] esp: accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf

2021-03-02 Thread Mark Cave-Ayland
On 02/03/2021 17:02, Laurent Vivier wrote: Le 09/02/2021 à 20:29, Mark Cave-Ayland a écrit : ESP SCSI commands are already accumulated in cmdbuf and so there is no need to keep a separate pdma_buf buffer. Accumulate SCSI commands for PDMA transfers in cmdbuf instead of pdma_buf so update cmdlen

Re: [PATCH v1 7/9] memory: introduce RAM_NORESERVE and wire it up in qemu_ram_mmap()

2021-03-02 Thread Peter Xu
On Tue, Feb 09, 2021 at 02:49:37PM +0100, David Hildenbrand wrote: > @@ -899,13 +899,17 @@ int kvm_s390_mem_op_pv(S390CPU *cpu, uint64_t offset, > void *hostbuf, > * to grow. We also have to use MAP parameters that avoid > * read-only mapping of guest pages. > */ > -static void *legacy_s390_

[PATCH 3/3] hw/gpio/avr_gpio.c: add tracing for read and writes

2021-03-02 Thread G S Niteesh Babu
Added tracing for gpio read, write, and update output irq. 1) trace_avr_gpio_update_ouput_irq 2) trace_avr_gpio_read 3) trace_avr_gpio_write Signed-off-by: G S Niteesh Babu --- hw/gpio/avr_gpio.c | 16 hw/gpio/trace-events | 6 ++ 2 files changed, 18 insertions(+), 4 del

[PATCH 2/3] avr/arduino: Add D13 LED

2021-03-02 Thread G S Niteesh Babu
Signed-off-by: G S Niteesh Babu --- hw/avr/Kconfig | 1 + hw/avr/arduino.c | 15 +++ 2 files changed, 16 insertions(+) diff --git a/hw/avr/Kconfig b/hw/avr/Kconfig index 16a57ced11..e0d4fc5537 100644 --- a/hw/avr/Kconfig +++ b/hw/avr/Kconfig @@ -8,3 +8,4 @@ config AVR_ATMEGA_MCU

[PATCH 1/3] hw/avr: Add limited support for avr gpio registers

2021-03-02 Thread G S Niteesh Babu
From: Heecheol Yang Add some of these features for AVR GPIO: - GPIO I/O : PORTx registers - Data Direction : DDRx registers - DDRx toggling : PINx registers Following things are not supported yet: - MCUR registers Signed-off-by: Heecheol Yang --- hw/avr/Kconfig | 1 + h

Re: [PATCH v2 03/31] qapi/qom: Add ObjectOptions for iothread

2021-03-02 Thread Kevin Wolf
Am 25.02.2021 um 23:55 hat Eric Blake geschrieben: > On 2/24/21 7:52 AM, Kevin Wolf wrote: > > Add an ObjectOptions union that will eventually describe the options of > > all user creatable object types. As unions can't exist without any > > branches, also add the first object type. > > > > This a

Re: [PATCH v1 5/9] softmmu/memory: pass ram_flags into qemu_ram_alloc_from_fd()

2021-03-02 Thread Peter Xu
On Tue, Feb 09, 2021 at 02:49:35PM +0100, David Hildenbrand wrote: > Let's pass in ram flags just like we do with qemu_ram_alloc_from_file(), > to clean up and prepare for more flags. > > Simplify the documentation of passed ram flags: Looking at our > documentation of RAM_SHARED and RAM_PMEM is s

[PATCH] qom: Check for wellformed id in user_creatable_add_type()

2021-03-02 Thread Kevin Wolf
Most code paths for creating a user creatable object go through QemuOpts, which ensures that the provided 'id' option is actually a valid identifier. However, there are some code paths that don't go through QemuOpts: qemu-storage-daemon --object (since commit 8db1efd3) and QMP object-add (since it

Re: [PATCH v1 6/9] softmmu/memory: pass ram_flags into memory_region_init_ram_shared_nomigrate()

2021-03-02 Thread Peter Xu
On Tue, Feb 09, 2021 at 02:49:36PM +0100, David Hildenbrand wrote: > Let's forward ram_flags instead, renaming > memory_region_init_ram_shared_nomigrate() into > memory_region_init_ram_flags_nomigrate(). Forward flags to > qemu_ram_alloc() and qemu_ram_alloc_internal(). > > Signed-off-by: David Hi

<    1   2   3   4   5   >