Re: [PATCH] mm/x86: Patch out arch_flush_lazy_mmu_mode() when running on bare metal

2013-03-20 Thread Boris Ostrovsky
- jwbo...@redhat.com wrote: > On Wed, Mar 13, 2013 at 09:25:44AM -0400, Boris Ostrovsky wrote: > > On 03/01/2013 07:14 AM, Josh Boyer wrote: > > >On Thu, Feb 28, 2013 at 04:52:20PM -0800, H. Peter Anvin wrote: > > >>On 02/28/2013 04:42 PM, Josh Boyer wrote: >

Re: [PATCH 2/2] mm/x86: Patch out arch_flush_lazy_mmu_mode() when running on bare metal

2013-04-03 Thread Boris Ostrovsky
On 03/23/2013 09:36 AM, Konrad Rzeszutek Wilk wrote: From: Boris Ostrovsky Invoking arch_flush_lazy_mmu_mode() results in calls to preempt_enable()/disable() which may have performance impact. Since lazy MMU is not used on bare metal we can patch away arch_flush_lazy_mmu_mode() so that it is

[PATCH 0/2] Enable WC+ memory type on AMD family 10h processors

2013-01-29 Thread Boris Ostrovsky
From: Boris Ostrovsky Enable WC+ memory type on AMD family 10h processors if BIOS doesn't do this. WC+ is used only in in virtualized scenarios and never in bare metal cases (see AMD APM v2). Also clean up init_amd() a little. Boris Ostrovsky (2): AMD,x86: Clean up init_amd() x8

[PATCH 1/2] AMD,x86: Clean up init_amd()

2013-01-29 Thread Boris Ostrovsky
From: Boris Ostrovsky Clean up multiple declarations of variable used for rd/wrmsr Signed-off-by: Boris Ostrovsky --- arch/x86/kernel/cpu/amd.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel

[PATCH 2/2] x86,AMD: Enable WC+ memory type on family 10 processors

2013-01-29 Thread Boris Ostrovsky
From: Boris Ostrovsky In some cases BIOS may not enable WC+ memory type on family 10 processors, instead converting what would be WC+ memory to CD type. On guests using nested pages this could result in performance degradation. This patch enables WC+. Signed-off-by: Boris Ostrovsky --- arch

[PATCH v2 0/2] Enable WC+ memory type on AMD family 10h processors

2013-01-29 Thread Boris Ostrovsky
clean up init_amd() a little. Boris Ostrovsky (2): AMD,x86: Clean up init_amd() x86,AMD: Enable WC+ memory type on family 10 processors arch/x86/include/uapi/asm/msr-index.h |1 + arch/x86/kernel/cpu/amd.c | 49 ++--- 2 files changed, 28 inser

[PATCH v2 1/2] AMD,x86: Clean up init_amd()

2013-01-29 Thread Boris Ostrovsky
Clean up multiple declarations of variable used for rd/wrmsr Signed-off-by: Boris Ostrovsky --- arch/x86/kernel/cpu/amd.c | 29 - 1 files changed, 12 insertions(+), 17 deletions(-) diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c index 15239ff

[PATCH v2 2/2] x86,AMD: Enable WC+ memory type on family 10 processors

2013-01-29 Thread Boris Ostrovsky
In some cases BIOS may not enable WC+ memory type on family 10 processors, instead converting what would be WC+ memory to CD type. On guests using nested pages this could result in performance degradation. This patch enables WC+. Signed-off-by: Boris Ostrovsky --- arch/x86/include/uapi/asm/msr

[PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set

2013-02-26 Thread Boris Ostrovsky
__tlb_remove_page() -> tlb_next_batch(). Signed-off-by: Boris Ostrovsky --- arch/x86/mm/pageattr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index ca1f1c2..7b3216e 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -136

Re: [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set

2013-02-26 Thread Boris Ostrovsky
- h...@zytor.com wrote: > On 02/26/2013 02:56 PM, Boris Ostrovsky wrote: > > When CONFIG_DEBUG_PAGEALLOC is set page table updates made by > > kernel_map_pages() are not made visible (via TLB flush) immediately > if lazy > > MMU is on. In environments that support

Re: Is: x86: mm: Fix vmalloc_fault oops during lazy MMU updates Was: Re: [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set

2013-02-28 Thread Boris Ostrovsky
On 02/28/2013 11:10 AM, Borislav Petkov wrote: On Thu, Feb 28, 2013 at 07:53:44AM -0800, H. Peter Anvin wrote: At the very least we should have an early filter for the **COMMON!** case that we are not on a PV platform. ... or, patch it out with the alternatives on baremetal, as Steven suggested

Re: Is: x86: mm: Fix vmalloc_fault oops during lazy MMU updates Was: Re: [PATCH] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set

2013-02-28 Thread Boris Ostrovsky
On 02/28/2013 11:22 AM, Borislav Petkov wrote: On Thu, Feb 28, 2013 at 11:20:20AM -0500, Boris Ostrovsky wrote: On 02/28/2013 11:10 AM, Borislav Petkov wrote: On Thu, Feb 28, 2013 at 07:53:44AM -0800, H. Peter Anvin wrote: At the very least we should have an early filter for the **COMMON

[PATCH] mm/x86: Patch out arch_flush_lazy_mmu_mode() when running on bare metal

2013-02-28 Thread Boris Ostrovsky
Invoking arch_flush_lazy_mmu_mode() results in calls to preempt_enable()/disable() which may have performance impact. Since lazy MMU is not used on bare metal we can patch away arch_flush_lazy_mmu_mode() so that it is never called in such environment. Signed-off-by: Boris Ostrovsky --- arch

Re: [GIT PULL] x86/cpu changes for v3.9

2013-02-19 Thread Boris Ostrovsky
On 02/19/2013 12:57 PM, Konrad Rzeszutek Wilk wrote: On Tue, Feb 19, 2013 at 06:47:58PM +0100, Borislav Petkov wrote: On Tue, Feb 19, 2013 at 09:38:31AM -0800, H. Peter Anvin wrote: My fault... I was tracking the fix and lost track of the thread. The problem is that the fix is necessary but no

Re: [GIT PULL] x86/cpu changes for v3.9

2013-02-19 Thread Boris Ostrovsky
On 02/19/2013 01:21 PM, H. Peter Anvin wrote: On 02/19/2013 10:19 AM, Boris Ostrovsky wrote: On 02/19/2013 12:57 PM, Konrad Rzeszutek Wilk wrote: On Tue, Feb 19, 2013 at 06:47:58PM +0100, Borislav Petkov wrote: On Tue, Feb 19, 2013 at 09:38:31AM -0800, H. Peter Anvin wrote: My fault... I was

Re: [PATCH] mm/x86: Patch out arch_flush_lazy_mmu_mode() when running on bare metal

2013-03-13 Thread Boris Ostrovsky
On 03/01/2013 07:14 AM, Josh Boyer wrote: On Thu, Feb 28, 2013 at 04:52:20PM -0800, H. Peter Anvin wrote: On 02/28/2013 04:42 PM, Josh Boyer wrote: On Fri, Mar 01, 2013 at 01:36:29AM +0100, Borislav Petkov wrote: On Thu, Feb 28, 2013 at 04:15:45PM -0800, H. Peter Anvin wrote: I'll try to get

[PATCH] x86/mce: Use MCG_CAP MSR to find out number of banks on AMD

2013-03-14 Thread Boris Ostrovsky
hould use. Signed-off-by: Boris Ostrovsky --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 1ac581f..cb7c739 100644 --- a/arch/x86/k

[PATCH v2 1/2] x86/mce: Replace shared_bank array with is_shared_bank() helper

2013-03-14 Thread Boris Ostrovsky
Use helper function instead of an array to report whether register bank is shared. Currently only bank 4 (northbridge) is shared. Signed-off-by: Boris Ostrovsky --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/arch

[PATCH v2 0/2] AMD MCE fixes

2013-03-14 Thread Boris Ostrovsky
Boris, Here is the updated patch for determining number of regiter banks on AMD plus a patch removing shared_bank array, as you suggested. Offline/online testing didn't show any issues. Boris Ostrovsky (2): x86/mce: Replace shared_bank array with is_shared_bank() helper x86/mce

[PATCH v2 2/2] x86/mce: Use MCG_CAP MSR to find out number of banks on AMD

2013-03-14 Thread Boris Ostrovsky
at we should use. Signed-off-by: Boris Ostrovsky --- arch/x86/kernel/cpu/mcheck/mce_amd.c | 21 ++--- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/arch/x86/kernel/cpu/mcheck/mce_amd.c b/arch/x86/kernel/cpu/mcheck/mce_amd.c index 654a155..13a22e2 100644 --- a/arc

Re: [xen] double fault: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC

2013-10-06 Thread Boris Ostrovsky
- torva...@linux-foundation.org wrote: > On Sun, Oct 6, 2013 at 1:23 AM, Fengguang Wu > wrote: > > > > I got the below dmesg and the first bad commit is commit > cf39c8e5352b: > > Merge tag 'stable/for-linus-3.12-rc0-tag' of > git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip > > Ug

[PATCH] xen/p2m: Don't call get_balloon_scratch_page() twice, keep interrupts disabled for multicalls

2013-09-06 Thread Boris Ostrovsky
is no put_balloon_scratch_page() in the error path.) In addition, the second multicall uses __xen_mc_entry() which does not disable interrupts. Rearrange xen_mc_* calls to keep interrupts off while performing multicalls. Signed-off-by: Boris Ostrovsky --- arch/x86/xen/p2m.c | 10 ++ 1

Re: [PATCH] x86/xen: remove deprecated IRQF_DISABLED

2013-09-08 Thread Boris Ostrovsky
- michael.opdenac...@free-electrons.com wrote: > This patch proposes to remove the IRQF_DISABLED flag from x86/xen > code. It's a NOOP since 2.6.35 and it will be removed one day. > > Signed-off-by: Michael Opdenacker > > --- > arch/x86/xen/smp.c | 10 +- > arch/x86/xen/spinlo

[PATCH v1 2/5] xen/PMU: Sysfs interface for setting Xen PMU mode

2013-09-10 Thread Boris Ostrovsky
Set Xen's PMU mode via /sys/hypervisor/pmu/pmu_mode. Add XENPMU hypercall. Signed-off-by: Boris Ostrovsky --- arch/x86/include/asm/xen/hypercall.h | 6 ++ arch/x86/xen/xen-head.S | 5 +- drivers/xen/sys-hypervisor.c | 118 +++ includ

[PATCH v1 0/5] xen/PMU: PMU support for Xen PV guests

2013-09-10 Thread Boris Ostrovsky
symbols to dom0 (similar to /proc/kallsyms) * VPMU infrastructure is now used for both HVM and PV and therefore has been moved up from hvm subtree Boris Ostrovsky (5): xen: xensyms support xen/PMU: Sysfs interface for setting Xen PMU mode xen/PMU: Initialization code for Xen PMU xen

[PATCH v1 1/5] xen: xensyms support

2013-09-10 Thread Boris Ostrovsky
Export Xen symbols to dom0 via /proc/xen/xensyms (similar to /proc/kallsyms). Signed-off-by: Boris Ostrovsky --- drivers/xen/Kconfig | 5 ++ drivers/xen/xenfs/Makefile | 1 + drivers/xen/xenfs/super.c| 3 + drivers/xen/xenfs/xenfs.h| 1 + drivers/xen

[PATCH v1 5/5] xen/PMU: Cache MSR accesses during interrupt handling

2013-09-10 Thread Boris Ostrovsky
Avoid trapping to hypervisor on each MSR access during interrupt handling. Instead, use cached MSR values provided in shared xenpmu_data by Xen. When handling is completed, flush the registers to hypervisor who will load them into HW. Signed-off-by: Boris Ostrovsky --- arch/x86/xen/pmu.c

[PATCH v1 3/5] xen/PMU: Initialization code for Xen PMU

2013-09-10 Thread Boris Ostrovsky
Map shared data structure that will hold CPU registers, VPMU context, VCPU/PCPI IDs of the VCPU interrupted by PMU interrupt. Hypervisor fills this information in its handler and passes it to the guest for further processing. Set up PMU VIRQ. Signed-off-by: Boris Ostrovsky --- arch/x86/xen

[PATCH v1 4/5] xen/PMU: Add support for PMU registes on PV guests

2013-09-10 Thread Boris Ostrovsky
PMU emulation code: MSR caching in PMU context and LVTPC APIC handling. (Portions of this code are taken from Xen's VPMU implementation) Signed-off-by: Boris Ostrovsky --- arch/x86/xen/enlighten.c | 27 +++- arch/x86/xen/pmu.c

Re: [Xen-devel] [PATCH v1 0/5] xen/PMU: PMU support for Xen PV guests

2013-09-11 Thread Boris Ostrovsky
On 09/11/2013 05:33 AM, David Vrabel wrote: On 10/09/13 16:31, Boris Ostrovsky wrote: This is the Linux side of Xen PMU support for PV guests, including dom0. Only kernel changes are here, toolstack patch will be provided separately. Here is description from the hypervisor patch submission

[PATCH] xen: Do not enable spinlocks before jump_label_init() has executed

2013-09-12 Thread Boris Ostrovsky
: Konrad Rzeszutek Wilk Signed-off-by: Boris Ostrovsky --- arch/x86/xen/spinlock.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/x86/xen/spinlock.c b/arch/x86/xen/spinlock.c index 253f63f..d90628d 100644 --- a/arch/x86/xen/spinlock.c +++ b/arch/x86/xen

Re: [PATCH 10/11] xenbus: convert bus code to use dev_groups

2013-10-07 Thread Boris Ostrovsky
On 10/07/2013 02:55 AM, Greg Kroah-Hartman wrote: The dev_attrs field of struct bus_type is going away soon, dev_groups should be used instead. This converts the xenbus code to use the correct field. Cc: Konrad Rzeszutek Wilk Cc: Boris Ostrovsky Cc: David Vrabel Cc: Signed-off-by: Greg

Re: [PATCH v1 2/5] xen/PMU: Sysfs interface for setting Xen PMU mode

2013-09-23 Thread Boris Ostrovsky
On 09/23/2013 09:17 AM, Konrad Rzeszutek Wilk wrote: On Tue, Sep 10, 2013 at 11:31:47AM -0400, Boris Ostrovsky wrote: + +/* Parameter structure for HYPERVISOR_xenpmu_op call */ +struct xenpmu_params { + union { + struct version { + uint8_t maj

Re: [PATCH v1 3/5] xen/PMU: Initialization code for Xen PMU

2013-09-23 Thread Boris Ostrovsky
On 09/23/2013 09:26 AM, Konrad Rzeszutek Wilk wrote: On Tue, Sep 10, 2013 at 11:31:48AM -0400, Boris Ostrovsky wrote: Map shared data structure that will hold CPU registers, VPMU context, VCPU/PCPI IDs of the VCPU interrupted by PMU interrupt. Hypervisor fills this information in its handler

Re: [Xen-devel] [PATCH v1 3/5] xen/PMU: Initialization code for Xen PMU

2013-09-23 Thread Boris Ostrovsky
On 09/23/2013 10:18 AM, Boris Ostrovsky wrote: On 09/23/2013 09:26 AM, Konrad Rzeszutek Wilk wrote: On Tue, Sep 10, 2013 at 11:31:48AM -0400, Boris Ostrovsky wrote: Map shared data structure that will hold CPU registers, VPMU context, VCPU/PCPI IDs of the VCPU interrupted by PMU interrupt

Re: [PATCH] xen: Do not enable spinlocks before jump_label_init() has executed

2013-09-24 Thread Boris Ostrovsky
On 09/12/2013 10:47 PM, Steven Rostedt wrote: On Thu, 12 Sep 2013 22:29:44 -0400 Boris Ostrovsky wrote: From: Konrad Rzeszutek Wilk xen_init_spinlocks() currently calls static_key_slow_inc() before jump_label_init() is invoked. When CONFIG_JUMP_LABEL is set (which usually is the case) the

[PATCH] x86,AMD: Power driver support for AMD's family 16h processors

2012-12-04 Thread Boris Ostrovsky
Add family 16h PCI ID to AMD's power driver to allow it report power consumption on these processors. Signed-off-by: Boris Ostrovsky --- drivers/hwmon/fam15h_power.c |1 + include/linux/pci_ids.h |1 + 2 files changed, 2 insertions(+) diff --git a/drivers/hwmon/fam15h_powe

[PATCH v2] x86,AMD: Power driver support for AMD's family 16h processors

2012-12-05 Thread Boris Ostrovsky
Add family 16h PCI ID to AMD's power driver to allow it report power consumption on these processors. Signed-off-by: Boris Ostrovsky --- drivers/hwmon/fam15h_power.c |4 1 file changed, 4 insertions(+) diff --git a/drivers/hwmon/fam15h_power.c b/drivers/hwmon/fam15h_power.c

[PATCH] x86, microcode, AMD: Add support for family 16h processors

2012-11-15 Thread Boris Ostrovsky
Add valid patch size for family 16h processors Signed-off-by: Boris Ostrovsky --- arch/x86/kernel/microcode_amd.c |4 1 file changed, 4 insertions(+) diff --git a/arch/x86/kernel/microcode_amd.c b/arch/x86/kernel/microcode_amd.c index 7720ff5..58790e8 100644 --- a/arch/x86/kernel

Re: [PATCH] x86, microcode, AMD: Add support for family 16h processors

2012-11-15 Thread Boris Ostrovsky
On 11/15/2012 03:45 PM, Henrique de Moraes Holschuh wrote: On Thu, 15 Nov 2012, Boris Ostrovsky wrote: Add valid patch size for family 16h processors Signed-off-by: Boris Ostrovsky Is this something that needs to go to -stable ? #define F1XH_MPB_MAX_SIZE 2048 #define

Re: [PATCH] x86, microcode, AMD: Add support for family 16h processors

2012-11-15 Thread Boris Ostrovsky
On 11/15/2012 06:01 PM, Gene Heskett wrote: On Thursday 15 November 2012, Henrique de Moraes Holschuh wrote: On Thu, 15 Nov 2012, Boris Ostrovsky wrote: Add valid patch size for family 16h processors Signed-off-by: Boris Ostrovsky Is this something that needs to go to -stable ? IMO

Re: [PATCH 3/3] MAINTAINERS: Add in two extra co-maintainers of the Xen tree.

2013-08-05 Thread Boris Ostrovsky
On 08/05/2013 02:05 PM, Konrad Rzeszutek Wilk wrote: Both Boris and David have graciously volunteered to help in maintaining the Xen subsystem tree. Cementing this in the MAINTAINERS file so they are copied on Xen related patches. CC: Boris Ostrovsky CC: David Vrabel Signed-off-by: Konrad

Re: [tip:x86/urgent] x86, mm: Patch out arch_flush_lazy_mmu_mode() when running on bare metal

2013-04-11 Thread Boris Ostrovsky
On 04/10/2013 08:30 PM, tip-bot for Boris Ostrovsky wrote: Commit-ID: 511ba86e1d386f671084b5d0e6f110bb30b8eeb2 Gitweb: http://git.kernel.org/tip/511ba86e1d386f671084b5d0e6f110bb30b8eeb2 Author: Boris Ostrovsky AuthorDate: Sat, 23 Mar 2013 09:36:36 -0400 Committer: H. Peter Anvin

[PATCH RESEND] mm/x86: Flush lazy MMU when DEBUG_PAGEALLOC is set

2013-04-11 Thread Boris Ostrovsky
__tlb_remove_page() -> tlb_next_batch(). Signed-off-by: Boris Ostrovsky --- arch/x86/mm/pageattr.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/x86/mm/pageattr.c b/arch/x86/mm/pageattr.c index 091934e..2ccbe0b 100644 --- a/arch/x86/mm/pageattr.c +++ b/arch/x86/mm/pageattr.c @@ -141

Re: 3.6.11 AMD-Vi: Completion-Wait loop timed out

2013-01-21 Thread Boris Ostrovsky
On 01/20/2013 06:57 AM, Jörg Rödel wrote: On Sun, Jan 20, 2013 at 12:48:28PM +0100, Borislav Petkov wrote: On Sun, Jan 20, 2013 at 12:40:11PM +0100, Jörg Rödel wrote: Yes, the BIOS vendor can fix this issue. They need to disable NB clock gating for the IOMMU. Right, Udo, you can try Gigabyt

Re: [Xen-devel] kernel 3.7+ cpufreq regression on AMD system running as dom0

2013-01-21 Thread Boris Ostrovsky
On 01/18/2013 02:00 PM, Konrad Rzeszutek Wilk wrote: So something like this in the hypervisor maybe (not even tested): diff --git a/xen/arch/x86/acpi/cpufreq/powernow.c b/xen/arch/x86/acpi/cpufreq/powernow.c index a9b7792..54e7808 100644 --- a/xen/arch/x86/acpi/cpufreq/powernow.c +++ b/xen/a

Re: 3.6.11 AMD-Vi: Completion-Wait loop timed out

2013-01-22 Thread Boris Ostrovsky
On 01/22/2013 09:13 AM, Udo van den Heuvel wrote: Gigabyte demonstrate that using ESX 5i IOMMU works fine. (with pictures attached). There are no attachments to your message. I am not sure that 5i supports IOMMU (but I may well be wrong). What can we bring against that? How reproducible

Re: 3.6.11 AMD-Vi: Completion-Wait loop timed out

2013-01-22 Thread Boris Ostrovsky
On 01/22/2013 10:27 AM, Udo van den Heuvel wrote: On 2013-01-22 15:36, Boris Ostrovsky wrote: Gigabyte demonstrate that using ESX 5i IOMMU works fine. (with pictures attached). There are no attachments to your message. Correct, gigabyte did send them via their support web-interface. Do yo

Re: [Xen-devel] kernel 3.7+ cpufreq regression on AMD system running as dom0

2013-01-18 Thread Boris Ostrovsky
On 01/18/2013 02:00 PM, Konrad Rzeszutek Wilk wrote: Right, that information is gathered from the MSRs. I think the Xen would need to do this since it can do the MSRs correctly and modify the P-states. So something like this in the hypervisor maybe (not even tested): Is there any harm in allo

Re: [PATCH] xen/pvhvm: Support more than 32 VCPUs when migrating (v3).

2016-07-21 Thread Boris Ostrovsky
On 07/21/2016 10:14 AM, Konrad Rzeszutek Wilk wrote: > On Fri, Jul 10, 2015 at 02:57:51PM -0400, Konrad Rzeszutek Wilk wrote: >> On Fri, Jul 10, 2015 at 02:37:46PM -0400, Konrad Rzeszutek Wilk wrote: >>> When Xen migrates an HVM guest, by default its shared_info can >>> only hold up to 32 CPUs. As

[PATCH] xen/PMU: Log VPMU initialization error at lower level

2016-06-21 Thread Boris Ostrovsky
This will match how PMU errors are reported at check_hw_exists()'s msr_fail label, which is reached when VPMU initialzation fails. Signed-off-by: Boris Ostrovsky --- arch/x86/xen/pmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/xen/pmu.c b/arch/x86/xen/

Re: [PATCH] xen/pciback: Fix conf_space read/write overlap check.

2016-06-21 Thread Boris Ostrovsky
o https://www.mail-archive.com/xen-devel@lists.xen.org/msg72174.html > > Cc: Jan Beulich > Cc: Boris Ostrovsky > Cc: sta...@vger.kernel.org > Signed-off-by: Andrey Grodzovsky + David and Juergen (maintainers) and kernel list. Reviewed-by: Boris Ostrovsky > --- > d

Re: [PATCH v3 1/3] xen/pciback: simplify pcistub device handling

2016-09-22 Thread Boris Ostrovsky
> Split out the search function. > > Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH v3 2/3] xen/pciback: avoid multiple entries in slot list

2016-09-22 Thread Boris Ostrovsky
On 09/22/2016 04:45 AM, Juergen Gross wrote: > The Xen pciback driver has a list of all pci devices it is ready to > seize. There is no check whether a to be added entry already exists. > While this might be no problem in the common case it might confuse > those which consume the list via sysfs. >

Re: [PATCH v3 3/3] xen/pciback: support driver_override

2016-09-22 Thread Boris Ostrovsky
On 09/22/2016 04:45 AM, Juergen Gross wrote: > Support the driver_override scheme introduced with commit 782a985d7af2 > ("PCI: Introduce new device binding path using pci_dev.driver_override") > > As pcistub_probe() is called for all devices (it has to check for a > match based on the slot address

[PATCH] perf/bts: Don't try handling BTS interrupt if BTS is not enabled

2016-09-26 Thread Boris Ostrovsky
Otherwise we will try to dereference ds which has not been allocated. Signed-off-by: Boris Ostrovsky --- arch/x86/events/intel/bts.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/events/intel/bts.c b/arch/x86/events/intel/bts.c index bdcd651..1f5657f 100644 --- a/arch/x86

Re: [tip:smp/hotplug 5/6] arch/x86/xen/enlighten.c:1522:2: error: implicit declaration of function 'xen_pvh_early_cpu_init'

2016-07-28 Thread Boris Ostrovsky
On 07/28/2016 12:14 PM, kbuild test robot wrote: tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git smp/hotplug head: c713c8cb2055f5f3b32ee4315be589177a2658cc commit: 854e9fa5a56a9771fad4701a427e4844d2cbade1 [5/6] xen/x86: Define stubs for xen_smp_intr_init/xen_smp_intr_free c

Re: [PATCH] xen: rename xen_pmu_init() in sys-hypervisor.c

2016-08-01 Thread Boris Ostrovsky
On 08/01/2016 07:40 AM, Juergen Gross wrote: > There are two functions with name xen_pmu_init() in the kernel. Rename > the one in drivers/xen/sys-hypervisor.c to avoid shadowing the one in > arch/x86/xen/pmu.c > > Signed-off-by: Juergen Gross While at it, how about changing xen_properties_init t

Re: [PATCH] xen: Make VPMU init message look less scary

2016-08-01 Thread Boris Ostrovsky
or than a normal state. > > Change the message to something less scary in case the hypervisor > returns EOPNOTSUPP when trying to activate VPMU. > > Signed-off-by: Juergen Gross Reviewed-by: Boris Ostrovsky

Re: [PATCH] xen: rename xen_pmu_init() in sys-hypervisor.c

2016-08-01 Thread Boris Ostrovsky
On 08/01/2016 11:44 AM, Juergen Gross wrote: > On 01/08/16 16:10, Boris Ostrovsky wrote: >> On 08/01/2016 07:40 AM, Juergen Gross wrote: >>> There are two functions with name xen_pmu_init() in the kernel. Rename >>> the one in drivers/xen/sys-hypervisor.c to avoid shadow

Re: [Xen-devel] [PATCH] xen: Make VPMU init message look less scary

2016-08-01 Thread Boris Ostrovsky
On 08/01/2016 11:48 AM, Juergen Gross wrote: > On 01/08/16 16:11, Konrad Rzeszutek Wilk wrote: >> On Mon, Aug 01, 2016 at 01:41:20PM +0200, Juergen Gross wrote: >>> The default for the Xen hypervisor is to not enable VPMU in order to >>> avoid security issues. In this case the Linux kernel will iss

[PATCH v2 2/2] xen/events: Convert to hotplug state machine

2016-09-07 Thread Boris Ostrovsky
From: Sebastian Andrzej Siewior Install the callbacks via the state machine. Signed-off-by: Sebastian Andrzej Siewior Signed-off-by: Boris Ostrovsky --- drivers/xen/events/events_fifo.c | 34 -- include/linux/cpuhotplug.h | 1 + 2 files changed, 13

[PATCH v2 1/2] xen/x86: Convert to hotplug state machine

2016-09-07 Thread Boris Ostrovsky
Switch to new CPU hotplug infrastructure. Signed-off-by: Boris Ostrovsky Suggested-by: Sebastian Andrzej Siewior --- Changes in v2: * Replace xen_cpu_up_cancel with xen_cpu_dead * Use existing CPUHP_AP_ONLINE_DYN instead of introducing new state * Be more careful with return value of

[PATCH v2 0/2] Convert to new CPU hotplug framework

2016-09-07 Thread Boris Ostrovsky
Boris Ostrovsky (2): xen/x86: Convert to hotplug state machine xen/events: Convert to hotplug state machine arch/x86/xen/enlighten.c | 115 ++- drivers/xen/events/events_fifo.c | 34 include/linux/cpuhotplug.h | 2 + 3 files

Re: [PATCH v2] xen/pciback: support driver_override

2016-09-08 Thread Boris Ostrovsky
On 09/02/2016 08:30 AM, Juergen Gross wrote: > Support the driver_override scheme introduced with commit 782a985d7af2 > ("PCI: Introduce new device binding path using pci_dev.driver_override") > > As pcistub_probe() is called for all devices (it has to check for a > match based on the slot address

Re: [PATCH] prctl,x86 Add PR_[GET|SET]_CPUID for controlling the CPUID instruction.

2016-09-14 Thread Boris Ostrovsky
On 09/14/2016 02:52 PM, Andy Lutomirski wrote: > On Tue, Sep 13, 2016 at 11:13 PM, Kyle Huey wrote: >> On Mon, Sep 12, 2016 at 9:56 AM, Andy Lutomirski wrote: >>> You should explicitly check that, if the >>> feature is set under Xen PV, then the MSR actually works as >>> advertised. This may req

Re: [Xen-devel] [PATCH v2 2/3] x86 Test and expose CPUID faulting capabilities in /proc/cpuinfo

2016-09-15 Thread Boris Ostrovsky
On 09/15/2016 03:11 PM, Kyle Huey wrote: > On Thu, Sep 15, 2016 at 3:25 AM, Jan Beulich wrote: > On 15.09.16 at 12:05, wrote: >>> On 14/09/16 22:01, Kyle Huey wrote: Xen advertises the underlying support for CPUID faulting but not does pass through writes to the relevant MSR, nor do

Re: [PATCH 1/2] xen/x86: Convert to hotplug state machine

2016-09-01 Thread Boris Ostrovsky
On 08/31/2016 12:15 PM, Sebastian Andrzej Siewior wrote: > On 2016-08-26 15:37:38 [-0400], Boris Ostrovsky wrote: >>> If you do find the time, you might manage to rework the code to avoid >>> using the _nocalls() function. If see this right, you use >>> xen_setup_vcpu

Re: [PATCH] xen: cleanup xen.h

2017-08-16 Thread Boris Ostrovsky
On 07/27/2017 11:44 AM, Juergen Gross wrote: > On 27/07/17 17:37, Boris Ostrovsky wrote: >> On 07/27/2017 11:11 AM, Juergen Gross wrote: >>> The macros for testing domain types are more complicated then they >>> need to. Simplify them. >>> >>> Signed-of

Re: [PATCH] xen-platform: constify pci_device_id.

2017-08-16 Thread Boris Ostrovsky
On 08/02/2017 06:36 PM, Boris Ostrovsky wrote: > On 08/02/2017 01:46 PM, Arvind Yadav wrote: >> pci_device_id are not supposed to change at runtime. All functions >> working with pci_device_id provided by work with >> const pci_device_id. So mark the non-const structs as co

Re: [PATCH 0/3] xen: do some cleanups

2017-08-16 Thread Boris Ostrovsky
On 08/04/2017 07:36 AM, Juergen Gross wrote: > Remove stuff no longer needed. > > Juergen Gross (3): > xen: remove tests for pvh mode in pure pv paths > xen: remove unused function xen_set_domain_pte() > xen: remove not used trace functions > > arch/x86/include/asm/xen/page.h | 5 - > a

Re: [PATCH v4] xen: get rid of paravirt op adjust_exception_frame

2017-08-16 Thread Boris Ostrovsky
ps.h| 1 - > 12 files changed, 140 insertions(+), 78 deletions(-) Reviewed-by: Boris Ostrovsky Applied to for-linus-4.14. -boris

Re: [PATCH] xen/pvcalls: use WARN_ON(1) instead of __WARN()

2017-08-16 Thread Boris Ostrovsky
On 07/21/2017 03:26 PM, Stefano Stabellini wrote: > On Fri, 21 Jul 2017, Arnd Bergmann wrote: >> __WARN() is an internal helper that is only available on >> some architectures, but causes a build error e.g. on ARM64 >> in some configurations: >> >> drivers/xen/pvcalls-back.c: In function 'set_backe

Re: [tip:x86/platform] x86/hyper-v: Use hypercall for remote TLB flush

2017-08-16 Thread Boris Ostrovsky
On 08/16/2017 12:42 PM, Vitaly Kuznetsov wrote: > Vitaly Kuznetsov writes: > >> Peter Zijlstra writes: >> >>> On Fri, Aug 11, 2017 at 09:16:29AM -0700, Linus Torvalds wrote: On Fri, Aug 11, 2017 at 2:03 AM, Peter Zijlstra wrote: > I'm sure we talked about using HAVE_RCU_TABLE_FREE

Re: [PATCH] xen: fix build failure related to removing adjust_exception_frame

2017-08-17 Thread Boris Ostrovsky
On 08/17/2017 05:03 AM, Juergen Gross wrote: > A kernel configured with XEN_PV but without KVM_GUEST will fail to > build since the patch removing the adjust_exception_frame paravirt > op. > > Fix this failure. > > Reported-by: Sander Eikelenboom > Signed-off-by: Juergen Gross > --- > arch/x86/x

Re: [PATCH] xen/events: events_fifo: Don't use {get,put}_cpu() in xen_evtchn_fifo_init()

2017-08-17 Thread Boris Ostrovsky
set). > > xen_evtchn_fifo_init() will always be called before SMP is initialized, > so {get,put}_cpu() could be replaced by a simple smp_processor_id(). On x86 this will be called out of init_IRQ(), which is already preceded by preempt_disable(). Reviewed-by: Boris Ostrovsky

Re: [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-20 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > Allocate a socket. Keep track of socket <-> ring mappings with a new data > structure, called sock_mapping. Implement the connect command by calling > inet_stream_connect, and mapping the new indexes page and data ring. > Allocate a workqueue and

Re: [PATCH v4 08/18] xen/pvcalls: implement connect command

2017-06-20 Thread Boris Ostrovsky
>> + >> static int pvcalls_back_connect(struct xenbus_device *dev, >> struct xen_pvcalls_request *req) >> { >> +struct pvcalls_fedata *fedata; >> +int ret = -EINVAL; >> +struct socket *sock; >> +struct sock_mapping *map; >> +struct xen_pvcalls_res

Re: [PATCH v4 07/18] xen/pvcalls: implement socket command

2017-06-20 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > Just reply with success to the other end for now. Delay the allocation > of the actual socket to bind and/or connect. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky

Re: [PATCH v4 10/18] xen/pvcalls: implement listen command

2017-06-20 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > Call inet_listen to implement the listen command. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky > --- > drivers/xen/pvcalls-back.c | 19

Re: [PATCH v4 11/18] xen/pvcalls: implement accept command

2017-06-20 Thread Boris Ostrovsky
> static void __pvcalls_back_accept(struct work_struct *work) > { > + struct sockpass_mapping *mappass = container_of( > + work, struct sockpass_mapping, register_work); > + struct sock_mapping *map; > + struct pvcalls_ioworker *iow; > + struct pvcalls_fedata *fedata;

Re: [PATCH v4 12/18] xen/pvcalls: implement poll command

2017-06-20 Thread Boris Ostrovsky
> @@ -499,6 +521,55 @@ static int pvcalls_back_accept(struct xenbus_device *dev, > static int pvcalls_back_poll(struct xenbus_device *dev, >struct xen_pvcalls_request *req) > { > + struct pvcalls_fedata *fedata; > + struct sockpass_mapping *mappass; > + st

Re: [PATCH v4 13/18] xen/pvcalls: implement release command

2017-06-20 Thread Boris Ostrovsky
> + > +static int pvcalls_back_release_passive(struct xenbus_device *dev, > + struct pvcalls_fedata *fedata, > + struct sockpass_mapping *mappass) > +{ > + if (mappass->sock->sk != NULL) { > + write_lock_bh(&ma

Re: [PATCH v4 15/18] xen/pvcalls: implement the ioworker functions

2017-06-20 Thread Boris Ostrovsky
there are none. > > Signed-off-by: Stefano Stabellini > CC: boris.ostrov...@oracle.com > CC: jgr...@suse.com Reviewed-by: Boris Ostrovsky

Re: [PATCH v4 12/18] xen/pvcalls: implement poll command

2017-06-21 Thread Boris Ostrovsky
>>> + >>> + mappass->reqcopy = *req; >>> + icsk = inet_csk(mappass->sock->sk); >>> + queue = &icsk->icsk_accept_queue; >>> + spin_lock(&queue->rskq_lock); >>> + data = queue->rskq_accept_head != NULL; >>> + spin_unlock(&queue->rskq_lock); >> What is the purpose of the queue lock here?

Re: [PATCH v4 16/18] xen/pvcalls: implement read

2017-06-21 Thread Boris Ostrovsky
On 06/15/2017 03:09 PM, Stefano Stabellini wrote: > When an active socket has data available, increment the io and read > counters, and schedule the ioworker. > > Implement the read function by reading from the socket, writing the data > to the data ring. > > Set in_error on error. > > Signed-off-b

Re: [Xen-devel] [PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure

2017-10-16 Thread Boris Ostrovsky
On 10/12/2017 03:53 PM, Boris Ostrovsky wrote: > On 10/12/2017 03:27 PM, Andrew Cooper wrote: >> On 12/10/17 20:11, Boris Ostrovsky wrote: >>> There is also another problem: >>> >>> [1.312425] general protection fault: [#1] SMP >>> [1.3129

Re: [PATCH] xen-netfront, xen-netback: Use correct minimum MTU values

2017-10-16 Thread Boris Ostrovsky
driver, the network >> will become unreachable immediately, the guest can no longer be pinged. >> >> xen_net{front|back} should not allow the user to set this value which causes >> network problems. >> >> Reported-by: Chen Shi >> Signed-off-by: Mohammed Gamal

Re: [Xen-devel] [PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure

2017-10-17 Thread Boris Ostrovsky
On 10/17/2017 01:24 AM, Josh Poimboeuf wrote: > On Mon, Oct 16, 2017 at 02:18:48PM -0400, Boris Ostrovsky wrote: >> On 10/12/2017 03:53 PM, Boris Ostrovsky wrote: >>> On 10/12/2017 03:27 PM, Andrew Cooper wrote: >>>> On 12/10/17 20:11, Boris Ostrovsky wrote: >&

Re: [Xen-devel] [PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure

2017-10-17 Thread Boris Ostrovsky
On 10/17/2017 09:10 AM, Brian Gerst wrote: > On Mon, Oct 16, 2017 at 2:18 PM, Boris Ostrovsky > wrote: >> >> Replacing the macro with >> >> #define PV_INDIRECT(addr) *addr // well, it's not so much >> indirect anymore >> >> makes thing

Re: [Xen-devel] [PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure

2017-10-17 Thread Boris Ostrovsky
On 10/17/2017 10:36 AM, Josh Poimboeuf wrote: > > Maybe we can add a new field to the alternatives entry struct which > specifies the offset to the CALL instruction, so apply_alternatives() > can find it. We'd also have to assume that the restore part of an alternative entry is the same size as th

Re: [PATCH v5 02/13] xen/pvcalls: implement frontend disconnect

2017-10-17 Thread Boris Ostrovsky
On 10/06/2017 08:30 PM, Stefano Stabellini wrote: > Introduce a data structure named pvcalls_bedata. It contains pointers to > the command ring, the event channel, a list of active sockets and a list > of passive sockets. Lists accesses are protected by a spin_lock. > > Introduce a waitqueue to all

Re: [PATCH v5 04/13] xen/pvcalls: implement socket command and handle events

2017-10-17 Thread Boris Ostrovsky
. > This way, we can easily get the struct sock_mapping from the struct > socket. > > Signed-off-by: Stefano Stabellini Reviewed-by: Boris Ostrovsky with one question: > + /* > + * PVCalls only supports domain AF_INET, > + * type SOCK_STREAM and protoc

Re: [PATCH v5 06/13] xen/pvcalls: implement bind command

2017-10-17 Thread Boris Ostrovsky
> + if (!pvcalls_front_dev) { > + pvcalls_exit(); > + return -ENOTCONN; The connect patch returns -ENETUNREACH here. Is there a deliberate distinction between these cases? Other than that Reviewed-by: Boris Ostrovsky

Re: [PATCH v5 08/13] xen/pvcalls: implement accept command

2017-10-17 Thread Boris Ostrovsky
On 10/06/2017 08:30 PM, Stefano Stabellini wrote: > Introduce a waitqueue to allow only one outstanding accept command at > any given time and to implement polling on the passive socket. Introduce > a flags field to keep track of in-flight accept and poll commands. > > Send PVCALLS_ACCEPT to the b

Re: [Xen-devel] [PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure

2017-10-17 Thread Boris Ostrovsky
On 10/17/2017 04:17 PM, Josh Poimboeuf wrote: > On Tue, Oct 17, 2017 at 11:36:57AM -0400, Boris Ostrovsky wrote: >> On 10/17/2017 10:36 AM, Josh Poimboeuf wrote: >>> Maybe we can add a new field to the alternatives entry struct which >>> specifies the offset

Re: [Xen-devel] [PATCH 11/13] x86/paravirt: Add paravirt alternatives infrastructure

2017-10-17 Thread Boris Ostrovsky
On 10/17/2017 04:50 PM, Josh Poimboeuf wrote: > On Tue, Oct 17, 2017 at 04:36:00PM -0400, Boris Ostrovsky wrote: >> On 10/17/2017 04:17 PM, Josh Poimboeuf wrote: >>> On Tue, Oct 17, 2017 at 11:36:57AM -0400, Boris Ostrovsky wrote: >>>> On 10/17/2017 10:36 AM, Josh P

Re: [PATCH v5 09/13] xen/pvcalls: implement sendmsg

2017-10-17 Thread Boris Ostrovsky
> +static int __write_ring(struct pvcalls_data_intf *intf, > + struct pvcalls_data *data, > + struct iov_iter *msg_iter, > + int len) > +{ > + RING_IDX cons, prod, size, masked_prod, masked_cons; > + RING_IDX array_size = XEN_FLEX

Re: [PATCH v5 10/13] xen/pvcalls: implement recvmsg

2017-10-17 Thread Boris Ostrovsky
> + > +int pvcalls_front_recvmsg(struct socket *sock, struct msghdr *msg, size_t > len, > + int flags) > +{ > + struct pvcalls_bedata *bedata; > + int ret; > + struct sock_mapping *map; > + > + if (flags & (MSG_CMSG_CLOEXEC|MSG_ERRQUEUE|MSG_OOB|MSG_TRUNC)) > +

Re: [PATCH v5 11/13] xen/pvcalls: implement poll command

2017-10-17 Thread Boris Ostrovsky
> > +static unsigned int pvcalls_front_poll_passive(struct file *file, > +struct pvcalls_bedata *bedata, > +struct sock_mapping *map, > +poll_table *wait) > +{ > +

  1   2   3   4   5   6   7   8   9   10   >