Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-18 Thread Will Deacon
On Wed, Nov 18, 2015 at 10:29:30AM +, Andre Przywara wrote: > On 02/11/15 14:58, Will Deacon wrote: > > On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: > >> this series cleans up kvmtool's kernel loading functionality a bit. > >> It has been broken out of a previous series I

Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-18 Thread Will Deacon
On Wed, Nov 18, 2015 at 10:29:30AM +, Andre Przywara wrote: > On 02/11/15 14:58, Will Deacon wrote: > > On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: > >> this series cleans up kvmtool's kernel loading functionality a bit. > >> It has been broken out of a previous series I

Re: [Qemu-devel] [PATCH v3 1/3] target-i386: add pkeys support for cpuid handling

2015-11-18 Thread Eduardo Habkost
On Wed, Nov 18, 2015 at 10:20:15AM +0800, Huaitong Han wrote: [...] > @@ -408,6 +420,13 @@ static FeatureWordInfo feature_word_info[FEATURE_WORDS] > = { > .cpuid_reg = R_EBX, > .tcg_features = TCG_7_0_EBX_FEATURES, > }, > +[FEAT_7_0_ECX] = { > +.feat_names =

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Sasha Levin
On 11/18/2015 03:22 AM, Gerd Hoffmann wrote: > /me goes undust the kvmtool patches for seabios. > > (see https://www.kraxel.org/cgit/seabios/commit/?h=kvmtool, > build with CONFIG_KVMTOOL=y + CONFIG_DEBUG_LEVEL=9) > > nilsson kraxel ~# ~kraxel/projects/kvmtool/lkvm run --name seabios >

Re: [PATCH 1/1] KVM: PPC: Increase memslots to 320

2015-11-18 Thread Thomas Huth
On 04/11/15 10:03, Thomas Huth wrote: > Only using 32 memslots for KVM on powerpc is way too low, you can > nowadays hit this limit quite fast by adding a couple of PCI devices > and/or pluggable memory DIMMs to the guest. > x86 already increased the limit to 512 in total, to satisfy 256 >

Re: [Qemu-devel] [PATCH v3 0/3] target-i386: add memory protection-key support

2015-11-18 Thread Eduardo Habkost
On Wed, Nov 18, 2015 at 10:20:14AM +0800, Huaitong Han wrote: > Changes in v3: > *Fix cpuid_7_0_ecx_feature_name error. > > Changes in v2: > *Fix memcpy error for xsave state. > *Fix TCG_7_0_ECX_FEATURES to 0. > *Make subjects more readable. > > The protection-key feature provides an additional

Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation

2015-11-18 Thread Borislav Petkov
On Wed, Nov 18, 2015 at 12:35:24PM +0100, Paolo Bonzini wrote: > Yes, exactly. I'm suggesting that the same applies to x86_vendor(). I > also prefer x86_cpuid_* to x86_*_cpuid because, once you add two > functions in the same family it's nice that they share a prefix. Ok, makes sense: ---

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Gerd Hoffmann
Hi, > Thanks for testing! I didn't even thing about seabios as a testing target. Not surprising, support isn't upstream, ran into a bunch of issues[1][2] last time I tried to combine the two, ran into some issues and nobody seemed to care, so the seabios patches where just sitting in a branch

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-18 Thread Eduardo Habkost
On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote: > > Ping... > > Do you have any comment on this patchset? Could it be applied to somewhere > if it is okay for you? I have no additional comments, as the memory-backend patches I was reviewing are not included in this version. I

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-18 Thread Michael S. Tsirkin
On Wed, Nov 18, 2015 at 05:18:17PM -0200, Eduardo Habkost wrote: > On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote: > > > > Ping... > > > > Do you have any comment on this patchset? Could it be applied to somewhere > > if it is okay for you? > > I have no additional comments, as

Re: [PATCH v3 7/7] KVM, pkeys: disable PKU feature without ept

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 06:44, Huaitong Han wrote: > This patch disables CPUID:PKU without ept, becase pkeys is not supported > with softmmu. Sure, but _what_ makes it impossible to support pkeys with shadow pages? Is it enough to add the pkey bits to the role (and then to kvm_get_mmu_page,

Re: [PATCH] KVM: powerpc: kvmppc_visible_gpa can be boolean

2015-11-18 Thread Paolo Bonzini
On 16/11/2015 04:10, Yaowei Bai wrote: > In another patch kvm_is_visible_gfn is maken return bool due to this > function only returns zero or one as its return value, let's also make > kvmppc_visible_gpa return bool to keep consistent. > > No functional change. > > Signed-off-by: Yaowei Bai

Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-18 Thread Andre Przywara
Hi Will, On 02/11/15 14:58, Will Deacon wrote: > On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: >> Hi, > > Hello Andre, > >> this series cleans up kvmtool's kernel loading functionality a bit. >> It has been broken out of a previous series I sent [1] and contains >> just the

Re: [PATCH] KVM-async_pf: Delete an unnecessary check before the function call "kmem_cache_destroy"

2015-11-18 Thread Paolo Bonzini
On 15/11/2015 10:45, SF Markus Elfring wrote: > From: Markus Elfring > Date: Sun, 15 Nov 2015 10:40:36 +0100 > > The kmem_cache_destroy() function tests whether its argument is NULL > and then returns immediately. Thus the test around the call is not needed. > >

Re: [PATCH] KVM: powerpc: kvmppc_visible_gpa can be boolean

2015-11-18 Thread Paolo Bonzini
On 16/11/2015 04:10, Yaowei Bai wrote: > In another patch kvm_is_visible_gfn is maken return bool due to this > function only returns zero or one as its return value, let's also make > kvmppc_visible_gpa return bool to keep consistent. > > No functional change. > > Signed-off-by: Yaowei Bai

Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 12:28, Borislav Petkov wrote: >> On 14/11/2015 11:37, Borislav Petkov wrote: >>> > > vendor = x86_vendor(); >>> > > - family = x86_family(); >>> > > + family = x86_family_cpuid(); >> > >> > What about renaming x86_vendor() so that this looks like >> > >> > -

Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation

2015-11-18 Thread Borislav Petkov
On Wed, Nov 18, 2015 at 12:10:08PM +0100, Paolo Bonzini wrote: > On 14/11/2015 11:37, Borislav Petkov wrote: > > vendor = x86_vendor(); > > - family = x86_family(); > > + family = x86_family_cpuid(); > > What about renaming x86_vendor() so that this looks like > > - vendor =

[PATCH 1/2] KVM: Remove unnecessary debugfs dentry references

2015-11-18 Thread Christian Borntraeger
From: Janosch Frank KVM creates debugfs files to export VM statistics to userland. To be able to remove them on kvm exit it tracks the files' dentries. Since their parent directory is also tracked and since each parent direntry knows its children we can easily remove

[PATCH 0/2] kvm: provide kvm stat per process

2015-11-18 Thread Christian Borntraeger
Paolo, I plan to submit these patches via my next s390 pull request. Basic idea is: we already have all kvm_stats per cpu and per vm, lets provide some additional debugfs folders to get kvm_stats also per VM to detect cases where only one guest goes wild. (no per vCPU stats yet. Do we want those

Re: [RFC PATCH 1/3] x86/cpu: Unify CPU family, model, stepping calculation

2015-11-18 Thread Paolo Bonzini
On 14/11/2015 11:37, Borislav Petkov wrote: > vendor = x86_vendor(); > - family = x86_family(); > + family = x86_family_cpuid(); What about renaming x86_vendor() so that this looks like - vendor = x86_vendor(); - family = x86_family(); + vendor =

[PATCH 2/2] KVM: Create debugfs dir and stat files for each VM

2015-11-18 Thread Christian Borntraeger
From: Janosch Frank KVM statistics for VMs (no. of exits, halts and other special instructions) are currently only available in a summarized manner for all VMs. They are exported to userland through files in the kvm debugfs directory and used for performance

KVM call for November 22th

2015-11-18 Thread Juan Quintela
Hi Please, send any topic that you are interested in covering. At the end of Monday I will send an email with the agenda or the cancellation of the call, so hurry up. After discussions on the QEMU Summit, we are going to have always open a KVM call where you can add topics. Call details:

Re: [PATCH 0/7] kvmtool: Cleanup kernel loading

2015-11-18 Thread Andre Przywara
Hi Will, On 02/11/15 14:58, Will Deacon wrote: > On Fri, Oct 30, 2015 at 06:26:53PM +, Andre Przywara wrote: >> Hi, > > Hello Andre, > >> this series cleans up kvmtool's kernel loading functionality a bit. >> It has been broken out of a previous series I sent [1] and contains >> just the

Re: [PATCH v3 0/7] KVM, pkeys: add memory protection-key support

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 06:43, Huaitong Han wrote: > Changes in v3: > *Add comments for patch that disable PKU feature without ept. > > Changes in v2: > *Add pku.c for kvm-unit-tests. > *Optimize permission_fault codes for patch4. > *Delete is_long_mode and PK for patch5. > *Squash cpuid and cr4 patches.

Re: [kvm-unit-test RFC] x86: Memory instructions test case

2015-11-18 Thread Paolo Bonzini
On 04/11/2015 22:21, Eduardo Habkost wrote: > Quickly hacked test case for memory instructions (clflush, mfence, > sfence, lfence, clflushopt, clwb, pcommit), that simply checks for #UD > exceptions. > > This was useful to test TCG handling of those instructions. > > The "fake clwb" part will

Re: [RFC PATCH 2/3] kvm: Add accessors for guest CPU's family, model, stepping

2015-11-18 Thread Paolo Bonzini
On 14/11/2015 11:37, Borislav Petkov wrote: > From: Borislav Petkov > > Those give the family, model and stepping of the guest vcpu. > > Signed-off-by: Borislav Petkov > Cc: Paolo Bonzini > --- > arch/x86/kvm/cpuid.h | 34

Re: [RFC PATCH 3/3] x86/cpu/amd, kvm: Satisfy guest kernel reads of IC_CFG MSR

2015-11-18 Thread Paolo Bonzini
On 14/11/2015 11:37, Borislav Petkov wrote: > From: Borislav Petkov > > The kernel accesses IC_CFG MSR (0xc0011021) on AMD because it checks > whether the way access filter is enabled on some F15h models, and, if > so, disables it. > > kvm doesn't handle that MSR access and

Re: [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain head in a new struct

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 04:21, Xiao Guangrong wrote: > > > On 11/12/2015 07:55 PM, Takuya Yoshikawa wrote: >> @@ -1720,7 +1724,7 @@ static struct kvm_mmu_page >> *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, >>* this feature. See the comments in kvm_zap_obsolete_pages(). >>*/ >>

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Gerd Hoffmann
On Mi, 2015-11-18 at 00:11 -0500, Sasha Levin wrote: > This is a first go at adding support for the modern (based on the 1.0 virtio > spec) virtio-pci implementation. > To sum it up: this is a lightly tested version for feedback about the design > and to weed out major bugs people notice.

Re: [PATCH v3 7/7] KVM, pkeys: disable PKU feature without ept

2015-11-18 Thread Han, Huaitong
On Wed, 2015-11-18 at 10:06 +0100, Paolo Bonzini wrote: > > On 18/11/2015 06:44, Huaitong Han wrote: > > This patch disables CPUID:PKU without ept, becase pkeys is not > > supported > > with softmmu. > > Sure, but _what_ makes it impossible to support pkeys with shadow > pages? > > Is it enough

Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

2015-11-18 Thread Xiao Guangrong
On 11/19/2015 08:59 AM, Takuya Yoshikawa wrote: On 2015/11/18 11:44, Xiao Guangrong wrote: On 11/12/2015 07:50 PM, Takuya Yoshikawa wrote: +if (!ret) { +clear_unsync_child_bit(sp, i); +continue; +} else if (ret > 0) {

Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

2015-11-18 Thread Takuya Yoshikawa
On 2015/11/18 11:44, Xiao Guangrong wrote: On 11/12/2015 07:50 PM, Takuya Yoshikawa wrote: +if (!ret) { +clear_unsync_child_bit(sp, i); +continue; +} else if (ret > 0) { nr_unsync_leaf += ret; Just a single line here,

Re: [PATCH v8 0/5] implement vNVDIMM

2015-11-18 Thread Xiao Guangrong
On 11/19/2015 04:44 AM, Michael S. Tsirkin wrote: On Wed, Nov 18, 2015 at 05:18:17PM -0200, Eduardo Habkost wrote: On Wed, Nov 18, 2015 at 09:59:34AM +0800, Xiao Guangrong wrote: Ping... Do you have any comment on this patchset? Could it be applied to somewhere if it is okay for you? I

Re: [PATCH 07/10] KVM: x86: MMU: Encapsulate the type of rmap-chain head in a new struct

2015-11-18 Thread Takuya Yoshikawa
On 2015/11/18 18:09, Paolo Bonzini wrote: On 18/11/2015 04:21, Xiao Guangrong wrote: On 11/12/2015 07:55 PM, Takuya Yoshikawa wrote: @@ -1720,7 +1724,7 @@ static struct kvm_mmu_page *kvm_mmu_alloc_page(struct kvm_vcpu *vcpu, * this feature. See the comments in

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Sasha Levin
On 11/18/2015 11:00 PM, Sasha Levin wrote: > Anyways, I debugged it for a bit a found that seabios attempts to write to > the notification BAR, I look further tomorrow to narrow it down and fix it. Err, *read*, obviously. I've never implemented that because the kernel doesn't try to do that (it

[RESEND PATCH] vfio: Drop owner assignment from platform_driver

2015-11-18 Thread Krzysztof Kozlowski
platform_driver does not need to set an owner because platform_driver_register() will set it. Signed-off-by: Krzysztof Kozlowski Acked-by: Baptiste Reynal --- The coccinelle script which generated the patch was sent here:

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Sasha Levin
On 11/18/2015 12:52 PM, Gerd Hoffmann wrote: > Hi, > >> Thanks for testing! I didn't even thing about seabios as a testing target. > > Not surprising, support isn't upstream, ran into a bunch of issues[1][2] > last time I tried to combine the two, ran into some issues and nobody > seemed to

Re: [PATCH 02/10] KVM: x86: MMU: Add helper function to clear a bit in unsync child bitmap

2015-11-18 Thread Takuya Yoshikawa
On 2015/11/19 11:46, Xiao Guangrong wrote: Actually, some people prefer to put braces when one of the if/else-if/else cases has multiple lines. You can see some examples in kernel/sched/core.c: see hrtick_start(), sched_fork(), free_sched_domain(). In our case, I thought putting braces would

Re: [Qemu-devel] [PATCH v3 1/3] target-i386: add pkeys support for cpuid handling

2015-11-18 Thread Han, Huaitong
On Wed, 2015-11-18 at 13:58 -0200, Eduardo Habkost wrote: > On Wed, Nov 18, 2015 at 10:20:15AM +0800, Huaitong Han wrote: > [...] > > @@ -408,6 +420,13 @@ static FeatureWordInfo > > feature_word_info[FEATURE_WORDS] = { > > .cpuid_reg = R_EBX, > > .tcg_features =

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-18 Thread Gerd Hoffmann
On Mi, 2015-11-18 at 23:01 -0500, Sasha Levin wrote: > On 11/18/2015 11:00 PM, Sasha Levin wrote: > > Anyways, I debugged it for a bit a found that seabios attempts to write to > > the notification BAR, I look further tomorrow to narrow it down and fix it. > > Err, *read*, obviously. > > I've

Re: [Qemu-devel] [PATCH v3 0/3] target-i386: add memory protection-key support

2015-11-18 Thread Paolo Bonzini
On 18/11/2015 18:51, Eduardo Habkost wrote: > Is every CPU supporting PKU guaranteed to have > CPUID.(EAX=0DH,ECX=9):EBX = 0xa80? We asked Intel a while ago when reorganizing XSAVE support in KVM and QEMU. Unfortunately, Intel is not listing the offsets anymore in the documentation, but they