All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: "Chaney, Ben" <bchaney@akamai.com>,
	"steven.sistare@oracle.com" <steven.sistare@oracle.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>
Cc: "peterx@redhat.com" <peterx@redhat.com>,
	"armbru@redhat.com" <armbru@redhat.com>,
	"Glasgall, Anna" <aglasgal@akamai.com>,
	"Hunt, Joshua" <johunt@akamai.com>,
	"Tottenham, Max" <mtottenh@akamai.com>
Subject: Re: Live update: q35 and pc-i440fx support (vapic)
Date: Wed, 19 Feb 2025 18:12:31 -0300	[thread overview]
Message-ID: <87mseh8wqo.fsf@suse.de> (raw)
In-Reply-To: <6290683B-76B5-42E1-AA17-1F3AC58FE9D7@akamai.com>

"Chaney, Ben" <bchaney@akamai.com> writes:

> Hello Steve,
>
> Thank you for posting the qemu cpr-transfer patches on qemu-devel. I am experimenting with them, and I noticed that cpr-transfer is failing on some qemu machine types. cpr-transfer is working for me on the microvm machine type but failing on q35 and pc-i440fx. When running in those configurations I get the following error on the new qemu process:
>
>
>     qemu-system-x86_64: error while loading state for instance 0x0 of device 'kvm-tpr-opt'
>     2025-02-18T14:46:52.550319Z qemu-system-x86_64: load of migration failed: Operation not permitted
>
> The issue occurs when initializing the vapic device in the new qemu process. In vapic_map_rom_writable, rom_size is set to zero. This causes the following condition to be triggered:
>
>     ram = memory_region_get_ram_ptr(section.mr);
>     rom_size = ram[rom_paddr + 2] * ROM_BLOCK_SIZE;
>     if (rom_size == 0) {
>     return -1;
>     }

Good job debugging the most opaque error message the migration code can emit.

>
> This occurs on the qemu master branch (tested on commit 9736ee382e95ead06a838fe0b0498e0cb3845270) with the following qemu command line options:
>
> Terminal 1:
>
>     /opt/qemu-build/bin/qemu-system-x86_64 -nographic -cpu host,migratable=yes,-vmx,-svm,invpcid=off -display vnc=unix:/opt/bchaney-tmp/vnc.socket -enable-kvm -name bchaney_test1,debug-threads=on -smp 4 -object memory-backend-file,id=ram0,size=4G,mem-path=/dev/shm/ram0,share=on -m 4G -machine aux-ram-share=on -rtc clock=vm -no-user-config -nodefaults -msg timestamp=on -bios /opt/linode-seabios/roms/bios.bin -machine q35,accel=kvm -cdrom /opt/bchaney-tmp/ubuntu-24.04.1-live-server-amd64.iso -qmp stdio

You're missing an option that tells QEMU to actually make use of the
shared memory backend:

-machine memory-backend=ram0

You might be looking at an older version of the documentation. We've
fixed that and Steve is working on a better error message for it.

>
> Terminal 2:
>
>     /opt/qemu-build/bin/qemu-system-x86_64 -nographic -cpu host,migratable=yes,-vmx,-svm,invpcid=off -display vnc=unix:/opt/bchaney-tmp/vnc.socket -enable-kvm -name bchaney_test1,debug-threads=on -smp 4 -object memory-backend-file,id=ram0,size=4G,mem-path=/dev/shm/ram0,share=on -m 4G -machine aux-ram-share=on -rtc clock=vm -no-user-config -nodefaults -msg timestamp=on -bios /opt/linode-seabios/roms/bios.bin -machine q35,accel=kvm -cdrom /opt/bchaney-tmp/ubuntu-24.04.1-live-server-amd64.iso -incoming '{"channel-type": "main", "addr": { "transport": "socket", "type": "unix", "path": "/opt/bchaney-tmp/main.sock"}}' -incoming '{"channel-type": "cpr", "addr": { "transport": "socket", "type": "unix", "path": "/opt/bchaney-tmp/cpr.sock"}}' -monitor stdio
>
> Qmp commands executed (in Terminal 1):
>
>     {"execute":"qmp_capabilities"}
>     {"execute": "query-status"}
>     {"execute":"migrate-set-parameters",
>        "arguments":{"mode":"cpr-transfer"}}
>     {"execute": "migrate", "arguments": { "channels": [
>         {"channel-type": "main", "addr": { "transport": "socket", "type": "unix",
>                    "path": "/opt/bchaney-tmp/main.sock"}},          
>     {"channel-type": "cpr",
>          "addr": { "transport": "socket", "type": "unix",
>                     "path": "/opt/bchaney-tmp/cpr.sock"}}]}}
>     {"execute": "query-status"}
>
> Is this a hardware configuration that is currently intended to be supported? If not, will it be supported in the future?
>
> Thank you,
> Ben Chaney


  reply	other threads:[~2025-02-19 21:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-19 17:55 Live update: q35 and pc-i440fx support (vapic) Chaney, Ben
2025-02-19 21:12 ` Fabiano Rosas [this message]
2025-02-24 15:17   ` Steven Sistare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mseh8wqo.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=aglasgal@akamai.com \
    --cc=armbru@redhat.com \
    --cc=bchaney@akamai.com \
    --cc=johunt@akamai.com \
    --cc=mtottenh@akamai.com \
    --cc=peterx@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=steven.sistare@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.