Re: [PATCH v2 05/14] target/riscv: Calculate address according to XLEN

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvd.c.inc | 23 ++- target/riscv/insn_trans/trans_rvf.c.inc | 23 ++- target/riscv/insn_trans/trans_rvi.c.inc | 18 ++ target/riscv/tran

Re: [PATCH v2 07/14] target/riscv: Ajdust vector atomic check with XLEN

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/insn_trans/trans_rvv.c.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [PATCH v2] hw/arm/virt: Expose empty NUMA nodes through ACPI

2021-11-10 Thread David Hildenbrand
On 10.11.21 11:33, Igor Mammedov wrote: > On Fri, 5 Nov 2021 23:47:37 +1100 > Gavin Shan wrote: > >> Hi Drew and Igor, >> >> On 11/2/21 6:39 PM, Andrew Jones wrote: >>> On Tue, Nov 02, 2021 at 10:44:08AM +1100, Gavin Shan wrote: Yeah, I agree. I don't have strong sense to expose these

Re: [PATCH v2 10/14] target/riscv: Adjust vector address with mask

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: The mask comes from the pointer masking extension, or the max value corresponding to XLEN bits. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c | 1 + target/riscv/cpu.h | 4 target/riscv/cpu_helper.c| 40 +++

Re: [PATCH v2 12/14] target/riscv: Split out the vill from vtype

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: We need not specially process vtype when XLEN changes. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.h | 1 + target/riscv/csr.c | 15 ++- target/riscv/machine.c | 1 + target/riscv/vector_helper.c | 7 ++-

Re: [PATCH v2 13/14] target/riscv: Don't save pc when exception return

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: As pc will be written by the xepc in exception return, just ignore pc in translation. Signed-off-by: LIU Zhiwei Reviewed-by: Richard Henderson --- target/riscv/helper.h | 4 ++-- target/riscv/insn_trans/trans_privileged.c.inc |

Re: [PATCH v2 14/14] target/riscv: Enable uxl field write

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/csr.c | 5 ++--- target/riscv/insn_trans/trans_rvi.c.inc | 4 ++-- target/riscv/op_helper.c| 3 ++- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/target/ri

Re: [PATCH v2 11/14] target/riscv: Adjust scalar reg in vector with XLEN

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: diff --git a/target/riscv/internals.h b/target/riscv/internals.h index b15ad394bb..07e882160d 100644 --- a/target/riscv/internals.h +++ b/target/riscv/internals.h @@ -27,6 +27,7 @@ FIELD(VDATA, VM, 8, 1) FIELD(VDATA, LMUL, 9, 2) FIELD(VDATA, NF, 11, 4)

Re: [PATCH v2 09/14] target/riscv: Relax debug check for pm write

2021-11-10 Thread Richard Henderson
On 11/10/21 8:04 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei --- target/riscv/csr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 9f41954894..74c0b788fd 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -1445,6 +1445,9 @@ st

[RFC PATCH v3] hw/nvme:Adding Support for namespace management

2021-11-10 Thread Naveen
From: Naveen Nagar This patch supports namespace management : create and delete operations This patch has been tested with the following command and size of image file for unallocated namespaces is taken as 0GB. ns_create will look into the list of unallocated namespaces and it will initialize th

Re: qemu-img.c possibly overflowing shifts by BDRV_SECTOR_BITS

2021-11-10 Thread Kevin Wolf
Am 09.11.2021 um 20:07 hat Peter Maydell geschrieben: > Hi; Coverity is complaining about some of the places in qemu-img.c > where it takes a 32-bit variable and shifts it left by BDRV_SECTOR_BITS > to convert a sector count to a byte count, because it's doing the > shift in 32-bits rather than 64

Re: [PATCH 2/2] tests/unit/test-smp-parse: Fix a check-patch complain

2021-11-10 Thread wangyanan (Y)
On 2021/11/10 18:16, Markus Armbruster wrote: Yanan Wang writes: Checkpatch.pl reports errors like below for commit 9e8e393bb7. Fix it. ERROR: space required after that close brace '}' +SMPTestData *data = &(SMPTestData){{ }}; Fixes: 9e8e393bb7 ("tests/unit: Add an unit test for smp par

Re: [PULL 0/3] QAPI patches patches for 2021-11-10

2021-11-10 Thread Richard Henderson
On 11/10/21 7:18 AM, Markus Armbruster wrote: The following changes since commit 0a70bcf18caf7a61d480f8448723c15209d128ef: Update version for v6.2.0-rc0 release (2021-11-09 18:22:57 +0100) are available in the Git repository at: git://repo.or.cz/qemu/armbru.git tags/pull-qapi-2021-11-10

[PATCH] tcg/optimize: Add an extra cast to fold_extract2

2021-11-10 Thread Richard Henderson
There is no bug, but silence a warning about computation in int32_t being assigned to a uint64_t. Reported-by: Coverity CID 1465220 Signed-off-by: Richard Henderson --- tcg/optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tcg/optimize.c b/tcg/optimize.c index dbb2d4

Re: [PATCH 0/6] RfC: try improve native hotplug for pcie root ports

2021-11-10 Thread Michael S. Tsirkin
Given it's a bugfix, and given that I hear through internal channels that QE results so far have been encouraging, I am inclined to bite the bullet and merge this for -rc1. I don't think this conflicts with Julia's patches as users can still disable ACPI hotplug into bridges. Gerd, agree? Worth t

Re: [PATCH v9 3/8] qmp: add QMP command x-query-virtio

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command lists all the instances of VirtIODevice with > their QOM paths and virtio type/name. > > Signed-off-by: Jonah Palmer [...] > diff --git a/qapi/qapi-schema.json b/qapi/qapi-schema.json > index 4912b97..1512ada 100644 > --- a/qapi

Re: [PATCH v2] tcg: Remove TCI experimental status

2021-11-10 Thread Richard Henderson
On 11/6/21 12:14 PM, Philippe Mathieu-Daudé wrote: The following commits (released in v6.0.0) made raised the quality of the TCI backend to the other TCG architectures, thus is is not considerated experimental anymore: - c6fbea47664..2f74f45e32b - dc09f047edd..9e9acb7b348 - b6139eb0578..2fc6f16ca

Re: [PATCH v2 1/3] tests: acpi: prepare for updated TPM related tables

2021-11-10 Thread Michael S. Tsirkin
On Tue, Nov 09, 2021 at 09:30:48AM -0500, Stefan Berger wrote: > > On 11/9/21 09:11, Michael S. Tsirkin wrote: > > On Tue, Nov 09, 2021 at 09:01:50AM -0500, Stefan Berger wrote: > > > Replace existing TPM related tables, that are about to change, with > > > empty files. > > > > > > Cc: Michael S.

Re: [PATCH 1/7] stream: Traverse graph after modification

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: bdrv_cor_filter_drop() modifies the block graph. That means that other parties can also modify the block graph before it returns. Therefore, we cannot assume that the result of a graph traversal we did before remains valid afterwards. We should thus fetch `

Re: [PATCH v2 2/3] acpi: tpm: Add missing device identification objects

2021-11-10 Thread Michael S. Tsirkin
On Tue, Nov 09, 2021 at 09:26:46AM -0500, Stefan Berger wrote: > > On 11/9/21 09:20, Michael S. Tsirkin wrote: > > On Tue, Nov 09, 2021 at 09:01:51AM -0500, Stefan Berger wrote: > > > Add missing device identification objects _STR and _UID. They will appear > > > as files 'description' and 'uid' u

[PATCH] tcg: Document ctpop opcodes

2021-11-10 Thread Richard Henderson
Fixes: a768e4e99247 Resolves: https://gitlab.com/qemu-project/qemu/-/issues/658 Signed-off-by: Richard Henderson --- tcg/README | 6 ++ 1 file changed, 6 insertions(+) diff --git a/tcg/README b/tcg/README index c2e7762a37..391f4d1e80 100644 --- a/tcg/README +++ b/tcg/README @@ -254,6 +254,12

Re: [PATCH] tcg/optimize: Add an extra cast to fold_extract2

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/10/21 13:01, Richard Henderson wrote: > There is no bug, but silence a warning about computation > in int32_t being assigned to a uint64_t. > > Reported-by: Coverity CID 1465220 > Signed-off-by: Richard Henderson > --- > tcg/optimize.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-

[PATCH] numa: avoid crash with SGX and "info numa"

2021-11-10 Thread Paolo Bonzini
Add the MEMORY_DEVICE_INFO_KIND_SGX_EPC case, so that enclave memory is included in the output of "info numa" instead of crashing the monitor. Fixes: a7c565a941 ("sgx-epc: Add the fill_device_info() callback support", 2021-09-30) Signed-off-by: Paolo Bonzini --- hw/core/numa.c | 7 +++ 1 fi

Re: [PATCH] tcg: Document ctpop opcodes

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/10/21 13:20, Richard Henderson wrote: > Fixes: a768e4e99247 > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/658 > Signed-off-by: Richard Henderson > --- > tcg/README | 6 ++ > 1 file changed, 6 insertions(+) > > diff --git a/tcg/README b/tcg/README > index c2e7762a37..391f

[PATCH v2 1/1] spapr_numa.c: fix FORM1 distance-less nodes

2021-11-10 Thread Daniel Henrique Barboza
Commit 71e6fae3a99 fixed an issue with FORM2 affinity guests with NUMA nodes in which the distance info is absent in machine_state->numa_state->nodes. This happens when QEMU adds a default NUMA node and when the user adds NUMA nodes without specifying the distances. During the discussions of the f

Re: [PATCH] spapr_numa.c: fix FORM1 distance-less nodes

2021-11-10 Thread Daniel Henrique Barboza
On 11/10/21 06:58, Richard Henderson wrote: On 11/9/21 7:35 PM, Daniel Henrique Barboza wrote: Commit 71e6fae3a99 fixed an issue with FORM2 affinity guests with NUMA nodes in which the distance info is absent in machine_state->numa_state->nodes. This happens when QEMU adds a default NUMA node

[PATCH v2 0/1] spapr_numa.c: fix FORM1 distance-less nodes

2021-11-10 Thread Daniel Henrique Barboza
Hi, Simple re-post because I forgot to add the "Fixes" tag. 'Reviewed-by' tag from Richard was also added. v1 link: https://lists.gnu.org/archive/html/qemu-devel/2021-11/msg0.html Daniel Henrique Barboza (1): spapr_numa.c: fix FORM1 distance-less nodes hw/ppc/spapr_numa.c | 62 +

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the child

Re: [PATCH v3] s390: kvm: adjust diag318 resets to retain data

2021-11-10 Thread Janosch Frank
On 11/9/21 21:56, Collin Walling wrote: The CPNC portion of the diag 318 data is erroneously reset during an initial CPU reset caused by SIGP. Let's go ahead and relocate the diag318_info field within the CPUS390XState struct such that it is only zeroed during a clear reset. This way, the CPNC wi

Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset

2021-11-10 Thread Paolo Bonzini
On 11/1/21 17:20, Yang Zhong wrote: The basic SGX patches were merged into Qemu release, the left NUMA function for SGX should be enabled. The patch1 implemented the SGX NUMA ACPI to enable NUMA in the SGX guest. Since Libvirt need detailed host SGX EPC sections info to decide how to allocate EPC

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents. We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has the advantage that a BdrvChild is removed from the child

RE: [PATCH 1/2] Fixed a QEMU hang when guest poweroff in COLO mode

2021-11-10 Thread Rao, Lei
OK, will be changed in V2. Thanks, Lei -Original Message- From: Juan Quintela Sent: Wednesday, November 10, 2021 5:55 PM To: Rao, Lei Cc: Zhang, Chen ; zhang.zhanghaili...@huawei.com; dgilb...@redhat.com; qemu-devel@nongnu.org Subject: Re: [PATCH 1/2] Fixed a QEMU hang when guest powe

Re: [PATCH] qmp: Stabilize preconfig

2021-11-10 Thread Michal Prívozník
On 11/3/21 9:02 AM, Markus Armbruster wrote: > Daniel P. Berrangé writes: > >> On Mon, Nov 01, 2021 at 03:37:58PM +0100, Michal Prívozník wrote: >>> On 10/25/21 2:19 PM, Markus Armbruster wrote: Michal Privoznik writes: > The -preconfig option and exit-preconfig command are around

Re: [PATCH 3/7] block: Unite remove_empty_child and child_free

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: Now that bdrv_remove_empty_child() no longer removes the child from the parent's children list but only checks that it is not in such a list, it is only a wrapper around bdrv_child_free() that checks that the child is empty and unused. That should apply to al

Re: [PATCH v9 4/8] qmp: add QMP command x-query-virtio-status

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the status of a VirtIODevice, including > its corresponding vhost device status (if active). > > Next patch will improve output by decoding feature bits, including > vhost device's feature bits (backend, protocol, acked, and

Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset

2021-11-10 Thread Yang Zhong
On Wed, Nov 10, 2021 at 01:52:09PM +0100, Paolo Bonzini wrote: > On 11/1/21 17:20, Yang Zhong wrote: > >The basic SGX patches were merged into Qemu release, the left NUMA > >function for SGX should be enabled. The patch1 implemented the SGX NUMA > >ACPI to enable NUMA in the SGX guest. Since Libvir

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Christian Schoenebeck
On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > > > > So looks like it was probably still easier and realistic to just add > > > > virtio > > > > capabilities for now for allowing to exceed current descriptor limit. > > > > > > I'm still not sure why virtio-net, virtio-blk, vi

Re: [PATCH] qmp: Stabilize preconfig

2021-11-10 Thread Damien Hedde
On 11/10/21 13:54, Michal Prívozník wrote: On 11/3/21 9:02 AM, Markus Armbruster wrote: Daniel P. Berrangé writes: On Mon, Nov 01, 2021 at 03:37:58PM +0100, Michal Prívozník wrote: On 10/25/21 2:19 PM, Markus Armbruster wrote: Michal Privoznik writes: The -preconfig option and exit-pr

Re: [PATCH v2 1/1] spapr_numa.c: fix FORM1 distance-less nodes

2021-11-10 Thread Cédric Le Goater
On 11/10/21 13:39, Daniel Henrique Barboza wrote: Commit 71e6fae3a99 fixed an issue with FORM2 affinity guests with NUMA nodes in which the distance info is absent in machine_state->numa_state->nodes. This happens when QEMU adds a default NUMA node and when the user adds NUMA nodes without specif

Re: [Ping][PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-10 Thread Denis Plotnikov
On 09.11.2021 20:46, Paolo Bonzini wrote: On 11/9/21 08:23, Denis Plotnikov wrote: Ping ping! Looks good, but can you explain why it's okay to call it before qemu_chr_cleanup() and user_creatable_cleanup()? I think a better solution to the ordering problem would be:   qemu_chr_cleanup();

Re: [PATCH v9 8/8] hmp: add virtio commands

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This patch implements the HMP versions of the virtio QMP commands. > > Signed-off-by: Jonah Palmer > --- > hmp-commands-info.hx | 218 ++ > include/monitor/hmp.h | 5 + > monitor/hmp-cmds.c| 358 > +

Re: [PATCH 2/5] hw/acpi/ich9: Add compatibility option for 'native-hpc-bit'

2021-11-10 Thread Igor Mammedov
On Wed, 10 Nov 2021 06:30:11 +0100 Julia Suvorova wrote: > To solve issues [1-2] the Hot Plug Capable bit in PCIe Slots will be > turned on, while the switch to ACPI Hot-plug will be done in the > DSDT table. > > Introducing 'x-keep-native-hpc' option disables the HPC bit only > in 6.1 and as a

[PATCH v3 2/3] acpi: tpm: Add missing device identification objects

2021-11-10 Thread Stefan Berger
Add missing device identification objects _STR and _UID. They will appear as files 'description' and 'uid' under Linux sysfs. Cc: Shannon Zhao Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Fixes: https://gitlab.com/qemu-project/qemu/-/issues/708 Signed-off-by: Stefan Berger --- hw/a

[PATCH v3 3/3] tests: acpi: Add updated TPM related tables

2021-11-10 Thread Stefan Berger
The updated TPM related tables have the following additions: Device (TPM) { Name (_HID, "MSFT0101" /* TPM 2.0 Security Device */) // _HID: Hardware ID + Name (_STR, "TPM 2.0 Device") // _STR: Description String + Name (_UID, One) // _UID: Unique ID Name (_STA, 0x0

Re: [PATCH 1/5] hw/pci/pcie_port: Rename 'native-hotplug' to 'native-hpc-bit'

2021-11-10 Thread Igor Mammedov
On Wed, 10 Nov 2021 09:08:34 + Daniel P. Berrangé wrote: > On Wed, Nov 10, 2021 at 01:04:54AM -0500, Michael S. Tsirkin wrote: > > On Wed, Nov 10, 2021 at 06:30:10AM +0100, Julia Suvorova wrote: > > > Rename the option to better represent its function - toggle Hot-Plug > > > Capable bit in

[PATCH v3 0/3] tpm: Add missing ACPI device identification objects

2021-11-10 Thread Stefan Berger
This series of patches adds missing ACPI device identification objects _STR and _UID to TPM 1.2 and TPM 2 ACPI tables. Stefan v3: - Dropped replacement of ACPI tables with empty files in 1/3. - Reduced ignored files Stefan Berger (3): tests: acpi: prepare for updated TPM related tables

[PATCH v3 1/3] tests: acpi: prepare for updated TPM related tables

2021-11-10 Thread Stefan Berger
Replace existing TPM related tables, that are about to change, with empty files. Cc: Michael S. Tsirkin Cc: Igor Mammedov Cc: Ani Sinha Signed-off-by: Stefan Berger --- tests/qtest/bios-tables-test-allowed-diff.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/qtest/bios-tables-te

Re: [PATCH v2 05/14] target/riscv: Calculate address according to XLEN

2021-11-10 Thread LIU Zhiwei
On 2021/11/10 下午6:52, Richard Henderson wrote: On 11/10/21 8:04 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei ---   target/riscv/insn_trans/trans_rvd.c.inc | 23 ++-   target/riscv/insn_trans/trans_rvf.c.inc | 23 ++-   target/riscv/insn_trans/trans_rvi

Re: [PATCH 4/7] block: Drop detached child from ignore list

2021-11-10 Thread Vladimir Sementsov-Ogievskiy
04.11.2021 13:38, Hanna Reitz wrote: bdrv_attach_child_common_abort() restores the parent's AioContext. To do so, the child (which was supposed to be attached, but is now detached again by this abort handler) is added to the ignore list for the AioContext changing functions. However, since we m

Re: [PATCH 2/5] hw/acpi/ich9: Add compatibility option for 'native-hpc-bit'

2021-11-10 Thread Igor Mammedov
On Wed, 10 Nov 2021 14:33:54 +0100 Igor Mammedov wrote: > On Wed, 10 Nov 2021 06:30:11 +0100 > Julia Suvorova wrote: > > > To solve issues [1-2] the Hot Plug Capable bit in PCIe Slots will be > > turned on, while the switch to ACPI Hot-plug will be done in the > > DSDT table. > > > > Introduci

Re: [PATCH 05/15] hw/nvme: Add support for SR-IOV

2021-11-10 Thread Lukasz Maniak
On Mon, Nov 08, 2021 at 08:56:43AM +0100, Klaus Jensen wrote: > On Nov 4 15:30, Lukasz Maniak wrote: > > On Tue, Nov 02, 2021 at 06:33:31PM +0100, Lukasz Maniak wrote: > > > On Tue, Nov 02, 2021 at 03:33:15PM +0100, Klaus Jensen wrote: > > > > On Oct 7 18:23, Lukasz Maniak wrote: > > > > > This p

Re: [PATCH v9 5/8] qmp: decode feature & status bits in virtio-status

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > Display feature names instead of bitmaps for host, guest, and > backend for VirtIODevice. > > Display status names instead of bitmaps for VirtIODevice. > > Display feature names instead of bitmaps for backend, protocol, > acked, and features (hdev-

Re: [PATCH v9 7/8] qmp: add QMP command x-query-virtio-queue-element

2021-11-10 Thread Markus Armbruster
Jonah Palmer writes: > From: Laurent Vivier > > This new command shows the information of a VirtQueue element. > > Signed-off-by: Jonah Palmer [...] > diff --git a/qapi/virtio.json b/qapi/virtio.json > index 0f65044..c57fbc5 100644 > --- a/qapi/virtio.json > +++ b/qapi/virtio.json > @@ -1061,

Re: [PATCH] cpu-models-x86.rst: Tidy up a couple of things

2021-11-10 Thread Kashyap Chamarthy
On Fri, Oct 15, 2021 at 05:22:59PM +0200, Kashyap Chamarthy wrote: > - Remove stray texinfo syntax (remnants of texinfo to rST conversion) > - Clarify the bit about long-term stable CPU models > > TODO: In a future patch, include potential examples as discussed > here[1]. > > [1] https://li

[PATCH 2/3] qtest/libqos: add a function to initialize secondary PCI buses

2021-11-10 Thread Laurent Vivier
Scan the PCI devices to find bridge and set PCI_SECONDARY_BUS and PCI_SUBORDINATE_BUS (algorithm from seabios) Signed-off-by: Laurent Vivier --- include/hw/pci/pci_bridge.h | 8 +++ tests/qtest/libqos/pci.c| 118 tests/qtest/libqos/pci.h| 1 + 3 f

[PATCH 0/3] tests/qtest: add some tests for virtio-net failover

2021-11-10 Thread Laurent Vivier
This series adds a qtest entry to test virtio-net failover feature. We check following error cases: - check missing id on device with failover_pair_id triggers an error - check a primary device plugged on a bus that doesn't support hotplug triggers an error We check the status of the machine b

[PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist()

2021-11-10 Thread Laurent Vivier
move them from block/qapi.c to qobject/qdict.c, qobject/qlist.c, qobject/qobject.c This is useful to debug qobjects Signed-off-by: Laurent Vivier --- block/qapi.c | 82 +- include/qapi/qmp/qdict.h | 2 + include/qapi/qmp/qlist.h | 1 + inc

[PATCH 3/3] tests/qtest: add some tests for virtio-net failover

2021-11-10 Thread Laurent Vivier
Add test cases to test several error cases that must be generated by invalid failover configuration. Add a combination of coldplug and hotplug test cases to be sure the primary is correctly managed according the presence or not of the STANDBY feature. Signed-off-by: Laurent Vivier --- tests/qte

Re: [PATCH 4/5] hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

2021-11-10 Thread Igor Mammedov
On Wed, 10 Nov 2021 02:21:34 -0500 "Michael S. Tsirkin" wrote: > On Wed, Nov 10, 2021 at 06:30:13AM +0100, Julia Suvorova wrote: > > There are two ways to enable ACPI PCI Hot-plug: > > > > * Disable the Hot-plug Capable bit on PCIe slots. > > > > This was the first approach which led to

Re: [PATCH v2 10/14] target/riscv: Adjust vector address with mask

2021-11-10 Thread LIU Zhiwei
On 2021/11/10 下午7:11, Richard Henderson wrote: On 11/10/21 8:04 AM, LIU Zhiwei wrote: The mask comes from the pointer masking extension, or the max value corresponding to XLEN bits. Signed-off-by: LIU Zhiwei ---   target/riscv/cpu.c   |  1 +   target/riscv/cpu.h   |  4   t

Re: [PATCH v2 12/14] target/riscv: Split out the vill from vtype

2021-11-10 Thread LIU Zhiwei
On 2021/11/10 下午7:23, Richard Henderson wrote: On 11/10/21 8:04 AM, LIU Zhiwei wrote: We need not specially process vtype when XLEN changes. Signed-off-by: LIU Zhiwei ---   target/riscv/cpu.h   |  1 +   target/riscv/csr.c   | 15 ++-   target/riscv/machine.c   |

Re: [PULL 1/2] hw: m68k: virt: Add compat machine for 6.1

2021-11-10 Thread Peter Maydell
On Tue, 9 Nov 2021 at 23:33, BALATON Zoltan wrote: > > On Tue, 9 Nov 2021, Peter Maydell wrote: > > On Tue, 9 Nov 2021 at 20:01, BALATON Zoltan wrote: > >> But maybe it's too late to change at this point. > > > > Massively too late. We've been using this versioned-machine > > scheme for over a de

Re: qemu-img.c possibly overflowing shifts by BDRV_SECTOR_BITS

2021-11-10 Thread Peter Maydell
On Wed, 10 Nov 2021 at 11:36, Kevin Wolf wrote: > > Am 09.11.2021 um 20:07 hat Peter Maydell geschrieben: > > Hi; Coverity is complaining about some of the places in qemu-img.c > > where it takes a 32-bit variable and shifts it left by BDRV_SECTOR_BITS > > to convert a sector count to a byte count

Re: [PULL 1/2] hw: m68k: virt: Add compat machine for 6.1

2021-11-10 Thread Daniel P . Berrangé
On Tue, Nov 09, 2021 at 08:58:58PM +0100, BALATON Zoltan wrote: > On Tue, 9 Nov 2021, Daniel P. Berrangé wrote: > > On Tue, Nov 09, 2021 at 01:34:49PM +0100, BALATON Zoltan wrote: > > > On Tue, 9 Nov 2021, Laurent Vivier wrote: > > > > Add the missing machine type for m68k/virt > > > > > > > > Cc:

Re: [PATCH v2 14/14] target/riscv: Enable uxl field write

2021-11-10 Thread LIU Zhiwei
On 2021/11/10 下午7:27, Richard Henderson wrote: On 11/10/21 8:04 AM, LIU Zhiwei wrote: Signed-off-by: LIU Zhiwei ---   target/riscv/csr.c  | 5 ++---   target/riscv/insn_trans/trans_rvi.c.inc | 4 ++--   target/riscv/op_helper.c    | 3 ++-   3 files changed, 6 ins

Re: [PATCH v2 05/14] target/riscv: Calculate address according to XLEN

2021-11-10 Thread Richard Henderson
On 11/10/21 2:44 PM, LIU Zhiwei wrote: I suspect the extend should come before the pointer mask and not after, but this is is a weakness in the current RVJ spec that it does not specify how the extension interacts with UXL.  (The reverse ordering would allow a 64-bit os to place a 32-bit applica

Re: [PATCH v2 10/14] target/riscv: Adjust vector address with mask

2021-11-10 Thread Richard Henderson
On 11/10/21 3:08 PM, LIU Zhiwei wrote: You'll want to update the translator to use these new fields instead of using the [msu]pmmask / [msu]pmbase fields directly. (Which means that we will have fewer tcg variables, and need not copy the "current" into DisasContext.) Do you mean we can remove

[PATCH v3 1/3] docs: rSTify the "TrivialPatches" wiki

2021-11-10 Thread Kashyap Chamarthy
The original wiki is here[1]. I converted by copying the wiki source into a .wiki file and convert to rST using `pandoc`: $ pandoc -f Mediawiki -t rst trivial-patches.wiki -o trivial-patches.rst Update the active maintainer names (and drop Michael Tokarev's inactive repo) to reflect curr

[PATCH v3 0/3] rSTify contribution-related wiki pages

2021-11-10 Thread Kashyap Chamarthy
My main motivation was to convert SubmitAPatch[1] based on a chat with Peter Maydell and Dan Berrangé on #qemu channel (on OFTC). But the page also links to a couple of other contribution-related pages, so I converted them too: - SubmitAPullRequest: https://wiki.qemu.org/Contribute/SubmitAPullR

[PATCH v3 2/3] docs: rSTify the "SubmitAPullRequest" wiki

2021-11-10 Thread Kashyap Chamarthy
The original wiki is here[1]. I converted by copying the wiki source into a .wiki file and convert to rST using `pandoc`: $ pandoc -f Mediawiki -t rst submitting-a-pull-request.wiki \ -o submitting-a-pull-request.rst This is a 1-1 conversion; no content changes. [1] https://wiki.qem

[PATCH v3 3/3] docs: rSTify the "SubmitAPatch" wiki

2021-11-10 Thread Kashyap Chamarthy
- The original wiki is here[1]. I copied the wiki source[2] into a .wiki file, and used `pandoc` to convert it to rST: $> pandoc -f Mediawiki -t rst submitting-a-patch.wiki -o submitting-a-patch.rst - The only minor touch-ups I did was to fix URLs. But 99%, it is a 1-1 conversion.

Re: [PATCH v2 12/14] target/riscv: Split out the vill from vtype

2021-11-10 Thread Richard Henderson
On 11/10/21 3:26 PM, LIU Zhiwei wrote: One question here. Even come before patch 6, we don't have a simple way to choose vill and reserved fields from s2 register in patch 6. You can certainly split out vill before you create a new way to select it based on xlen. In fact, you *should* do that

Re: [PATCH v2 14/14] target/riscv: Enable uxl field write

2021-11-10 Thread Richard Henderson
On 11/10/21 3:38 PM, LIU Zhiwei wrote: Why do you not allow writes to SXL? That means we still don't support the change of SXLEN. I didn't check the S-mode CSRs behavior when XLEN changes in this patch set. For example, the behavior of satp when trap into M-mode from S-mode if SXLEN=32 and MX

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Hanna Reitz
On 10.11.21 13:46, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents.  We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Stefan Hajnoczi
On Wed, Nov 10, 2021 at 02:14:43PM +0100, Christian Schoenebeck wrote: > On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > As you are apparently reluctant for changing the virtio specs, what about > introducing those discussed virtio capabalities either as experimental ones > w

Re: [PATCH 2/7] block: Manipulate children list in .attach/.detach

2021-11-10 Thread Hanna Reitz
On 10.11.21 13:51, Vladimir Sementsov-Ogievskiy wrote: 04.11.2021 13:38, Hanna Reitz wrote: The children list is specific to BDS parents.  We should not modify it in the general children modification code, but let BDS parents deal with it in their .attach() and .detach() methods. This also has

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Richard Henderson
On 11/10/21 10:25 AM, Richard Henderson wrote: On 11/8/21 8:42 PM, Khem Raj wrote: uint64_t is available in all userspaces via compiler include stdint.h therefore use it instead of __u64 which is linux internal type, it fixes build on some platforms eg. aarch64 systems using musl C library Sign

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Richard Henderson
On 11/10/21 4:12 PM, Richard Henderson wrote: On 11/10/21 10:25 AM, Richard Henderson wrote: On 11/8/21 8:42 PM, Khem Raj wrote: uint64_t is available in all userspaces via compiler include stdint.h therefore use it instead of __u64 which is linux internal type, it fixes build on some platforms

Re: [PATCH 4/5] hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

2021-11-10 Thread Julia Suvorova
On Wed, Nov 10, 2021 at 2:58 PM Igor Mammedov wrote: > > On Wed, 10 Nov 2021 02:21:34 -0500 > "Michael S. Tsirkin" wrote: > > > On Wed, Nov 10, 2021 at 06:30:13AM +0100, Julia Suvorova wrote: > > > There are two ways to enable ACPI PCI Hot-plug: > > > > > > * Disable the Hot-plug Capable

Re: [PATCH v3 0/3] rSTify contribution-related wiki pages

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/10/21 15:48, Kashyap Chamarthy wrote: > My main motivation was to convert SubmitAPatch[1] based on a chat with > Peter Maydell and Dan Berrangé on #qemu channel (on OFTC). But the page > also links to a couple of other contribution-related pages, so I > converted them too: > > - SubmitAPu

Re: Poking around bdrv_is_inserted()

2021-11-10 Thread Kevin Wolf
Am 09.11.2021 um 16:20 hat Markus Armbruster geschrieben: > Kevin Wolf writes: > > > Am 09.11.2021 um 07:44 hat Markus Armbruster geschrieben: > >> Screwed up qemu-devel@nongnu.org, sorry for the inconvenience. > >> > >> Markus Armbruster writes: > >> > >> > bdrv_is_inserted() returns false wh

Re: [PATCH 4/5] hw/i386/acpi-build: Deny control on PCIe Native Hot-plug in _OSC

2021-11-10 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 04:25:40PM +0100, Julia Suvorova wrote: > On Wed, Nov 10, 2021 at 2:58 PM Igor Mammedov wrote: > > > > On Wed, 10 Nov 2021 02:21:34 -0500 > > "Michael S. Tsirkin" wrote: > > > > > On Wed, Nov 10, 2021 at 06:30:13AM +0100, Julia Suvorova wrote: > > > > There are two ways to

Re: [RFC 1/4] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/8/21 03:37, Warner Losh wrote: > Add a new function host_signal_set_pc to set the next pc in an > mcontext. The caller should ensure this is a valid PC for execution. > > Signed-off-by: Warner Losh > --- > linux-user/host/aarch64/host-signal.h | 5 + > linux-user/host/alpha/host-signal

Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-10 Thread Philippe Mathieu-Daudé
On 11/8/21 03:37, Warner Losh wrote: > All instances of rewind_if_in_safe_syscall are the same, differing only > in how the instruction point is fetched from the ucontext and the size > of the registers. Use host_signal_pc and new host_signal_set_pc > interfaces to fetch the pointer to the PC and a

Re: [PATCH 1/5] hw/pci/pcie_port: Rename 'native-hotplug' to 'native-hpc-bit'

2021-11-10 Thread Michael S. Tsirkin
On Wed, Nov 10, 2021 at 02:30:27PM +0100, Igor Mammedov wrote: > On Wed, 10 Nov 2021 09:08:34 + > Daniel P. Berrangé wrote: > > > On Wed, Nov 10, 2021 at 01:04:54AM -0500, Michael S. Tsirkin wrote: > > > On Wed, Nov 10, 2021 at 06:30:10AM +0100, Julia Suvorova wrote: > > > > Rename the opti

Re: [PATCH v2 0/3] virtio: increase VIRTQUEUE_MAX_SIZE to 32k

2021-11-10 Thread Christian Schoenebeck
On Mittwoch, 10. November 2021 16:14:19 CET Stefan Hajnoczi wrote: > On Wed, Nov 10, 2021 at 02:14:43PM +0100, Christian Schoenebeck wrote: > > On Mittwoch, 10. November 2021 11:05:50 CET Stefan Hajnoczi wrote: > > As you are apparently reluctant for changing the virtio specs, what about > > introd

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Warner Losh
On Wed, Nov 10, 2021 at 8:19 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 11/10/21 4:12 PM, Richard Henderson wrote: > > On 11/10/21 10:25 AM, Richard Henderson wrote: > >> On 11/8/21 8:42 PM, Khem Raj wrote: > >>> uint64_t is available in all userspaces via compiler include st

Re: [PATCH v3 0/5] SGX NUMA support plus vepc reset

2021-11-10 Thread Paolo Bonzini
On 11/10/21 13:56, Yang Zhong wrote: Paolo, thanks! No other maintainers to review numa patches, so i will send the numa patches again? thanks! The patch look good, but they were sent too close to the 6.2 release freeze. I'll take a look at them again a month. Paolo

Re: [PATCH 1/3] qdict: make available dump_qobject(), dump_qdict(), dump_qlist()

2021-11-10 Thread Markus Armbruster
Laurent Vivier writes: > move them from block/qapi.c to qobject/qdict.c, qobject/qlist.c, > qobject/qobject.c > > This is useful to debug qobjects > > Signed-off-by: Laurent Vivier I think qobject_to_json_pretty() is better suited to debugging, because it preserves differences like the one betw

Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-10 Thread Warner Losh
On Mon, Nov 8, 2021 at 9:39 AM Warner Losh wrote: > > > On Mon, Nov 8, 2021 at 8:07 AM Richard Henderson < > richard.hender...@linaro.org> wrote: > >> On 11/8/21 3:37 AM, Warner Losh wrote: >> > All instances of rewind_if_in_safe_syscall are the same, differing only >> > in how the instruction po

Re: [Ping][PATCH v0] vl: flush all task from rcu queue before exiting

2021-11-10 Thread Paolo Bonzini
On 11/10/21 14:29, Denis Plotnikov wrote: On 09.11.2021 20:46, Paolo Bonzini wrote: On 11/9/21 08:23, Denis Plotnikov wrote: Ping ping! Looks good, but can you explain why it's okay to call it before qemu_chr_cleanup() and user_creatable_cleanup()? I think a better solution to the orderin

[RFC v2 4/6] common-user: Adjust system call return on FreeBSD

2021-11-10 Thread Warner Losh
All the *-users generally use the Linux style of negative return codes for errno. FreeBSD returns errno, not -errno. Add ifdefs for FreeBSD to make the adjustment on the 4 hosts that we have support for. Signed-off-by: Warner Losh --- common-user/host/aarch64/safe-syscall.inc.S | 5 + common

Re: [RFC 2/4] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-10 Thread Richard Henderson
On 11/10/21 5:20 PM, Warner Losh wrote: Although I think we can fairly safely drop HAVE_SAFE_SYSCALL.  It is required for proper operation.  As with host-signal.h, really. Yes. The only possible use I can see for it is to allow people to bring up new platforms m

Re: [PATCH] linux-user: Replace __u64 with uint64_t

2021-11-10 Thread Khem Raj
On Wed, Nov 10, 2021 at 8:03 AM Warner Losh wrote: > > > > On Wed, Nov 10, 2021 at 8:19 AM Richard Henderson > wrote: >> >> On 11/10/21 4:12 PM, Richard Henderson wrote: >> > On 11/10/21 10:25 AM, Richard Henderson wrote: >> >> On 11/8/21 8:42 PM, Khem Raj wrote: >> >>> uint64_t is available in

[RFC v2 1/6] linux-user: Add host_signal_set_pc to set pc in mcontext

2021-11-10 Thread Warner Losh
Add a new function host_signal_set_pc to set the next pc in an mcontext. The caller should ensure this is a valid PC for execution. Signed-off-by: Warner Losh Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson --- linux-user/host/aarch64/host-signal.h | 5 + linux-user/host

[RFC v2 3/6] linux-user/safe-syscall.inc.S: Move to common-user

2021-11-10 Thread Warner Losh
Move all the safe_syscall.inc.S files to common-user. They are almost identical between linux-user and bsd-user to re-use. Signed-off-by: Warner Losh --- {linux-user => common-user}/host/aarch64/safe-syscall.inc.S | 0 {linux-user => common-user}/host/arm/safe-syscall.inc.S | 0 {linux-user

[RFC v2 6/6] *-user: move safe-syscall.* to common-user

2021-11-10 Thread Warner Losh
Move linux-user/safe-syscall.S to common-user/common-safe-syscall.S and replace it with a #include "common-safe-syscall.S" so that bsd-user can also use it. Also move safe-syscall.h so that it can define a few more externs. Signed-off-by: Warner Losh --- common-user/common-safe-syscall.S

[RFC v2 0/6] linux-user: simplify safe signal handling

2021-11-10 Thread Warner Losh
This is a quick RFC to see if something like this is worth doing. I've created a new interface host_signal_set_pc. This allows us to move all the nearly identical copies of rewind_if_in_safe_syscall into signal.c. This reduces the amount of code that needs to be rewritten for bsd-user's adaptatio

[RFC v2 5/6] common-user/host/mips: create, though mips hosts likely don't work reliably

2021-11-10 Thread Warner Losh
Signed-off-by: Warner Losh --- common-user/host/mips/safe-syscall.inc.S | 1 + 1 file changed, 1 insertion(+) create mode 100644 common-user/host/mips/safe-syscall.inc.S diff --git a/common-user/host/mips/safe-syscall.inc.S b/common-user/host/mips/safe-syscall.inc.S new file mode 100644 index

[RFC v2 2/6] linux-user/signal.c: Create a common rewind_if_in_safe_syscall

2021-11-10 Thread Warner Losh
All instances of rewind_if_in_safe_syscall are the same, differing only in how the instruction point is fetched from the ucontext and the size of the registers. Use host_signal_pc and new host_signal_set_pc interfaces to fetch the pointer to the PC and adjust if needed. Delete all the old copies of

<    1   2   3   >