* [GIT PULL] KVM fixes for 4.10 merge window
@ 2016-12-16 16:57 Paolo Bonzini
2016-12-16 19:42 ` Linus Torvalds
0 siblings, 1 reply; 5+ messages in thread
From: Paolo Bonzini @ 2016-12-16 16:57 UTC (permalink / raw)
To: torvalds; +Cc: linux-kernel, rkrcmar, kvm
Linus,
The following changes since commit cdb98c2698b4af287925abcba4d77d92af82a0c3:
Revert "nvme: add support for the Write Zeroes command" (2016-12-13 19:53:37 -0800)
are available in the git repository at:
git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
for you to fetch changes up to b94c3698b4b043a7b3aae8c3c88f60dd29565b90:
Revert "x86/kvm: Support the vCPU preemption check" (2016-12-16 17:53:40 +0100)
----------------------------------------------------------------
Early fixes for x86, most notably a lockdep/might_sleep splat
introduced during the merge window.
----------------------------------------------------------------
GanShun (1):
kvm: nVMX: Correct a VMX instruction error code for VMPTRLD
Paolo Bonzini (2):
KVM: hyperv: fix locking of struct kvm_hv fields
Revert "x86/kvm: Support the vCPU preemption check"
Yi Sun (1):
KVM: x86: Expose Intel AVX512IFMA/AVX512VBMI/SHA features to guest.
Documentation/virtual/kvm/locking.txt | 8 ++++++--
arch/x86/include/asm/kvm_host.h | 1 +
arch/x86/include/uapi/asm/kvm_para.h | 4 +---
arch/x86/kvm/cpuid.c | 9 +++++----
arch/x86/kvm/hyperv.c | 24 +++++++++++++++---------
arch/x86/kvm/vmx.c | 2 +-
arch/x86/kvm/x86.c | 17 +----------------
7 files changed, 30 insertions(+), 35 deletions(-)
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] KVM fixes for 4.10 merge window
2016-12-16 16:57 [GIT PULL] KVM fixes for 4.10 merge window Paolo Bonzini
@ 2016-12-16 19:42 ` Linus Torvalds
2016-12-17 3:09 ` Pan Xinhui
2016-12-17 8:22 ` Paolo Bonzini
0 siblings, 2 replies; 5+ messages in thread
From: Linus Torvalds @ 2016-12-16 19:42 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list
On Fri, Dec 16, 2016 at 8:57 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
> git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
This piece-of-shit branch has obviously never been even compile-tested:
arch/x86/kernel/kvm.c: In function ‘__kvm_vcpu_is_preempted’:
arch/x86/kernel/kvm.c:596:14: error: ‘struct kvm_steal_time’ has no
member named ‘preempted’
where commit b94c3698b4b0 ("Revert "x86/kvm: Support the vCPU
preemption check"") removed the "preempted" field from struct
kvm_steal_time, but you left this in place:
__visible bool __kvm_vcpu_is_preempted(int cpu)
{
struct kvm_steal_time *src = &per_cpu(steal_time, cpu);
return !!src->preempted;
}
And no, that is not a merge artifact in my tree (although that
function did come in from Ingo). That compile failure comes from your
very own branch.
Am I upset? You bet I am. Get your act together. You can't just
randomly revert things without checking the end result.
Linus
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] KVM fixes for 4.10 merge window
2016-12-16 19:42 ` Linus Torvalds
@ 2016-12-17 3:09 ` Pan Xinhui
2016-12-17 8:24 ` Paolo Bonzini
2016-12-17 8:22 ` Paolo Bonzini
1 sibling, 1 reply; 5+ messages in thread
From: Pan Xinhui @ 2016-12-17 3:09 UTC (permalink / raw)
To: Linus Torvalds, Paolo Bonzini
Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list
在 2016/12/17 03:42, Linus Torvalds 写道:
> On Fri, Dec 16, 2016 at 8:57 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
>
> This piece-of-shit branch has obviously never been even compile-tested:
>
> arch/x86/kernel/kvm.c: In function ‘__kvm_vcpu_is_preempted’:
> arch/x86/kernel/kvm.c:596:14: error: ‘struct kvm_steal_time’ has no
> member named ‘preempted’
>
hi, Linus
oh, my bad also. I introduce this struct member and use it in same patch.
Better to separate tem into two patches. I make one fix patch below. sorry again.
Hi, Paolo
I have known where is th problem, I think if we can set this ->preempted later after preempted_enable()
or just introduce something like write_guest_nosleep (per cpu memory section in guest, so there is no page_fault or any other cannot sleep problems)?
thanks
xinhui
-----------------
From d4fa3ea0b8b6f3e5ff511604a4a6665d1cbb74c3 Mon Sep 17 00:00:00 2001
From: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Date: Sat, 17 Dec 2016 02:56:33 -0500
Subject: [PATCH] kvm: fix compile issue
we revert commit 0b9f6c4615c993d2b552e0d2bd1ade49b56e5beb which calls
sleep function while preempt_disable on host part. But we remove struct
kvm_steal_time::preempted too. This casues compile problem as both guest
and host code use it.
Fix it by adding struct kvm_steal_time::preempted back.
Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
---
arch/x86/include/uapi/asm/kvm_para.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/arch/x86/include/uapi/asm/kvm_para.h b/arch/x86/include/uapi/asm/kvm_para.h
index 94dc8ca..1421a65 100644
--- a/arch/x86/include/uapi/asm/kvm_para.h
+++ b/arch/x86/include/uapi/asm/kvm_para.h
@@ -45,7 +45,9 @@ struct kvm_steal_time {
__u64 steal;
__u32 version;
__u32 flags;
- __u32 pad[12];
+ __u8 preempted;
+ __u8 u8_pad[3];
+ __u32 pad[11];
};
#define KVM_STEAL_ALIGNMENT_BITS 5
--
2.4.11
> where commit b94c3698b4b0 ("Revert "x86/kvm: Support the vCPU
> preemption check"") removed the "preempted" field from struct
> kvm_steal_time, but you left this in place:
>
> __visible bool __kvm_vcpu_is_preempted(int cpu)
> {
> struct kvm_steal_time *src = &per_cpu(steal_time, cpu);
>
> return !!src->preempted;
> }
>
> And no, that is not a merge artifact in my tree (although that
> function did come in from Ingo). That compile failure comes from your
> very own branch.
>
> Am I upset? You bet I am. Get your act together. You can't just
> randomly revert things without checking the end result.
>
> Linus
>
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [GIT PULL] KVM fixes for 4.10 merge window
2016-12-16 19:42 ` Linus Torvalds
2016-12-17 3:09 ` Pan Xinhui
@ 2016-12-17 8:22 ` Paolo Bonzini
1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2016-12-17 8:22 UTC (permalink / raw)
To: Linus Torvalds
Cc: Linux Kernel Mailing List, Radim Krčmář, KVM list
> On Fri, Dec 16, 2016 at 8:57 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >
> > git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
>
> This piece-of-shit branch has obviously never been even compile-tested:
>
> arch/x86/kernel/kvm.c: In function ‘__kvm_vcpu_is_preempted’:
> arch/x86/kernel/kvm.c:596:14: error: ‘struct kvm_steal_time’ has no
> member named ‘preempted’
>
> where commit b94c3698b4b0 ("Revert "x86/kvm: Support the vCPU
> preemption check"") removed the "preempted" field from struct
> kvm_steal_time, but you left this in place:
>
> __visible bool __kvm_vcpu_is_preempted(int cpu)
> {
> struct kvm_steal_time *src = &per_cpu(steal_time, cpu);
>
> return !!src->preempted;
> }
>
> And no, that is not a merge artifact in my tree (although that
> function did come in from Ingo). That compile failure comes from your
> very own branch.
Yes, it does. Well, to be honest I did test this (not just compile-test
it) but I didn't have KVM guest support turned on, only KVM host support.
Sorry, I'll resend it and make sure I do a "make allmodconfig" in the
future (and not send pull requests at 6 PM on Friday).
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [GIT PULL] KVM fixes for 4.10 merge window
2016-12-17 3:09 ` Pan Xinhui
@ 2016-12-17 8:24 ` Paolo Bonzini
0 siblings, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2016-12-17 8:24 UTC (permalink / raw)
To: Pan Xinhui
Cc: Linus Torvalds, Linux Kernel Mailing List,
Radim Krčmář,
KVM list
----- Original Message -----
> From: "Pan Xinhui" <xinhui@linux.vnet.ibm.com>
> To: "Linus Torvalds" <torvalds@linux-foundation.org>, "Paolo Bonzini" <pbonzini@redhat.com>
> Cc: "Linux Kernel Mailing List" <linux-kernel@vger.kernel.org>, "Radim Krčmář" <rkrcmar@redhat.com>, "KVM list"
> <kvm@vger.kernel.org>
> Sent: Saturday, December 17, 2016 4:09:16 AM
> Subject: Re: [GIT PULL] KVM fixes for 4.10 merge window
>
>
>
> 在 2016/12/17 03:42, Linus Torvalds 写道:
> > On Fri, Dec 16, 2016 at 8:57 AM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> >>
> >> git://git.kernel.org/pub/scm/virt/kvm/kvm.git tags/for-linus
> >
> > This piece-of-shit branch has obviously never been even compile-tested:
> >
> > arch/x86/kernel/kvm.c: In function ‘__kvm_vcpu_is_preempted’:
> > arch/x86/kernel/kvm.c:596:14: error: ‘struct kvm_steal_time’ has no
> > member named ‘preempted’
> >
> hi, Linus
> oh, my bad also. I introduce this struct member and use it in same patch.
> Better to separate tem into two patches. I make one fix patch below. sorry
> again.
Hi Xinhui, don't worry it's purely my fault. :)
> I have known where is th problem, I think if we can set this ->preempted
> later after preempted_enable()
> or just introduce something like write_guest_nosleep (per cpu memory section
> in guest, so there is no page_fault or any other cannot sleep problems)?
Yes there is already kvm_read_guest_inatomic, we can add an equivalent one
for writes. It will be for 4.11 anyway, so there's time.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-12-17 8:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-16 16:57 [GIT PULL] KVM fixes for 4.10 merge window Paolo Bonzini
2016-12-16 19:42 ` Linus Torvalds
2016-12-17 3:09 ` Pan Xinhui
2016-12-17 8:24 ` Paolo Bonzini
2016-12-17 8:22 ` Paolo Bonzini
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).