Re: Improve default machine type selection

2023-04-14 Thread Jim Fehlig
On 4/14/23 09:24, Andrea Bolognani wrote: On Fri, Apr 14, 2023 at 03:33:21PM +0200, Peter Krempa wrote: On Fri, Apr 14, 2023 at 06:26:02 -0700, Andrea Bolognani wrote: I don't think we rely on default machine types anywhere in the test suite, and even if we were only minor touch-ups would

[PATCH 1/3] qemu: Change default machine type for aarch64

2023-04-14 Thread Jim Fehlig
It's quite difficult, if not impossible, to create a working aarch64 VM using the current default machine type of 'integratorcp'. Change the default to the more appropriate and virtualization friendly 'virt' machine type. Signed-off-by: Jim Fehlig --- src/qemu/qemu_capabilities.c

[PATCH 3/3] NEWS: Mention change of default machine type for aarch64 and riscv64

2023-04-14 Thread Jim Fehlig
Signed-off-by: Jim Fehlig --- NEWS.rst | 6 ++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 6bc5a59c0d..76a7e8de98 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -19,6 +19,12 @@ v9.3.0 (unreleased) * **Improvements** +* qemu: Change default machine type for

[PATCH 2/3] qemu: Change default machine type for riscv64

2023-04-14 Thread Jim Fehlig
It's quite difficult, if not impossible, to create a working riscv64 VM using the current default machine type of 'spike_v1.10'. Change the default to the more appropriate and virtualization friendly 'virt' machine type. Signed-off-by: Jim Fehlig --- src/qemu/qemu_capabilities.c

[PATCH 0/3] Change default machine type for aarch64 and riscv64

2023-04-14 Thread Jim Fehlig
This series is a first attempt at changing the default machine type for aarch64 and riscv64. It is difficult, if not impossible, to create a working VM with the current defaults of 'integratorcp' and 'spike_v1.10', so let's change the default to type 'virt'. See the following thread for more

Re: [PATCH 1/4] conf: add loader type 'none'

2023-04-14 Thread Andrea Bolognani
On Mon, Apr 10, 2023 at 07:50:36PM -0300, Daniel Henrique Barboza wrote: > On 4/7/23 15:12, Andrea Bolognani wrote: > > On Tue, Mar 28, 2023 at 04:46:45PM -0300, Daniel Henrique Barboza wrote: > So, I talked with Canonical a few months back about this package. I'm using a > F37 > dev box and I

Re: [PATCH 1/4] conf: add loader type 'none'

2023-04-14 Thread Andrea Bolognani
On Tue, Apr 11, 2023 at 01:14:27PM +0200, Gerd Hoffmann wrote: > > The second approach is the one described in the Ubuntu wiki[3], and > > also requires passing two files to QEMU, except this time they come > > from the opensbi and u-boot-qemu packages respectively. The usage > > looks like > > >

Re: Improve default machine type selection

2023-04-14 Thread Andrea Bolognani
On Fri, Apr 14, 2023 at 03:33:21PM +0200, Peter Krempa wrote: > On Fri, Apr 14, 2023 at 06:26:02 -0700, Andrea Bolognani wrote: > > I don't think we rely on default machine types anywhere in the test > > suite, and even if we were only minor touch-ups would probably be > > necessary. > > The test

Re: [PATCH 0/3] Setup iothread polling attributes in the XML

2023-04-14 Thread Martin Kletzander
On Fri, Mar 31, 2023 at 02:00:31PM +0200, Peter Krempa wrote: Peter Krempa (3): conf: Store the iothread 'poll' settings in the XML qemu: Use configured iothread poll parameters on startup If you change all of them to the same type (ULL for example) and adjust the type in JSON appropriately,

Re: [PATCH 3/3] docs: formatdomain: Properly indent example XML for setting 'metadata_cache'

2023-04-14 Thread Martin Kletzander
On Fri, Mar 31, 2023 at 02:00:34PM +0200, Peter Krempa wrote: Indent the example XML block so that it belongs to the paragraph talking about it. Signed-off-by: Peter Krempa Reviewed-by: Martin Kletzander signature.asc Description: PGP signature

[PATCH 1/2] virsh: Introduce --xpath and --wrap to capabilities

2023-04-14 Thread Michal Privoznik
Similarly to dumpxml, let's have --xpath and --wrap to the 'capabilities' command since users might be interested only in a subset of capabilities XML. Signed-off-by: Michal Privoznik --- docs/manpages/virsh.rst | 9 - tools/virsh-host.c | 27 +++ 2 files

[PATCH 2/2] virsh: Introduce --xpath and --wrap to domcapabilities

2023-04-14 Thread Michal Privoznik
Similarly to dumpxml, let's have --xpath and --wrap to the 'domcapabilities' command since users might be interested only in a subset of domcapabilities XML. Signed-off-by: Michal Privoznik --- docs/manpages/virsh.rst | 8 tools/virsh-host.c | 19 +++ 2 files

[PATCH 0/2] virsh: Introduce --xpath and --wrap to (dom)capabilities

2023-04-14 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): virsh: Introduce --xpath and --wrap to capabilities virsh: Introduce --xpath and --wrap to domcapabilities docs/manpages/virsh.rst | 17 ++- tools/virsh-host.c | 46 ++--- 2 files changed, 54

Re: [PATCH 2/3] qemu: Use configured iothread poll parameters on startup

2023-04-14 Thread Martin Kletzander
On Fri, Mar 31, 2023 at 02:00:33PM +0200, Peter Krempa wrote: Implement the support for the persisted poll parameters and remove restrictions on saving config when modifying them during runtime. Signed-off-by: Peter Krempa --- src/qemu/qemu_command.c | 18 +++

[PATCH 3/4] qemu: Move SCSI path generation into qemuDomainPrepareHostdev()

2023-04-14 Thread Michal Privoznik
When preparing a SCSI with passthrough of a host SCSI adapter (i.e. no protocol), a virStorageSource structure is initialized and stored inside virDomainHostdevDef. But the source structure is filled in many places, with almost the same code. Firstly, qemuProcessPrepareHostHostdev() and

[PATCH 4/4] qemu: Remove empty functions

2023-04-14 Thread Michal Privoznik
After previous cleanup, there are some functions that do nothing: qemuConnectDomainXMLToNativePrepareHostHostdev() qemuConnectDomainXMLToNativePrepareHost() qemuProcessPrepareHostHostdev() qemuProcessPrepareHostHostdevs() Remove them. Signed-off-by: Michal Privoznik ---

[PATCH 1/4] qemuDomainAttachHostDevice: Prepare device early and for all types

2023-04-14 Thread Michal Privoznik
When attaching a hostdev of a SCSI subsys, qemuDomainPrepareHostdev() is called. This makes sense because the function prepares just SCSI hostdevs ignoring others. But this will soon change. Thefore, move the function call out of qemuDomainAttachHostSCSIDevice() and into

[PATCH 0/4] qemu: Move preparation into qemuDomainPrepareHostdev()

2023-04-14 Thread Michal Privoznik
Now, technically 2/4 is a v3 of: https://listman.redhat.com/archives/libvir-list/2023-April/239368.html but when reviewing it, I realized that we can move more code around and this ended up bigger cleanup. Michal Prívozník (3): qemuDomainAttachHostDevice: Prepare device early and for all

[PATCH 2/4] qemu: Move PCI backend setting into qemuDomainPrepareHostdev()

2023-04-14 Thread Michal Privoznik
From: Zhenzhong Duan virsh command domxml-to-native failed with below error but start command succeed for same domain xml. "internal error: invalid PCI passthrough type 'default'" If a PCI backend is not set in the XML, the supported one is then chosen in

Re: [PATCH 1/3] conf: Store the iothread 'poll' settings in the XML

2023-04-14 Thread Martin Kletzander
On Fri, Mar 31, 2023 at 02:00:32PM +0200, Peter Krempa wrote: Currently we allow configuring the 'poll-max-ns', 'poll-grow', and 'poll-shrink' parameters of qemu iothreads only during runtime and they are not persisted. Add XML machinery to persist them. Signed-off-by: Peter Krempa ---

Re: Improve default machine type selection

2023-04-14 Thread Peter Krempa
On Fri, Apr 14, 2023 at 06:26:02 -0700, Andrea Bolognani wrote: > On Thu, Apr 13, 2023 at 08:23:25AM -0600, Jim Fehlig wrote: > > On 4/6/23 08:27, Andrea Bolognani wrote: > > > On Thu, Apr 06, 2023 at 06:10:11AM -0700, Andrea Bolognani wrote: > > > > In conclusion, there currently doesn't seem to

Re: Improve default machine type selection

2023-04-14 Thread Andrea Bolognani
On Thu, Apr 13, 2023 at 08:23:25AM -0600, Jim Fehlig wrote: > On 4/6/23 08:27, Andrea Bolognani wrote: > > On Thu, Apr 06, 2023 at 06:10:11AM -0700, Andrea Bolognani wrote: > > > In conclusion, there currently doesn't seem to exist a way to define > > > a useful integratorcp-based VM in libvirt,

Re: [PATCH v2] qemu: Fix domxml-to-native command failure

2023-04-14 Thread Michal Prívozník
On 4/14/23 07:34, Zhenzhong Duan wrote: > virsh command domxml-to-native failed with below error but start > command succeed for same domain xml. > > "internal error: invalid PCI passthrough type 'default'" > > If host PCI device's driver attribute isn't defined in domain xml, > qemu driver will

[PATCH 2/2] qemumemlocktest: Introduce pc-hostdev-nvme test case

2023-04-14 Thread Michal Privoznik
This basically just demonstrates the limit raised by previous commit. Signed-off-by: Michal Privoznik --- .../qemumemlock-pc-hostdev-nvme.xml | 24 +++ tests/qemumemlocktest.c | 1 + 2 files changed, 25 insertions(+) create mode 100644

[PATCH 0/2] qemu_domain: Increase memlock limit for NVMe disks

2023-04-14 Thread Michal Privoznik
*** BLURB HERE *** Michal Prívozník (2): qemu_domain: Increase memlock limit for NVMe disks qemumemlocktest: Introduce pc-hostdev-nvme test case src/qemu/qemu_domain.c| 35 +-- .../qemumemlock-pc-hostdev-nvme.xml | 24 +

[PATCH 1/2] qemu_domain: Increase memlock limit for NVMe disks

2023-04-14 Thread Michal Privoznik
When starting QEMU, or when hotplugging a PCI device QEMU might lock some memory. How much? Well, that's a undecidable problem: a Turing machine that halts, halts in an finite number of steps, and thus it can move tape only so many times. Now, does given TM halt? QED. But despite that, we try to

[PATCH] qemu: Fix incorrect command name in error messages

2023-04-14 Thread Andrea Bolognani
Signed-off-by: Andrea Bolognani --- Pushed as trivial. src/qemu/qemu_monitor_json.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_monitor_json.c b/src/qemu/qemu_monitor_json.c index 3b42b28fa1..b2c0b20a11 100644 --- a/src/qemu/qemu_monitor_json.c +++

Re: [PATCH v2 03/10] tcg: Use one-insn-per-tb accelerator property in curr_cflags()

2023-04-14 Thread Richard Henderson
On 4/13/23 18:24, Peter Maydell wrote: On Mon, 3 Apr 2023 at 19:33, Richard Henderson wrote: On 4/3/23 07:46, Peter Maydell wrote: uint32_t curr_cflags(CPUState *cpu) { uint32_t cflags = cpu->tcg_cflags; +TCGState *tcgstate = TCG_STATE(current_accel()); As mentioned