[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ZddijN0ShU23sdJw@google.com>
Date: Thu, 22 Feb 2024 07:04:44 -0800
From: Sean Christopherson <seanjc@...gle.com>
To: paul@....org
Cc: Arnd Bergmann <arnd@...nel.org>, David Woodhouse <dwmw2@...radead.org>,
Paolo Bonzini <pbonzini@...hat.com>, Arnd Bergmann <arnd@...db.de>,
Thomas Gleixner <tglx@...utronix.de>, Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
Dave Hansen <dave.hansen@...ux.intel.com>, x86@...nel.org,
"H. Peter Anvin" <hpa@...or.com>, Jens Axboe <axboe@...nel.dk>, Jan Kara <jack@...e.cz>,
Christian Brauner <brauner@...nel.org>, kvm@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] KVM: x86/xen: fix 32-bit pointer cast
On Thu, Feb 22, 2024, Paul Durrant wrote:
> On 22/02/2024 10:03, Arnd Bergmann wrote:
> > From: Arnd Bergmann <arnd@...db.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
Powered by blists - more mailing lists