Re: [RFCv1 7/7] KVM: unmap guest memory using poisoned pages

2021-04-07 Thread Christophe de Dinechin
> On 7 Apr 2021, at 15:16, Kirill A. Shutemov wrote: > > On Tue, Apr 06, 2021 at 04:57:46PM +0200, David Hildenbrand wrote: >> On 06.04.21 16:33, Dave Hansen wrote: >>> On 4/6/21 12:44 AM, David Hildenbrand wrote: On 02.04.21 17:26, Kirill A. Shutemov wrote: > TDX architecture aims

Re: [PATCH v2 0/2] Simplify mtty driver and mdev core

2019-08-20 Thread Christophe de Dinechin
hich is that it forces user-space to resolve potential race conditions when creating an index or short name or alias. Also, what happens if `index=10` is not provided on the command-line? Does that make the device unusable for your purpose? -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH] KVM: Disable wake-affine vCPU process to mitigate lock holder preemption

2019-08-02 Thread Christophe de Dinechin
I suspect an increasing number of hosts will be split between VMs and containers. > > Regards -- Cheers, Christophe de Dinechin

Re: [PATCH v1 0/6] mm / virtio: Provide support for paravirtual waste page treatment

2019-06-26 Thread Christophe de Dinechin
t;> mm/Makefile |1 >> mm/aeration.c | 270 >> +++ >> mm/page_alloc.c | 203 ++ >> mm/shuffle.c| 24 --- >> mm/shuffle.h| 35 + >> 12 files changed, 753 insertions(+), 136 deletions(-) >> create mode 100644 include/linux/memory_aeration.h >> create mode 100644 mm/aeration.c > > Compared to > > 17 files changed, 838 insertions(+), 86 deletions(-) > create mode 100644 include/linux/memory_aeration.h > create mode 100644 mm/aeration.c > > this looks like a good improvement :) -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [RFC PATCH V2 4/5] vhost: introduce helpers to get the size of metadata area

2019-03-06 Thread Christophe de Dinechin
> On 6 Mar 2019, at 08:18, Jason Wang wrote: > > Signed-off-by: Jason Wang > --- > drivers/vhost/vhost.c | 46 -- > 1 file changed, 28 insertions(+), 18 deletions(-) > > diff --git a/drivers/vhost/vhost.c b/drivers/vhost/vhost.c > index

Re: [RFC PATCH V2 2/5] vhost: fine grain userspace memory accessors

2019-03-06 Thread Christophe de Dinechin
> On 6 Mar 2019, at 08:18, Jason Wang wrote: > > This is used to hide the metadata address from virtqueue helpers. This > will allow to implement a vmap based fast accessing to metadata. > > Signed-off-by: Jason Wang > --- > drivers/vhost/vhost.c | 94

Re: [Qemu-devel][PATCH 3/4] Add hepler functions for CPUID xsave area size calculation.

2019-01-08 Thread Christophe de Dinechin
Typo in subject line (helper) > On 26 Dec 2018, at 09:25, Yang Weijiang wrote: > > These functions are called when return CPUID xsave area > size information. > > Signed-off-by: Zhang Yi > Signed-off-by: Yang Weijiang > --- > target/i386/cpu.c | 26 +- > 1 file

Re: [PATCH 08/11] x86/fpu: Always store the registers in copy_fpstate_to_sigframe()

2018-10-11 Thread Christophe de Dinechin
saving the registers > - * directly. > - */ > - if (boot_cpu_has(X86_FEATURE_XSAVES)) { > - WARN_ONCE(1, "x86/fpu: saving compacted-format xsave > area to a signal frame!\n"); > - return -1; > - } > + copy_fpregs_to_fpstate(fpu); > + fpregs_deactivate(fpu); > + } > > + if (using_compacted_format()) { > + copy_xstate_to_user(buf_fx, xsave, 0, size); > + } else { > fpstate_sanitize_xstate(fpu); > - if (__copy_to_user(buf_fx, xsave, fpu_user_xstate_size)) > + size = fpu_user_xstate_size; > + if (__copy_to_user(buf_fx, xsave, size)) > return -1; > } -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH 08/11] x86/fpu: Always store the registers in copy_fpstate_to_sigframe()

2018-10-11 Thread Christophe de Dinechin
saving the registers > - * directly. > - */ > - if (boot_cpu_has(X86_FEATURE_XSAVES)) { > - WARN_ONCE(1, "x86/fpu: saving compacted-format xsave > area to a signal frame!\n"); > - return -1; > - } > + copy_fpregs_to_fpstate(fpu); > + fpregs_deactivate(fpu); > + } > > + if (using_compacted_format()) { > + copy_xstate_to_user(buf_fx, xsave, 0, size); > + } else { > fpstate_sanitize_xstate(fpu); > - if (__copy_to_user(buf_fx, xsave, fpu_user_xstate_size)) > + size = fpu_user_xstate_size; > + if (__copy_to_user(buf_fx, xsave, size)) > return -1; > } -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH 03/11] x86/fpu: make __raw_xsave_addr() use feature number instead of mask

2018-10-11 Thread Christophe de Dinechin
; i); > > if (hdr.xfeatures & mask) { > - void *dst = __raw_xsave_addr(xsave, 1 << i); > + void *dst = __raw_xsave_addr(xsave, i); > > offset = xstate_offsets[i]; > size = xstate_sizes[i]; -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH 03/11] x86/fpu: make __raw_xsave_addr() use feature number instead of mask

2018-10-11 Thread Christophe de Dinechin
; i); > > if (hdr.xfeatures & mask) { > - void *dst = __raw_xsave_addr(xsave, 1 << i); > + void *dst = __raw_xsave_addr(xsave, i); > > offset = xstate_offsets[i]; > size = xstate_sizes[i]; -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature

2018-10-05 Thread Christophe de Dinechin
> On 5 Oct 2018, at 16:41, Daniel Vetter wrote: > > On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote: >> >> >>> On 5 Oct 2018, at 14:51, Gerd Hoffmann wrote: >>> >>> The feature allows the guest request an EDID blob (

Re: [PATCH v2] virtio-gpu: add VIRTIO_GPU_F_EDID feature

2018-10-05 Thread Christophe de Dinechin
> On 5 Oct 2018, at 16:41, Daniel Vetter wrote: > > On Fri, Oct 05, 2018 at 04:38:11PM +0200, Christophe de Dinechin wrote: >> >> >>> On 5 Oct 2018, at 14:51, Gerd Hoffmann wrote: >>> >>> The feature allows the guest request an EDID blob (

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-31 Thread Christophe de Dinechin
> On 31 Jan 2018, at 11:15, Thomas Gleixner <t...@linutronix.de> wrote: > > On Wed, 31 Jan 2018, Christophe de Dinechin wrote: >>> On 30 Jan 2018, at 21:46, Alan Cox <gno...@lxorguk.ukuu.org.uk> wrote: >>> >>>> If you are ever going to migr

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-31 Thread Christophe de Dinechin
> On 31 Jan 2018, at 11:15, Thomas Gleixner wrote: > > On Wed, 31 Jan 2018, Christophe de Dinechin wrote: >>> On 30 Jan 2018, at 21:46, Alan Cox wrote: >>> >>>> If you are ever going to migrate to Skylake, I think you should just >>>> al

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-31 Thread Christophe de Dinechin
> On 30 Jan 2018, at 21:46, Alan Cox wrote: > >> If you are ever going to migrate to Skylake, I think you should just >> always tell the guests that you're running on Skylake. That way the >> guests will always assume the worst case situation wrt Specte. > >

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-31 Thread Christophe de Dinechin
> On 30 Jan 2018, at 21:46, Alan Cox wrote: > >> If you are ever going to migrate to Skylake, I think you should just >> always tell the guests that you're running on Skylake. That way the >> guests will always assume the worst case situation wrt Specte. > > Unfortunately if you do that then

Re: [RFC 05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-31 Thread Christophe de Dinechin
SPECTRE_V2_RETPOLINE_MINIMAL_AMD; > - setup_force_cpu_cap(X86_FEATURE_RETPOLINE_AMD); > - setup_force_cpu_cap(X86_FEATURE_RETPOLINE); > - } else { > - retpoline_generic: > - mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC : > - SPECTRE_V2_RETPOLINE_MINIMAL; > - setup_force_cpu_cap(X86_FEATURE_RETPOLINE); > + /* Fall through */ > + case SPECTRE_V2_CMD_RETPOLINE_GENERIC: > + if (IS_ENABLED(CONFIG_RETPOLINE)) { > + mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC : > + SPECTRE_V2_RETPOLINE_MINIMAL; > + setup_force_cpu_cap(X86_FEATURE_RETPOLINE); > + break; > + } > + /* Fall through */ > + default: > + if (boot_cpu_has_bug(X86_BUG_SPECTRE_V2)) > + pr_err("kernel not compiled with retpoline; no > mitigation available!"); > + return; > } > > spectre_v2_enabled = mode; -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [RFC 05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-31 Thread Christophe de Dinechin
gt; - setup_force_cpu_cap(X86_FEATURE_RETPOLINE_AMD); > - setup_force_cpu_cap(X86_FEATURE_RETPOLINE); > - } else { > - retpoline_generic: > - mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC : > - SPECTRE_V2_RETPOLINE_MINIMAL; > - setup_force_cpu_cap(X86_FEATURE_RETPOLINE); > + /* Fall through */ > + case SPECTRE_V2_CMD_RETPOLINE_GENERIC: > + if (IS_ENABLED(CONFIG_RETPOLINE)) { > + mode = retp_compiler() ? SPECTRE_V2_RETPOLINE_GENERIC : > + SPECTRE_V2_RETPOLINE_MINIMAL; > + setup_force_cpu_cap(X86_FEATURE_RETPOLINE); > + break; > + } > + /* Fall through */ > + default: > + if (boot_cpu_has_bug(X86_BUG_SPECTRE_V2)) > + pr_err("kernel not compiled with retpoline; no > mitigation available!"); > + return; > } > > spectre_v2_enabled = mode; -- Cheers, Christophe de Dinechin (IRC c3d)

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-30 Thread Christophe de Dinechin
> On 30 Jan 2018, at 15:52, Christian Borntraeger <borntrae...@de.ibm.com> > wrote: > > > > On 01/30/2018 03:46 PM, Christophe de Dinechin wrote: >> >> >>> On 30 Jan 2018, at 13:11, Christian Borntraeger <borntrae...@de.ibm.com> >>

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-30 Thread Christophe de Dinechin
> On 30 Jan 2018, at 15:52, Christian Borntraeger > wrote: > > > > On 01/30/2018 03:46 PM, Christophe de Dinechin wrote: >> >> >>> On 30 Jan 2018, at 13:11, Christian Borntraeger >>> wrote: >>> >>> >>>

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-30 Thread Christophe de Dinechin
> On 30 Jan 2018, at 13:11, Christian Borntraeger > wrote: > > > > On 01/30/2018 01:23 AM, Linus Torvalds wrote: > [...] >> >> So I actually have a _different_ question to the virtualization >> people. This includes the vmware people, but it also obviously >>

Re: [RFC,05/10] x86/speculation: Add basic IBRS support infrastructure

2018-01-30 Thread Christophe de Dinechin
> On 30 Jan 2018, at 13:11, Christian Borntraeger > wrote: > > > > On 01/30/2018 01:23 AM, Linus Torvalds wrote: > [...] >> >> So I actually have a _different_ question to the virtualization >> people. This includes the vmware people, but it also obviously >> incldues the Amazon AWS kind