Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: Alexandru Elisei <alexandru.elisei@arm.com>
To: Will Deacon <will@kernel.org>
Cc: julien.thierry.kdev@gmail.com, maz@kernel.org, oupton@kernel.org,
	jean-philippe@linaro.org, andre.przywara@arm.com,
	suzuki.poulose@arm.com, kvm@vger.kernel.org
Subject: Re: [PATCH kvmtool 2/6] disk/core: Do not modify const strings in disk_img_name_parser()
Date: Mon, 18 May 2026 10:51:02 +0100	[thread overview]
Message-ID: <agrhBo3TW7lKQY7R@raptor> (raw)
In-Reply-To: <agl8Y3yhC2tfsDap@willie-the-truck>

Hi Will,

On Sun, May 17, 2026 at 09:29:23AM +0100, Will Deacon wrote:
> On Mon, Mar 23, 2026 at 03:02:17PM +0000, Alexandru Elisei wrote:
> > @arg is const char *, but disk_img_name_parser() modifies it, which leads
> > to a compilation error on x86 with gcc 15.2.1:
> > 
> > disk/core.c:27:21: error: assignment discards ‘const’ qualifier from pointer target type [-Werror=discarded-qualifiers]
> >    27 |                 sep = strstr(arg, ":");
> > 
> > Make a copy of @arg and modify it instead, and be very careful to free it
> > when no longer needed.
> > 
> > Signed-off-by: Alexandru Elisei <alexandru.elisei@arm.com>
> > ---
> > 
> > I followed the instruction from Documentation/io-testing, but I couldn't
> > get a virtio SCSI disk work in a VM, I kept getting this kvmtool error when
> > the guest tried to use it:
> > 
> > [    0.154837] virtio_scsi virtio1: 1/0/0 default/read/poll queues
> > [    0.156965] scsi host0: Virtio SCSI HBA
> >   Fatal: VHOST_SCSI_SET_ENDPOINT failed 19
> 
> That's -ENODEV, so presumably vhost_scsi_set_endpoint() (in the host
> kernel) is failing to match the device. Can you stick some tracing in
> there to figure out what's going wrong?

I am pretty sure I made a configuration error when creating the scsi-disk in
userspace. Jean-Philippe was able to run upstream kvmtool (without this series)
with a scsi-disk with his setup. I'll try harder for the next iteration.

Thanks,
Alex

  reply	other threads:[~2026-05-18  9:51 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-23 15:02 [PATCH kvmtool 0/6] x86 compilation fixes and arm64 PMU improvements Alexandru Elisei
2026-03-23 15:02 ` [PATCH kvmtool 1/6] virtio: Do not modify const strings in virtio_9p_rootdir_parser() Alexandru Elisei
2026-03-23 15:02 ` [PATCH kvmtool 2/6] disk/core: Do not modify const strings in disk_img_name_parser() Alexandru Elisei
2026-05-17  8:29   ` Will Deacon
2026-05-18  9:51     ` Alexandru Elisei [this message]
2026-03-23 15:02 ` [PATCH kvmtool 3/6] arm64: Initialise the PMU last Alexandru Elisei
2026-05-17  8:33   ` Will Deacon
2026-05-18  9:53     ` Alexandru Elisei
2026-03-23 15:02 ` [PATCH kvmtool 4/6] util: Set exit status to errno in die_perror() Alexandru Elisei
2026-03-23 15:02 ` [PATCH kvmtool 5/6] util: Allow die_perror() to take a variable list of argument Alexandru Elisei
2026-05-17  8:44   ` Will Deacon
2026-05-18 10:12     ` Alexandru Elisei
2026-05-18 15:06       ` Will Deacon
2026-05-18 15:22         ` Alexandru Elisei
2026-03-23 15:02 ` [PATCH kvmtool 6/6] arm64: Improve KVM_ARM_VCPU_PMU_V3_CTRL diagnostics Alexandru Elisei

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=agrhBo3TW7lKQY7R@raptor \
    --to=alexandru.elisei@arm.com \
    --cc=andre.przywara@arm.com \
    --cc=jean-philippe@linaro.org \
    --cc=julien.thierry.kdev@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=oupton@kernel.org \
    --cc=suzuki.poulose@arm.com \
    --cc=will@kernel.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox