Re: [PATCH] lz4: add overrun checks to lz4_uncompress_unknownoutputsize()

2014-07-04 Thread Jan Beulich
>>> On 04.07.14 at 08:12, Jan Beulich wrote: >>>> On 04.07.14 at 01:11, wrote: > > From: Greg Kroah-Hartman > > > > Jan points out that I forgot to make the needed fixes to the > > lz4_uncompress_unknownoutputsize() function to mirror the changes

Re: [PATCH] ix86: fix vDSO build

2014-07-23 Thread Jan Beulich
>>> On 11.07.14 at 00:58, wrote: > On 07/03/2014 07:35 AM, Jan Beulich wrote: >> Relying on static functions used just once to get inlined (and >> subsequently have dead code paths eliminated) is wrong: Compilers are >> free to decide whether they do this, re

Re: genksyms: separating public headers from private header files

2014-07-23 Thread Jan Beulich
>>> On 16.07.14 at 17:19, wrote: > Hi Jan, Michal, > > I am not sure who maintains genksyms officially, so I am sending this > question to the two of you as folks who seemed to have contributed to the > tool. :-) > > I noticed with genksyms that a symbol is opaquely defined in a > public header

Re: [Xen-devel] [PATCH] xen/pciback: Fix error return code in xen_pcibk_attach()

2014-07-23 Thread Jan Beulich
passed to xenbus_dev_fatal(); -EILSEQ, -ENODATA, or -EPROTO (despite it normally being network specific) would seem better to me. In any event Reviewed-by Jan Beulich -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vge

Re: [Xen-devel] [PATCH] xen: fix memory leak in __xen_pcibk_add_pci_dev()

2014-04-01 Thread Jan Beulich
> Signed-off-by: Daeseok Youn Reviewed-by: Jan Beulich albeit the solution is not ideal: > --- a/drivers/xen/xen-pciback/vpci.c > +++ b/drivers/xen/xen-pciback/vpci.c > @@ -130,6 +130,7 @@ static int __xen_pcibk_add_pci_dev(struct > xen_pcibk_device *pdev, >

Re: [PATCH v2] xen: fix memory leak in __xen_pcibk_add_pci_dev()

2014-04-01 Thread Jan Beulich
gt; Signed-off-by: Daeseok Youn As before Reviewed-by: Jan Beulich > --- > v2: The kfree() invocation is moved outside the locked region. > > drivers/xen/xen-pciback/vpci.c |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/xen/xen

Re: [RFC PATCH] crypto: crc32c-pclmul - Use pmovzxdq to shrink K_table

2014-05-28 Thread Jan Beulich
>>> "George Spelvin" 05/28/14 4:40 PM >>> >Jan: Is support for SLE10's pre-2.18 binutils still required? >Your PEXTRD fix was only a year ago, so I expect, but I wanted to ask. I'd much appreciate if I would be able to build the kernel that way for another while. >Two other minor additional cha

Re: [RFC PATCH] crypto: crc32c-pclmul - Use pmovzxdq to shrink K_table

2014-05-28 Thread Jan Beulich
>>> "George Spelvin" 05/28/14 11:47 PM >>> >Jan Beulich wrote: >> "George Spelvin" 05/28/14 4:40 PM >>> Jan: Is support for SLE10's pre-2.18 binutils still required? >>> Your PEXTRD fix was only a year ago, so I expect, but

[PATCH] swiotlb: don't assume PA 0 is invalid

2014-06-02 Thread Jan Beulich
en regions get unmapped, this is being fixed at once along with adding a similar check to swiotlb_tbl_sync_single(). Obviously the less intrusive change would be to simply drop the check in swiotlb_tbl_unmap_single(). Signed-off-by: Jan Beulich --- lib/swiotlb.c | 28 ++

[PATCH] rtc-efi: check for invalid data coming back from UEFI

2014-06-02 Thread Jan Beulich
ome Fujitsu system (with possibly not up to date firmware, but anyway). Perhaps efi_read_alarm() should not fail if neither enabled nor pending are set, but the returned time is invalid? Reported-by: Raymund Will Signed-off-by: Jan Beulich --- drivers/rtc/rtc-efi.c |

Re: [PATCH v6 1/9] efi: Use early_mem*() instead of early_io*()

2014-06-23 Thread Jan Beulich
>>> On 20.06.14 at 23:29, wrote: > --- a/drivers/firmware/efi/efi.c > +++ b/drivers/firmware/efi/efi.c > @@ -298,7 +298,7 @@ int __init efi_config_init(efi_config_table_type_t > *arch_tables) > if (table64 >> 32) { > pr_cont("\n"); >

Re: [PATCH v6 2/9] arch/x86: Do not access EFI memory map if it is not available

2014-06-23 Thread Jan Beulich
>>> On 23.06.14 at 11:53, wrote: > On 20/06/14 22:29, Daniel Kiper wrote: >> Do not access EFI memory map if it is not available. At least >> Xen dom0 EFI implementation does not have an access to it. > > Could it make one based on the XENMEM_memory_map or > XENMEM_machine_memory_map hypercall?

[PATCH] x86-64: drop several unnecessary CFI annotations

2014-06-25 Thread Jan Beulich
space: path). Also remove a bogus commented out annotation - there's no register %orig_rax after all. Signed-off-by: Jan Beulich --- arch/x86/kernel/entry_64.S | 52 ++--- 1 file changed, 26 insertions(+), 26 deletions(-) --- 3.16-rc2/arch/

Re: [Xen-devel] [V0 PATCH] pvh: Disable PSE feature for now

2014-01-28 Thread Jan Beulich
>>> On 28.01.14 at 03:18, Mukesh Rathor wrote: > Until now, xen did not expose PSE to pvh guest, but a patch was submitted > to xen list to enable bunch of features for a pvh guest. PSE has not been > looked into for PVH, so until we can do that and test it to make sure it > works, disable the fea

Re: [Xen-devel] [PATCH 3/3] xen-blkback: fix shutdown race

2014-01-29 Thread Jan Beulich
>>> On 28.01.14 at 18:43, Roger Pau Monne wrote: > --- a/drivers/block/xen-blkback/blkback.c > +++ b/drivers/block/xen-blkback/blkback.c > @@ -985,17 +985,31 @@ static void __end_block_io_op(struct pending_req > *pending_req, int error) >* the proper response on the ring. >*/ >

Re: [Xen-devel] [PATCH 3/3] xen-blkback: fix shutdown race

2014-02-04 Thread Jan Beulich
>>> On 03.02.14 at 17:58, Roger Pau Monné wrote: > On 29/01/14 09:52, Jan Beulich wrote: >>>>> On 28.01.14 at 18:43, Roger Pau Monne wrote: >>> + free_req(blkif, pending_req); >>> + /* >>> +*

Re: [Xen-devel] [PATCH 3/3] xen-blkback: fix shutdown race

2014-02-04 Thread Jan Beulich
>>> On 04.02.14 at 09:16, Roger Pau Monné wrote: > On 04/02/14 09:02, Jan Beulich wrote: >>>>> On 03.02.14 at 17:58, Roger Pau Monné wrote: >>> On 29/01/14 09:52, Jan Beulich wrote: >>>>>>> On 28.01.14 at 18:43, Roger Pau

Re: [Xen-devel] [RFC][PATCH 3/3] timekeeping: Fix potential lost pv notification of time change

2013-12-10 Thread Jan Beulich
>>> On 10.12.13 at 06:09, John Stultz wrote: > static cycle_t logarithmic_accumulation(struct timekeeper *tk, cycle_t > offset, > - u32 shift) > + u32 shift, int *action) With plain int used here, ... > @@

[PATCH v2] x86: honor ACPI FADT flag indicating absence of a CMOS RTC

2013-10-21 Thread Jan Beulich
Even though the omission was found only during code review (originally in the Xen hypervisor, looking through ACPI v5 flags and their meanings and uses), we shouldn't be creating a corresponding platform device in that case. Signed-off-by: Jan Beulich --- v2: Emit a log message in this cas

[PATCH v2] x86-64: don't track CPU model data that is used by 32-bit code only

2013-10-21 Thread Jan Beulich
e on Intel CPUs (intel.c's instance was lacking the sentinel with family being zero), so the patch bumps that by one, - c_models' vendor sub-field was unused (and anyway redundant with the base structure's c_x86_vendor field), so the patch deletes it. Signed-off-by: Jan Beul

[PATCH 0/2] x86: unify / improve copy_*_user()

2013-10-21 Thread Jan Beulich
: x86: unify copy_to_user() and add size checking to it Signed-off-by: Jan Beulich Cc: Arjan van de Ven include/asm/uaccess.h| 98 +++ include/asm/uaccess_32.h | 29 - include/asm/uaccess_64.h | 28 - lib/usercopy_32.c

[PATCH 1/2] x86: unify copy_from_user() size checking

2013-10-21 Thread Jan Beulich
oing forward. I would question however that commit 2fb0815c9ee6b9ac50e15dd8360ec76d9fa46a2 ("gcc4: disable __compiletime_object_size for GCC 4.6+") was really necessary, and instead this should have been dealt with as is done here from the beginning. Cc: Arjan van de Ven Cc: Guenter Roeck Signed-off-by

[PATCH 2/2] x86: unify copy_to_user() and add size checking to it

2013-10-21 Thread Jan Beulich
Similarly to copy_from_user(), where the range check is to protect against kernel memory corruption, copy_to_user() can benefit from such checking too: Here it protects against kernel information leaks. Signed-off-by: Jan Beulich Cc: Arjan van de Ven --- arch/x86/include/asm/uaccess.h

Re: EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Jan Beulich
>>> On 21.10.13 at 14:57, Daniel Kiper wrote: (Looking at the Cc list it's quite interesting that you copied a whole lot of people, but not me as the maintainer of the EFI bits in Xen.) > Separate multiboot2efi module should be established. It should verify system > kernel and all loaded modules

Re: EFI and multiboot2 devlopment work for Xen

2013-10-21 Thread Jan Beulich
>>> On 21.10.13 at 16:23, Konrad Rzeszutek Wilk wrote: > On Mon, Oct 21, 2013 at 02:36:38PM +0100, Jan Beulich wrote: >> >>> On 21.10.13 at 14:57, Daniel Kiper wrote: >> >> (Looking at the Cc list it's quite interesting that you copied a >> wh

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Jan Beulich
>>> On 21.10.13 at 20:39, Daniel Kiper wrote: > On Mon, Oct 21, 2013 at 02:36:38PM +0100, Jan Beulich wrote: >> >>> On 21.10.13 at 14:57, Daniel Kiper wrote: >> > Separate multiboot2efi module should be established. It should verify >> > system >

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Jan Beulich
>>> On 21.10.13 at 20:46, Daniel Kiper wrote: > On Mon, Oct 21, 2013 at 03:37:21PM +0100, Jan Beulich wrote: >> >>> On 21.10.13 at 16:23, Konrad Rzeszutek Wilk >> >>> wrote: >> > However my understanding is that the general distro approach is

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Jan Beulich
>>> On 22.10.13 at 11:26, Ian Campbell wrote: > AIUI "efilinux" is somewhat badly named and does not use the Linux Boot > Protocol (i.e. the (b)zImage stuff with real mode entry point) either. > It actually loads and executes the kernel binary as a PE/COFF executable > (the native UEFI binary exec

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Jan Beulich
>>> On 22.10.13 at 11:45, Ian Campbell wrote: > On Tue, 2013-10-22 at 10:31 +0100, Jan Beulich wrote: >> >>> On 22.10.13 at 11:26, Ian Campbell wrote: >> > AIUI "efilinux" is somewhat badly named and does not use the Linux Boot >> > Protoc

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Jan Beulich
>>> On 22.10.13 at 15:53, Ian Campbell wrote: > On Tue, 2013-10-22 at 09:42 -0400, Konrad Rzeszutek Wilk wrote: > >> Looking at the Fedora GRUB2 source, the 'struct linux_kernel_header' is > defined >> in the linux/Documentation/x86/boot.txt and hpa is pretty strict >> about making it backwards

Re: EFI and multiboot2 devlopment work for Xen

2013-10-22 Thread Jan Beulich
>>> On 22.10.13 at 16:51, Konrad Rzeszutek Wilk wrote: > And I still haven't found the module that can launch any PE/COFF > image from GRUB2. Maybe that is a myth. I can't exclude that this is a custom a patch as the linuxefi support. Jan -- To unsubscribe from this list: send the line "unsubsc

Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Jan Beulich
>>> Ian Campbell 10/23/13 10:32 AM >>> >The second (standard PE/COFF entry point) can be launched using the UEFI >chainloader call. AIUI this should work with xen.efi today. There are >some limitations however, firstly there is no way to pass additional >blobs and so the launched image must load e

Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Jan Beulich
>>> Konrad Rzeszutek Wilk 10/23/13 3:15 PM >>> >On Wed, Oct 23, 2013 at 09:32:30AM +0100, Ian Campbell wrote: >> Am I correct that xen.efi today can be loaded from grub today using the >> chainload command? Whereupon it will parse the xen.cfg and load the dom0 >> kernel and load things from FAT et

Re: [Xen-devel] EFI and multiboot2 devlopment work for Xen

2013-10-23 Thread Jan Beulich
>>> Vladimir 'φ-coder/phcoder' Serbinenko 10/23/13 7:02 PM >>> >>> >> GrUB - which iiuc stays in memory >> after transferring control - could export its file system support to its >> descendants). > >Xen shouldn't need to load any file after multiboot2 entry point. The >needed files would already

RE: [PATCH] don't select EFI from certain special ACPI drivers

2013-12-18 Thread Jan Beulich
>>> On 17.12.13 at 23:34, "Luck, Tony" wrote: >> No, it hasn't. But I explicitly checked the relevant EFI=n and EFI=y >> cases. > > I pushed your patch into my "next" tree - the robots will notice soon and > send us e-mail if they find any issues. Thanks, Tony. I'm afraid though that fixing th

Re: [Xen-devel] [PATCH RFC 1/3] x86: Make page cache mode a real type

2014-08-22 Thread Jan Beulich
>>> On 21.08.14 at 11:30, wrote: > On 08/20/2014 09:26 PM, Toshi Kani wrote: >> On Tue, 2014-08-19 at 15:25 +0200, jgr...@suse.com wrote: >>> --- a/arch/x86/mm/init.c >>> +++ b/arch/x86/mm/init.c >>> @@ -27,6 +27,35 @@ >>> >>> #include "mm_internal.h" >>> >>> +/* >>> + * Tables translating betwe

Re: [Xen-devel] [PATCH RFC 2/3] x86: Enable PAT to use cache mode translation tables

2014-08-22 Thread Jan Beulich
>>> On 19.08.14 at 15:25, wrote: > @@ -118,8 +167,14 @@ void pat_init(void) > PAT(4, WB) | PAT(5, WC) | PAT(6, UC_MINUS) | PAT(7, UC); > > /* Boot CPU check */ > - if (!boot_pat_state) > + if (!boot_pat_state) { > rdmsrl(MSR_IA32_CR_PAT, boot_pat_state); >

Re: sync_set_bit() vs set_bit() -- what's the difference?

2014-08-27 Thread Jan Beulich
>>> On 27.08.14 at 09:30, wrote: > I'm curious about the difference. :-) > > sync_set_bit() is only used in drivers/hv/ and drivers/xen/ while set_bit() > is used in all other places. What makes hv/xen special? I guess this would really want to be used by anything communicating with a hyperviso

Re: [Xen-devel] [V1 PATCH 0/2] Linux PVH: set EFER bits..

2014-08-28 Thread Jan Beulich
>>> On 28.08.14 at 16:08, wrote: > The Xen change that broke Linux PVH guests must be reverted. This > change may also have broken other guests (e.g., Mirage or one of the > other unikernel OSes). If PVH wasn't tech preview, I'd agree. But since it is, I don't see a reason to revert that change.

Re: [Xen-devel] [PATCH RFC 0/3] x86: Full support of PAT

2014-08-20 Thread Jan Beulich
>>> One Thousand Gnomes 08/20/14 2:08 PM >>> >> The Linux kernel currently supports only 4 different cache modes. The PAT MSR >> is set up in a way that the setting of _PAGE_PAT in a pte doesn't matter: the >> top 4 entries in the PAT MSR are the same as the 4 lower entries. >> >> This results in

Re: [PATCH 1/3] xen: sync some headers with xen tree

2014-09-04 Thread Jan Beulich
>>> On 04.09.14 at 14:38, <"jgr...@suse.com".non-mime.internet> wrote: > As the KEXEC and DUMPCORE related ELFNOTES are not relevant for the > kernel they are omitted from elfnote.h. But the defines are still in the patch: > @@ -153,6 +192,65 @@ > */ > #define XEN_ELFNOTE_SUPPORTED_FEATURES 17

Re: [PATCH 2/3] xen: eliminate scalability issues from initrd handling

2014-09-04 Thread Jan Beulich
>>> On 04.09.14 at 14:52, wrote: > On 04/09/14 13:38, Juergen Gross wrote: >> --- a/arch/x86/xen/xen-head.S >> +++ b/arch/x86/xen/xen-head.S >> @@ -124,6 +124,9 @@ NEXT_HYPERCALL(arch_6) >> ELFNOTE(Xen, XEN_ELFNOTE_L1_MFN_VALID, >> .quad _PAGE_PRESENT; .quad _PAGE_PRESENT) >>

Re: [Xen-devel] [PATCH 3/3] xen: eliminate scalability issues from initial mapping setup

2014-09-04 Thread Jan Beulich
>>> On 04.09.14 at 15:02, wrote: > On 04/09/14 13:59, David Vrabel wrote: >> On 04/09/14 13:38, Juergen Gross wrote: >>> Direct Xen to place the initial P->M table outside of the initial >>> mapping, as otherwise the 1G (implementation) / 2G (theoretical) >>> restriction on the size of the initial

Re: [Xen-devel] [PATCH] Solved the Xen PV/KASLR riddle

2014-08-29 Thread Jan Beulich
>>> On 29.08.14 at 16:27, wrote: > Sure. Btw, someone also contacted me saying they have the same problem > without > changing the layout but having really big initrd (500M). While that feels > like > it should be impossible (if the kernel+initrd+xen stuff has to fix the 512M > kernel image size

Re: [PATCH 4/5] x86: entry_64.S: always allocate complete "struct pt_regs"

2014-08-11 Thread Jan Beulich
use rdi here? >> >> I changed this entire area in v2: basically, I will not change the logic, >> but will add comments explaining what are we doing here, and why. >> (Some minor code changes will be done, not affecting the logic). >> >> While we are at it, what

Re: [PATCH 4/5] x86: entry_64.S: always allocate complete "struct pt_regs"

2014-08-11 Thread Jan Beulich
>>> On 11.08.14 at 11:07, wrote: > How does one test the entry CFI annotations? The best that I know of > is to single-step through using gdb attached to qemu and see whether > backtraces seem to work. Or have the kernel generate a backtrace from a suitable location and check that the backtrace

Re: [PATCH 4/5] x86: entry_64.S: always allocate complete "struct pt_regs"

2014-08-11 Thread Jan Beulich
>>> On 11.08.14 at 15:26, wrote: > On 08/11/2014 10:40 AM, Jan Beulich wrote: >>>>>> CFI_ESCAPE 0x0f /* DW_CFA_def_cfa_expression */, 6, \ >>>>>> 0x77 /* DW_OP_breg7 */, 0, \ >>>>>>

Re: [PATCH 4/5] x86: entry_64.S: always allocate complete "struct pt_regs"

2014-08-11 Thread Jan Beulich
>>> On 11.08.14 at 16:53, wrote: > On 08/11/2014 07:17 AM, Jan Beulich wrote: >>> >>> The existing comments explain what every byte means. >>> They are useful if CFI-literate reader wants to check correctness >>> of the encoding of this annotatio

Re: [PATCH 4/5] x86: entry_64.S: always allocate complete "struct pt_regs"

2014-08-12 Thread Jan Beulich
>>> On 12.08.14 at 11:31, wrote: > Jan, Pater, does this look correct _and_ human-understandable? > > --- a/arch/x86/kernel/entry_64.S > +++ b/arch/x86/kernel/entry_64.S > @@ -652,10 +652,14 @@ END(interrupt) > cmovzq PER_CPU_VAR(irq_stack_ptr),%rsp > CFI_DEF_CFA_REGISTERrsi >

Re: [tip:x86/boot] x86-64: Use RIP-relative addressing for most per-CPU accesses

2014-11-05 Thread Jan Beulich
>>> "H. Peter Anvin" 11/04/14 9:11 PM >>> >On 11/04/2014 11:45 AM, tip-bot for Jan Beulich wrote: >> x86-64: Use RIP-relative addressing for most per-CPU accesses >> >> Observing that per-CPU data (in the SMP case) is reachable by >> exploi

Re: [PATCH 0/2] x86-64: allow using RIP-relative addressing for per-CPU data

2014-11-05 Thread Jan Beulich
>>> Andy Lutomirski 11/04/14 8:33 PM >>> >On 11/04/2014 12:49 AM, Jan Beulich wrote: >> Observing that per-CPU data (in the SMP case) is reachable by >> exploiting 64-bit address wraparound, these two patches >> arrange for using the one byte shorter R

Re: [PATCH, RFC] x86: also CFI-annotate certain inline asm()s

2014-11-05 Thread Jan Beulich
>>> Andy Lutomirski 11/04/14 8:40 PM >>> >On 11/04/2014 01:24 AM, Jan Beulich wrote: >> The main obstacle to having done this long ago was the need to >> determine whether annotations are needed in the first place: They need >> to be avoided when a frame

Re: [PATCH, RFC] x86: also CFI-annotate certain inline asm()s

2014-11-06 Thread Jan Beulich
>>> On 05.11.14 at 18:23, wrote: > On Wed, Nov 5, 2014 at 9:13 AM, Jan Beulich wrote: >>>>> Andy Lutomirski 11/04/14 8:40 PM >>> >>>On 11/04/2014 01:24 AM, Jan Beulich wrote: >>>> The main obstacle to having done this long ago was the nee

[PATCH] xen-pciback: drop SR-IOV VFs when PF driver unloads

2014-11-06 Thread Jan Beulich
allows the driver to be loaded again with it being able to create the VFs anew, but which also allows to then pass through the PF instead of the VFs). Don't do this however for any VFs currently in active use by a guest. Signed-off-by: Jan Beulich --- drivers/xen/xen-pciback/pci_stub.c |

Re: [tip:x86/urgent] ix86: Fix build failure when !CONFIG_X86_IO_APIC

2014-10-28 Thread Jan Beulich
>>> On 28.10.14 at 12:18, wrote: > Commit-ID: a425cf83e39f99a70168c184e79cea8c67ba7c12 > Gitweb: > http://git.kernel.org/tip/a425cf83e39f99a70168c184e79cea8c67ba7c12 > Author: Jan Beulich > AuthorDate: Tue, 16 Sep 2014 13:44:24 +0100 > Committer: Ingo Mo

Re: [tip:x86/urgent] ix86: Fix build failure when !CONFIG_X86_IO_APIC

2014-10-29 Thread Jan Beulich
>>> On 29.10.14 at 08:50, wrote: > * Jan Beulich wrote: > >> >>> On 28.10.14 at 12:18, wrote: >> > Commit-ID: a425cf83e39f99a70168c184e79cea8c67ba7c12 >> > Gitweb: > http://git.kernel.org/tip/a425cf83e39f99a70168c184e79cea8c67ba7c12

[PATCH] ix86: fix placement of mp_should_keep_irq()

2014-11-03 Thread Jan Beulich
stubbing it out when !CONFIG_X86_IO_APIC was at least questionable. Signed-off-by: Jan Beulich Cc: Jiang Liu --- Note: This replaces (rather than fixes) the previously sent "ix86: fix build failure when !CONFIG_X86_IO_APIC" (which conflicts with the commit mentioned above). --- arch/x8

[PATCH] x86: avoid building unused IRQ entry stubs

2014-11-03 Thread Jan Beulich
padding bytes each of the final four sets have) this doesn't seem to provide any real benefit: Both irq_entries_start and common_interrupt getting cache line aligned, eliminating the 30th set would just produce 32 bytes of padding between the 29th and common_interrupt. Signed-off-by: Jan Be

your patch "mm: Remove false WARN_ON from pagecache_isize_extended()"

2014-11-03 Thread Jan Beulich
Jan, having run into that warning too, I looked into it a little, and now having found that patch am pretty uncertain: Both truncate_setsize() and pagecache_isize_extended() document that they want to be called with i_mutex held, so removing the WARN_ON() alone seems either incomplete or wrong. Wh

Re: your patch "mm: Remove false WARN_ON from pagecache_isize_extended()"

2014-11-03 Thread Jan Beulich
>>> On 03.11.14 at 23:18, wrote: > On Mon, Nov 03, 2014 at 04:41:13PM +, Jan Beulich wrote: >> having run into that warning too, I looked into it a little, and now >> having found that patch am pretty uncertain: Both truncate_setsize() >> and pagecache_isize_exte

[PATCH] irqflags: fix (at least latent) code generation issue

2014-11-04 Thread Jan Beulich
preceding it (which was slightly wrong from at least from 2.6.37 onwards). The code bloat was observed in reality with an experimental x86 patch I'm about to post as RFC. Signed-off-by: Jan Beulich --- include/linux/irqflags.h |6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) --- 3.1

[PATCH] x86: convert a few more per-CPU items to read-mostly ones

2014-11-04 Thread Jan Beulich
t got converted to per-CPU data years ago). Signed-off-by: Jan Beulich --- arch/x86/include/asm/percpu.h|2 +- arch/x86/include/asm/processor.h |4 ++-- arch/x86/kernel/setup_percpu.c |2 +- arch/x86/kernel/smpboot.c|2 +- 4 files changed, 5 insertions(+), 5 dele

[PATCH 1/2] x86-64: handle PC-relative relocations on per-CPU data

2014-11-04 Thread Jan Beulich
This is in preparation of using RIP-relative addressing in many of the per-CPU accesses. Signed-off-by: Jan Beulich --- arch/x86/boot/compressed/misc.c | 14 +- arch/x86/tools/relocs.c | 38 -- 2 files changed, 41 insertions(+), 11

[PATCH 0/2] x86-64: allow using RIP-relative addressing for per-CPU data

2014-11-04 Thread Jan Beulich
addressing for most per-CPU accesses Signed-off-by: Jan Beulich -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FA

[PATCH 2/2] x86-64: use RIP-relative addressing for most per-CPU accesses

2014-11-04 Thread Jan Beulich
he dependency on the minimum kernel load address, arbitrarily low values for CONFIG_PHYSICAL_START are now no longer possible. A link time assertion is being added, directing to the need to increase that value when it triggers. Signed-off-by: Jan Beulich --- a

[PATCH, RFC] x86: also CFI-annotate certain inline asm()s

2014-11-04 Thread Jan Beulich
s) arch/x86/kernel/kprobes/ arch/x86/kernel/kvm/ drivers/char/i8k.c:i8k_smm() drivers/char/toshiba.c:tosh_smm() drivers/lguest/x86/ Signed-off-by: Jan Beulich Cc: Tony Jones --- arch/x86/Makefile| 22 arch/x86/include/as

Re: [PATCH] x86: adjust default caching mode translation tables

2015-07-22 Thread Jan Beulich
>>> On 22.07.15 at 00:29, wrote: > On Mon, 2015-07-20 at 08:46 +0100, Jan Beulich wrote: >> Make WT really mean WT (rather than UC). >> >> I can't see why commit 9cd25aac1f ("x86/mm/pat: Emulate PAT when it is >> disabled") didn't make th

Re: [PATCH] x86: adjust default caching mode translation tables

2015-07-22 Thread Jan Beulich
>>> On 22.07.15 at 17:23, wrote: > On Wed, 2015-07-22 at 09:17 -0600, Jan Beulich wrote: >> > >> > > > On 22.07.15 at 00:29, wrote: >> > On Mon, 2015-07-20 at 08:46 +0100, Jan Beulich wrote: >> > > Make WT really mean WT (rather than UC

Re: [PATCH] x86: adjust default caching mode translation tables

2015-07-22 Thread Jan Beulich
>>> On 22.07.15 at 18:06, wrote: > On Wed, 2015-07-22 at 09:41 -0600, Jan Beulich wrote: >> > >> > > > On 22.07.15 at 17:23, wrote: >> > On Wed, 2015-07-22 at 09:17 -0600, Jan Beulich wrote: >> > > > >> > > > > &

Re: [PATCH] x86, pat: Add comments to cachemode translation tables

2015-07-22 Thread Jan Beulich
>>> On 22.07.15 at 20:06, wrote: > Add comments to the cachemode translation tables to clarify that > the default values are set as minimal supported mode, which are > necessary to handle WC and WT fallback to UC- when they are not > enabled. Wait - shouldn't WT fall back to UC (so to not be affe

Re: [PATCH v3 2/3] x86/ldt: Make modify_ldt optional

2015-07-23 Thread Jan Beulich
>>> On 22.07.15 at 21:23, wrote: > --- a/arch/x86/Kconfig > +++ b/arch/x86/Kconfig > @@ -1015,6 +1015,7 @@ config VM86 > config X86_16BIT > bool "Enable support for 16-bit segments" if EXPERT > default y > + depends on MODIFY_LDT_SYSCALL > ---help--- > This option is

Re: [PATCH] x86, pat: Add comments to cachemode translation tables

2015-07-23 Thread Jan Beulich
>>> On 23.07.15 at 16:27, wrote: > On Thu, 2015-07-23 at 00:42 -0600, Jan Beulich wrote: >> > >> > > > On 22.07.15 at 20:06, wrote: >> > Add comments to the cachemode translation tables to clarify that >> > the default values are set as mini

Re: [PATCH] x86, pat: Add comments to cachemode translation tables

2015-07-23 Thread Jan Beulich
>>> On 23.07.15 at 17:25, wrote: > Yes, I agree with you. But such risk is very low -- 1) the regular case > (no fallback) is used most of the cases, 2) the code using WT knows what > type of memory it is dealing with. For example, pmem may map NVDIMM with > WT, and any sane BIOS sets MTRR to WB

Re: Proposal for finishing the 64-bit x86 syscall cleanup

2015-08-25 Thread Jan Beulich
ld this be any better than the current, "special awful" stubs? >Thing 2: vdso compilation with binutils that doesn't support .cfi directives > >Userspace debuggers really like having the vdso properly >CFI-annotated, and the 32-bit fast syscall entries are annotatied >m

Re: [Xen-devel] [PATCH 1/1] xen/gntdev: kmalloc structure gntdev_copy_batch

2016-05-08 Thread Jan Beulich
>>> Heinrich Schuchardt 05/08/16 8:13 AM >>> >--- a/drivers/xen/gntdev.c >+++ b/drivers/xen/gntdev.c >@@ -915,36 +915,43 @@ static int gntdev_grant_copy_seg(struct >gntdev_copy_batch *batch, >static long gntdev_ioctl_grant_copy(struct gntdev_priv *priv, void __user *u) >{ >struct ioctl_gntdev_gra

[PATCH] xen: fix ring resize of /dev/evtchn

2016-05-04 Thread Jan Beulich
boot a HVM guest with 64 or more vCPU-s, which was reported by Konrad Rzeszutek Wilk . Signed-off-by: Jan Beulich --- drivers/xen/evtchn.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) --- 4.6-rc6/drivers/xen/evtchn.c +++ 4.6-rc6-xen-dev-evtchn-resize/drivers

Re: [Xen-devel] [PATCH] xen: fix ring resize of /dev/evtchn

2016-05-04 Thread Jan Beulich
>>> On 04.05.16 at 17:34, wrote: > On 04/05/16 14:30, David Vrabel wrote: >> On 04/05/16 14:02, Jan Beulich wrote: >>> The copying of ring data was wrong for two cases: For a full ring >>> nothing got copied at all (as in that case the canonicalized producer &g

Re: [PATCH v2 08/13] ACPICA: Hardware: Add optimized access bit width support

2016-05-26 Thread Jan Beulich
>>> Boris Ostrovsky 05/25/16 9:17 PM >>> >On 05/05/2016 12:58 AM, Lv Zheng wrote: >> +static u8 >> +acpi_hw_get_access_bit_width(struct acpi_generic_address *reg, u8 >> max_bit_width) >> +{ >> +u64 address; >> + >> +if (!reg->access_width) { >> +/* >> + * Detect old regist

[PATCH] objtool: allow building with older libelf

2016-05-12 Thread Jan Beulich
The switch to elf_getshdr{num,strndx} post-dates the oldest tool chain the kernel is supposed to be able to build with, so try to cope with such an environment. Signed-off-by: Jan Beulich --- tools/objtool/Makefile|4 tools/objtool/elf.h |5 + 2 files changed

[PATCH] objtool: cope with pre-4.5 gcc (and non-gcc)

2016-05-12 Thread Jan Beulich
number of files getting such warnings by about 99% for me. Signed-off-by: Jan Beulich --- tools/objtool/builtin-check.c | 37 - 1 file changed, 36 insertions(+), 1 deletion(-) --- 4.6-rc7/tools/objtool/builtin-check.c +++ 4.6-rc7-objtool-BUG-older-gcc/tools/

Re: [PATCH] xen/x86/pvh: Use HVM's flush_tlb_others op

2015-12-15 Thread Jan Beulich
>>> On 15.12.15 at 15:36, wrote: > On 12/14/2015 10:27 AM, Konrad Rzeszutek Wilk wrote: >> On Sat, Dec 12, 2015 at 07:25:55PM -0500, Boris Ostrovsky wrote: >>> Using MMUEXT_TLB_FLUSH_MULTI doesn't buy us much since the hypervisor >>> will likely perform same IPIs as would have the guest. >>> >> Bu

Re: [PATCH] xen/x86/pvh: Use HVM's flush_tlb_others op

2015-12-15 Thread Jan Beulich
>>> On 15.12.15 at 16:14, wrote: > On 12/15/2015 10:03 AM, Jan Beulich wrote: >>>>> On 15.12.15 at 15:36, wrote: >>> On 12/14/2015 10:27 AM, Konrad Rzeszutek Wilk wrote: >>>> On Sat, Dec 12, 2015 at 07:25:55PM -0500, Boris Ostrovsky wrote: >&g

Re: [PATCH] xen/x86/pvh: Use HVM's flush_tlb_others op

2015-12-15 Thread Jan Beulich
>>> On 15.12.15 at 16:37, wrote: > On 12/15/2015 10:24 AM, Jan Beulich wrote: >>>>> On 15.12.15 at 16:14, wrote: >>> On 12/15/2015 10:03 AM, Jan Beulich wrote: >>>>>>> On 15.12.15 at 15:36, wrote: >>>>> On 12/14/2015 10:

Re: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-10 Thread Jan Beulich
>>> On 10.09.15 at 13:37, wrote: > On Thu, 10 Sep 2015, Mark Rutland wrote: >> Why can't Xen give a virtual EFI interface to Dom0 / guests? e.g. >> create pages of RuntimeServicesCode that are trivial assembly shims >> doing hypercalls, and plumb these into the virtual EFI memory map and >> tables

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-10 Thread Jan Beulich
>>> On 10.09.15 at 14:58, wrote: > On Thu, 2015-09-10 at 13:15 +0100, Mark Rutland wrote: > >> > In any case this should be separate from the shim ABI discussion. >> >> I disagree; I think this is very much relevant to the ABI discussion. >> That's not to say that I insist on a particular approa

Re: [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-10 Thread Jan Beulich
>>> On 10.09.15 at 16:53, wrote: > On Thu, Sep 10, 2015 at 01:55:25PM +0100, Jan Beulich wrote: >> >>> On 10.09.15 at 13:37, wrote: >> > On Thu, 10 Sep 2015, Mark Rutland wrote: >> >> Why can't Xen give a virtual EFI interface to Dom0 / guests

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-14 Thread Jan Beulich
>>> On 14.09.15 at 11:36, wrote: > On 14 September 2015 at 11:31, Shannon Zhao wrote: >> My understanding is that if there are no EFI_MEMORY_RUNTIME regions, it >> means we can't use runtime services and should not set the bit >> EFI_RUNTIME_SERVICES of efi.flags. But if efi_virtmap_init() return

Re: [Xen-devel] [PATCH] efi/libstub/fdt: Standardize the names of EFI stub parameters

2015-09-14 Thread Jan Beulich
>>> On 14.09.15 at 13:16, wrote: > (I still think not using SetVirtualAddressMap() at all > would be the best approach for arm64, but unfortunately, most of my > colleagues disagree with me) Any reasons they have? I'm curious because we run x86 Xen without using this function ... Jan -- To unsu

Re: [Xen-devel] crash tool - problem with new Xen linear virtual mapped sparse p2m list

2015-11-24 Thread Jan Beulich
>>> On 24.11.15 at 13:57, wrote: > V Tue, 24 Nov 2015 10:35:03 + > Andrew Cooper napsáno: > >> On 24/11/15 10:17, Petr Tesarik wrote: >> > On Tue, 24 Nov 2015 10:09:01 + >> > David Vrabel wrote: >> > >> >> On 24/11/15 09:55

Re: [Xen-devel] crash tool - problem with new Xen linear virtual mapped sparse p2m list

2015-11-24 Thread Jan Beulich
>>> On 24.11.15 at 14:46, wrote: > On Tue, 2015-11-24 at 10:35 +, Andrew Cooper wrote: >> On 24/11/15 10:17, Petr Tesarik wrote: >> > On Tue, 24 Nov 2015 10:09:01 + >> > David Vrabel wrote: >> > >> > > On 24/11/15 09:55, Malcol

Re: [Xen-devel] [PATCH] x86: Xen PV guests don't have the rtc_cmos platform device

2015-12-09 Thread Jan Beulich
>>> On 09.12.15 at 15:32, wrote: > --- a/arch/x86/kernel/rtc.c > +++ b/arch/x86/kernel/rtc.c > @@ -200,6 +200,9 @@ static __init int add_rtc_cmos(void) > } > #endif > > + if (paravirt_enabled()) > + return -ENODEV; What about Xen Dom0? Jan -- To unsubscribe from this li

Re: [Xen-devel] [PATCH] x86: Xen PV guests don't have the rtc_cmos platform device

2015-12-09 Thread Jan Beulich
>>> On 09.12.15 at 16:15, wrote: > On 12/09/2015 10:00 AM, Sander Eikelenboom wrote: >> On 2015-12-09 15:42, Jan Beulich wrote: >>>>>> On 09.12.15 at 15:32, wrote: >>>> --- a/arch/x86/kernel/rtc.c >>>> +++ b/arch/x86/kernel/rtc.c

[PATCH] x86: adjust default caching mode translation tables

2015-07-20 Thread Jan Beulich
Make WT really mean WT (rather than UC). I can't see why commit 9cd25aac1f ("x86/mm/pat: Emulate PAT when it is disabled") didn't make this match its changes to pat_init(). Signed-off-by: Jan Beulich Cc: Borislav Petkov Cc: Toshi Kani --- arch/x86/mm/init.c |6 +++--

[PATCH] x86: "noxsave" should imply further disabled features

2015-07-20 Thread Jan Beulich
Complete the set of dependent features that need disabling at once: XSAVEC, AVX-512 and all currently known to the kernel extensions to it, as well as MPX need to be disabled too. Signed-off-by: Jan Beulich --- arch/x86/kernel/fpu/init.c |6 ++ 1 file changed, 6 insertions(+) --- 4.2

[PATCH v3] x86/mm: avoid premature success when changing page attributes

2016-02-10 Thread Jan Beulich
pages. The cases when __change_page_attr() calls __cpa_process_fault(), otoh, don't generally mean the entire range got processed (as can be seen from one of the two success return paths in __cpa_process_fault() already adjusting ->numpages). Signed-off-by: Jan Beulich --- v3: Mostly

Re: [Xen-devel] [PATCH 4/4] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-20 Thread Jan Beulich
t; Provide a get_required_mask op that uses the maximum MFN to calculate > the DMA mask. > > Signed-off-by: David Vrabel Reviewed-by: Jan Beulich -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org

Re: [Xen-devel] [PATCH 3/3] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-12 Thread Jan Beulich
>>> On 12.11.14 at 16:25, wrote: > +u64 > +xen_swiotlb_get_required_mask(struct device *dev) > +{ > + u64 max_mfn; > + > + max_mfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL); > + > + return DMA_BIT_MASK(fls64(max_mfn << PAGE_SHIFT) + 1); > +} The value the hypercall returns

Re: [Xen-devel] [PATCH 3/3] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-12 Thread Jan Beulich
>>> On 12.11.14 at 17:59, wrote: > On 12/11/14 15:55, Jan Beulich wrote: >>>>> On 12.11.14 at 16:25, wrote: >>> +u64 >>> +xen_swiotlb_get_required_mask(struct device *dev) >>> +{ >>> + u64 max_mfn; >>>

Re: [PATCH, RFC] x86: also CFI-annotate certain inline asm()s

2014-11-12 Thread Jan Beulich
>>> On 12.11.14 at 21:36, wrote: > On Mon, Nov 10, 2014 at 11:42 PM, Jan Beulich wrote: >> >> Nothing crashes with the unwind information being wrong. It is >> solely you who was claiming (without proof) years ago that the >> unwinder repeatedly caused issues

Re: [Xen-devel] [PATCH 3/3] x86/xen: use the maximum MFN to calculate the required DMA mask

2014-11-13 Thread Jan Beulich
>>> On 12.11.14 at 16:55, wrote: On 12.11.14 at 16:25, wrote: >> +u64 >> +xen_swiotlb_get_required_mask(struct device *dev) >> +{ >> +u64 max_mfn; >> + >> +max_mfn = HYPERVISOR_memory_op(XENMEM_maximum_ram_page, NULL); >> + >> +return DMA_BIT_MASK(fls64(max_mfn << PAGE_SHIFT) + 1

<    5   6   7   8   9   10   11   12   13   14   >