From: Sean Christopherson <seanjc@google.com>
To: paul@xen.org
Cc: Arnd Bergmann <arnd@kernel.org>,
David Woodhouse <dwmw2@infradead.org>,
Paolo Bonzini <pbonzini@redhat.com>,
Arnd Bergmann <arnd@arndb.de>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
Dave Hansen <dave.hansen@linux.intel.com>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>,
Jens Axboe <axboe@kernel.dk>, Jan Kara <jack@suse.cz>,
Christian Brauner <brauner@kernel.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86/xen: fix 32-bit pointer cast
Date: Thu, 22 Feb 2024 07:04:44 -0800 [thread overview]
Message-ID: <ZddijN0ShU23sdJw@google.com> (raw)
In-Reply-To: <c8c37018-8681-458f-96b7-82bae88ebcd3@xen.org>
On Thu, Feb 22, 2024, Paul Durrant wrote:
> On 22/02/2024 10:03, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@arndb.de>
> >
> > shared_info.hva is a 64-bit variable, so casting to a pointer causes
> > a warning in 32-bit builds:
> >
> > arch/x86/kvm/xen.c: In function 'kvm_xen_hvm_set_attr':
> > arch/x86/kvm/xen.c:660:45: error: cast to pointer from integer of different size [-Werror=int-to-pointer-cast]
> > 660 | void __user * hva = (void *)data->u.shared_info.hva;
> >
> > Replace the cast with a u64_to_user_ptr() call that does the right thing.
>
> Thanks Arnd. I'd just got a ping from kernel test robot for lack of __user
> qualifier in the cast
> (https://lore.kernel.org/oe-kbuild-all/202402221721.mhF8MNVh-lkp@intel.com/),
> which this should also fix.
Ya, 'tis a good bot. I squashed this in. Paul/David, new hashes for the
affected commits are below.
Thanks Arnd!
KVM: x86/xen: allow shared_info to be mapped by fixed HVA
https://github.com/kvm-x86/linux/commit/b9220d32799a
KVM: x86/xen: allow vcpu_info to be mapped by fixed HVA
https://github.com/kvm-x86/linux/commit/3991f35805d0
KVM: selftests: map Xen's shared_info page using HVA rather than GFN
https://github.com/kvm-x86/linux/commit/9397b5334af1
KVM: selftests: re-map Xen's vcpu_info using HVA rather than GPA
https://github.com/kvm-x86/linux/commit/b4dfbfdc9538
KVM: x86/xen: advertize the KVM_XEN_HVM_CONFIG_SHARED_INFO_HVA capability
https://github.com/kvm-x86/linux/commit/615451d8cb3f
KVM: pfncache: check the need for invalidation under read lock first
https://github.com/kvm-x86/linux/commit/9fa336e343b2
KVM: x86/xen: allow vcpu_info content to be 'safely' copied
https://github.com/kvm-x86/linux/commit/003d914220c9
prev parent reply other threads:[~2024-02-22 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-22 10:03 [PATCH] KVM: x86/xen: fix 32-bit pointer cast Arnd Bergmann
2024-02-22 10:14 ` Paul Durrant
2024-02-22 15:04 ` Sean Christopherson [this message]
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=ZddijN0ShU23sdJw@google.com \
--to=seanjc@google.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=axboe@kernel.dk \
--cc=bp@alien8.de \
--cc=brauner@kernel.org \
--cc=dave.hansen@linux.intel.com \
--cc=dwmw2@infradead.org \
--cc=hpa@zytor.com \
--cc=jack@suse.cz \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=tglx@linutronix.de \
--cc=x86@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 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.