Re: [PATCH] x86/boot: clear rsdp address in boot_params for broken loaders

2018-12-03 Thread Juergen Gross
On 04/12/2018 00:07, h...@zytor.com wrote: > On December 3, 2018 2:38:11 AM PST, Juergen Gross wrote: >> In case a broken boot loader doesn't clear its struct boot_params clear >> rsdp_addr in sanitize_boot_params(). >> >> This fixes commit e6e094e053af75

Re: [PATCH] x86/boot: clear rsdp address in boot_params for broken loaders

2018-12-03 Thread Juergen Gross
On 04/12/2018 06:49, H. Peter Anvin wrote: > On 12/3/18 9:32 PM, Juergen Gross wrote: >> >> I'd like to send a followup patch doing that. And I'd like to not only >> test sentinel for being non-zero, but all padding fields as well. This >> should be 4.21 mater

Re: [PATCH v4 0/9] xen: dma-buf support for grant device

2018-07-02 Thread Juergen Gross
On 02/07/18 09:10, Oleksandr Andrushchenko wrote: > Hello, Boris, Juergen! > > Do you think I can re-base the series (which already has > all required R-b's from Xen community) onto the latest kernel > with API changes to patches 5 (of_dma_configure) and 8 > (dma-buf atomic ops) and we can merge i

[GIT PULL] xen: fix for 4.17-rc5

2018-05-11 Thread Juergen Gross
/x86/xen/enlighten_hvm.c | 13 + 1 file changed, 13 insertions(+) Juergen Gross (1): Merge tag 'for-linus-4.17-rc5-tag' of gitolite.kernel.org:pub/scm/linux/kernel/git/xen/tip into __for-linus-4.17-rc5-tag van der Linden, Frank (1): x86/xen: Reset VCPU0 info poi

Re: [PATCH] x86-64/Xen: fix stack switching

2018-05-14 Thread Juergen Gross
On 14/05/18 12:28, Jan Beulich wrote: On 08.05.18 at 04:38, wrote: >> On Mon, May 7, 2018 at 5:16 AM Jan Beulich wrote: >> >>> While on native entry into the kernel happens on the trampoline stack, >>> PV Xen kernels are being entered with the current thread stack right >>> away. Hence sourc

Re: [PATCH] x86/pti: don't report XenPV as vulnerable

2018-06-15 Thread Juergen Gross
On 15/06/18 23:10, Jiri Kosina wrote: > On Fri, 15 Jun 2018, Juergen Gross wrote: > >> Like it is possible to switch off PTI in the kernel it is possible to do >> the same with XPTI in the hypervisor (it is even possible to disable >> XPTI for dom0 only). >> >&

Re: [PATCH v2] x86/pti: don't report XenPV as vulnerable

2018-06-18 Thread Juergen Gross
o off in X86_HYPER_XEN_PV > cases); the security of the system ultimately depends on presence of > mitigation in Hypervisor, which can't be easily detected from DomU; let's > report that. > > Reported-and-tested-by: Mike Latimer > Signed-off-by: Jiri Kosina Acked-by: Juergen Gross Juergen

Re: [PATCH v5] scsi: xen-scsifront: add error handling for xenbus_printf

2018-06-19 Thread Juergen Gross
On 15/06/18 19:05, Zhouyang Jia wrote: > When xenbus_printf fails, the lack of error-handling code may > cause unexpected results. > > This patch adds error-handling code after calling xenbus_printf. > > Signed-off-by: Zhouyang Jia Reviewed-by: Juergen Gross Juergen

Re: [PATCH] xen: Fix two possible sleep-in-atomic-context bugs in create_active()

2018-06-20 Thread Juergen Gross
te_active in pvcalls_front_accept > drivers/xen/pvcalls-front.c, 783: spin_lock in pvcalls_front_accept > > To fix these bugs, GFP_KERNEL is replaced with GFP_ATOMIC. > > These bugs are found by my static analysis tool (DSAC-2) and checked by my > code review. > > Signed-off-by: Jia-Ju Bai Reviewed-by: Juergen Gross Juergen

Re: [BUG] xen: Two possible sleep-in-atomic-context bugs in bind_evtchn_to_irqhandler()

2018-06-20 Thread Juergen Gross
On 20/06/18 04:49, Jia-Ju Bai wrote: > The driver may sleep with holding a spinlock. > The function call paths (from bottom to top) in Linux-4.16.7 are: > > [FUNC] mutex_lock_nested --> can sleep > drivers/xen/events/events_base.c, 839: mutex_lock_nested in > bind_evtchn_to_irq > drivers/xen/event

Re: [PATCH 1/8] xen/grant-table: Make set/clear page private code shared

2018-05-29 Thread Juergen Gross
On 25/05/18 17:33, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Make set/clear page private code shared and accessible to > other kernel modules which can re-use these instead of open-coding. > > Signed-off-by: Oleksandr Andrushchenko > --- > drivers/xen/grant-table.c | 5

Re: [PATCH 2/8] xen/balloon: Move common memory reservation routines to a module

2018-05-29 Thread Juergen Gross
On 25/05/18 17:33, Oleksandr Andrushchenko wrote: > From: Oleksandr Andrushchenko > > Memory {increase|decrease}_reservation and VA mappings update/reset > code used in balloon driver can be made common, so other drivers can > also re-use the same functionality without open-coding. > Create a ded

Re: [PATCH v5 1/3] xen: Sync up with the canonical protocol definitions in Xen

2018-06-12 Thread Juergen Gross
On 13/06/18 08:13, Oleksandr Andrushchenko wrote: > On 06/13/2018 09:11 AM, Dmitry Torokhov wrote: >> On June 12, 2018 10:49:31 PM PDT, Oleksandr Andrushchenko >> wrote: >>> On 06/13/2018 02:40 AM, Dmitry Torokhov wrote: >>>> On Tue, Jun 12, 2018 at 03:46:10PM

Re: [Xen-devel] [PATCH] xen: don't use privcmd_call() from xen_mc_flush()

2018-06-13 Thread Juergen Gross
ss to >>> Linux user space. >>> >>> Add a new xen_single_call() function to be use for that purpose. >>> >>> Reported-by: Jan Beulich >>> Signed-off-by: Juergen Gross >> >> Reviewed-by: Jan Beulich > > Actually I've onl

Re: [PATCH] x86/pti: don't report XenPV as vulnerable

2018-06-14 Thread Juergen Gross
On 15/06/18 00:32, Jiri Kosina wrote: > From: Jiri Kosina > > Xen PV domain is not by design affected by meltdown as it's enforcing > split CR3 itself. Let's not report such systems as "Vulnerable" in sysfs > (we're also already forcing PTI to off in X86_HYPER_XEN_PV cases) > > Reported-and-te

Re: [PATCH] x86/pti: don't report XenPV as vulnerable

2018-06-14 Thread Juergen Gross
On 15/06/18 08:04, Jiri Kosina wrote: > On Fri, 15 Jun 2018, Juergen Gross wrote: > >> wrong for 64-bit, too, in case the mitigation is disabled at hypervisor >> level. > > If that is indeed possible (is it?), then the check we have in > pti_check_boottime_disable(

Re: [PATCH] x86/pti: don't report XenPV as vulnerable

2018-06-14 Thread Juergen Gross
On 15/06/18 08:16, Jiri Kosina wrote: > On Fri, 15 Jun 2018, Juergen Gross wrote: > >>>> wrong for 64-bit, too, in case the mitigation is disabled at hypervisor >>>> level. >>> >>> If that is indeed possible (is it?), then the check we have in &

Re: [PATCH] x86/pti: don't report XenPV as vulnerable

2018-06-15 Thread Juergen Gross
On 15/06/18 08:39, Jiri Kosina wrote: > On Fri, 15 Jun 2018, Juergen Gross wrote: > >> Why? PTI has to be disabled in PV guests as it can't work there due to >> missing paravirtualization of the PTI feature (mov to/from %cr3). >> >> The Xen meltdown mitigati

Re: [PATCH v5] xen/privcmd: add IOCTL_PRIVCMD_MMAP_RESOURCE

2018-05-16 Thread Juergen Gross
On 09/05/18 15:16, Paul Durrant wrote: > My recent Xen patch series introduces a new HYPERVISOR_memory_op to > support direct priv-mapping of certain guest resources (such as ioreq > pages, used by emulators) by a tools domain, rather than having to access > such resources via the guest P2M. > > T

Re: [PATCH v2 2/3] xen/store: do not store local values in xen_start_info

2018-05-16 Thread Juergen Gross
On 09/05/18 12:21, Roger Pau Monne wrote: > There's no need to store the xenstore page or event channel in > xen_start_info if they are locally initialized. > > This also fixes PVH local xenstore initialization due to the lack of > xen_start_info in that case. > > Signed-off-by: Boris Ostrovsky

Re: [PATCH] xen-netfront: fix xennet_start_xmit()'s return type

2018-05-16 Thread Juergen Gross
On 24/04/18 15:18, Luc Van Oostenryck wrote: > The method ndo_start_xmit() is defined as returning an 'netdev_tx_t', > which is a typedef for an enum type, but the implementation in this > driver returns an 'int'. > > Fix this by returning 'netdev_tx_t' in this driver too. > > Signed-off-by: Luc

Re: [PATCH v4 1/2] xen/kbdif: Sync up with the canonical definition in Xen

2018-05-18 Thread Juergen Gross
nter to 1 if no pointer device needs >to be created > > Signed-off-by: Oleksandr Andrushchenko > Cc: Konrad Rzeszutek Wilk Reviewed-by: Juergen Gross Juergen

[PATCH] xen: remove unused hypercall functions

2018-08-20 Thread Juergen Gross
Remove Xen hypercall functions which are used nowhere in the kernel. Signed-off-by: Juergen Gross --- arch/x86/include/asm/xen/hypercall.h | 118 --- 1 file changed, 118 deletions(-) diff --git a/arch/x86/include/asm/xen/hypercall.h b/arch/x86/include/asm/xen

Re: [PATCH -next] x86/xen: Fix read buffer overflow

2018-12-18 Thread Juergen Gross
On 18/12/2018 09:19, YueHaibing wrote: > Fix smatch warning: > > arch/x86/xen/enlighten_pv.c:649 get_trap_addr() error: > buffer overflow 'early_idt_handler_array' 32 <= 32 > > Fixes: 42b3a4cb5609 ("x86/xen: Support early interrupts in xen pv guests") > Signed-off-by: YueHaibing > --- > arch/x

[PATCH] xen/netfront: tolerate frags with no data

2018-12-18 Thread Juergen Gross
...@vger.kernel.org Tested-by: Dietmar Hahn Signed-off-by: Juergen Gross --- drivers/net/xen-netfront.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/xen-netfront.c b/drivers/net/xen-netfront.c index f17f602e6171..5b97cc946d70 100644 --- a/drivers/net/xen-netfront.c +++ b

Re: [PATCH] xen/netfront: tolerate frags with no data

2018-12-18 Thread Juergen Gross
On 19/12/2018 07:00, David Miller wrote: > From: Juergen Gross > Date: Tue, 18 Dec 2018 16:06:19 +0100 > >> At least old Xen net backends seem to send frags with no real data >> sometimes. In case such a fragment happens to occur with the frag limit >> already re

[GIT PULL] xen: features and fixes for 4.21

2018-12-20 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-4.21-rc1-tag xen: features and fixes for 4.21 It contains the following changes: - a series to enable KVM guests to be booted by qemu via the Xen PVH boot entry for speeding up KVM

Re: [RFC PATCH 4/4] x86/mm: remove bottom-up allocation style for x86_64

2019-01-07 Thread Juergen Gross
On 08/01/2019 07:13, Pingfan Liu wrote: > On Tue, Jan 8, 2019 at 1:42 AM Dave Hansen wrote: >> >> On 1/7/19 12:24 AM, Pingfan Liu wrote: >>> There are two acheivements by this patch. >>> -1st. keep the subtree of pgtable away from movable node. >>> Background about the defect of the current bottom

Re: [PATCH 13/20] xenbus: drop useless LIST_HEAD

2019-01-07 Thread Juergen Gross
://coccinelle.lip6.fr/) > > // > @@ > identifier x; > @@ > - LIST_HEAD(x); > ... when != x > // > > Fixes: 1107ba885e46 ("xen: add xenfs to allow usermode <-> Xen interaction") > Signed-off-by: Julia Lawall Reviewed-by: Juergen Gross Juergen

[PATCH v4 2/3] x86/boot: add acpi rsdp address to setup_header

2018-10-09 Thread Juergen Gross
lobbered. Signed-off-by: Juergen Gross --- V3: fix commit message and some documentation bits (Ingo Molnar) V4: add version feedback from bootloader --- Documentation/x86/boot.txt| 32 +++- arch/x86/boot/header.S| 6 +- arch/x86/inc

[PATCH v4 3/3] x86/acpi: take rsdp address for boot params if available

2018-10-09 Thread Juergen Gross
In case the rsdp address in struct boot_params is specified don't try to find the table by searching, but take the address directly as set by the boot loader. Signed-off-by: Juergen Gross --- V3: use a generic retrieval function with a __weak annotated default function (Ingo Molnar

[PATCH v4 0/3] x86: make rsdp address accessible via boot params

2018-10-09 Thread Juergen Gross
order to support an arbitrary RSDP address this patch series adds the physical address of the RSDP to the boot params structure filled by the boot loader. Juergen Gross (3): x86/xen: fix boot loader version reported for pvh guests x86/boot: add acpi rsdp address to setup_header x86/acpi

Re: [Xen-devel] [PATCH] xen: drop writing error messages to xenstore

2018-10-10 Thread Juergen Gross
On 10/10/2018 18:57, Boris Ostrovsky wrote: > On 10/10/18 11:53 AM, Juergen Gross wrote: >> On 10/10/2018 17:09, Joao Martins wrote: >>> On 10/09/2018 05:09 PM, Juergen Gross wrote: >>>> xenbus_va_dev_error() will try to write error messages to Xenstore >>

Re: x86/paravirt: Use a single ops structure

2018-10-29 Thread Juergen Gross
aster >> Web: >> https://git.kernel.org/torvalds/c/5c83511bdb9832c86be20fb86b783356e2f58062 >> Author: Juergen Gross >> AuthorDate: Tue Aug 28 09:40:19 2018 +0200 >> Committer: Thomas Gleixner >> CommitDate: Mon Sep 3 16:50:35 2018 +0200 >> >> x8

Re: x86/paravirt: Use a single ops structure

2018-10-30 Thread Juergen Gross
On 30/10/2018 14:33, Marc Dionne wrote: > On Mon, Oct 29, 2018 at 11:25 AM Juergen Gross wrote: >> >> On 29/10/2018 13:58, Marc Dionne wrote: >>> On Tue, Oct 23, 2018 at 2:37 PM Linux Kernel Mailing List >>> wrote: >>>> >>>> Commit:

Re: [PATCH] x86: modify inline asm constraints in __cmpxchg_double()

2018-10-16 Thread Juergen Gross
On 16/10/2018 08:25, Ingo Molnar wrote: > > * Juergen Gross wrote: > >> Some gcc versions seem to have problems with the constraints in >> __cmpxchg_double() as they suddenly issue a build error when random >> parts of sources calling __cmpxchg_double() are modified

Re: [PATCH] x86: modify inline asm constraints in __cmpxchg_double()

2018-10-17 Thread Juergen Gross
On 16/10/2018 10:01, Ingo Molnar wrote: > > * Juergen Gross wrote: > >> On 16/10/2018 08:25, Ingo Molnar wrote: >>> >>> * Juergen Gross wrote: >>> >>>> Some gcc versions seem to have problems with the constraints in >>>> _

Re: [PATCH] mm: Speed up mremap on large regions

2018-10-11 Thread Juergen Gross
On 12/10/2018 05:21, Jann Horn wrote: > +cc xen maintainers and kvm folks > > On Fri, Oct 12, 2018 at 4:40 AM Joel Fernandes (Google) > wrote: >> Android needs to mremap large regions of memory during memory management >> related operations. The mremap system call can be really slow if THP is >>

Re: [PATCH] mm: Speed up mremap on large regions

2018-10-12 Thread Juergen Gross
On 12/10/2018 07:34, Jann Horn wrote: > On Fri, Oct 12, 2018 at 7:29 AM Juergen Gross wrote: >> On 12/10/2018 05:21, Jann Horn wrote: >>> +cc xen maintainers and kvm folks >>> >>> On Fri, Oct 12, 2018 at 4:40 AM Joel Fernandes (Google) >>> wrote:

[PATCH] x86: modify inline asm constraints in __cmpxchg_double()

2018-10-15 Thread Juergen Gross
"a" in the input constraints has the same semantics while avoiding that build error. Signed-off-by: Juergen Gross --- I should note that I have observed gcc hangs instead sometimes. Not taking any patches modifying users of __cmpxchg_double() due to a gcc bug which seems to be distro-specif

Re: [PATCH v4 2/2] locking/pvqspinlock, hv: Enable PV qspinlock for Hyper-V

2018-10-08 Thread Juergen Gross
t; Cc: Michael Kelley (EOSG) > Cc: Juergen Gross > Signed-off-by: Yi Sun Reviewed-by: Juergen Gross Juergen

Re: [PATCH] x86/build: Build VSMP support only if selected

2018-11-01 Thread Juergen Gross
On 01/11/2018 14:10, Eial Czerwacki wrote: > Greetings, > > On 11/01/2018 12:39 PM, Shai Fultheim (s...@scalemp.com) wrote: >> On 01/11/18 11:37, Thomas Gleixner wrote: >> >>> VSMP support is built even if CONFIG_X86_VSMP is not set. This leads to a >>> build >>> breakage when CONFIG_PCI is disab

Re: [PATCH] x86/build: Build VSMP support only if selected

2018-11-01 Thread Juergen Gross
On 01/11/2018 16:09, Eial Czerwacki wrote: > Greetings, > > On 11/01/2018 03:45 PM, Juergen Gross wrote: >> On 01/11/2018 14:10, Eial Czerwacki wrote: >>> Greetings, >>> >>> On 11/01/2018 12:39 PM, Shai Fultheim (s...@scalemp.com) wrote: >

Re: [PATCH v2] x86/build: Build VSMP support only if CONFIG_PCI is selected

2018-11-02 Thread Juergen Gross
EST and PARAVIRT is a little bit strange, you can add: Reviewed-by: Juergen Gross Juergen

Re: [PATCH] xen: remove redundant 'default n' from Kconfig

2018-10-24 Thread Juergen Gross
On 16/10/2018 16:33, Bartlomiej Zolnierkiewicz wrote: > 'default n' is the default value for any bool or tristate Kconfig > setting so there is no need to write it explicitly. > > Also since commit f467c5640c29 ("kconfig: only write '# CONFIG_FOO > is not set' for visible symbols") the Kconfig beh

Re: [PATCH] x86/ioremap: tighten integer overflow checking

2018-10-24 Thread Juergen Gross
On 25/10/2018 08:16, Dan Carpenter wrote: > The current check is a bit off in the case where "phys_addr + size" > wraps to zero because then "last_addr" is set to ULONG_MAX which is >= > phys_addr. And -2 would be okay? For 32-bit systems I believe ULONG_MAX is a perfectly valid physical address.

Re: [PATCH v1 2/2] x86/hyperv: make HvNotifyLongSpinWait hypercall

2018-10-19 Thread Juergen Gross
commended number is 0x, never retry. > > Signed-off-by: Yi Sun > Cc: "K. Y. Srinivasan" > Cc: Haiyang Zhang > Cc: Stephen Hemminger > Cc: Thomas Gleixner > Cc: Michael Kelley (EOSG) > Cc: Juergen Gross > --- > arch/x86/hyperv/hv_spinlock.c

Re: [PATCH v1 2/2] x86/hyperv: make HvNotifyLongSpinWait hypercall

2018-10-22 Thread Juergen Gross
On 22/10/2018 03:53, Yi Sun wrote: > On 18-10-19 16:20:52, Juergen Gross wrote: >> On 19/10/2018 15:13, Yi Sun wrote: > > [...] > >>> diff --git a/kernel/locking/qspinlock_paravirt.h >>> b/kernel/locking/qspinlock_paravirt.h >>> index 013

Re: [PATCH] x86/mm: Expand static page table for fixmap space

2018-09-17 Thread Juergen Gross
On 17/09/18 09:34, Feng Tang wrote: > We met a kernel panic when enabling earlycon, which is due to > the fixmap address of earlycon is not statically setup. > > Currently the static fixmap setup in head_64.S only covers 2M > virtual address space, while it acutually could be in 4M space > with di

Re: [PATCH v2] x86/mm: Expand static page table for fixmap space

2018-09-17 Thread Juergen Gross
g max_pfn) > /* L3_k[511] -> level2_fixmap_pgt */ > convert_pfn_mfn(level3_kernel_pgt); > > - /* L3_k[511][506] -> level1_fixmap_pgt */ > + /* L3_k[507, 508 - FIXMAP_PMD_NUM] -> level1_fixmap_pgt */ You messed up the comment. The [511] must not be dropped. I would swap the "508 - FIXMAP_PMD_NUM" and "507" in order to start with the lower index, and replace "," by "...": + /* L3_k[511][508-FIXMAP_PMD_NUM ... 507] -> level1_fixmap_pgt */ With that corrected you can have my: Reviewed-by: Juergen Gross (Xen parts) Juergen

Re: [PATCH 4/5] LoongArch: Add paravirt interface for guest kernel

2024-01-03 Thread Juergen Gross
On 03.01.24 09:00, maobibo wrote: On 2024/1/3 下午3:40, Jürgen Groß wrote: On 03.01.24 08:16, Bibo Mao wrote: The patch add paravirt interface for guest kernel, it checks whether system runs on VM mode. If it is, it will detect hypervisor type. And returns true it is KVM hypervisor, else return

Re: [PATCH v4 3/5] x86/paravirt: introduce ALT_NOT_XEN

2023-11-14 Thread Juergen Gross
On 14.11.23 16:09, Borislav Petkov wrote: On Mon, Oct 30, 2023 at 03:25:06PM +0100, Juergen Gross wrote: Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Not crazy about adding yet another macro indirection - at least with the X86_FEATURE_ it is clear what this

Re: [PATCH v4 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-11-29 Thread Juergen Gross
On 21.11.23 19:45, Borislav Petkov wrote: On Mon, Oct 30, 2023 at 03:25:07PM +0100, Juergen Gross wrote: Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful

[PATCH v5 1/5] x86/paravirt: introduce ALT_NOT_XEN

2023-11-29 Thread Juergen Gross
Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross --- V3: - split off from next patch V5: - move patch to the start of the series (Boris Petkov) --- arch/x86/include/asm/paravirt.h | 42

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Juergen Gross
On 06.12.23 12:08, Borislav Petkov wrote: On Wed, Nov 29, 2023 at 02:33:31PM +0100, Juergen Gross wrote: Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful

Re: [PATCH v5 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-08 Thread Juergen Gross
On 08.12.23 13:57, Borislav Petkov wrote: On Fri, Dec 08, 2023 at 12:53:47PM +0100, Juergen Gross wrote: Took me a while to find it. Patch 5 was repairing the issue again Can't have that. Any patch in any set must build and boot successfully for bisection reasons. Of course. The pr

[PATCH v6 0/5] 86/paravirt: Get rid of paravirt patching

2023-12-09 Thread Juergen Gross
st patch into 2 - rebase of patch 2 as suggested by Peter - addressed Peter's comments for patch 3 Juergen Gross (5): x86/paravirt: introduce ALT_NOT_XEN x86/paravirt: move some functions and defines to alternative x86/alternative: add indirect call patching x86/paravirt: switch mixed paravi

[PATCH v6 1/5] x86/paravirt: introduce ALT_NOT_XEN

2023-12-09 Thread Juergen Gross
Introduce the macro ALT_NOT_XEN as a short form of ALT_NOT(X86_FEATURE_XENPV). Suggested-by: Peter Zijlstra (Intel) Signed-off-by: Juergen Gross --- V3: - split off from next patch V5: - move patch to the start of the series (Boris Petkov) --- arch/x86/include/asm/paravirt.h | 42

[PATCH v6 2/5] x86/paravirt: move some functions and defines to alternative

2023-12-09 Thread Juergen Gross
As a preparation for replacing paravirt patching completely by alternative patching, move some backend functions and #defines to alternative code and header. Signed-off-by: Juergen Gross --- V4: - rename x86_nop() to nop_func() and x86_BUG() to BUG_func() (Boris Petkov) --- arch/x86/include

[PATCH v6 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2

2023-12-09 Thread Juergen Gross
Instead of stacking alternative and paravirt patching, use the new ALT_FLAG_CALL flag to switch those mixed calls to pure alternative handling. This eliminates the need to be careful regarding the sequence of alternative and paravirt patching. Signed-off-by: Juergen Gross Acked-by: Peter

[PATCH v6 5/5] x86/paravirt: remove no longer needed paravirt patching code

2023-12-09 Thread Juergen Gross
Now that paravirt is using the alternatives patching infrastructure, remove the paravirt patching code. Signed-off-by: Juergen Gross Acked-by: Peter Zijlstra (Intel) --- arch/x86/include/asm/paravirt.h | 13 -- arch/x86/include/asm/paravirt_types.h | 38 --- arch/x86

Re: [PATCH] x86/paravirt: Disable virt spinlock when CONFIG_PARAVIRT_SPINLOCKS disabled

2024-05-23 Thread Juergen Gross
Silence unused native_pv_lock_init() function warning") Suggested-by: Qiuxu Zhuo Reported-by: Prem Nath Dey Reported-by: Xiaoping Zhou Signed-off-by: Chen Yu Reviewed-by: Juergen Gross Juergen --- arch/x86/kernel/paravirt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) d

[PATCH 0/3] xen: cleanup and fix lazy mode handling

2023-09-13 Thread Juergen Gross
This small series is cleaning up Xen lazy mode handling by removing unused stuff and moving purely Xen-specific code away from general kernel code. The last patch is fixing a regression which was introduced in the 6.6 merge window. Juergen Gross (3): arm/xen: remove lazy mode related

[PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Juergen Gross
change. Signed-off-by: Juergen Gross --- arch/x86/include/asm/paravirt_types.h | 15 -- arch/x86/include/asm/xen/hypervisor.h | 26 +++ arch/x86/kernel/paravirt.c| 67 --- arch/x86/xen/enlighten_pv.c | 39 +--- a

Re: [PATCH 2/3] x86/xen: move paravirt lazy code

2023-09-13 Thread Juergen Gross
On 13.09.23 15:26, Steven Rostedt wrote: On Wed, 13 Sep 2023 13:38:27 +0200 Juergen Gross wrote: diff --git a/include/trace/events/xen.h b/include/trace/events/xen.h index 44a3f565264d..0577f0cdd231 100644 --- a/include/trace/events/xen.h +++ b/include/trace/events/xen.h @@ -6,26 +6,26

[GIT PULL] xen: branch for v5.12-rc1

2021-02-16 Thread Juergen Gross
Linus, Please git pull the following tag: git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip.git for-linus-5.12-rc1-tag xen: branch for v5.12-rc1 This batch contains a series of Xen related security fixes, all related to limited error handling in Xen backend drivers. Thanks. Juergen a

Re: [PATCH net v3] net: sched: fix packet stuck problem for lockless qdisc

2021-04-08 Thread Juergen Gross
average latency reported by sysbench is well below 1 msec, but at least once per hour I get latencies in the minute range. With this patch I don't see these high latencies any longer (test is running for more than 20 hours now). So you can add my: Tested-by: Juergen Gross Juergen OpenPGP_0x

[PATCH] xen: switch to post-init routines in xen mmu.c earlier

2014-12-10 Thread Juergen Gross
With the virtual mapped linear p2m list the post-init mmu operations must be used for setting up the p2m mappings, as in case of CONFIG_FLATMEM the init routines may trigger BUGs. Reported-by: Boris Ostrovsky Signed-off-by: Juergen Gross --- arch/x86/xen/mmu.c | 2 +- 1 file changed, 1

Re: [PATCH] xen: switch to post-init routines in xen mmu.c earlier

2014-12-10 Thread Juergen Gross
On 12/10/2014 05:13 PM, Konrad Rzeszutek Wilk wrote: On Wed, Dec 10, 2014 at 04:56:03PM +0100, Juergen Gross wrote: With the virtual mapped linear p2m list the post-init mmu operations must be used for setting up the p2m mappings, as in case of CONFIG_FLATMEM the init routines may trigger BUGs

Re: [Xen-devel] [PATCH] xen: switch to post-init routines in xen mmu.c earlier

2014-12-10 Thread Juergen Gross
On 12/10/2014 07:07 PM, David Vrabel wrote: On 10/12/14 15:56, Juergen Gross wrote: With the virtual mapped linear p2m list the post-init mmu operations must be used for setting up the p2m mappings, as in case of CONFIG_FLATMEM the init routines may trigger BUGs. Reported-by: Boris Ostrovsky

[PATCH] xen: fix sparse warning in page.h

2014-12-04 Thread Juergen Gross
The inline function mfn_to_pfn_no_overrides() uses __get_user() to access the machine_to_phys_mapping array to avoid crashes when using out of bounds indices e.g. for I/O addresses. Avoid sparse warnings by attributing the accessed address with __user. Signed-off-by: Juergen Gross --- arch/x86

[PATCH] xen: fix sparse warning in p2m.c

2014-12-04 Thread Juergen Gross
The patch "Speed up set_phys_to_machine() by using read-only mappings" introduced a sparse warning: arch/x86/xen/p2m.c:628:13: sparse: incorrect type in argument 1 (different address spaces) Avoid the warning. Signed-off-by: Juergen Gross --- arch/x86/xen

[PATCH] xen: introduce helper functions to do save read and write accesses

2014-12-05 Thread Juergen Gross
the helpers in page.h and p2m.c. This will fix the sparse warnings when doing "make C=1". Signed-off-by: Juergen Gross --- arch/x86/include/asm/xen/page.h | 16 +++- arch/x86/xen/p2m.c | 2 +- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git

[PATCH] xen: annotate xen_set_identity_and_remap_chunk() with __init

2014-12-07 Thread Juergen Gross
Commit 5b8e7d80542487ff1bf17b4cf2922a01dee13d3a removed the __init annotation from xen_set_identity_and_remap_chunk(). Add it again. Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/setup.c b/arch/x86/xen

Re: [BISECTED] 3.19-rc1 regression - kernel does not load in GRUB 0.97 (GRUB Legacy)

2014-12-27 Thread Juergen Gross
st bad commit commit bd809af16e3ab1f8d55b3e2928c47c67e2a865d2 Author: Juergen Gross Date: Mon Nov 3 14:02:03 2014 +0100 x86: Enable PAT to use cache mode translation tables Update the translation tables from cache mode to pgprot values according to the PAT settings. This enable

Re: [REGRESSION][x86] Commit f5b2831d65 cause boot failure in VMware ESXi 5.1 guest

2014-12-27 Thread Juergen Gross
(including warning/bug_on/backtrace or whatever) and the guest just hangs. It's OK on v3.18, so it's a regression. Bisect points to the following commit: commit f5b2831d654167d77da8afbef4d2584897b12d0c Author: Juergen Gross Date: Mon Nov 3 14:02:02 2014 +0100 x86: Respect PAT

Re: [BISECTED] 3.19-rc1 regression - kernel does not load in GRUB 0.97 (GRUB Legacy)

2014-12-28 Thread Juergen Gross
On 12/28/2014 08:20 AM, Пламен Петров wrote: -Original Message- From: Juergen Gross [mailto:jgr...@suse.com] Sent: Saturday, December 27, 2014 3:48 PM To: Пламен Петров; linux-kernel@vger.kernel.org Cc: 'Thomas Gleixner' Subject: Re: [BISECTED] 3.19-rc1 regression - kernel doe

Re: [PATCH] x86: don't rely on VMWare emulating PAT MSR correctly

2015-01-06 Thread Juergen Gross
x86 maintainers, could you please consider taking my patch? There have been several reports now regarding this issue, all could be fixed using my patch. Juergen On 12/17/2014 05:57 AM, Alok Kataria wrote: Hi, On Tue, 2014-12-16 at 10:58 +0100, Juergen Gross wrote: VMWare seems not to

Re: [PATCH] x86/xen: Free bootmem in free_p2m_page() during early boot

2015-01-07 Thread Juergen Gross
On 01/07/2015 03:08 PM, Boris Ostrovsky wrote: With recent changes in p2m we now have legitimate cases when p2m memory needs to be freed during early boot (i.e. before slab is initialized). Signed-off-by: Boris Ostrovsky Reviewed-by: Juergen Gross --- arch/x86/xen/p2m.c | 7 +-- 1

[PATCH] mm: use correct format specifiers when printing address ranges

2015-01-08 Thread Juergen Gross
Especially on 32 bit kernels memory node ranges are printed with 32 bit wide addresses only. Use u64 types and %llx specifiers to print full width of addresses. Signed-off-by: Juergen Gross --- mm/page_alloc.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff

[PATCH 0/3] xen: correct several bugs in new p2m list setup

2015-01-08 Thread Juergen Gross
In the setup code of the linear mapped p2m list several bugs have been found, especially for 32 bit dom0. These patches correct the errors and make 32 bit dom0 bootable again. Juergen Gross (3): xen: correct error for building p2m list on 32 bits xen: correct race in alloc_p2m_pmd() xen

[PATCH 1/3] xen: correct error for building p2m list on 32 bits

2015-01-08 Thread Juergen Gross
In xen_rebuild_p2m_list() for large areas of invalid or identity mapped memory the pmd entries on 32 bit systems are initialized wrong. Correct this error. Suggested-by: Boris Ostrovsky Signed-off-by: Juergen Gross --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[PATCH 2/3] xen: correct race in alloc_p2m_pmd()

2015-01-08 Thread Juergen Gross
new page. Signed-off-by: Juergen Gross --- arch/x86/xen/p2m.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 36ae094..fdb996e 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -440,10 +440,9 @@ EXPORT_SYMBOL_GPL

[PATCH 3/3] xen: use correct type for physical addresses

2015-01-08 Thread Juergen Gross
When converting a pfn to a physical address be sure to use 64 bit wide types. Also avoid invalidating memory for zero sized non-aligned extra memory regions. Signed-off-by: Juergen Gross Tested-by: Boris Ostrovsky --- arch/x86/xen/setup.c | 6 -- 1 file changed, 4 insertions(+), 2

Re: [PATCH 2/3] xen: correct race in alloc_p2m_pmd()

2015-01-09 Thread Juergen Gross
On 01/09/2015 04:09 PM, David Vrabel wrote: On 08/01/15 17:01, Juergen Gross wrote: When allocating a new pmd for the linear mapped p2m list a check is done for not introducing another pmd when this just happened on another cpu. In this case the old pte pointer was returned which points to the

[Patch V2 4/4] xen: check for zero sized area when invalidating memory

2015-01-11 Thread Juergen Gross
With the introduction of the linear mapped p2m list setting memory areas to "invalid" had to be delayed. When doing the invalidation make sure no zero sized areas are processed. Signed-off-by: Juegren Gross --- arch/x86/xen/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/x

[Patch V2 2/4] xen: correct race in alloc_p2m_pmd()

2015-01-11 Thread Juergen Gross
new page. Signed-off-by: Juergen Gross --- arch/x86/xen/p2m.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 36ae094..fdb996e 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -440,10 +440,9 @@ EXPORT_SYMBOL_GPL

[Patch V2 3/4] xen: use correct type for physical addresses

2015-01-11 Thread Juergen Gross
When converting a pfn to a physical address be sure to use 64 bit wide types or convert the physical address to a pfn if possible. Signed-off-by: Juergen Gross Tested-by: Boris Ostrovsky --- arch/x86/xen/setup.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/x86

[Patch V2 0/4] xen: correct several bugs in new p2m list setup

2015-01-11 Thread Juergen Gross
Beulich - compare pfns instead physical addresses as suggested by Jan Beulich Juergen Gross (4): xen: correct error for building p2m list on 32 bits xen: correct race in alloc_p2m_pmd() xen: use correct type for physical addresses xen: check for zero sized area when invalidating memory arch

[Patch V2 1/4] xen: correct error for building p2m list on 32 bits

2015-01-11 Thread Juergen Gross
In xen_rebuild_p2m_list() for large areas of invalid or identity mapped memory the pmd entries on 32 bit systems are initialized wrong. Correct this error. Suggested-by: Boris Ostrovsky Signed-off-by: Juergen Gross --- arch/x86/xen/p2m.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion

[Patch RESEND] x86: don't rely on VMWare emulating PAT MSR correctly

2015-01-11 Thread Juergen Gross
quot;) triggers this VMWare bug when the kernel is booted as a VMWare guest. Reported-by: Jongman Heo Signed-off-by: Juergen Gross Tested-by: Jongman Heo Acked-by: Alok N Kataria --- arch/x86/mm/pat.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/arch/x86/mm/pat.

Re: [Patch RESEND] x86: don't rely on VMWare emulating PAT MSR correctly

2015-01-18 Thread Juergen Gross
PING! The patch repairs a bug with VMWARE, which has been reported by several users. All of them have confirmed the patch is working. And VMWARE has acked the patch. What else do you need to take it? It is available for over a month now! Juergen On 01/12/2015 06:15 AM, Juergen Gross wrote

Re: [Patch V2 0/4] xen: auto-generate symbols for xen hypercalls

2015-01-18 Thread Juergen Gross
Hi, anything missing to take these patches? Juergen On 12/17/2014 10:50 AM, Juergen Gross wrote: The Xen hypercalls are defined in include/xen/interface/xen.h. There are some places where for each hypercall a table element is created. Instead of manually add each hypercall element to these

Re: [RESEND Patch V2 1/4] xen: build infrastructure for generating hypercall depending symbols

2015-01-27 Thread Juergen Gross
*Ping* David wants a comment from the x86 maintainers. Juergen On 01/21/2015 08:49 AM, Juergen Gross wrote: Today there are several places in the kernel which build tables containing one entry for each possible Xen hypercall. Create an infrastructure to be able to generate these tables at

[PATCH 2/5] xen: use correct types for addresses in arch/x86/xen/setup.c

2015-01-27 Thread Juergen Gross
In many places in arch/x86/xen/setup.c wrong types are used for physical addresses (u64 or unsigned long long). Use phys_addr_t instead. Use macros already defined instead of open coding them. Correct some other type mismatches. Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 25

[PATCH 1/5] xen: cleanup arch/x86/xen/setup.c

2015-01-27 Thread Juergen Gross
Remove extern declarations in arch/x86/xen/setup.c which are either not used or redundant. Move needed other extern declarations to xen-ops.h Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 10 -- arch/x86/xen/xen-ops.h | 6 ++ 2 files changed, 6 insertions(+), 10

[PATCH 3/5] xen: add some __init and static annotations in arch/x86/xen/setup.c

2015-01-27 Thread Juergen Gross
Some more functions in arch/x86/xen/setup.c can be made "__init". xen_ignore_unusable() can be made "static". Signed-off-by: Juergen Gross --- arch/x86/xen/setup.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/s

[PATCH 5/5] xen: cleanup arch/x86/xen/mmu.c

2015-01-27 Thread Juergen Gross
Remove a nested ifdef. Signed-off-by: Juergen Gross --- arch/x86/xen/mmu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 6a8bbf4..adca9e2 100644 --- a/arch/x86/xen/mmu.c +++ b/arch/x86/xen/mmu.c @@ -1734,10 +1734,8 @@ static void __init

[PATCH 0/5] xen: various cleanups

2015-01-27 Thread Juergen Gross
Several cleanups in xen kernel files: - move declarations to header file - delete not needed lines - annotate functions as __init - make functions static - use correct types for addresses No functional changes. Juergen Gross (5): xen: cleanup arch/x86/xen/setup.c xen: use correct types for

[PATCH 4/5] xen: add some __init annotations in arch/x86/xen/mmu.c

2015-01-27 Thread Juergen Gross
The file arch/x86/xen/mmu.c has some functions that can be annotated with "__init". Signed-off-by: Juergen Gross --- arch/x86/xen/mmu.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/arch/x86/xen/mmu.c b/arch/x86/xen/mmu.c index 5c1f9ac..6a8bbf4 10

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