Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On 10/07/2018 14:06, Raslan, KarimAllah wrote: > On Mon, 2018-04-16 at 13:10 +0200, Paolo Bonzini wrote: >> On 15/04/2018 23:53, KarimAllah Ahmed wrote: >>> >>> Guest memory can either be directly managed by the kernel (i.e. have a >>> "struct >>> page") or they can simply live outside kernel control (i.e. do not have a >>> "struct page"). KVM mostly support these two modes, except in a few places >>> where the code seems to assume that guest memory must have a "struct page". >>> >>> This patchset introduces a new mapping interface to map guest memory into >>> host >>> kernel memory which also supports PFN-based memory (i.e. memory without >>> 'struct >>> page'). It also converts all offending code to this interface or simply >>> read/write directly from guest memory. >>> >>> As far as I can see all offending code is now fixed except the APIC-access >>> page >>> which I will handle in a seperate patch. >> >> I assume the caching will also be a separate patch. >> >> It looks good except that I'd squash patches 4 and 9 together. But I'd >> like a second set of eyes to look at it. > > BTW, Why did you want to squash these 2 patches specifically? They are > very unrelated to me. The only common thing is that they switch from > code that supports only "struct page" to code that supports PFN only > but this is also common for all other patches. Probably at the time I was thinking they both affect cmpxchg, but really they are gpte and emulator respectively. Looks like I have 12 more patches on my review queue then! *ouch* Paolo >> >> Thanks, >> >> Paolo >> > Amazon Development Center Germany GmbH > Berlin - Dresden - Aachen > main office: Krausenstr. 38, 10117 Berlin > Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger > Ust-ID: DE289237879 > Eingetragen am Amtsgericht Charlottenburg HRB 149173 B >
Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On Mon, 2018-04-16 at 13:10 +0200, Paolo Bonzini wrote: > On 15/04/2018 23:53, KarimAllah Ahmed wrote: > > > > Guest memory can either be directly managed by the kernel (i.e. have a > > "struct > > page") or they can simply live outside kernel control (i.e. do not have a > > "struct page"). KVM mostly support these two modes, except in a few places > > where the code seems to assume that guest memory must have a "struct page". > > > > This patchset introduces a new mapping interface to map guest memory into > > host > > kernel memory which also supports PFN-based memory (i.e. memory without > > 'struct > > page'). It also converts all offending code to this interface or simply > > read/write directly from guest memory. > > > > As far as I can see all offending code is now fixed except the APIC-access > > page > > which I will handle in a seperate patch. > > I assume the caching will also be a separate patch. > > It looks good except that I'd squash patches 4 and 9 together. But I'd > like a second set of eyes to look at it. BTW, Why did you want to squash these 2 patches specifically? They are very unrelated to me. The only common thing is that they switch from code that supports only "struct page" to code that supports PFN only but this is also common for all other patches. > > Thanks, > > Paolo > Amazon Development Center Germany GmbH Berlin - Dresden - Aachen main office: Krausenstr. 38, 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On Tue, 2018-05-15 at 12:06 -0400, Konrad Rzeszutek Wilk wrote: > On Mon, Apr 16, 2018 at 02:27:13PM +0200, Paolo Bonzini wrote: > > > > On 16/04/2018 14:09, Raslan, KarimAllah wrote: > > > > > > > > > > > I assume the caching will also be a separate patch. > > > Yup, do you want me to include it in this one? I already have it, I > > > just thought that I get those bits out first. > > > > It's the same for me. > > > > Paolo > > > > > > > > > > > > > It looks good except that I'd squash patches 4 and 9 together. > > > Yup, makes sense. I should have squashed them when I removed the > > > lifecycle change! > > > > > > Thanks for the review :) > > > > > > > > > > > But I'd like a second set of eyes to look at it. > > Did anybody else end up reviewing these patches? And would it make sense > to repost a new version with the #4 and #9 squashed? Thanks. No, no second review yet. I will squash and repost a new version. > > > > > > Amazon Development Center Germany GmbH Berlin - Dresden - Aachen main office: Krausenstr. 38, 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On Mon, Apr 16, 2018 at 02:27:13PM +0200, Paolo Bonzini wrote: > On 16/04/2018 14:09, Raslan, KarimAllah wrote: > >> I assume the caching will also be a separate patch. > > Yup, do you want me to include it in this one? I already have it, I > > just thought that I get those bits out first. > > It's the same for me. > > Paolo > > >> It looks good except that I'd squash patches 4 and 9 together. > > Yup, makes sense. I should have squashed them when I removed the > > lifecycle change! > > > > Thanks for the review :) > > > >> But I'd like a second set of eyes to look at it. Did anybody else end up reviewing these patches? And would it make sense to repost a new version with the #4 and #9 squashed? Thanks. >
Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On 16/04/2018 14:09, Raslan, KarimAllah wrote: >> I assume the caching will also be a separate patch. > Yup, do you want me to include it in this one? I already have it, I > just thought that I get those bits out first. It's the same for me. Paolo >> It looks good except that I'd squash patches 4 and 9 together. > Yup, makes sense. I should have squashed them when I removed the > lifecycle change! > > Thanks for the review :) > >> But I'd like a second set of eyes to look at it.
Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On Mon, 2018-04-16 at 13:10 +0200, Paolo Bonzini wrote: > On 15/04/2018 23:53, KarimAllah Ahmed wrote: > > > > Guest memory can either be directly managed by the kernel (i.e. have a > > "struct > > page") or they can simply live outside kernel control (i.e. do not have a > > "struct page"). KVM mostly support these two modes, except in a few places > > where the code seems to assume that guest memory must have a "struct page". > > > > This patchset introduces a new mapping interface to map guest memory into > > host > > kernel memory which also supports PFN-based memory (i.e. memory without > > 'struct > > page'). It also converts all offending code to this interface or simply > > read/write directly from guest memory. > > > > As far as I can see all offending code is now fixed except the APIC-access > > page > > which I will handle in a seperate patch. > > I assume the caching will also be a separate patch. Yup, do you want me to include it in this one? I already have it, I just thought that I get those bits out first. > > It looks good except that I'd squash patches 4 and 9 together. Yup, makes sense. I should have squashed them when I removed the lifecycle change! Thanks for the review :) > But I'd like a second set of eyes to look at it. > > Thanks, > > Paolo > Amazon Development Center Germany GmbH Berlin - Dresden - Aachen main office: Krausenstr. 38, 10117 Berlin Geschaeftsfuehrer: Dr. Ralf Herbrich, Christian Schlaeger Ust-ID: DE289237879 Eingetragen am Amtsgericht Charlottenburg HRB 149173 B
Re: [PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
On 15/04/2018 23:53, KarimAllah Ahmed wrote: > Guest memory can either be directly managed by the kernel (i.e. have a "struct > page") or they can simply live outside kernel control (i.e. do not have a > "struct page"). KVM mostly support these two modes, except in a few places > where the code seems to assume that guest memory must have a "struct page". > > This patchset introduces a new mapping interface to map guest memory into host > kernel memory which also supports PFN-based memory (i.e. memory without > 'struct > page'). It also converts all offending code to this interface or simply > read/write directly from guest memory. > > As far as I can see all offending code is now fixed except the APIC-access > page > which I will handle in a seperate patch. I assume the caching will also be a separate patch. It looks good except that I'd squash patches 4 and 9 together. But I'd like a second set of eyes to look at it. Thanks, Paolo
[PATCH v2 00/12] KVM/X86: Introduce a new guest mapping interface
Guest memory can either be directly managed by the kernel (i.e. have a "struct page") or they can simply live outside kernel control (i.e. do not have a "struct page"). KVM mostly support these two modes, except in a few places where the code seems to assume that guest memory must have a "struct page". This patchset introduces a new mapping interface to map guest memory into host kernel memory which also supports PFN-based memory (i.e. memory without 'struct page'). It also converts all offending code to this interface or simply read/write directly from guest memory. As far as I can see all offending code is now fixed except the APIC-access page which I will handle in a seperate patch. Filippo Sironi (1): X86/KVM: Handle PFNs outside of kernel reach when touching GPTEs KarimAllah Ahmed (11): X86/nVMX: handle_vmon: Read 4 bytes from guest memory X86/nVMX: handle_vmptrld: Copy the VMCS12 directly from guest memory X86/nVMX: Update the PML table without mapping and unmapping the page KVM: Introduce a new guest mapping API KVM/nVMX: Use kvm_vcpu_map when mapping the L1 MSR bitmap KVM/nVMX: Use kvm_vcpu_map when mapping the virtual APIC page KVM/nVMX: Use kvm_vcpu_map when mapping the posted interrupt descriptor table KVM/X86: Use kvm_vcpu_map in emulator_cmpxchg_emulated KVM/X86: hyperv: Use kvm_vcpu_map in synic_clear_sint_msg_pending KVM/X86: hyperv: Use kvm_vcpu_map in synic_deliver_msg KVM/nSVM: Use the new mapping API for mapping guest memory arch/x86/kvm/hyperv.c | 28 - arch/x86/kvm/paging_tmpl.h | 38 +--- arch/x86/kvm/svm.c | 97 +++--- arch/x86/kvm/vmx.c | 145 +++-- arch/x86/kvm/x86.c | 13 ++-- include/linux/kvm_host.h | 9 +++ virt/kvm/kvm_main.c| 50 7 files changed, 203 insertions(+), 177 deletions(-) Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org -- 2.7.4