Re: [PATCH] pc: q35: Bump max_cpus to 512

2022-05-18 Thread Suravee Suthikulpanit
On 5/13/22 6:23 PM, Michael S. Tsirkin wrote: On Mon, May 09, 2022 at 09:12:49AM +0200, Igor Mammedov wrote: On Wed, 4 May 2022 08:16:39 -0500 Suravee Suthikulpanit wrote: This is the maximum number of vCPU supported by the AMD x2APIC virtualization. Signed-off-by: Suravee Suthikulpanit -

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-18 Thread Thomas Huth
On 18/05/2022 17.41, Eric Blake wrote: On Wed, May 18, 2022 at 03:44:45PM +0200, Thomas Huth wrote: The "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat flawed into the QAPI schema. Since the flaws are gone

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-18 Thread Thomas Huth
On 18/05/2022 17.08, Markus Armbruster wrote: Thomas Huth writes: The "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat flawed into the QAPI schema. Since the flaws are gone now, it's time to QAPIfy. This

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

2022-05-18 Thread Jonah Palmer
On 5/16/22 16:26, Michael S. Tsirkin wrote: On Fri, Apr 01, 2022 at 09:23:22AM -0400, Jonah Palmer wrote: From: Laurent Vivier Display feature names instead of bitmaps for host, guest, and backend for VirtIODevices. Display status names instead of bitmaps for VirtIODevices. Display feature n

Re: [PULL 0/8] Misc patches (Gitlab-CI, qtest, Capstone, ...)

2022-05-18 Thread Thomas Huth
On 18/05/2022 18.12, Richard Henderson wrote: On 5/18/22 02:04, Thomas Huth wrote:   Hi Richard! The following changes since commit eec398119fc6911d99412c37af06a6bc27871f85:    Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2022-05-16 16:31:01 -0700)

RE: [PATCH] whpx: Added support for saving/restoring VM state

2022-05-18 Thread Ivan Shcherbakov
Hi Paolo, Thanks for pointing out the relevant fields of the XSAVE state - it explains what is going on. I did some quick experiments with modifying the buffer manually, so: * Hyper-V doesn't care about the value of MXCSR_MASK. Both 0x and 0x work. * Setting XCOMP_BV to 0 does trigger t

[PATCH v24 8/8] tests: Add dirty page rate limit test

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Add dirty page rate limit test if kernel support dirty ring. The following qmp commands are covered by this test case: "calc-dirty-rate", "query-dirty-rate", "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit" and "query-vcpu-dirty-limit". Signed-off-by: Hyman Huang(黄勇) Ack

[PATCH v24 7/8] softmmu/dirtylimit: Implement dirty page rate limit

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query d

[PATCH v24 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is in service. Signed-off-by: Hyman Huang(黄勇) Revie

[PATCH v24 5/8] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu --- accel/kvm/kvm-all.c| 5 + accel/stubs/kvm-stub.c | 6 ++ include/sysemu/kvm.h | 2 ++ 3 files changed, 13 insertions(+)

[PATCH v24 4/8] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util functions

[PATCH v24 3/8] migration/dirtyrate: Refactor dirty page rate calculation

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) abstract out dirty log change logic into function global_dirty_log_change. abstract out dirty page rate calculation logic via dirty-ring into function vcpu_calculate_dirtyrate. abstract out mathematical dirty page rate calculation into do_calculate_dirtyrate, decouple it f

[PATCH v24 2/8] cpus: Introduce cpu_list_generation_id

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Introduce cpu_list_generation_id to track cpu list generation so that cpu hotplug/unplug can be detected during measurement of dirty page rate. cpu_list_generation_id could be used to detect changes of cpu list, which is prepared for dirty page rate measurement. Signed-off

[PATCH v24 1/8] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so that it can cover single vcpu dirty-ring-reaping scenario. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Peter Xu --- accel/kvm/kvm-all.c | 23 +-- 1 file changed, 13 insertions(+), 10 del

[PATCH v24 0/8] support dirty restraint on vCPU

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) v24: - add "Acked-by: Peter Xu " tag in (PATCH [8/8]) v23: This is v23 of dirtylimit series. Since v22 posted abount 1 month ago, i did some modifications to make sure it's ready to be queued: - rebased the master and changed the qapi version tag from 7.0 to 7.1 - do not

[PATCH v23 7/8] softmmu/dirtylimit: Implement dirty page rate limit

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Implement dirtyrate calculation periodically basing on dirty-ring and throttle virtual CPU until it reachs the quota dirty page rate given by user. Introduce qmp commands "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit", "query-vcpu-dirty-limit" to enable, disable, query d

[PATCH v23 3/8] migration/dirtyrate: Refactor dirty page rate calculation

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) abstract out dirty log change logic into function global_dirty_log_change. abstract out dirty page rate calculation logic via dirty-ring into function vcpu_calculate_dirtyrate. abstract out mathematical dirty page rate calculation into do_calculate_dirtyrate, decouple it f

Re: [PATCH v23 0/8] support dirty restraint on vCPU

2022-05-18 Thread Hyman Huang
sent by accident, please ignore, i'll resend when series is ready. 在 2022/5/19 11:25, huang...@chinatelecom.cn 写道: From: Hyman Huang(黄勇) This is v23 of dirtylimit series. Since v22 posted abount 1 month ago, i did some modifications to make sure it's ready to be queued: - rebased the master a

[PATCH v23 2/8] cpus: Introduce cpu_list_generation_id

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Introduce cpu_list_generation_id to track cpu list generation so that cpu hotplug/unplug can be detected during measurement of dirty page rate. cpu_list_generation_id could be used to detect changes of cpu list, which is prepared for dirty page rate measurement. Signed-off

[PATCH v23 5/8] accel/kvm/kvm-all: Introduce kvm_dirty_ring_size function

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Introduce kvm_dirty_ring_size util function to help calculate dirty ring ful time. Signed-off-by: Hyman Huang(黄勇) Acked-by: Peter Xu --- accel/kvm/kvm-all.c| 5 + accel/stubs/kvm-stub.c | 6 ++ include/sysemu/kvm.h | 2 ++ 3 files changed, 13 insertions(+)

[PATCH v23 8/8] tests: Add dirty page rate limit test

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Add dirty page rate limit test if kernel support dirty ring, create a standalone file to implement the test case. The following qmp commands are covered by this test case: "calc-dirty-rate", "query-dirty-rate", "set-vcpu-dirty-limit", "cancel-vcpu-dirty-limit" and "query-vc

[PATCH v23 1/8] accel/kvm/kvm-all: Refactor per-vcpu dirty ring reaping

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Add a non-required argument 'CPUState' to kvm_dirty_ring_reap so that it can cover single vcpu dirty-ring-reaping scenario. Signed-off-by: Hyman Huang(黄勇) Reviewed-by: Peter Xu --- accel/kvm/kvm-all.c | 23 +-- 1 file changed, 13 insertions(+), 10 del

[PATCH v23 6/8] softmmu/dirtylimit: Implement virtual CPU throttle

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Setup a negative feedback system when vCPU thread handling KVM_EXIT_DIRTY_RING_FULL exit by introducing throttle_us_per_full field in struct CPUState. Sleep throttle_us_per_full microseconds to throttle vCPU if dirtylimit is in service. Signed-off-by: Hyman Huang(黄勇) Revie

[PATCH v23 4/8] softmmu/dirtylimit: Implement vCPU dirtyrate calculation periodically

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) Introduce the third method GLOBAL_DIRTY_LIMIT of dirty tracking for calculate dirtyrate periodly for dirty page rate limit. Add dirtylimit.c to implement dirtyrate calculation periodly, which will be used for dirty page rate limit. Add dirtylimit.h to export util functions

[PATCH v23 0/8] support dirty restraint on vCPU

2022-05-18 Thread huangy81
From: Hyman Huang(黄勇) This is v23 of dirtylimit series. Since v22 posted abount 1 month ago, i did some modifications to make sure it's ready to be queued: - rebased the master and changed the qapi version tag from 7.0 to 7.1 - do not set error if when query_vcpu_dirty_limit find dirtylimit not

Re: [RFC 1/6] qapi/migration: Introduce vcpu-dirtylimit-period parameters

2022-05-18 Thread Hyman Huang
在 2022/5/18 23:05, Eric Blake 写道: On Tue, May 17, 2022 at 02:35:01PM +0800, huang...@chinatelecom.cn wrote: From: Hyman Huang(黄勇) Introduce "vcpu-dirtylimit-period" migration parameters, which is used to makes dirtyrate calculation period make configurable. To implement that, refactor

Re: [PATCH v4 34/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-05-18 Thread yangxiaojuan
Hi Richard On 2022/5/19 上午2:04, Richard Henderson wrote: +    uint64_t sw_isr[LOONGARCH_MAX_VCPUS][LS3A_INTC_IP][EXTIOI_IRQS / 64]; This has not been declared with DECLARE_BITMAP, therefore you will see a compile-time error when building on an ILP32 (i686) or P64 (win64) host. I pointed

Re: [PATCH V2 1/4] softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH

2022-05-18 Thread Jason Wang
On Wed, May 18, 2022 at 9:09 PM Dr. David Alan Gilbert wrote: > > * Jason Wang (jasow...@redhat.com) wrote: > > On Sat, May 7, 2022 at 10:03 AM Zhang, Chen wrote: > > > > > > > > > > > > > -Original Message- > > > > From: Zhang, Chen > > > > Sent: Wednesday, April 27, 2022 5:26 PM > > > >

Re: [PULL 07/11] sysemu: tpm: Add a stub function for TPM_IS_CRB

2022-05-18 Thread Stefan Berger
On 5/18/22 21:17, Alex Williamson wrote: On Wed, 18 May 2022 20:46:02 -0400 Stefan Berger wrote: On 5/6/22 16:48, Alex Williamson wrote: From: Eric Auger In a subsequent patch, VFIO will need to recognize if a memory region owner is a TPM CRB device. Hence VFIO needs to use TPM_IS_CRB()

Re: [PULL 07/11] sysemu: tpm: Add a stub function for TPM_IS_CRB

2022-05-18 Thread Alex Williamson
On Wed, 18 May 2022 20:46:02 -0400 Stefan Berger wrote: > On 5/6/22 16:48, Alex Williamson wrote: > > From: Eric Auger > > > > In a subsequent patch, VFIO will need to recognize if > > a memory region owner is a TPM CRB device. Hence VFIO > > needs to use TPM_IS_CRB() even if CONFIG_TPM is unse

Re: [PULL 07/11] sysemu: tpm: Add a stub function for TPM_IS_CRB

2022-05-18 Thread Stefan Berger
On 5/6/22 16:48, Alex Williamson wrote: From: Eric Auger In a subsequent patch, VFIO will need to recognize if a memory region owner is a TPM CRB device. Hence VFIO needs to use TPM_IS_CRB() even if CONFIG_TPM is unset. So let's add a stub function. Signed-off-by: Eric Auger Suggested-by:

RE: [PATCH] target/arm: Make number of counters in PMCR follow the CPU

2022-05-18 Thread ishii.shuuic...@fujitsu.com
> Thanks for looking up the a64fx register value. You don't need to > do anything more -- I'll fix up the TODO comment and put the right > value into this patch, either when I post a v2 of it or else when > I apply it to target-arm.next. I understand. Thank you in advance. Shuuichirou. > -Or

Re: [PATCH 1/2] target/m68k: Clear mach in m68k_cpu_disas_set_info

2022-05-18 Thread Laurent Vivier
Le 30/04/2022 à 19:02, Richard Henderson a écrit : Zero selects all cpu features in disas/m68k.c, which is really what we want -- not limited to 68040. Signed-off-by: Richard Henderson --- target/m68k/cpu.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/target/m68k/

Re: [PULL 0/7] Artist cursor fix final patches

2022-05-18 Thread Richard Henderson
On 5/18/22 09:17, Helge Deller wrote: The following changes since commit 178bacb66d98d9ee7a702b9f2a4dfcd88b72a9ab: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-05-09 11:07:04 -0700) are available in the Git repository at: https://github.com/hdell

Re: [PATCH v4 39/43] hw/loongarch: Add LoongArch load elf function.

2022-05-18 Thread Richard Henderson
On 5/17/22 04:30, Xiaojuan Yang wrote: @@ -26,6 +31,10 @@ struct LoongArchMachineState { MemoryRegion lowmem; MemoryRegion highmem; MemoryRegion isa_io; +MemoryRegion bios; This is unused. Otherwise, Reviewed-by: Richard Henderson r~

Re: [PATCH v4 38/43] hw/loongarch: Add LoongArch ls7a rtc device support

2022-05-18 Thread Richard Henderson
On 5/17/22 04:30, Xiaojuan Yang wrote: This patch add ls7a rtc device support. Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- MAINTAINERS| 1 + hw/loongarch/Kconfig | 1 + hw/loongarch/loongson3.c | 4 + hw/rtc/Kconfig | 3 + hw/rtc/l

Re: The fate of iotest 297

2022-05-18 Thread John Snow
On Wed, May 18, 2022, 12:37 PM Kevin Wolf wrote: > Am 18.05.2022 um 01:28 hat John Snow geschrieben: > > Hi Kevin, > > > > I remember that you wanted some minimum Niceness threshold in order to > > agree to me removing iotest 297. > > > > I've already moved it onto GitLab CI in the form of the >

Re: [PATCH v4 34/43] hw/intc: Add LoongArch extioi interrupt controller(EIOINTC)

2022-05-18 Thread Richard Henderson
On 5/17/22 04:30, Xiaojuan Yang wrote: +static void extioi_update_irq(LoongArchExtIOI *s, int irq_num, int level) +{ +int ipnum, cpu, found, irq_index, irq_mask; + +ipnum = get_ipmap(s, irq_num); +cpu = get_coremap(s, irq_num); +irq_index = irq_num / 32; +irq_mask = 1 << (irq_

Re: [PATCH v4 25/43] target/loongarch: Add LoongArch CSR instruction

2022-05-18 Thread Richard Henderson
On 5/17/22 04:30, Xiaojuan Yang wrote: This includes: - CSRRD - CSRWR - CSRXCHG Signed-off-by: Xiaojuan Yang Signed-off-by: Song Gao --- target/loongarch/csr_helper.c | 87 ++ target/loongarch/disas.c | 101 +++ target/loongarch/helper.h

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-18 Thread Jason Gunthorpe
On Tue, May 17, 2022 at 09:46:56PM -0600, Alex Williamson wrote: > The current solution is obviously non-optimal, it was mainly > meant for backwards compatibility, but this seems like a fail faster > solution, with less useless work, but also providing less indication > how to configure the migra

Re: [PATCH] hw/tpm/tpm_tis_common.c: Assert that locty is in range

2022-05-18 Thread Peter Maydell
On Wed, 18 May 2022 at 14:46, Stefan Berger wrote: > > > > On 5/13/22 12:38, Peter Maydell wrote: > > In tpm_tis_mmio_read(), tpm_tis_mmio_write() and > > tpm_tis_dump_state(), we calculate a locality index with > > tpm_tis_locality_from_addr() and then use it as an index into the > > s->loc[] arr

Re: The fate of iotest 297

2022-05-18 Thread Kevin Wolf
Am 18.05.2022 um 01:28 hat John Snow geschrieben: > Hi Kevin, > > I remember that you wanted some minimum Niceness threshold in order to > agree to me removing iotest 297. > > I've already moved it onto GitLab CI in the form of the > check-python-pipenv job, but I recall you wanted to be able to

Re: [PATCH 28/35] acpi: pvpanic-isa: use AcpiDevAmlIfClass:build_dev_aml to provide device's AML

2022-05-18 Thread Michael S. Tsirkin
On Tue, May 17, 2022 at 10:13:51AM +0200, Gerd Hoffmann wrote: > That problem isn't new and we already have a bunch of aml_* stubs > because of that. I expect it'll work just fine, at worst we'll > have to add a stub or two in case some calls are not covered yet. Right but adding these stubs is a

[PULL 4/7] artist: Fix vertical X11 cursor position in HP-UX

2022-05-18 Thread Helge Deller
Drop the hard-coded value of 1146 lines which seems to work with HP-UX 11, but not with HP-UX 10. Instead encode the screen height in byte 0 of active_lines_low and byte 3 of misc_video as it's expected by the Xorg X11 graphics driver. This potentially allows for higher vertical screen resolutions

[PULL 0/7] Artist cursor fix final patches

2022-05-18 Thread Helge Deller
The following changes since commit 178bacb66d98d9ee7a702b9f2a4dfcd88b72a9ab: Merge tag 'block-pull-request' of https://gitlab.com/stefanha/qemu into staging (2022-05-09 11:07:04 -0700) are available in the Git repository at: https://github.com/hdeller/qemu-hppa.git tags/artist-cursor-fix-f

[PULL 2/7] artist: Introduce constant for max cursor size

2022-05-18 Thread Helge Deller
Add the constant NGLE_MAX_SPRITE_SIZE which defines the currently maximum supported cursor size. Signed-off-by: Helge Deller Acked-by: Mark Cave-Ayland --- hw/display/artist.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/hw/display/artist.c b/hw/display/artist.

[PULL 7/7] artist: Fix X cursor position calculation in X11

2022-05-18 Thread Helge Deller
The X cursor postion can be calculated based on the backporch and interleave values. In the emulation we ignore the HP-UX settings for backporch and use instead twice the size of the emulated cursor. With those changes the X-position of the graphics cursor is now finally working correctly on HP-U

[PULL 6/7] artist: Emulate screen blanking

2022-05-18 Thread Helge Deller
The misc_video and misc_ctrl registers control the visibility of the screen. Start with the screen turned on, and hide or show the screen based on the control registers. Signed-off-by: Helge Deller Acked-by: Mark Cave-Ayland --- hw/display/artist.c | 30 ++ 1 file ch

[PULL 3/7] artist: Use human-readable variable names instead of reg_xxx

2022-05-18 Thread Helge Deller
Convert the variable names of some registers to human-readable and understandable names. Signed-off-by: Helge Deller Acked-by: Mark Cave-Ayland --- hw/display/artist.c | 72 ++--- 1 file changed, 49 insertions(+), 23 deletions(-) diff --git a/hw/display/

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Jason Gunthorpe
On Wed, May 18, 2022 at 05:00:26PM +0100, Daniel P. Berrangé wrote: > On Wed, May 18, 2022 at 12:42:37PM -0300, Jason Gunthorpe wrote: > > On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote: > > > > > >> Is there a really performance difference to just use: > > > >> > > > >> uint8_t buf

[PULL 5/7] artist: Allow to turn cursor on or off

2022-05-18 Thread Helge Deller
Bit 0x80 in the cursor_cntrl register specifies if the cursor should be visible. Prevent rendering the cursor if it's invisible. Signed-off-by: Helge Deller Acked-by: Mark Cave-Ayland --- hw/display/artist.c | 14 ++ 1 file changed, 14 insertions(+) diff --git a/hw/display/artist.c

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-18 Thread Kevin Wolf
Am 18.05.2022 um 14:43 hat Paolo Bonzini geschrieben: > On 5/18/22 14:28, Emanuele Giuseppe Esposito wrote: > > For example, all callers of bdrv_open() always take the AioContext lock. > > Often it is taken very high in the call stack, but it's always taken. > > I think it's actually not a problem

Re: [PULL 0/8] Misc patches (Gitlab-CI, qtest, Capstone, ...)

2022-05-18 Thread Richard Henderson
On 5/18/22 02:04, Thomas Huth wrote: Hi Richard! The following changes since commit eec398119fc6911d99412c37af06a6bc27871f85: Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2022-05-16 16:31:01 -0700) are available in the Git repository at: ht

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Daniel P . Berrangé
On Wed, May 18, 2022 at 12:42:37PM -0300, Jason Gunthorpe wrote: > On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote: > > > >> Is there a really performance difference to just use: > > >> > > >> uint8_t buffer[size]; > > >> > > >> qemu_get_buffer(f, buffer, size); > > >> write(fd, buff

Re: [PATCH 4/9] vfio/migration: Skip pre-copy if dirty page tracking is not supported

2022-05-18 Thread Jason Gunthorpe
On Wed, May 18, 2022 at 01:39:31PM +0200, Juan Quintela wrote: > > That does seem like a defect in this patch, any SLA constraints should > > still all be checked under the assumption all ram is dirty. > > And how are we going to: > - detect the network link speed > - to be sure that we are insid

Re: [PATCH 5/9] migration/qemu-file: Add qemu_file_get_to_fd()

2022-05-18 Thread Jason Gunthorpe
On Wed, May 18, 2022 at 01:54:34PM +0200, Juan Quintela wrote: > >> Is there a really performance difference to just use: > >> > >> uint8_t buffer[size]; > >> > >> qemu_get_buffer(f, buffer, size); > >> write(fd, buffer, size); > >> > >> Or telling it otherwise, what sizes are we talking here? > >

Re: [PATCH 0/3] hw/acpi/aml-build: Fix {socket, cluster, core} IDs in PPTT

2022-05-18 Thread Andrew Jones
On Wed, May 18, 2022 at 05:21:38PM +0800, Gavin Shan wrote: > The {socket, cluster, core} IDs detected from Linux guest aren't > matching with what have been provided in PPTT. The flag used for > 'ACPI Processor ID valid' is missed for {socket, cluster, core} > nodes. In this case, Linux guest take

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-18 Thread Eric Blake
On Wed, May 18, 2022 at 03:44:45PM +0200, Thomas Huth wrote: > The "-display sdl" option still uses a hand-crafted parser for its > parameters since we didn't want to drag an interface we considered > somewhat flawed into the QAPI schema. Since the flaws are gone now, > it's time to QAPIfy. > > Th

Re: [PATCH v4 0/3] block/dirty-bitmaps: fix and improve bitmap merge

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 02:12:03PM +0300, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > v4: > 01,03: add Kevin's r-b > 02: add hbitmap_free() on success patch if local_backup is not needed > > Vladimir Sementsov-Ogievskiy (3): > block: block_dirty_bitmap_merge():

Re: [PATCH v4 2/3] block: improve block_dirty_bitmap_merge(): don't allocate extra bitmap

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 02:12:05PM +0300, Vladimir Sementsov-Ogievskiy wrote: > From: Vladimir Sementsov-Ogievskiy > > We don't need extra bitmap. All we need is to backup the original > bitmap when we do first merge. So, drop extra temporary bitmap and work > directly with target and backup. >

Re: [RFC 4/6] migration: Introduce dirtylimit capability

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 02:35:04PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce migration dirtylimit capability, which can > be turned on before live migration and limit dirty > page rate durty live migration. s/durty/during/ ? > > Dirtylimit dirtylimit capabili

Re: [PATCH] hw/gpio/aspeed_gpio: Fix QOM pin property

2022-05-18 Thread Peter Delevoryas
> On May 18, 2022, at 12:31 AM, Rashmica Gupta wrote: > > On Mon, 2022-05-02 at 01:08 -0700, Peter Delevoryas wrote: >> I was setting gpioV4-7 to "1110" using the QOM pin property handler >> and >> noticed that lowering gpioV7 was inadvertently lowering gpioV4-6 too. >> >> (qemu) qom-set

Re: [PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-18 Thread Markus Armbruster
Thomas Huth writes: > The "-display sdl" option still uses a hand-crafted parser for its > parameters since we didn't want to drag an interface we considered > somewhat flawed into the QAPI schema. Since the flaws are gone now, > it's time to QAPIfy. > > This introduces the new "DisplaySDL" QAPI

Re: [RFC 2/6] qapi/migration: Introduce vcpu-dirtylimit parameters

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 02:35:02PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce "vcpu-dirtylimit" migration parameter used > to limit dirty page rate during live migration. > > "vcpu-dirtylimit" and "vcpu-dirtylimit-period" are > two dirtylimit-related migration p

Re: [RFC 1/6] qapi/migration: Introduce vcpu-dirtylimit-period parameters

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 02:35:01PM +0800, huang...@chinatelecom.cn wrote: > From: Hyman Huang(黄勇) > > Introduce "vcpu-dirtylimit-period" migration parameters, > which is used to makes dirtyrate calculation period make > configurable. > > To implement that, refactor vcpu_dirty_rate_stat_collect

Re: [PATCH v2 1/3] ui: Remove deprecated parameters of the "-display sdl" option

2022-05-18 Thread Markus Armbruster
Thomas Huth writes: > These parameters are in the way for further refactoring (since they > use an underscore in the name which is forbidden in QAPI), so let's > remove these now that their deprecation period is over. Forbidden, but there's an exception mechanism, so this reason isn't compelling

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 18, 2022 at 02:43:50PM +0200, Paolo Bonzini wrote: > On 5/18/22 14:28, Emanuele Giuseppe Esposito wrote: > > For example, all callers of bdrv_open() always take the AioContext lock. > > Often it is taken very high in the call stack, but it's always taken. > > I think it's actually not

Re: [PATCH v2 10/26] nbd: add missing coroutine_fn annotations

2022-05-18 Thread Eric Blake
On Mon, May 09, 2022 at 12:30:03PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/nbd.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/block/nbd.c b/block/nbd.c > index 6085ab1d2c..fe913a6db4 100644 > --- a/block/nbd.c > +++ b/block/

Re: [PATCH v2 09/26] iscsi: add missing coroutine_fn annotations

2022-05-18 Thread Eric Blake
On Mon, May 09, 2022 at 12:30:02PM +0200, Paolo Bonzini wrote: > Signed-off-by: Paolo Bonzini > --- > block/iscsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/block/iscsi.c b/block/iscsi.c > index d707d0b354..b33eeec794 100644 > --- a/block/iscsi.c > +++ b/block/isc

Re: [RFC PATCH v2 0/8] Removal of AioContext lock, bs->parents and ->children: new rwlock

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 18, 2022 at 02:28:41PM +0200, Emanuele Giuseppe Esposito wrote: > > > Am 17/05/2022 um 12:59 schrieb Stefan Hajnoczi: > > On Wed, May 04, 2022 at 02:39:05PM +0100, Stefan Hajnoczi wrote: > >> On Tue, Apr 26, 2022 at 04:51:06AM -0400, Emanuele Giuseppe Esposito wrote: > >>> This is a n

Re: [PATCH v2 00/11] scsi: add quirks and features to support m68k Macs

2022-05-18 Thread Mark Cave-Ayland
On 24/04/2022 17:49, Mark Cave-Ayland wrote: Here are the next set of patches from my ongoing work to allow the q800 machine to boot MacOS related to SCSI devices. The first patch implements a dummy FORMAT UNIT command which is used by the Apple HD SC Setup program when preparing an empty disk

Re: [PATCH] block: get rid of blk->guest_block_size

2022-05-18 Thread Durrant, Paul
On 18/05/2022 14:09, Stefan Hajnoczi wrote: Commit 1b7fd729559c ("block: rename buffer_alignment to guest_block_size") noted: At this point, the field is set by the device emulation, but completely ignored by the block layer. The last time the value of buffer_alignment/guest_block_size wa

Re: [PULL 0/8] Net patches

2022-05-18 Thread Richard Henderson
On 5/17/22 20:12, Jason Wang wrote: The following changes since commit eec398119fc6911d99412c37af06a6bc27871f85: Merge tag 'for_upstream' of git://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging (2022-05-16 16:31:01 -0700) are available in the git repository at: https://github.com

Re: QEMU cpu socket allocation

2022-05-18 Thread Peter Zay
Hi Rajesh, >So, is it a bug that Virt Manager uses more Sockets by default, when i choose “Copy host CPU Configuration” ? Bug, or feature. With a win10 client in a VM, Windows PC Health Check will complain that you do not have enough CPUs to upgrade to win11 if you have (Sockets,Cores,Threads) =

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Paolo Bonzini
On 5/18/22 15:31, Daniel P. Berrangé wrote: When picking defaults there is never a perfect answer, it is more a matter of the least-worst option. It is pretty clear that nthreads=1 is terrible for any large VMs. Defaulting it to nvcpus made conceptual sense as the user has implicit said that the

Re: [PATCH v6 09/13] migration: Enable TLS for preempt channel

2022-05-18 Thread Daniel P . Berrangé
On Tue, May 17, 2022 at 03:57:26PM -0400, Peter Xu wrote: > This patch is based on the async preempt channel creation. It continues > wiring up the new channel with TLS handshake to destionation when enabled. > > Note that only the src QEMU needs such operation; the dest QEMU does not > need any

Re: [PATCH 03/18] block: Change blk_{pread,pwrite}() param order

2022-05-18 Thread Eric Blake
On Tue, May 17, 2022 at 12:37:31PM +0100, Alberto Faria wrote: > Swap 'buf' and 'bytes' around for consistency with > blk_co_{pread,pwrite}(), and in preparation to implement these functions > using generated_co_wrapper. > > Callers were updated using this Coccinelle script: > > @@ expression

Re: [PATCH v5 8/8] libvduse: Add support for reconnecting

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:51PM +0800, Xie Yongji wrote: > @@ -291,6 +294,15 @@ static int vduse_blk_exp_create(BlockExport *exp, > BlockExportOptions *opts, > return -ENOMEM; > } > > +vblk_exp->recon_file = g_strdup_printf("%s/vduse-blk-%s", > +

Re: [PATCH v6 08/13] migration: Export tls-[creds|hostname|authz] params to cmdline too

2022-05-18 Thread Daniel P . Berrangé
On Tue, May 17, 2022 at 03:57:25PM -0400, Peter Xu wrote: > It's useful for specifying tls credentials all in the cmdline (along with > the -object tls-creds-*), especially for debugging purpose. > > The trick here is we must remember to not free these fields again in the > finalize() function of

Re: [PATCH 06/18] block: Implement blk_{pread, pwrite}() using generated_co_wrapper

2022-05-18 Thread Paolo Bonzini
On 5/18/22 15:34, Emanuele Giuseppe Esposito wrote: +/* For blk_bs() in generated block/block-gen.c */ +#include "sysemu/block-backend.h" +#include "block/block_int.h" #include "block/coroutines.h" #include "block/block-gen.h" #include "block/block_int.h"\ This second include of block_int

Re: [RFC 00/18] vfio: Adopt iommufd

2022-05-18 Thread Yi Liu
On 2022/5/18 15:22, zhangfei@foxmail.com wrote: On 2022/5/17 下午4:55, Yi Liu wrote: Hi Zhangfei, On 2022/5/12 17:01, zhangfei@foxmail.com wrote: Hi, Yi On 2022/5/11 下午10:17, zhangfei@foxmail.com wrote: On 2022/5/10 下午10:08, Yi Liu wrote: On 2022/5/10 20:45, Jason Gunthorpe w

Re: [PATCH v5 7/8] vduse-blk: Add vduse-blk resize support

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:50PM +0800, Xie Yongji wrote: > To support block resize, this uses vduse_dev_update_config() > to update the capacity field in configuration space and inject > config interrupt on the block resize callback. > > Signed-off-by: Xie Yongji > Reviewed-by: Stefan Hajnoczi

Re: TCG performance on PPC64

2022-05-18 Thread Daniel Henrique Barboza
I'm adding qemu-devel for extra visibility since you've also measure TCG performance of x86 and s390x guests in x86/M1 hosts as well. This is very interesting. Nice work collecting all this data. As for ppc64 performance I'll say that I am surprised that, in the end, the ppc64 TCG backend isn't

Re: [PATCH v5 6/8] vduse-blk: Implement vduse-blk export

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:49PM +0800, Xie Yongji wrote: > This implements a VDUSE block backends based on > the libvduse library. We can use it to export the BDSs > for both VM and container (host) usage. > > The new command-line syntax is: > > $ qemu-storage-daemon \ > --blockdev file,no

Re: [PATCH] hw/tpm/tpm_tis_common.c: Assert that locty is in range

2022-05-18 Thread Stefan Berger
On 5/13/22 12:38, Peter Maydell wrote: In tpm_tis_mmio_read(), tpm_tis_mmio_write() and tpm_tis_dump_state(), we calculate a locality index with tpm_tis_locality_from_addr() and then use it as an index into the s->loc[] array. In all these cases, the array index can't overflow because the Mem

Re: [PATCH v5 5/8] libvduse: Add VDUSE (vDPA Device in Userspace) library

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:48PM +0800, Xie Yongji wrote: > +static int vduse_queue_update_vring(VduseVirtq *vq, uint64_t desc_addr, > +uint64_t avail_addr, uint64_t used_addr) > +{ > +struct VduseDev *dev = vq->dev; > +uint64_t len; > + > +len = si

[PATCH v2 3/3] ui: Remove deprecated options "-sdl" and "-curses"

2022-05-18 Thread Thomas Huth
We have "-sdl" and "-curses", but no "-gtk" and no "-cocoa" ... these old-style options are rather confusing than helpful nowadays. Now that the deprecation period is over, let's remove them, so we get a cleaner interface (where "-display" is the only way to select the user interface). Reviewed-by

[PATCH v2 1/3] ui: Remove deprecated parameters of the "-display sdl" option

2022-05-18 Thread Thomas Huth
These parameters are in the way for further refactoring (since they use an underscore in the name which is forbidden in QAPI), so let's remove these now that their deprecation period is over. Reviewed-by: Daniel P. Berrangé Signed-off-by: Thomas Huth --- docs/about/deprecated.rst | 16 ---

[PATCH v2 0/3] ui: Remove deprecated sdl parameters and switch to QAPI parser

2022-05-18 Thread Thomas Huth
The "-display sdl" option still uses a hand-crafted parser for its parameters since some of them used underscores which is forbidden in QAPI. Now that they've been deprecated and the deprecation period is over, we can remove the problematic parameters and switch to use the QAPI parser instead. Whi

[PATCH v2 2/3] ui: Switch "-display sdl" to use the QAPI parser

2022-05-18 Thread Thomas Huth
The "-display sdl" option still uses a hand-crafted parser for its parameters since we didn't want to drag an interface we considered somewhat flawed into the QAPI schema. Since the flaws are gone now, it's time to QAPIfy. This introduces the new "DisplaySDL" QAPI struct that is used to hold the p

Re: [PATCH v22 3/7] net/vmnet: implement shared mode (vmnet-shared)

2022-05-18 Thread osy
On Thu, Mar 17, 2022 at 10:28 AM Vladislav Yaroshchuk wrote: > > Interaction with vmnet.framework in different modes > differs only on configuration stage, so we can create > common `send`, `receive`, etc. procedures and reuse them. > > Signed-off-by: Phillip Tennen > Signed-off-by: Vladislav Yar

Re: [PATCH 06/18] block: Implement blk_{pread, pwrite}() using generated_co_wrapper

2022-05-18 Thread Emanuele Giuseppe Esposito
Am 17/05/2022 um 16:22 schrieb Paolo Bonzini: > On 5/17/22 13:38, Alberto Faria wrote: >> We need to add include/sysemu/block-backend-io.h to the inputs of the >> block-gen.c target defined in block/meson.build. >> >> Signed-off-by: Alberto Faria > > Emanuele is looking it cleaning this up, so

Re: [PATCH] hostmem: default the amount of prealloc-threads to smp-cpus

2022-05-18 Thread Daniel P . Berrangé
On Wed, May 18, 2022 at 03:02:48PM +0200, Dario Faggioli wrote: > On Wed, 2022-05-18 at 12:17 +0200, Igor Mammedov wrote: > > On Tue, 17 May 2022 20:46:50 +0200 > > Paolo Bonzini wrote: > > > > diff --git a/backends/hostmem.c b/backends/hostmem.c > > > > index a7bae3d713..624bb7ecd3 100644 > > > >

Re: [PATCH v5 4/8] linux-headers: Add vduse.h

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:47PM +0800, Xie Yongji wrote: > This adds vduse header to linux headers so that the > relevant VDUSE API can be used in subsequent patches. > > Signed-off-by: Xie Yongji > --- > linux-headers/linux/vduse.h | 306 > scripts/update

Re: [PATCH v5 1/8] block: Support passing NULL ops to blk_set_dev_ops()

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:44PM +0800, Xie Yongji wrote: > This supports passing NULL ops to blk_set_dev_ops() > so that we can remove stale ops in some cases. > > Signed-off-by: Xie Yongji > --- > block/block-backend.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Ste

Re: [PATCH v5 2/8] block-backend: Introduce blk_get_guest_block_size()

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:45PM +0800, Xie Yongji wrote: > Support getting the guest block size for the block backend. > It's needed for the following commit. > > Signed-off-by: Xie Yongji > --- > block/block-backend.c | 6 ++ > include/sysemu/block-backend-io.h | 1 + > 2 fil

Re: [PATCH v5 3/8] block/export: Abstract out the logic of virtio-blk I/O process

2022-05-18 Thread Stefan Hajnoczi
On Wed, May 04, 2022 at 03:40:46PM +0800, Xie Yongji wrote: > -static void vu_blk_req_complete(VuBlkReq *req) > +static void vu_blk_req_complete(VuBlkReq *req, size_t in_len) > { > VuDev *vu_dev = &req->server->vu_dev; > > -/* IO size with 1 extra status byte */ > -vu_queue_push(vu_

[PATCH] block: get rid of blk->guest_block_size

2022-05-18 Thread Stefan Hajnoczi
Commit 1b7fd729559c ("block: rename buffer_alignment to guest_block_size") noted: At this point, the field is set by the device emulation, but completely ignored by the block layer. The last time the value of buffer_alignment/guest_block_size was actually used was before commit 339064d50639 (

Re: [PATCH V2 1/4] softmmu/runstate.c: add RunStateTransition support form COLO to PRELAUNCH

2022-05-18 Thread Dr. David Alan Gilbert
* Jason Wang (jasow...@redhat.com) wrote: > On Sat, May 7, 2022 at 10:03 AM Zhang, Chen wrote: > > > > > > > > > -Original Message- > > > From: Zhang, Chen > > > Sent: Wednesday, April 27, 2022 5:26 PM > > > To: Jason Wang ; Paolo Bonzini > > > > > > Cc: Li Zhijian ; qemu-dev > > de...@n

Re: [PATCH v6 07/13] migration: Add helpers to detect TLS capability

2022-05-18 Thread Peter Xu
On Wed, May 18, 2022 at 09:57:12AM +0100, Daniel P. Berrangé wrote: > > @@ -37,4 +37,8 @@ void migration_tls_channel_connect(MigrationState *s, > > QIOChannel *ioc, > > const char *hostname, > >

  1   2   >