Re: [RFC 00/10] Speculation Control feature support

2018-01-21 Thread Konrad Rzeszutek Wilk
On Sat, Jan 20, 2018 at 08:22:51PM +0100, KarimAllah Ahmed wrote: > Start using the newly-added microcode features for speculation control on both > Intel and AMD CPUs to protect against Spectre v2. Thank you posting these. > > This patch series covers interrupts, system calls, context switching

Re: [RFC 10/10] x86/enter: Use IBRS on syscall and interrupts

2018-01-21 Thread Konrad Rzeszutek Wilk
On Sat, Jan 20, 2018 at 08:23:01PM +0100, KarimAllah Ahmed wrote: > From: Tim Chen > > Stop Indirect Branch Speculation on every user space to kernel space > transition and reenable it when returning to user space./ How about interrupts? That is should .macro interrupt have the same treatment?

Re: [PATCH 06/22] swiotlb: rename swiotlb_free to swiotlb_exit

2018-01-12 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 09:09:16AM +0100, Christoph Hellwig wrote: OK? Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/kernel/dma-swiotlb.c | 2 +- > arch/x86/kernel/pci-swiotlb.c | 2 +- > include/linux/swiotlb.h

Re: [PATCH 05/22] x86: rename swiotlb_dma_ops

2018-01-12 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 09:09:15AM +0100, Christoph Hellwig wrote: > We'll need that name for a generic implementation soon. > > Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk > --- > arch/x86/kernel/pci-swiotlb.c | 4 ++-- > 1 file changed, 2 ins

Re: [PATCH 04/22] powerpc: rename swiotlb_dma_ops

2018-01-12 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 09:09:14AM +0100, Christoph Hellwig wrote: > We'll need that name for a generic implementation soon. > Reviewed-by: Konrad Rzeszutek Wilk > Signed-off-by: Christoph Hellwig > --- > arch/powerpc/include/asm/swiotlb.h | 2 +- > arch/powerpc/ke

Re: [PATCH 03/22] ia64: rename swiotlb_dma_ops

2018-01-12 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 09:09:13AM +0100, Christoph Hellwig wrote: > We'll need that name for a generic implementation soon. > > Signed-off-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk > --- > arch/ia64/hp/common/hwsw_iommu.c | 4 ++-- > arch/ia64/hp/

Re: [PATCH 21/33] dma-mapping: add an arch_dma_supported hook

2018-01-12 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 09:00:15AM +0100, Christoph Hellwig wrote: > To implement the x86 forbid_dac and iommu_sac_force we want an arch hook > so that it can apply the global options across all dma_map_ops > implementations. > > Signed-off-by: Christoph Hellwig Reviewed-by: K

Re: [PATCH 19/33] dma-mapping: warn when there is no coherent_dma_mask

2018-01-12 Thread Konrad Rzeszutek Wilk
f-by: Christoph Hellwig Reviewed-by: Konrad Rzeszutek Wilk > --- > include/linux/dma-mapping.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h > index d84951865be7..9f28b2fa329e 100644 > --- a/include/linux/dma

Re: [PATCH v1 2/8] x86/entry/clearregs: Add infrastructure to clear registers

2018-01-11 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 05:03:22PM -0800, Andi Kleen wrote: > From: Andi Kleen > > Add 64bit assembler macros to clear registers on kernel entry. > Used in followon patches. > > Signed-off-by: Andi Kleen > --- > arch/x86/entry/calling.h | 28 > 1 file changed, 28 i

Re: [PATCH 3/8] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-10 Thread Konrad Rzeszutek Wilk
On Wed, Jan 10, 2018 at 03:28:43PM +0100, Paolo Bonzini wrote: > On 10/01/2018 15:06, Arjan van de Ven wrote: > > On 1/10/2018 5:20 AM, Paolo Bonzini wrote: > >> * a simple specification that does "IBRS=1 blocks indirect branch > >> prediction altogether" would actually satisfy the specification ju

Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v5

2018-01-09 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 01:12:51PM -0800, Christoph Hellwig wrote: > On Tue, Jan 09, 2018 at 03:04:17PM -0500, Konrad Rzeszutek Wilk wrote: > > Totally. Thanks for taking care of it - been slammed with x86 architecture > > craziness. > > I'll take this as an Acked

Re: [PATCH 6/7] x86/svm: Set IBPB when running a different VCPU

2018-01-09 Thread Konrad Rzeszutek Wilk
(Removing 't...@char.us.oracle.com') from the email. Adding Jun. > > On Tue, Jan 9, 2018 at 12:47 PM, Konrad Rzeszutek Wilk > wrote: > > On Tue, Jan 09, 2018 at 03:39:09PM -0500, Konrad Rzeszutek Wilk wrote: > >> On Tue, Jan 09, 2018 at 05:49:08PM +0100, Paolo Bonzini

Re: [PATCH 6/7] x86/svm: Set IBPB when running a different VCPU

2018-01-09 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 03:39:09PM -0500, Konrad Rzeszutek Wilk wrote: > On Tue, Jan 09, 2018 at 05:49:08PM +0100, Paolo Bonzini wrote: > > On 09/01/2018 17:23, Arjan van de Ven wrote: > > > On 1/9/2018 8:17 AM, Paolo Bonzini wrote: > > >> On 09/01/2018 16:19, Arjan

Re: [PATCH 6/7] x86/svm: Set IBPB when running a different VCPU

2018-01-09 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 05:49:08PM +0100, Paolo Bonzini wrote: > On 09/01/2018 17:23, Arjan van de Ven wrote: > > On 1/9/2018 8:17 AM, Paolo Bonzini wrote: > >> On 09/01/2018 16:19, Arjan van de Ven wrote: > >>> On 1/9/2018 7:00 AM, Liran Alon wrote: > > - ar...@linux.intel.com wrote:

Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v5

2018-01-09 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 11:47:55AM -0800, Christoph Hellwig wrote: > On Thu, Jan 04, 2018 at 02:49:21PM +0100, Christian König wrote: > > I perfectly agree on that, but this is for stable kernel backports. Because > > of this I want to keep the footprint as low as possible. > > > > When your patch

Re: [PATCH 7/8] x86/svm: Set IBPB when running a different VCPU

2018-01-09 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 01:03:09PM +0100, Paolo Bonzini wrote: > From: Tom Lendacky > > Set IBPB (Indirect Branch Prediction Barrier) when the current CPU is > going to run a VCPU different from what was previously run. Nested > virtualization uses the same VMCB for the second level guest, but t

Re: [PATCH 6/8] kvm: svm: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to guest

2018-01-09 Thread Konrad Rzeszutek Wilk
On Tue, Jan 09, 2018 at 01:03:08PM +0100, Paolo Bonzini wrote: > Direct access to MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD is important > for performance. Allow load/store of MSR_IA32_SPEC_CTRL, restore guest > IBRS on VM entry and set it to 0 on VM exit (because Linux does not use > it yet). > >

Re: [PATCH 3/7] kvm: vmx: pass MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD down to the guest

2018-01-08 Thread Konrad Rzeszutek Wilk
On Mon, Jan 08, 2018 at 07:08:41PM +0100, Paolo Bonzini wrote: > Direct access to MSR_IA32_SPEC_CTRL and MSR_IA32_PRED_CMD is important > for performance. Allow load/store of MSR_IA32_SPEC_CTRL, restore guest > IBRS on VM entry and set it to 0 on VM exit (because Linux does not use > it yet). > >

Re: [PATCH 2/7] x86/msr: add definitions for indirect branch predictor MSRs

2018-01-08 Thread Konrad Rzeszutek Wilk
On Mon, Jan 08, 2018 at 07:08:40PM +0100, Paolo Bonzini wrote: > KVM will start using them soon. Perhaps include a bit of description? > > Signed-off-by: Paolo Bonzini > --- > arch/x86/include/asm/msr-index.h | 5 + > 1 file changed, 5 insertions(+) > > diff --git a/arch/x86/include/asm/ms

Re: [PATCH 1/7] KVM: x86: add SPEC_CTRL and IBPB_SUPPORT accessors

2018-01-08 Thread Konrad Rzeszutek Wilk
On Mon, Jan 08, 2018 at 07:08:39PM +0100, Paolo Bonzini wrote: > As an interim measure until SPEC_CTRL is supported by upstream > Linux in cpufeatures, add a function that lets vmx.c and svm.c > know whether to save/restore MSR_IA32_SPEC_CTRL. Reviewed-by: Konrad Rzeszutek Wilk >

Re: [patch V2 1/2] sysfs/cpu: Add vulnerability folder

2018-01-07 Thread Konrad Rzeszutek Wilk
On Mon, Jan 08, 2018 at 01:22:04AM +0300, Alexey Dobriyan wrote: > Thomas Gleixner wrote: > > Create /sys/devices/system/cpu/vulnerabilities folder and files for > > meltdown, spectre_v1 and spectre_v2. > > It is called "grep -e '^bugs' /proc/cpuinfo". > > kpti is deduceable from .config and /pro

Re: [patch V2 1/2] sysfs/cpu: Add vulnerability folder

2018-01-07 Thread Konrad Rzeszutek Wilk
y: capacity of cpu#. > + > +What:/sys/devices/system/cpu/vulnerabilities > + /sys/devices/system/cpu/vulnerabilities/meltdown > + /sys/devices/system/cpu/vulnerabilities/spectre_v1 > + /sys/devices/system/cpu/vulnerabilities/spectre_v2 &g

Re: [patch V2 2/2] x86/cpu: Implement CPU vulnerabilites sysfs functions

2018-01-07 Thread Konrad Rzeszutek Wilk
On Sun, Jan 07, 2018 at 10:48:01PM +0100, Thomas Gleixner wrote: > Implement the CPU vulnerabilty show functions for meltdown, spectre_v1 and > spectre_v2. > > Signed-off-by: Thomas Gleixner Reviewed-by: Konrad Rzeszutek Wilk Thank you! > --- > arch/x86/Kconfig |

Is: Linus, name for 'spectre' variable. Was:Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature

2018-01-06 Thread Konrad Rzeszutek Wilk
On Sat, Jan 06, 2018 at 10:39:27PM +0100, Thomas Gleixner wrote: > On Sat, 6 Jan 2018, Konrad Rzeszutek Wilk wrote: > > On Sat, Jan 06, 2018 at 08:47:19PM +0100, Thomas Gleixner wrote: > > > On Sat, 6 Jan 2018, Dave Hansen wrote: > > > > > > > On 01/06

Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature

2018-01-06 Thread Konrad Rzeszutek Wilk
On Sat, Jan 06, 2018 at 09:34:01PM +, Van De Ven, Arjan wrote: > > I agree. But this is what customers are told to inspect to see if they > > are impacted. And if in the future versions this goes away or such - they > > will freak out and cause needless escalations. > > > it's a mistake thoug

Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature

2018-01-06 Thread Konrad Rzeszutek Wilk
On Sat, Jan 06, 2018 at 08:47:19PM +0100, Thomas Gleixner wrote: > On Sat, 6 Jan 2018, Dave Hansen wrote: > > > On 01/06/2018 09:41 AM, Van De Ven, Arjan wrote: > > .macro DISABLE_IBRS > > - ALTERNATIVE "jmp .Lskip_\@", "", X86_FEATURE_SPEC_CTRL > > + testl $1, dynamic_

Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature

2018-01-06 Thread Konrad Rzeszutek Wilk
On Sat, Jan 06, 2018 at 10:10:59AM -0800, Tim Chen wrote: > > > On 01/06/2018 12:54 AM, Greg KH wrote: > > On Fri, Jan 05, 2018 at 06:12:19PM -0800, Tim Chen wrote: > >> From: Tim Chen > >> From: Andrea Arcangeli > >> > >> There are 2 ways to control IBRS > >> > >> 1. At boot time > >> noib

Re: [PATCH v2 4/8] x86/spec_ctrl: Add sysctl knobs to enable/disable SPEC_CTRL feature

2018-01-06 Thread Konrad Rzeszutek Wilk
On Fri, Jan 05, 2018 at 06:12:19PM -0800, Tim Chen wrote: > From: Tim Chen > From: Andrea Arcangeli > > There are 2 ways to control IBRS > > 1. At boot time > noibrs kernel boot parameter will disable IBRS usage > > Otherwise if the above parameters are not specified, the system > will ena

Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set v2

2018-01-02 Thread Konrad Rzeszutek Wilk
On Tue, Jan 02, 2018 at 01:13:58PM +0100, Christian König wrote: > TTM tries to allocate coherent memory in chunks of 2MB first to improve > TLB efficiency and falls back to allocating 4K pages if that fails. > > Suppress the warning when the 2MB allocations fails since there is a > valid fall bac

Re: PROBLEM: consolidated IDT invalidation causes kexec to reboot

2017-12-27 Thread Konrad Rzeszutek Wilk
On Tue, Dec 26, 2017 at 07:00:43PM -0800, h...@zytor.com wrote: > On December 26, 2017 6:54:55 PM PST, Linus Torvalds > wrote: > >On Tue, Dec 26, 2017 at 6:25 PM, wrote: > >> > >> This is why I personally prefer to see these kinds of terminal stubs > >written in assembly explicitly: the C compi

Re: [Xen-devel] [RFC v1] ALSA: xen-front: Add Xen para-virtualized frontend driver

2017-12-22 Thread Konrad Rzeszutek Wilk
On Fri, Dec 22, 2017 at 05:48:45PM +0200, Oleksandr Andrushchenko wrote: > > On 12/22/2017 05:12 PM, Konrad Rzeszutek Wilk wrote: > > On Mon, Dec 11, 2017 at 10:45:27AM +0200, Oleksandr Andrushchenko wrote: > > > ping > > ..snip.. > > > > > This is implem

Re: [Xen-devel] [RFC v1] ALSA: xen-front: Add Xen para-virtualized frontend driver

2017-12-22 Thread Konrad Rzeszutek Wilk
On Mon, Dec 11, 2017 at 10:45:27AM +0200, Oleksandr Andrushchenko wrote: > ping ..snip.. > > > This is implemented as a change to the sndif protocol [8] and allows > > > [8] > > > https://github.com/andr2000/linux/commit/095d7feae00bf00c852c67c4f1044de5601678ed .. I must have missed it being post

Re: [PATCH] swiotlb: suppress warning when __GFP_NOWARN is set.

2017-12-19 Thread Konrad Rzeszutek Wilk
On December 19, 2017 9:32:55 AM EST, "Christian König" wrote: >TTM tries to allocate coherent memory in chunks of 2MB first to improve >TLB efficiency and falls back to allocating 4K pages if that fails. > >Suppress the warning when the 2MB allocations fails since there is a >valid fall back path

Re: [PATCH RFC 0/7] kvm pvtimer

2017-12-13 Thread Konrad Rzeszutek Wilk
On Wed, Dec 13, 2017 at 11:25:13PM +0800, Quan Xu wrote: > On Fri, Dec 8, 2017 at 11:10 PM, Konrad Rzeszutek Wilk < > konrad.w...@oracle.com> wrote: > > > On Fri, Dec 08, 2017 at 04:39:43PM +0800, Quan Xu wrote: > > > From: Ben Luo > > > > > >

Re: [PATCH] KVM: vmx: shadow more fields that are read/written on every vmexits

2017-12-13 Thread Konrad Rzeszutek Wilk
On Wed, Dec 13, 2017 at 01:13:56PM +0100, Paolo Bonzini wrote: > Compared to when VMCS shadowing was added to KVM, we are reading/writing > a few more fields: the PML index, the interrupt status and the preemption > timer value. The first two are because we are exposing more features > to nested g

Re: [PATCH] IPI performance benchmark

2017-12-13 Thread Konrad Rzeszutek Wilk
On Wed, Dec 13, 2017 at 01:47:47PM +0300, Yury Norov wrote: > On Mon, Dec 11, 2017 at 10:33:32AM -0500, Konrad Rzeszutek Wilk wrote: > > On Mon, Dec 11, 2017 at 05:16:00PM +0300, Yury Norov wrote: > > > This benchmark sends many IPIs in different modes and measures > >

Re: [PATCH] IPI performance benchmark

2017-12-11 Thread Konrad Rzeszutek Wilk
On Mon, Dec 11, 2017 at 05:16:00PM +0300, Yury Norov wrote: > This benchmark sends many IPIs in different modes and measures > time for IPI delivery (first column), and total time, ie including > time to acknowledge the receive by sender (second column). > > The scenarios are: > Dry-run: do e

Re: [PATCH RFC 0/7] kvm pvtimer

2017-12-08 Thread Konrad Rzeszutek Wilk
On Fri, Dec 08, 2017 at 04:39:43PM +0800, Quan Xu wrote: > From: Ben Luo > > This patchset introduces a new paravirtualized mechanism to reduce VM-exit > caused by guest timer accessing. And how bad is this blib in arming the timer? And how often do you get this timer to be armed? OR better yet

Re: [PATCH RFC 3/7] KVM: timer: synchronize tsc-deadline timestamp for guest

2017-12-08 Thread Konrad Rzeszutek Wilk
On Fri, Dec 08, 2017 at 04:39:46PM +0800, Quan Xu wrote: > From: Ben Luo > > In general, KVM guest programs tsc-deadline timestamp to > MSR_IA32_TSC_DEADLINE MSR. This will cause a VM-exit, and > then KVM handles this timer for guest. > > The tsc-deadline timestamp is mostly recorded in share pa

Re: [PATCH RFC 0/2] ignore LBR-related MSRs

2017-12-06 Thread Konrad Rzeszutek Wilk
On Wed, Dec 06, 2017 at 02:43:01PM +0300, Jan Dakinevich wrote: > w2k16 essentials fails to boot if underlying hypervisor lacks of support for > LBR MSRs. To workaround the issue, it suggessted to ignore these MSRs (but > not > all). This is without any hyperv enablement? Meaning normal stock g

Re: [PATCH v2 1/2] KVM: MMU: Fix infinite loop when there is no available mmu page

2017-12-06 Thread Konrad Rzeszutek Wilk
On Wed, Dec 06, 2017 at 01:28:30AM -0800, Wanpeng Li wrote: > From: Wanpeng Li > > The below test case can cause infinite loop in kvm when ept=0. > > #include > #include > #include > #include > #include > #include > #include > > long r[5]; > int main()

Re: [PATCHv2 0/4] x86: 5-level related changes into decompression code

2017-11-29 Thread Konrad Rzeszutek Wilk
On Wed, Nov 29, 2017 at 03:24:53PM -0800, H. Peter Anvin wrote: > On 11/29/17 14:31, Borislav Petkov wrote: > > > > A couple of points: > > > > * so this box here has a normal grub installation and apparently grub > > jumps to some other entry point. Ouch. Perhaps you can report this on grub-dev

Re: [Xen-devel] [PATCH] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-29 Thread Konrad Rzeszutek Wilk
On Wed, Nov 29, 2017 at 09:40:20AM -0700, Jan Beulich wrote: > >>> On 29.11.17 at 17:29, wrote: > > On Wed, Nov 29, 2017 at 08:35:33AM -0700, Jan Beulich wrote: > >> >>> On 29.11.17 at 16:08, wrote: > >> > On 11/9/2017 2:28 AM, Jan Beulich wrote: > >> > On 08.11.17 at 16:44, wrote: > >> >>>

Re: [Xen-devel] [PATCH] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute

2017-11-29 Thread Konrad Rzeszutek Wilk
On Wed, Nov 29, 2017 at 08:35:33AM -0700, Jan Beulich wrote: > >>> On 29.11.17 at 16:08, wrote: > > On 11/9/2017 2:28 AM, Jan Beulich wrote: > > On 08.11.17 at 16:44, wrote: > >>> On 11/7/2017 8:40 AM, Jan Beulich wrote: > >>> On 06.11.17 at 18:48, wrote: > > --- a/Documentation/ABI/

Re: No check of the size passed to unmap_single in swiotlb

2017-11-24 Thread Konrad Rzeszutek Wilk
..snip.. > > There doesn't seem to be much good reason for SWIOTLB to be more special > > than other DMA API backends, and not all of them have enough internal state > > to > > be able to make such a check. It's also not necessarily possible to "prevent > > damage" anyway - if a driver does pass a

Re: [PATCH V2 07/29] ibft: deprecate pci_get_bus_and_slot()

2017-11-24 Thread Konrad Rzeszutek Wilk
et_bus_and_slot() function in favor of > pci_get_domain_bus_and_slot(). Aha! > > We don't search for the device in other domains than zero. This is because > on x86 platforms the BIOS executes only devices which are in domain 0. > Furthermore, the iBFT spec doesn't have a doma

Re: No check of the size passed to unmap_single in swiotlb

2017-11-20 Thread Konrad Rzeszutek Wilk
On Mon, Nov 20, 2017 at 08:17:14AM +, Eric Yang wrote: > Hi all, Hi! > > During debug a device only support 32bits DMA(Qualcomm Atheros AP) in our > LS1043A 64bits ARM SOC, we found that the invoke of dma_unmap_single --> > swiotlb_tbl_unmap_single will unmap the passed "size" anyway eve

Re: [PATCH 03/10] x86: jailhouse: Enable APIC and SMP support

2017-11-20 Thread Konrad Rzeszutek Wilk
On Fri, Nov 17, 2017 at 11:42:02PM +0100, Thomas Gleixner wrote: > On Thu, 16 Nov 2017, Jan Kiszka wrote: > > Just noticed, that all prefixes should be 'x86/jailhouse:' please > > > +static unsigned int x2apic_get_apic_id(unsigned long id) > > +{ > > +return id; > > +} > > + > > static v

Re: [PATCH v5 2/4] KVM: X86: Add paravirt remote TLB flush

2017-11-16 Thread Konrad Rzeszutek Wilk
On Thu, Nov 16, 2017 at 12:00:45PM +0100, Paolo Bonzini wrote: > On 15/11/2017 22:11, Konrad Rzeszutek Wilk wrote: > > If we migrate to another host that does not expose this, should the > > flush_tlb_others be reset back to the generic one? Or we don't care that > >

Re: [Xen-devel] [PATCH RFC v3 0/6] x86/idle: add halt poll support

2017-11-15 Thread Konrad Rzeszutek Wilk
On Mon, Nov 13, 2017 at 06:05:59PM +0800, Quan Xu wrote: > From: Yang Zhang > > Some latency-intensive workload have seen obviously performance > drop when running inside VM. The main reason is that the overhead > is amplified when running inside VM. The most cost I have seen is > inside idle pat

Re: [PATCH v5 2/4] KVM: X86: Add paravirt remote TLB flush

2017-11-15 Thread Konrad Rzeszutek Wilk
On Mon, Nov 13, 2017 at 02:01:18AM -0800, Wanpeng Li wrote: > From: Wanpeng Li > > Remote flushing api's does a busy wait which is fine in bare-metal > scenario. But with-in the guest, the vcpus might have been pre-empted > or blocked. In this scenario, the initator vcpu would end up > busy-waiti

Re: [PATCH v5 0/4] KVM: X86: Paravirt remote TLB flush

2017-11-15 Thread Konrad Rzeszutek Wilk
On Mon, Nov 13, 2017 at 02:01:16AM -0800, Wanpeng Li wrote: > Remote flushing api's does a busy wait which is fine in bare-metal > scenario. But with-in the guest, the vcpus might have been pre-empted > or blocked. In this scenario, the initator vcpu would end up > busy-waiting for a long amount of

Re: [PATCH v3] KVM: X86: Fix softlockup when get the current kvmclock

2017-11-08 Thread Konrad Rzeszutek Wilk
On Wed, Nov 08, 2017 at 06:52:12PM -0800, Wanpeng Li wrote: > From: Wanpeng Li > > watchdog: BUG: soft lockup - CPU#6 stuck for 22s! [qemu-system-x86:10185] > CPU: 6 PID: 10185 Comm: qemu-system-x86 Tainted: G OE > 4.14.0-rc4+ #4 > RIP: 0010:kvm_get_time_scale+0x4e/0xa0 [kvm] > C

Re: [PATCH v2 0/2] KVM: MMU: fix kvm_is_mmio_pfn()

2017-11-02 Thread Konrad Rzeszutek Wilk
On Tue, Oct 31, 2017 at 07:48:38PM +0800, Haozhong Zhang wrote: > [I just copy the commit message from patch 2] > > Some reserved pages, such as those from NVDIMM DAX devices, are > not for MMIO, and can be mapped with cached memory type for better > performance. However, the above check misconcei

Re: [PATCH v3 2/3] KVM: nVMX: Validate the IA32_BNDCFGS on nested VM-entry

2017-11-02 Thread Konrad Rzeszutek Wilk
S MSR must be 0. > - The linear address in bits 63:12 must be canonical. > > Cc: Paolo Bonzini > Cc: Radim Krčmář > Cc: Jim Mattson > Signed-off-by: Wanpeng Li Reviewed-by: Konrad Rzeszutek Wilk > --- > arch/x86/kvm/vmx.c | 7 +++ > 1 file changed, 7 insertion

Re: [PATCH 9/9] KVM: x86: Disable intercept for Intel processor trace MSRs

2017-10-17 Thread Konrad Rzeszutek Wilk
On October 16, 2017 8:14:11 AM EDT, Luwei Kang wrote: >From: Chao Peng > >Trap for Intel processor trace is none sense. Pass through to >guest directly. And none of those MSRs can be subverted by the guest? That is none of these should be filtered / audited first? > >Signed-off-by: Chao Peng

Re: [PATCH v4 3/3] MAINTAINERS: xen, kvm: track pvclock-abi.h changes

2017-09-27 Thread Konrad Rzeszutek Wilk
eader file, hence this commit simply enforces it more > explicitly and have both peers noticed when such changes happen. > > Signed-off-by: Joao Martins > Acked-by: Juergen Gross Reviewed-by: Konrad Rzeszutek Wilk > --- > In the end, I choose the originally posted because t

Re: [PATCH 2/2] KVM: VMX: Don't expose PLE enable if there is no hardware support

2017-09-27 Thread Konrad Rzeszutek Wilk
the L1 hypervsior, however, > ple_window still s/hypervsior/hypervisor/ > shows the default value on L1 hypervsior. This patch fixes it by clearing all > the Ditto here. > PLE related module parameter if there is no PLE capability. > > Cc: Paolo Bonzini > Cc: Radim Krčmář &g

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-25 Thread Konrad Rzeszutek Wilk
> I think you are missing the following point: > > "vcpu0 can be interrupted when its not in a spinlock protected section, > otherwise it can't." > > So you _have_ to communicate to the host when the guest enters/leaves a > critical section. How would this work for Windows or FreeBSD?

Re: [patch 3/3] x86: kvm guest side support for KVM_HC_RT_PRIO hypercall

2017-09-21 Thread Konrad Rzeszutek Wilk
On Thu, Sep 21, 2017 at 08:38:38AM -0300, Marcelo Tosatti wrote: > Add hypercalls to spinlock/unlock to set/unset FIFO priority > for the vcpu, protected by a static branch to avoid performance > increase in the normal kernels. > > Enable option by "kvmfifohc" kernel command line parameter (disabl

Re: [patch 2/3] KVM: x86: KVM_HC_RT_PRIO hypercall (host-side)

2017-09-21 Thread Konrad Rzeszutek Wilk
On Thu, Sep 21, 2017 at 08:38:37AM -0300, Marcelo Tosatti wrote: > When executing guest vcpu-0 with FIFO:1 priority, which is necessary to > deal with the following situation: > > VCPU-0 (housekeeping VCPU)VCPU-1 (realtime VCPU) > > raw_spin_lock(A) > interrupted, schedule task T-1

Re: [RFC PATCH v2 0/7] x86/idle: add halt poll support

2017-08-29 Thread Konrad Rzeszutek Wilk
On Tue, Aug 29, 2017 at 10:02:15PM +0800, Wanpeng Li wrote: > > Here is the data we get when running benchmark netperf: > > > >2. w/ patch: > > halt_poll_threshold=1 -- 15803.89 bits/s -- 159.5 %CPU > > halt_poll_threshold=2 -- 15899.04 bits/s -- 161.5 %CPU > > halt_po

Re: [PATCH v6] vfio: platform: reset: Add Broadcom FlexRM reset module

2017-08-29 Thread Konrad Rzeszutek Wilk
On Tue, Aug 29, 2017 at 09:34:46AM +0530, Anup Patel wrote: > This patch adds Broadcom FlexRM low-level reset for > VFIO platform. > Is there an document that explains and /or details the various registers? > It will do the following: > 1. Disable/Deactivate each FlexRM ring > 2. Flush each FlexR

Re: [RFC PATCH v2 1/7] x86/paravirt: Add pv_idle_ops to paravirt ops

2017-08-29 Thread Konrad Rzeszutek Wilk
On Tue, Aug 29, 2017 at 11:46:35AM +, Yang Zhang wrote: > So far, pv_idle_ops.poll is the only ops for pv_idle. .poll is called in > idle path which will polling for a while before we enter the real idle > state. > > In virtualization, idle path includes several heavy operations > includes tim

[GIT PULL] (xen) stable/for-jens-4.13.. for 4.13-rc7 or 4.14-rc1 if you would like

2017-08-28 Thread Konrad Rzeszutek Wilk
Hey Jens, Please git pull the following branch: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.13 .. which as a bug-fix when shutting down xen block backend driver with multiple queues and the driver not clearing all of them. Thank you! If you pull it in your

Re: [Xen-devel] [PATCH 1/1] xen-blkback: stop blkback thread of every queue in xen_blkif_disconnect

2017-08-23 Thread Konrad Rzeszutek Wilk
.snip.. > > > > Acked-by: Roger Pau Monné > > Forgot to add, this needs to be backported to stable branches, so: Annie, could you resend the patch with the tags and an update to the description to me please? > > Cc: sta...@vger.kernel.org > > Roger. > > __

Re: [PATCH] KVM/x86: Increase max vcpu number to 352

2017-08-18 Thread Konrad Rzeszutek Wilk
On Wed, Aug 16, 2017 at 11:07:55AM +0800, Lan Tianyu wrote: > On 2017年08月15日 22:10, Konrad Rzeszutek Wilk wrote: > > On Tue, Aug 15, 2017 at 11:00:04AM +0800, Lan Tianyu wrote: > >> On 2017年08月12日 03:35, Konrad Rzeszutek Wilk wrote: > >>> On Fri, Aug 11, 2017 at

Re: [PATCH] KVM/x86: Increase max vcpu number to 352

2017-08-18 Thread Konrad Rzeszutek Wilk
On Tue, Aug 15, 2017 at 06:13:29PM +0200, Radim Krčmář wrote: > (Missed this mail before my last reply.) > > 2017-08-15 10:10-0400, Konrad Rzeszutek Wilk: > > On Tue, Aug 15, 2017 at 11:00:04AM +0800, Lan Tianyu wrote: > > > On 2017年08月12日 03:35, Konrad Rzeszutek Wilk

[GIT PULL] (xen) stable/for-jens-4.13 for rc5

2017-08-15 Thread Konrad Rzeszutek Wilk
Hey Jens, Please git pull the following branch: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.13 which has two fixes, both of them spotted by Amazon. 1) Fix in Xen-blkfront caused by the re-write in 4.8 time-frame. 2) Fix in the xen_biovec_phys_mergeable whi

Re: [PATCH] KVM/x86: Increase max vcpu number to 352

2017-08-15 Thread Konrad Rzeszutek Wilk
On Tue, Aug 15, 2017 at 11:00:04AM +0800, Lan Tianyu wrote: > On 2017年08月12日 03:35, Konrad Rzeszutek Wilk wrote: > > On Fri, Aug 11, 2017 at 03:00:20PM +0200, Radim Krčmář wrote: > >> 2017-08-11 10:11+0200, David Hildenbrand: > >>> On 11.08.2017 09:49, Lan

Re: [PATCH] KVM/x86: Increase max vcpu number to 352

2017-08-11 Thread Konrad Rzeszutek Wilk
On Fri, Aug 11, 2017 at 03:00:20PM +0200, Radim Krčmář wrote: > 2017-08-11 10:11+0200, David Hildenbrand: > > On 11.08.2017 09:49, Lan Tianyu wrote: > >> Hi Konrad: > >>Thanks for your review. > >> > >> On 2017年08月11日 01:50, Konrad Rzeszutek Wi

Re: [PATCH v5 08/10] arm64/mm: Add support for XPFO to swiotlb

2017-08-10 Thread Konrad Rzeszutek Wilk
On Wed, Aug 09, 2017 at 02:07:53PM -0600, Tycho Andersen wrote: > From: Juerg Haefliger > > Pages that are unmapped by XPFO need to be mapped before and unmapped > again after (to restore the original state) the __dma_{map,unmap}_area() > operations to prevent fatal page faults. > > Signed-off-b

Re: [PATCH v5 03/10] swiotlb: Map the buffer if it was unmapped by XPFO

2017-08-10 Thread Konrad Rzeszutek Wilk
On Wed, Aug 09, 2017 at 02:07:48PM -0600, Tycho Andersen wrote: > From: Juerg Haefliger > > Signed-off-by: Juerg Haefliger > Tested-by: Tycho Andersen > --- > include/linux/xpfo.h | 4 > lib/swiotlb.c| 3 ++- > mm/xpfo.c| 9 + > 3 files changed, 15 insertions(+

[GIT PULL] (xen) stable/for-jens-4.13

2017-07-25 Thread Konrad Rzeszutek Wilk
Hi Jens, Please git pull in your branch "for-linus" the following branch which is based on 765e40b675a9566459ddcb8358ad16f3b8344bbe "blk-mq: map queues to all present CPUs": git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.13 It has two bug-fixes for the xen-blkfr

Re: [Xen-devel] maybe revert commit c275a57f5ec3 "xen/balloon: Set balloon's initial state to number of existing RAM pages"

2017-07-07 Thread Konrad Rzeszutek Wilk
On Tue, Mar 28, 2017 at 05:30:24PM +0200, Juergen Gross wrote: > On 28/03/17 16:27, Boris Ostrovsky wrote: > > On 03/28/2017 04:08 AM, Jan Beulich wrote: > > On 28.03.17 at 03:57, wrote: > >>> I think there is indeed a disconnect between target memory (provided by > >>> the toolstack) and cur

Re: [Xen-devel] [PATCH] xen/x86: Don't BUG on CPU0 offlining

2017-06-28 Thread Konrad Rzeszutek Wilk
On Mon, Jun 26, 2017 at 06:39:30PM +0200, Vitaly Kuznetsov wrote: > CONFIG_BOOTPARAM_HOTPLUG_CPU0 allows to offline CPU0 but Xen HVM guests > BUG() in xen_teardown_timer(). Remove the BUG_ON(), this is probably a > leftover from ancient times when CPU0 hotplug was impossible, it works > just fine f

Re: [GIT PULL] (xen) stable/for-jens-3.14

2017-06-20 Thread Konrad Rzeszutek Wilk
On Tue, Jun 20, 2017 at 07:11:01AM -0600, Jens Axboe wrote: > On 06/20/2017 06:13 AM, Konrad Rzeszutek Wilk wrote: > > Hey Jens, > > > > Please git pull the following branch: > > > > git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git > >

[GIT PULL] (xen) stable/for-jens-3.14

2017-06-20 Thread Konrad Rzeszutek Wilk
Hey Jens, Please git pull the following branch: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.12 which has security and memory leak fixes in xen block driver. Thank you. Jan Beulich (1): xen-blkback: don't leak stack data via response ring Juergen Gross

Re: [PATCH v6 26/34] iommu/amd: Allow the AMD IOMMU to work with memory encryption

2017-06-15 Thread Konrad Rzeszutek Wilk
On June 15, 2017 11:33:22 AM EDT, Borislav Petkov wrote: >On Thu, Jun 15, 2017 at 09:59:45AM -0500, Tom Lendacky wrote: >> Actually the detection routine, amd_iommu_detect(), is part of the >> IOMMU_INIT_FINISH macro support which is called early through >mm_init() >> from start_kernel() and that

Re: [PATCH 08/44] xen-swiotlb: implement ->mapping_error

2017-06-10 Thread Konrad Rzeszutek Wilk
On Thu, Jun 08, 2017 at 03:25:33PM +0200, Christoph Hellwig wrote: > DMA_ERROR_CODE is going to go away, so don't rely on it. Reviewed-by: Konrad Rzeszutek Wilk

Re: [PATCH 07/44] xen-swiotlb: consolidate xen_swiotlb_dma_ops

2017-06-10 Thread Konrad Rzeszutek Wilk
--- > drivers/xen/swiotlb-xen.c | 93 > ++ > include/xen/swiotlb-xen.h | 62 +--- > 4 files changed, 49 insertions(+), 137 deletions(-) Yeeey! Reviewed-by: Konrad Rzeszutek Wilk

Re: [Xen-devel] [PATCH 0/5] xen/pvh*: Support > 32 VCPUs at restore

2017-06-08 Thread Konrad Rzeszutek Wilk
On Thu, Jun 08, 2017 at 10:28:15AM +0200, Juergen Gross wrote: > On 03/06/17 02:05, Ankur Arora wrote: > > This patch series fixes a bunch of issues in the xen_vcpu setup > > logic. > > > > Simplify xen_vcpu related code: code refactoring in advance of the > > rest of the patch series. > > > > Su

Re: [Xen-devel] [PATCH v2 0/3] xen/blkback: several fixes of resource management

2017-06-07 Thread Konrad Rzeszutek Wilk
On Wed, Jun 07, 2017 at 10:36:58PM +1000, Steven Haigh wrote: > On Friday, 19 May 2017 1:28:46 AM AEST Juergen Gross wrote: > > Destroying a Xen guest domain while it was doing I/Os via xen-blkback > > leaked several resources, including references of the guest's memory > > pages. > > > > This pat

Re: [Xen-devel] [PATCH 2/2] xen: add sysfs node for guest type

2017-05-22 Thread Konrad Rzeszutek Wilk
On Mon, May 22, 2017 at 10:57:00AM +0200, Juergen Gross wrote: > Currently there is no reliable user interface inside a Xen guest to > determine its type (e.g. HVM, PV or PVH). Instead of letting user mode > try to determine this by various rather hacky mechanisms (parsing of > boot messages before

[GIT PULL] (xen) stable/for-jens-4.12

2017-05-15 Thread Konrad Rzeszutek Wilk
Hey Jens, Could you kindly pull: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.12 which has one tiny fix: Thanks! Gustavo A. R. Silva (1): block: xen-blkback: add null check to avoid null pointer dereference drivers/block/xen-blkback/xenbus.c | 8

Re: [PATCH] block: xen-blkback: add null check to avoid null pointer dereference

2017-05-15 Thread Konrad Rzeszutek Wilk
On Thu, May 11, 2017 at 10:27:35AM -0500, Gustavo A. R. Silva wrote: > Add null check before calling xen_blkif_put() to avoid potential > null pointer dereference. > Applied to 'stable/for-jens-4.12' and will push soon to Jens. > Addresses-Coverity-ID: 1350942 > Cc: Juergen Gross > Signed-off-b

[GIT PULL] (xen) stable/for-jens-4.12

2017-04-18 Thread Konrad Rzeszutek Wilk
Hey Jens, Please git pull the following branch: git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen.git stable/for-jens-4.12 which is based on your 'for-4.12/block' branch. It has one fix - to emit an uevent whenever the size of the guest disk image changes. Please pull! drivers/block/x

Re: [PATCH 16/22] xen-blkfront: Make use of the new sg_map helper function

2017-04-18 Thread Konrad Rzeszutek Wilk
On Tue, Apr 18, 2017 at 09:42:20AM -0600, Logan Gunthorpe wrote: > > > On 18/04/17 08:27 AM, Konrad Rzeszutek Wilk wrote: > > Interesting that you didn't CC any of the maintainers. Could you > > do that in the future please? > > Please read the cover lette

Re: [PATCH 0/4] Properly invalidate data in the cleancache.

2017-04-18 Thread Konrad Rzeszutek Wilk
v(). > Note: I only fixed conditional cleancache_invalidate_inode() here. >Do we also need to add ->nrexceptional check in into invalidate_bdev()? > > - Patches 3-4: some optimizations. Acked-by: Konrad Rzeszutek Wilk Thanks! > > Andrey Ryabinin (4): > fs: f

Re: [PATCH 16/22] xen-blkfront: Make use of the new sg_map helper function

2017-04-18 Thread Konrad Rzeszutek Wilk
On Tue, Apr 18, 2017 at 02:13:59PM +, David Laight wrote: > From: Logan Gunthorpe > > Sent: 13 April 2017 23:05 > > Straightforward conversion to the new helper, except due to > > the lack of error path, we have to warn if unmapable memory > > is ever present in the sgl. Interesting that you d

Re: [PATCH 2/2] xen/arm,arm64: rename __generic_dma_ops to xen_get_dma_ops

2017-04-13 Thread Konrad Rzeszutek Wilk
> > Signed-off-by: Stefano Stabellini > > CC: li...@armlinux.org.uk > > CC: catalin.mari...@arm.com > > CC: will.dea...@arm.com > > CC: boris.ostrov...@oracle.com > > CC: jgr...@suse.com > > CC: Julien Grall > > Reviewed-by: Boris Ostrovsky > > (

Re: [PATCH] blkfront: add uevent for size change

2017-04-11 Thread Konrad Rzeszutek Wilk
On Tue, Apr 11, 2017 at 12:24:09PM -0700, Marc Olson wrote: > When a blkfront device is resized from dom0, emit a KOBJ_CHANGE uevent to > notify the guest about the change. This allows for custom udev rules, such > as automatically resizing a filesystem, when an event occurs. Looks pretty reasonab

Re: [Xen-devel] [For Linux 1/4] xen/kbdif: update protocol description

2017-04-07 Thread Konrad Rzeszutek Wilk
On Fri, Apr 07, 2017 at 01:29:27PM +0200, Juergen Gross wrote: > On 07/04/17 10:30, Oleksandr Andrushchenko wrote: > > From: Oleksandr Andrushchenko > > > > The patch clarifies the protocol that is used by the PV keyboard > > drivers. > > > > Reviewed-by:

Re: [PATCH v2] xen: make functions in xen-acpi-processor return void

2017-03-31 Thread Konrad Rzeszutek Wilk
On Fri, Mar 31, 2017 at 04:40:56PM +0200, Juergen Gross wrote: > There are several functions in xen-acpi-processor which either always > return the same value or where the returned value is never checked. > > Make the functions return void. Well, we could actually check it and do some extra error

Re: maybe revert commit c275a57f5ec3 "xen/balloon: Set balloon's initial state to number of existing RAM pages"

2017-03-24 Thread Konrad Rzeszutek Wilk
On Fri, Mar 24, 2017 at 04:34:23PM -0400, Dan Streetman wrote: > On Wed, Mar 22, 2017 at 10:13 PM, Boris Ostrovsky > wrote: > > > > > > On 03/22/2017 05:16 PM, Dan Streetman wrote: > >> > >> I have a question about a problem introduced by this commit: > >> c275a57f5ec3056f732843b11659d892235faff7

Re: [Xen-devel] [PATCH 0/2 v2] xen/acpi: upload PM state from init-domain to Xen

2017-03-24 Thread Konrad Rzeszutek Wilk
cessor.c | 36 +++- > > 1 file changed, 27 insertions(+), 9 deletions(-) > > > > Applied to for-linus-4.11b, with some modifications to commit message in > patch 2. > > Next time please copy maintainers (Juergen and me), otherwise there

Re: [Xen-devel] [PATCH v3 4/7] xen/9pfs: connect to the backend

2017-03-17 Thread Konrad Rzeszutek Wilk
On Fri, Mar 17, 2017 at 05:54:47AM +0100, Juergen Gross wrote: > On 16/03/17 19:03, Stefano Stabellini wrote: > > On Thu, 16 Mar 2017, Juergen Gross wrote: > >> On 15/03/17 19:44, Stefano Stabellini wrote: > >>> On Wed, 15 Mar 2017, Juergen Gross wrote: > On 14/03/17 22:22, Stefano Stabellini

Re: [Xen-devel] [PATCH 6/7] xen/9pfs: receive responses

2017-03-08 Thread Konrad Rzeszutek Wilk
On Tue, Mar 07, 2017 at 05:13:59PM -0800, Stefano Stabellini wrote: > On Tue, 7 Mar 2017, Stefano Stabellini wrote: > > > > + > > > > + ring = container_of(work, struct xen_9pfs_dataring, work); > > > > + priv = ring->priv; > > > > + > > > > + while (1) { > > > > + c

Re: [GIT PULL] (swiotbl) stable/for-4.11 for 4.11-rc1

2017-03-06 Thread Konrad Rzeszutek Wilk
On Mon, Mar 06, 2017 at 11:52:06AM -0500, Konrad Rzeszutek Wilk wrote: > Hey Linus, Vacation does strange things to my brain. Fixed up the LKML mailing list address. > > Please git pull the following branch: > > git://git.kernel.org/pub/scm/linux/kernel/git/konrad/swiotlb.gi

Re: [RFC PATCH v4 19/28] swiotlb: Add warnings for use of bounce buffers with SME

2017-02-17 Thread Konrad Rzeszutek Wilk
On Thu, Feb 16, 2017 at 09:46:19AM -0600, Tom Lendacky wrote: > Add warnings to let the user know when bounce buffers are being used for > DMA when SME is active. Since the bounce buffers are not in encrypted > memory, these notifications are to allow the user to determine some > appropriate actio

<    1   2   3   4   5   6   7   8   9   10   >