Re: [PATCH v17 11/13] target/loongarch: Adjust functions and structure to support user-mode

2022-06-17 Thread Richard Henderson
On 6/16/22 05:16, Song Gao wrote: Some functions and member of the structure are different with softmmu-mode So we need adjust them to support user-mode. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c| 21 ++- target/loongarch/c

Re: [PATCH v17 10/13] target/loongarch: remove unused include hw/loader.h

2022-06-17 Thread Richard Henderson
On 6/16/22 05:16, Song Gao wrote: Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c | 1 - 1 file changed, 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v17 09/13] target/loongarch: Fix helper_asrtle_d/asrtgt_d raise wrong exception

2022-06-17 Thread Richard Henderson
On 6/16/22 05:16, Song Gao wrote: Raising EXCCODE_BCE instead of EXCCODE_ADEM for helper_asrtle_d/asrtgt_d. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c | 2 ++ target/loongarch/op_helper.c | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-)

Re: [PATCH v17 08/13] target/loongarch: Fix missing update CSR_BADV

2022-06-17 Thread Richard Henderson
On 6/16/22 05:16, Song Gao wrote: loongarch_cpu_do_interrupt() should update CSR_BADV for some EXCCODE. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/cpu.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v17 07/13] target/loongarch: remove badaddr from CPULoongArch

2022-06-17 Thread Richard Henderson
On 6/16/22 05:16, Song Gao wrote: We can use CSR_BADV to replace badaddr. Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- Reviewed-by: Richard Henderson r~ target/loongarch/cpu.h | 2 -- target/loongarch/gdbstub.c | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-)

Re: [PATCH v17 02/13] linux-user: Add LoongArch signal support

2022-06-17 Thread Richard Henderson
On 6/16/22 05:16, Song Gao wrote: +static void copy_fpu_to_sigcontext(CPULoongArchState *env, + struct extctx_layout *extctx) +{ +int i; +struct target_sctx_info *info = (struct target_sctx_info *)extctx->fpu.addr; +struct target_fpu_context *fpu_ctx

[PATCH 1/1] hw: m25p80: fixing individual test failure when tests are running in isolation

2022-06-17 Thread Iris Chen
Signed-off-by: Iris Chen --- tests/qtest/aspeed_smc-test.c | 74 +-- 1 file changed, 63 insertions(+), 11 deletions(-) diff --git a/tests/qtest/aspeed_smc-test.c b/tests/qtest/aspeed_smc-test.c index ec233315e6..b1e682db65 100644 --- a/tests/qtest/aspeed_smc-test.

[PATCH 0/1] hw: m25p80: fix aspeed_smc tests failure when run in isolation

2022-06-17 Thread Iris Chen
Hey everyone, I discovered that some of the tests in tests/qtest/aspeed_smc-test.c were failing when run in isolation due to dependencies between the tests. For example, one test would test the reading of a block of memory written in the test before it. I think it would make sense to add flash_re

Re: [PATCH v3 1/2] hw: m25p80: add WP# pin and SRWD bit for write protection

2022-06-17 Thread Dan Zhang
On Fri, Jun 17, 2022 at 03:02:45PM -0700, Iris Chen wrote: > Signed-off-by: Iris Chen > --- > Thanks everyone for your comments. This is a v3 patch that addresses all > suggestions (moving write_enable to decode_new_cmd). > I am waiting on some feedback from Dan's (dz4l...@gmail.com) patch > reg

[PATCH v3 2/2] hw: m25p80: add tests for write protect (WP# and SRWD bit)

2022-06-17 Thread Iris Chen
--- Fixing suggestions to move testing related code to a different commit. tests/qtest/aspeed_smc-test.c | 62 +++ 1 file changed, 62 insertions(+) diff --git a/tests/qtest/aspeed_smc-test.c b/tests/qtest/aspeed_smc-test.c index ec233315e6..7786addfb8 100644 --- a

[PATCH v3 1/2] hw: m25p80: add WP# pin and SRWD bit for write protection

2022-06-17 Thread Iris Chen
Signed-off-by: Iris Chen --- Thanks everyone for your comments. This is a v3 patch that addresses all suggestions (moving write_enable to decode_new_cmd). I am waiting on some feedback from Dan's (dz4l...@gmail.com) patch regarding adding a STATE_STANDBY state. Currently, all tests are passing

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

2022-06-17 Thread Alex Williamson
On Mon, 13 Jun 2022 14:21:26 +0300 Avihai Horon wrote: > On 6/8/2022 12:32 AM, Alex Williamson wrote: > > External email: Use caution opening links or attachments > > > > > > On Tue, 7 Jun 2022 20:44:23 +0300 > > Avihai Horon wrote: > > > >> On 5/30/2022 8:07 PM, Avihai Horon wrote: > >>> He

Re: [PATCH v6 6/8] KVM: Handle page fault for private memory

2022-06-17 Thread Sean Christopherson
On Thu, May 19, 2022, Chao Peng wrote: > @@ -4028,8 +4081,11 @@ static bool is_page_fault_stale(struct kvm_vcpu *vcpu, > if (!sp && kvm_test_request(KVM_REQ_MMU_FREE_OBSOLETE_ROOTS, vcpu)) > return true; > > - return fault->slot && > -mmu_notifier_retry_hva(vcp

Re: [PATCH] xen/pass-through: don't create needless register group

2022-06-17 Thread Chuck Zmudzinski
On 6/17/22 9:07 AM, Anthony PERARD wrote: On Fri, Jun 10, 2022 at 12:23:35PM -0400, Chuck Zmudzinski wrote: Currently we are creating a register group for the Intel IGD OpRegion for every device we pass through, but the XEN_PCI_INTEL_OPREGION register group is only valid for an Intel IGD. Add a

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-06-17 Thread Sean Christopherson
On Fri, Jun 17, 2022, Sean Christopherson wrote: > > @@ -110,6 +133,7 @@ struct kvm_userspace_memory_region { > > */ > > #define KVM_MEM_LOG_DIRTY_PAGES(1UL << 0) > > #define KVM_MEM_READONLY (1UL << 1) > > +#define KVM_MEM_PRIVATE(1UL << 2) > > Hmm, KVM_MEM_PRIVATE is techni

Re: [PATCH 03/11] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-17 Thread Daniel Henrique Barboza
On 6/14/22 09:10, Cédric Le Goater wrote: On 6/13/22 17:44, Daniel Henrique Barboza wrote: It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB object vi

Re: [PATCH v6 4/8] KVM: Extend the memslot to support fd-based private memory

2022-06-17 Thread Sean Christopherson
On Thu, May 19, 2022, Chao Peng wrote: > @@ -653,12 +662,12 @@ struct kvm_irq_routing_table { > }; > #endif > > -#ifndef KVM_PRIVATE_MEM_SLOTS > -#define KVM_PRIVATE_MEM_SLOTS 0 > +#ifndef KVM_INTERNAL_MEM_SLOTS > +#define KVM_INTERNAL_MEM_SLOTS 0 > #endif This rename belongs in a separate pa

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

2022-06-17 Thread Keith Busch
On Thu, Jun 16, 2022 at 08:34:06PM +0800, Jinhao Fan wrote: > 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

Re: [PATCH 03/11] ppc/pnv: use dev->parent_bus->parent to get the PHB

2022-06-17 Thread Daniel Henrique Barboza
On 6/14/22 06:10, Frederic Barrat wrote: On 13/06/2022 17:44, Daniel Henrique Barboza wrote: It is not advisable to execute an object_dynamic_cast() to poke into bus->qbus.parent and follow it up with a C cast into the PnvPHB type we think we got. A better way is to access the PnvPHB objec

Re: New "IndustryStandard" fw_cfg?

2022-06-17 Thread Dionna Amalie Glaze
I think the option should be boolean since it doesn't look like we're going to need to tune the number very much. It all boils down to "does the OS affirmatively support unaccepted memory?" as in, we have no way to negotiate it, but force unaccepted memory on. Ovmf can interpret the existence of an

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

2022-06-17 Thread Daniel Henrique Barboza
Queued in gitlab.com/danielhb/qemu/tree/ppc-next after adding Cedric's R-b from v1. Thanks, Daniel On 6/17/22 06:52, Frederic Barrat wrote: The 'resume_as_sreset' attribute of a cpu is set when a thread is entering a stop state on ppc books. It causes the thread to be re-routed to vector 0x1

[PATCH v2] xen/pass-through: don't create needless register group

2022-06-17 Thread Chuck Zmudzinski
Currently we are creating a register group for the Intel IGD OpRegion for every device we pass through, but the XEN_PCI_INTEL_OPREGION register group is only valid for an Intel IGD. Add a check to make sure the device is an Intel IGD and a check that the administrator has enabled gfx_passthru in th

Re: A new qemu acpi test with bios bits

2022-06-17 Thread Ani Sinha
oops, Phil's redhat email bounced! On Fri, Jun 17, 2022 at 10:41 PM Ani Sinha wrote: > > Hi : > I am trying to write a new ACPI/smbios test framework that uses bios > bits (https://biosbits.org/ ). > This test will effectively: > (a) use a pre-built bits software zip file kept somewhere (where to

A new qemu acpi test with bios bits

2022-06-17 Thread Ani Sinha
Hi : I am trying to write a new ACPI/smbios test framework that uses bios bits (https://biosbits.org/ ). This test will effectively: (a) use a pre-built bits software zip file kept somewhere (where to keep is TBD). (b) unzip it. (c) add a python based acpi and smbios test script to the unzipped bit

Re: [PATCH qemu v2 0/2] ppc/spapr: Implement H_WATCHDOG

2022-06-17 Thread Daniel Henrique Barboza
On 6/17/22 03:07, Alexey Kardashevskiy wrote: This implements H_WATCHDOG. More detailed comments are in the patches. This is based on sha1 96c343cc774b Joel Stanley "linux-user: Add PowerPC ISA 3.1 and MMA to hwcap". Please comment. Thanks. This version worked with the kernel side patches

Re: [PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-17 Thread Daniel Henrique Barboza
On 6/17/22 03:07, Alexey Kardashevskiy wrote: It keeps repeating, move it to the header. This uses __builtin_ctzl() to allow using the macros in #define. Signed-off-by: Alexey Kardashevskiy --- Reviewed-by: Daniel Henrique Barboza include/hw/pci-host/pnv_phb3_regs.h | 16

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

2022-06-17 Thread Daniel Henrique Barboza
On 6/17/22 03:07, 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/project/linuxppc-dev/list/?series=303120 This was tested b

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-17 Thread Joao Martins
On 6/17/22 13:18, Joao Martins wrote: > On 6/16/22 15:23, Igor Mammedov wrote: >> On Fri, 20 May 2022 11:45:31 +0100 >> Joao Martins wrote: >>> +} >>> + >>> +if (pcmc->has_reserved_memory && >>> + (machine->ram_size < machine->maxram_size)) { >>> +device_mem_size = machine->m

Re: [PATCH v2 00/10] Improve reliability of VM tests

2022-06-17 Thread John Snow
On Thu, Jun 16, 2022 at 10:27 AM John Snow wrote: > > This patch series attempts to improve the reliability of several of the > VM test targets. In particular, both CentOS 8 tests are non-functional > because CentOS 8 was EOL at the beginning of this calendar year, with > repositories and mirrors

Re: [PATCH] hmat acpi: Don't require initiator value in -numa when hmat=on

2022-06-17 Thread Brice Goglin
Hello Could somebody please apply (or reject) this commit? Thanks Brice Le 06/04/2022 à 14:29, Brice Goglin a écrit : From: Brice Goglin The "Memory Proximity Domain Attributes" structure of the ACPI HMAT has a "Processor Proximity Domain Valid" flag that is currently always set because Qem

Re: [RFC PATCH v2 3/8] qapi: golang: Generate qapi's struct types in Go

2022-06-17 Thread Victor Toso
Hi, On Fri, Jun 17, 2022 at 03:41:10PM +0100, Daniel P. Berrangé wrote: > On Fri, Jun 17, 2022 at 02:19:27PM +0200, Victor Toso wrote: > > This patch handles QAPI struct types and generates the equivalent > > types in Go. > > > > At the time of this writing, it generates 388 structures. > > > >

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

2022-06-17 Thread Fabiano Rosas
Frederic Barrat writes: > The 'resume_as_sreset' attribute of a cpu is 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 > cleared on reset or a thread might be re-routed unexpectedly afte

[PATCH 2/5] cpus-common: Add run_on_cpu2()

2022-06-17 Thread Peter Xu
This version of run_on_cpu() allows to take an Error** to detect errors. Signed-off-by: Peter Xu --- cpus-common.c | 27 +++ include/hw/core/cpu.h | 26 ++ softmmu/cpus.c| 6 ++ 3 files changed, 59 insertions(+) diff --git a/c

[PATCH 0/5] CPU: Detect put cpu register errors for migrations

2022-06-17 Thread Peter Xu
rfc->v1: - Rebase to master, drop RFC tag. This series teaches QEMU to detect errors when e.g. putting registers from QEMU to KVM, and fail migrations properly. For the rational of this series and why it was posted, please refer to the bug report here: https://lore.kernel.org/all/YppVupW+IWsm7Os

[PATCH 4/5] cpu: Allow cpu_synchronize_all_post_init() to take an errp

2022-06-17 Thread Peter Xu
Allow cpu_synchronize_all_post_init() to fail with an errp when it's set. Modify both precopy and postcopy to try to detect such error. Signed-off-by: Peter Xu --- hw/core/machine.c | 2 +- include/sysemu/cpus.h | 2 +- migration/savevm.c| 20 +--- softmmu/cpus.c

[PATCH 3/5] accel: Allow synchronize_post_init() to take an Error**

2022-06-17 Thread Peter Xu
It allows accel->synchronize_post_init() hook to return an error upwards. Add a new cpu_synchronize_post_init_full() for it, then let the existing cpu_synchronize_post_init() to call it with errp==NULL. Signed-off-by: Peter Xu --- accel/hvf/hvf-accel-ops.c | 2 +- accel/kvm/kvm-all.c

[PATCH 1/5] cpus-common: Introduce run_on_cpu_func2 which allows error returns

2022-06-17 Thread Peter Xu
run_on_cpu API does not yet support any way to pass over an error message to above. Add a new run_on_cpu_func2 hook to grant possibility of that. Note that this only changes the cpus-common core, no API is yet introduced for v2 of the run_on_cpu_func function. Signed-off-by: Peter Xu --- cpus-

[PATCH 5/5] KVM: Hook kvm_arch_put_registers() errors to the caller

2022-06-17 Thread Peter Xu
Leverage the new mechanism to pass over errors to upper stack for kvm_arch_put_registers() when called for the post_init() accel hook. Signed-off-by: Peter Xu --- accel/kvm/kvm-all.c | 13 ++--- accel/kvm/kvm-cpus.h | 2 +- softmmu/cpus.c | 5 - 3 files changed, 15 insertion

Re: [RFC PATCH v2 3/8] qapi: golang: Generate qapi's struct types in Go

2022-06-17 Thread Daniel P . Berrangé
On Fri, Jun 17, 2022 at 02:19:27PM +0200, Victor Toso wrote: > This patch handles QAPI struct types and generates the equivalent > types in Go. > > At the time of this writing, it generates 388 structures. > > The highlights of this implementation are: > > 1. Generating an Go struct that require

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

2022-06-17 Thread Alexander Bulekov
On 220617 1217, Thomas Huth wrote: > On 16/06/2022 21.03, Alexander Bulekov wrote: > > On 220616 0930, Patrick Venture wrote: > > > On Thu, Jun 16, 2022 at 6:31 AM Alexander Bulekov wrote: > > > > > > > Is this an --enable-sanitizers build? The virtual-device fuzzer catches > > > > > > > > > >

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-17 Thread Daniel P . Berrangé
On Fri, Jun 17, 2022 at 10:04:14AM -0400, John Snow wrote: > On Fri, Jun 17, 2022, 5:49 AM Daniel P. Berrangé > wrote: > > > On Thu, Jun 16, 2022 at 06:35:44PM +0400, Marc-André Lureau wrote: > > > Hi > > > > > > On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: > > > > > > > In some container en

Re: [PATCH V8 38/39] python/machine: add QEMUMachine accessors

2022-06-17 Thread John Snow
On Wed, Jun 15, 2022, 11:27 AM Steve Sistare wrote: > Provide full_args() to return all command-line arguments used to start a > vm, some of which are not otherwise visible to QEMUMachine clients. This > is needed by the cpr test, which must start a vm, then pass all qemu > command-line argument

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-17 Thread John Snow
On Fri, Jun 17, 2022, 5:49 AM Daniel P. Berrangé wrote: > On Thu, Jun 16, 2022 at 06:35:44PM +0400, Marc-André Lureau wrote: > > Hi > > > > On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: > > > > > In some container environments, there may be references to block > devices > > > witnessable from

[PATCH] sphinx: change default language to 'en'

2022-06-17 Thread Martin Liška
Fixes the following Sphinx warning (treated as error) starting with 5.0 release: Warning, treated as error: Invalid configuration value found: 'language = None'. Update your configuration to a valid langauge code. Falling back to 'en' (English). Signed-off-by: Martin Liska --- docs/conf.py | 2

Re: [PATCH 6/7] crypto: Implement ECDSA algorithm by gcrypt

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:30PM +0800, Lei He wrote: > Implement ECDSA algorithm by gcrypt > > Signed-off-by: lei he > --- > crypto/akcipher-gcrypt.c.inc | 400 > +++ > 1 file changed, 400 insertions(+) Reviewed-by: Daniel P. Berrangé With regards,

Re: [PATCH 7/7] crypto: Add test suite for ECDSA algorithm

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:31PM +0800, Lei He wrote: > 1. add test suite for ecdsa algorithm. > 2. use qcrypto_akcihper_max_xxx_len to help create buffers in > test code. > > Signed-off-by: lei he > --- > tests/unit/test-crypto-akcipher.c | 227 > +++--- > 1 f

Re: [PATCH v5 5/5] i386/pc: restrict AMD only enforcing of valid IOVAs to new machine type

2022-06-17 Thread Joao Martins
On 6/16/22 15:27, Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:32 +0100 > Joao Martins wrote: > >> The added enforcing is only relevant in the case of AMD where the >> range right before the 1TB is restricted and cannot be DMA mapped >> by the kernel consequently leading to IOMMU INVALID_DEVI

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-17 Thread Joao Martins
On 6/17/22 13:32, Igor Mammedov wrote: > On Fri, 17 Jun 2022 13:18:38 +0100 > Joao Martins wrote: >> On 6/16/22 15:23, Igor Mammedov wrote: >>> On Fri, 20 May 2022 11:45:31 +0100 >>> Joao Martins wrote: +hwaddr above_4g_mem_start, +

Re: [PATCH] xen/pass-through: don't create needless register group

2022-06-17 Thread Anthony PERARD via
On Fri, Jun 10, 2022 at 12:23:35PM -0400, Chuck Zmudzinski wrote: > Currently we are creating a register group for the Intel IGD OpRegion > for every device we pass through, but the XEN_PCI_INTEL_OPREGION > register group is only valid for an Intel IGD. Add a check to make > sure the device is an I

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

2022-06-17 Thread Jinhao Fan
> On Jun 17, 2022, at 8:56 PM, Klaus Jensen wrote: > > On Jun 17 20:47, Jinhao Fan wrote: >> >> >>> On Jun 17, 2022, at 7:54 PM, Klaus Jensen wrote: >>> >>> LGTM, >>> >>> Reviewed-by: Klaus Jensen >>> >> >> Great! >> >> I have two questions: >> >> How many “Reviewed-by”’s do I need to g

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

2022-06-17 Thread Klaus Jensen
On Jun 17 20:47, Jinhao Fan wrote: > > > > On Jun 17, 2022, at 7:54 PM, Klaus Jensen wrote: > > > > LGTM, > > > > Reviewed-by: Klaus Jensen > > > > Great! > > I have two questions: > > How many “Reviewed-by”’s do I need to get my patch applied? > That depends ;) The maintainers decide t

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

2022-06-17 Thread Jinhao Fan
> On Jun 17, 2022, at 7:54 PM, Klaus Jensen wrote: > > On Jun 16 20:34, Jinhao Fan wrote: >> 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 i

Re: [PATCH v1] MAINTAINERS: Collect memory device files in "Memory devices"

2022-06-17 Thread Jonathan Cameron via
On Fri, 17 Jun 2022 14:31:51 +0200 David Hildenbrand wrote: > Xiao Guangrong doesn't have enough time to actively review or contribute > to our NVDIMM implementation. Let's dissolve the "NVDIMM" section, moving > relevant ACPI parts to "ACPI/SMBIOS" and moving memory device stuff into a > new "Me

Re: [PATCH v2] xen/pass-through: merge emulated bits correctly

2022-06-17 Thread Anthony PERARD via
On Sat, Jun 11, 2022 at 12:43:29PM -0400, Chuck Zmudzinski wrote: > In xen_pt_config_reg_init(), there is an error in the merging of the > emulated data with the host value. With the current Qemu, instead of > merging the emulated bits with the host bits as defined by emu_mask, > the emulated bits

Re: [PATCH v1] MAINTAINERS: Collect memory device files in "Memory devices"

2022-06-17 Thread Igor Mammedov
On Fri, 17 Jun 2022 14:31:51 +0200 David Hildenbrand wrote: > Xiao Guangrong doesn't have enough time to actively review or contribute > to our NVDIMM implementation. Let's dissolve the "NVDIMM" section, moving > relevant ACPI parts to "ACPI/SMBIOS" and moving memory device stuff into a > new "Me

Re: Corrupted display changing screen colour depth in qemu-system-ppc/MacOS

2022-06-17 Thread Marc-André Lureau
Hi On Fri, Jun 17, 2022 at 1:56 PM Gerd Hoffmann wrote: > > Hi, > > > > Can you try ditch the QEMU_ALLOCATED_FLAG check added by the commit? > > > > Commit cb8962c146 drops the QEMU_ALLOCATED_FLAG check: if I add it back in > > with the following diff on top then everything works again: > > Ah,

[RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-06-17 Thread Victor Toso
This patch adds a struct type in Go that will handle return values for QAPI's command types. The return value of a Command is, encouraged to be, QAPI's complex types or an Array of those. Every Command has a underlying CommandResult. The EmptyCommandReturn is for those that don't expect any data

[RFC PATCH v2 6/8] qapi: golang: Generate qapi's command types in Go

2022-06-17 Thread Victor Toso
This patch handles QAPI command types and generates data structures in Go that decodes from QMP JSON Object to Go data structure and vice versa. Simlar to Event, this patch adds a Command interface and two helper functions MarshalCommand and UnmarshalCommand. At the time of this writing, it gener

[PATCH v1] MAINTAINERS: Collect memory device files in "Memory devices"

2022-06-17 Thread David Hildenbrand
Xiao Guangrong doesn't have enough time to actively review or contribute to our NVDIMM implementation. Let's dissolve the "NVDIMM" section, moving relevant ACPI parts to "ACPI/SMBIOS" and moving memory device stuff into a new "Memory devices" section. Make that new section cover other memory device

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-17 Thread Igor Mammedov
On Fri, 17 Jun 2022 13:18:38 +0100 Joao Martins wrote: > On 6/16/22 15:23, Igor Mammedov wrote: > > On Fri, 20 May 2022 11:45:31 +0100 > > Joao Martins wrote: > > > >> It is assumed that the whole GPA space is available to be DMA > >> addressable, within a given address space limit, expect fo

[RFC PATCH v2 3/8] qapi: golang: Generate qapi's struct types in Go

2022-06-17 Thread Victor Toso
This patch handles QAPI struct types and generates the equivalent types in Go. At the time of this writing, it generates 388 structures. The highlights of this implementation are: 1. Generating an Go struct that requires a @base type, the @base type fields are copied over to the Go struct. Th

[RFC PATCH v2 8/8] qapi: golang: document skip function visit_array_types

2022-06-17 Thread Victor Toso
Signed-off-by: Victor Toso --- scripts/qapi/golang.py | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/qapi/golang.py b/scripts/qapi/golang.py index ab91cf124f..f37014f52b 100644 --- a/scripts/qapi/golang.py +++ b/scripts/qapi/golang.py @@ -410,7 +410,12 @@ def vi

[RFC PATCH v2 1/8] qapi: golang: Generate qapi's enum types in Go

2022-06-17 Thread Victor Toso
This patch handles QAPI enum types and generates its equivalent in Go. Basically, Enums are being handled as strings in Golang. 1. For each QAPI enum, we will define a string type in Go to be the assigned type of this specific enum. 2. Naming: CamelCase will be used in any identifier that we

[RFC PATCH v2 4/8] qapi: golang: Generate qapi's union types in Go

2022-06-17 Thread Victor Toso
This patch handles QAPI union types and generates the equivalent data structures and methods in Go to handle it. At the moment of this writing, it generates 38 structures. The QAPI union type has two types of fields: The @base and the @variants members. The @base fields can be considered common m

[RFC PATCH v2 2/8] qapi: golang: Generate qapi's alternate types in Go

2022-06-17 Thread Victor Toso
This patch handles QAPI alternate types and generates data structures in Go that handles it. At this moment, there are 5 alternates in qemu/qapi, they are: * BlockDirtyBitmapMergeSource * Qcow2OverlapChecks * BlockdevRef * BlockdevRefOrNull * StrOrNull Alternate types are similar to Union bu

[RFC PATCH v2 0/8] qapi: add generator for Golang interface

2022-06-17 Thread Victor Toso
Hi, This is the second iteration of RFC v1: https://lists.gnu.org/archive/html/qemu-devel/2022-04/msg00226.html # What this is about? To generate a simple Golang interface that could communicate with QEMU over QMP. The Go code that is generated is meant to be used as the bare bones to exchang

[RFC PATCH v2 5/8] qapi: golang: Generate qapi's event types in Go

2022-06-17 Thread Victor Toso
This patch handles QAPI event types and generates data structures in Go that handles it. We also define a Event interface and two helper functions MarshalEvent and UnmarshalEvent. At the moment of this writing, this patch generates 51 structures (50 events) Example: qapi: | { 'event': 'MEMORY

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-17 Thread Joao Martins
On 6/16/22 15:23, Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:31 +0100 > Joao Martins wrote: > >> It is assumed that the whole GPA space is available to be DMA >> addressable, within a given address space limit, expect for a >^^^ typo? >

Re: [PATCH v5 3/5] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-06-17 Thread Igor Mammedov
On Fri, 17 Jun 2022 12:13:45 +0100 Joao Martins wrote: > On 6/16/22 14:30, Igor Mammedov wrote: > > On Fri, 20 May 2022 11:45:30 +0100 > > Joao Martins wrote: > > > >> Use the pre-initialized pci-host qdev and fetch the > >> pci-hole64-size into pc_memory_init() newly added argument. > >> pii

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

2022-06-17 Thread Xiao Guangrong
On Wed, Jun 15, 2022 at 7:49 PM David Hildenbrand wrote: > > 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. > >

Re: [PULL v2 25/86] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142)

2022-06-17 Thread Igor Mammedov
On Fri, 17 Jun 2022 11:51:44 +0100 Jonathan Cameron wrote: > On Thu, 16 Jun 2022 16:45:00 +0200 > Igor Mammedov wrote: > > > On Mon, 16 May 2022 16:51:34 -0400 > > "Michael S. Tsirkin" wrote: > > > > > From: Ben Widawsky > > > > > > CXL host bridges themselves may have MMIO. Since host br

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

2022-06-17 Thread Klaus Jensen
On Jun 16 20:34, Jinhao Fan wrote: > 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., S

Re: [PATCH 5/7] crypto: Implement ECDSA algorithm by hogweed

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:29PM +0800, Lei He wrote: > Implement ECDSA algorithm by hogweed and nettle. > > Signed-off-by: lei he > --- > crypto/akcipher-nettle.c.inc | 268 > +++ > 1 file changed, 268 insertions(+) Reviewed-by: Daniel P. Berrangé

Re: [PATCH 4/7] crypto: Add ECDSA key parser

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:28PM +0800, Lei He wrote: > Add ECDSA key parser and ECDSA signautre parser. typo: 'signature' > > Signed-off-by: lei he > --- > crypto/ecdsakey-builtin.c.inc | 248 > ++ > crypto/ecdsakey.c

Re: [PATCH v5 2/5] i386/pc: create pci-host qdev prior to pc_memory_init()

2022-06-17 Thread Joao Martins
On 6/16/22 14:21, Reviewed-by: Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:29 +0100 > Joao Martins wrote: > >> At the start of pc_memory_init() we usually pass a range of >> 0..UINT64_MAX as pci_memory, when really its 2G (i440fx) or >> 32G (q35). To get the real user value, we need to get p

Re: [PATCH 3/7] crypto: remove "qemu/osdep.h" in rsakey.h

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:27PM +0800, Lei He wrote: > Move 'include "qemu/osdep.h"' from rsakey.h to rsakey.c. > > Signed-off-by: lei he > --- > crypto/rsakey.c | 1 + > crypto/rsakey.h | 1 - > 2 files changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Daniel P. Berrangé With regards,

Re: [PATCH v5 1/5] hw/i386: add 4g boundary start to X86MachineState

2022-06-17 Thread Joao Martins
On 6/16/22 14:05, Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:28 +0100 > Joao Martins wrote: >> Rather than hardcoding the 4G boundary everywhere, introduce a >> X86MachineState property @above_4g_mem_start and use it > so far it's just field not a property /fix commit message/ > Fixed. >>

Re: [PATCH 2/7] crypto: Support more ASN.1 types

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:26PM +0800, Lei He wrote: > 1. support decoding of 'bit string','octet string', > 'object id', and 'context specific tag' for DER decoder. > 2. support encoding of int and sequence for DER decoder. > 3. add test suites for the above changes. > > Signed-off-by: lei he

Re: [PATCH v5 3/5] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-06-17 Thread Joao Martins
On 6/16/22 14:30, Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:30 +0100 > Joao Martins wrote: > >> Use the pre-initialized pci-host qdev and fetch the >> pci-hole64-size into pc_memory_init() newly added argument. >> piix needs a bit of care given all the !pci_enabled() >> and that the pci_ho

Re: [PATCH 1/7] crypto: Introduce ECDSA algorithm API

2022-06-17 Thread Daniel P . Berrangé
On Mon, Jun 13, 2022 at 04:45:25PM +0800, Lei He wrote: > Introduce ECDSA related structures to qapi-crypto. > > Signed-off-by: lei he > --- > qapi/crypto.json | 28 ++-- > 1 file changed, 26 insertions(+), 2 deletions(-) Reviewed-by: Daniel P. Berrangé With regards,

Re: [PULL v2 25/86] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142)

2022-06-17 Thread Jonathan Cameron via
On Thu, 16 Jun 2022 16:45:00 +0200 Igor Mammedov wrote: > On Mon, 16 May 2022 16:51:34 -0400 > "Michael S. Tsirkin" wrote: > > > From: Ben Widawsky > > > > CXL host bridges themselves may have MMIO. Since host bridges don't have > > a BAR they are treated as special for MMIO. This patch incl

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

2022-06-17 Thread Thomas Huth
On 16/06/2022 21.03, Alexander Bulekov wrote: On 220616 0930, Patrick Venture wrote: On Thu, Jun 16, 2022 at 6:31 AM Alexander Bulekov wrote: Is this an --enable-sanitizers build? The virtual-device fuzzer catches Yeah - it should be reproducible with a sanitizers build from HEAD -- I can

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

2022-06-17 Thread Paolo Bonzini
Hi Matheus, could you please test the tests-tcg-next branch at https://gitlab.com/bonzini/qemu? Thanks, Paolo On Thu, Jun 16, 2022 at 3:23 AM Alex Bennée wrote: > > > Matheus Kowalczuk Ferst writes: > > > On 01/06/2022 15:05, Alex Bennée wrote: > >> From: Paolo Bonzini > >> > >> In preparati

Re: Corrupted display changing screen colour depth in qemu-system-ppc/MacOS

2022-06-17 Thread Gerd Hoffmann
Hi, > > Can you try ditch the QEMU_ALLOCATED_FLAG check added by the commit? > > Commit cb8962c146 drops the QEMU_ALLOCATED_FLAG check: if I add it back in > with the following diff on top then everything works again: Ah, the other way around. > diff --git a/ui/console.c b/ui/console.c > inde

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

2022-06-17 Thread Frederic Barrat
The 'resume_as_sreset' attribute of a cpu is 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 cleared on reset or a thread might be re-routed unexpectedly after a reset, when it was not in a st

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-17 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 06:35:44PM +0400, Marc-André Lureau wrote: > Hi > > On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: > > > In some container environments, there may be references to block devices > > witnessable from a container through /proc/self/mountinfo that reference > > devices we

Re: [RFC PATCH 12/12] test/qtest: Add ubpf basic test case

2022-06-17 Thread Thomas Huth
On 17/06/2022 09.36, Zhang Chen wrote: TODO: This test case does not work. Need add ubpf.h header in qtest compile "-I ../ubpf/vm -I ../ubpf/vm/inc". I'm not sure if we need it in qtest. Because normal tests/qtest not including external module test case like fdt. Or we just need a qtest case for

Re: [PATCH v2 09/10] tests/vm: remove duplicate 'centos' VM test

2022-06-17 Thread Thomas Huth
On 16/06/2022 16.26, John Snow wrote: This is listed twice by accident; we require genisoimage to run the test, so remove the unconditional entry. Signed-off-by: John Snow --- tests/vm/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/Makefile.incl

Re: [PATCH v2 08/10] tests/vm: remove ubuntu.i386 VM test

2022-06-17 Thread Thomas Huth
On 16/06/2022 16.26, John Snow wrote: Ubuntu 18.04 is out of our support window, and Ubuntu 20.04 does not support i386 anymore. The debian project does, but they do not provide any cloud images for it, a new expect-style script would have to be written. Since we have i386 cross-compiler tests h

Re: [PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-06-17 Thread Thomas Huth
On 16/06/2022 16.26, John Snow wrote: In certain container environments we may not have FUSE at all, so skip the test in this circumstance too. Signed-off-by: John Snow --- tests/qemu-iotests/108 | 5 + 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/108 b/tests/qemu-iot

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-17 Thread Thomas Huth
On 16/06/2022 16.43, John Snow wrote: On Thu, Jun 16, 2022 at 10:36 AM Marc-André Lureau wrote: Hi On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: In some container environments, there may be references to block devices witnessable from a container through /proc/self/mountinfo that refere

Re: [PATCH] block/rbd: support driver-specific reopen

2022-06-17 Thread Raphael Pour
Hello everyone, what do you think? Please tell me if something needs to be clarified or improved. Raphael PS: Hopefully this second reply attempt isn't messed up (first: https://lists.nongnu.org/archive/html/qemu-block/2022-06/msg00344.html) On 4/13/22 14:26, Raphael Pour wrote: This patc

Re: [PATCH] tests/vm: do not specify -bios option

2022-06-17 Thread Thomas Huth
On 16/06/2022 10.30, Paolo Bonzini wrote: When running from the build tree, the executable is able to find the BIOS on its own; when running from the source tree, a firmware blob should already be installed and there is no guarantee that the one in the source tree works with the QEMU that is bein

Re: [RFC PATCH 01/12] configure: Add iovisor/ubpf project as a submodule for QEMU

2022-06-17 Thread Daniel P . Berrangé
On Fri, Jun 17, 2022 at 03:36:19PM +0800, Zhang Chen wrote: > Make iovisor/ubpf project be a git submodule for QEMU. > It will auto clone ubpf project when configure QEMU. I don't think we need todo this. As it is brand new functionality we don't have any back compat issues. We should just expect

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

2022-06-17 Thread Eugenio Perez Martin
On Fri, Jun 17, 2022 at 3:29 AM Jason Wang wrote: > > On Wed, Jun 15, 2022 at 6:03 PM Eugenio Perez Martin > wrote: > > > > 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:

[RFC PATCH 12/12] test/qtest: Add ubpf basic test case

2022-06-17 Thread Zhang Chen
TODO: This test case does not work. Need add ubpf.h header in qtest compile "-I ../ubpf/vm -I ../ubpf/vm/inc". I'm not sure if we need it in qtest. Because normal tests/qtest not including external module test case like fdt. Or we just need a qtest case for filter-ubpf module. This test will load p

[RFC PATCH 11/12] docs/devel: Add userspace-ebpf.rst

2022-06-17 Thread Zhang Chen
Introduce userspace ebpf basic knowledge. Signed-off-by: Zhang Chen --- docs/devel/userspace-ebpf.rst | 106 ++ 1 file changed, 106 insertions(+) create mode 100644 docs/devel/userspace-ebpf.rst diff --git a/docs/devel/userspace-ebpf.rst b/docs/devel/userspace-e

[RFC PATCH 07/12] net/filter: Introduce filter-ubpf module

2022-06-17 Thread Zhang Chen
The filter-ubpf module able to load user defined ebpf program to handle network packet based on filter framework. Signed-off-by: Zhang Chen --- net/filter-ubpf.c | 149 ++ net/meson.build | 1 + 2 files changed, 150 insertions(+) create mode 10064

[RFC PATCH 08/12] qapi: Add FilterUbpfProperties and qemu-options

2022-06-17 Thread Zhang Chen
Add filter-ubpf related QOM and qemu-options. Signed-off-by: Zhang Chen --- qapi/qom.json | 18 ++ qemu-options.hx | 6 ++ 2 files changed, 24 insertions(+) diff --git a/qapi/qom.json b/qapi/qom.json index 6a653c6636..820a5218e8 100644 --- a/qapi/qom.json +++ b/qapi/qom.j

[RFC PATCH 05/12] ebpf/uBPF: Add qemu_prepare_ubpf to load ebpf binary

2022-06-17 Thread Zhang Chen
The qemu_prepare_ubpf() can load user defined userspace ebpf binary file to Qemu userspace ebpf VM but not run it. The ebpf program will triggered in the hook point. Signed-off-by: Zhang Chen --- ebpf/ubpf-stub.c | 5 +++ ebpf/ubpf.c | 100 +++

  1   2   >