Re: [Xen-devel] [V5 PATCH 1/1] x86/xen: Set EFER.NX and EFER.SCE in PVH guests

2014-09-15 Thread Mukesh Rathor
On Fri, 12 Sep 2014 16:42:58 -0400 Konrad Rzeszutek Wilk wrote: > On Wed, Sep 10, 2014 at 04:36:06PM -0700, Mukesh Rathor wrote: sorry, i didn't realize you had more comments... didn't scroll down :).. > > cpumask_var_t xen_cpu_initialized_map; > > > > @

Re: [Xen-devel] [V5 PATCH 1/1] x86/xen: Set EFER.NX and EFER.SCE in PVH guests

2014-09-12 Thread Mukesh Rathor
On Fri, 12 Sep 2014 16:42:58 -0400 Konrad Rzeszutek Wilk wrote: > On Wed, Sep 10, 2014 at 04:36:06PM -0700, Mukesh Rathor wrote: > > This fixes two bugs in PVH guests: > > > > - Not setting EFER.NX means the NX bit in page table entries is > > ignored on

[V5 PATCH 1/1] x86/xen: Set EFER.NX and EFER.SCE in PVH guests

2014-09-10 Thread Mukesh Rathor
fore jumping to cpu_bringup_and_idle(). Signed-off-by: Mukesh Rathor Signed-off-by: David Vrabel --- arch/x86/xen/enlighten.c | 6 ++ arch/x86/xen/smp.c | 29 ++--- arch/x86/xen/smp.h | 8 arch/x86/xen/xen-head.S | 33 + 4 fi

[V5 PATCH 0/1] x86/xen: Set EFER.NX and EFER.SCE in PVH guests

2014-09-10 Thread Mukesh Rathor
Hi, Attached V5 patch for fixing the EFER bugs on PVH. Changes in v5 (Mukesh): - Jan reminded us that vcpu 0 could go offline/online. So, add flag back instead of using cpuid to return from xen_pvh_early_cpu_init. - Boris comments: o Rename to xen_pvh_early_cpu_init o Add

Re: [Xen-devel] [V2 PATCH 1/1] PVH: set EFER.NX and EFER.SCE

2014-09-03 Thread Mukesh Rathor
On Wed, 3 Sep 2014 14:58:04 +0100 David Vrabel wrote: > On 03/09/14 02:19, Mukesh Rathor wrote: > > This patch addresses two things for a pvh boot vcpu: > > > > - NX bug on intel: It was recenlty discovered that NX is not being > > honored in PVH on intel sin

[V2 PATCH 1/1] PVH: set EFER.NX and EFER.SCE

2014-09-02 Thread Mukesh Rathor
cause they come up on kernel page tables that have pte.NX bits set. As such, before anything is touched in DS/SS, EFER.NX must be set. Signed-off-by: Mukesh Rathor --- arch/x86/xen/enlighten.c | 3 +++ arch/x86/xen/smp.c | 28 arch/x86/xen/smp.h | 1 +

[V2 PATCH 0/1] PVH: set EFER bits

2014-09-02 Thread Mukesh Rathor
Changes from V1: - Unify the patches into one - Unify the code to set the EFER bits. thanks, Mukesh -- 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.

Re: [Xen-devel] [V1 PATCH 1/2] PVH: set EFER.NX and EFER.SCE for boot vcpu

2014-08-28 Thread Mukesh Rathor
On Thu, 28 Aug 2014 15:18:26 +0100 David Vrabel wrote: > On 27/08/14 23:33, Mukesh Rathor wrote: > > This patch addresses three things for a pvh boot vcpu: > > > > - NX bug on intel: It was recenlty discovered that NX is not being > > honored in PVH on intel sin

[V1 PATCH 1/2] PVH: set EFER.NX and EFER.SCE for boot vcpu

2014-08-27 Thread Mukesh Rathor
added. Signed-off-by: Mukesh Rathor --- arch/x86/xen/enlighten.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index c0cb11f..4af512d 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c @@ -1499,6 +1499,17 @@

[V1 PATCH 0/2] Linux PVH: set EFER bits..

2014-08-27 Thread Mukesh Rathor
Resending with comments fixed up. Please note, these are no longer AMD only, but address existing broken boot and broken NX on intel. thanks mukesh -- 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

[V1 PATCH 2/2] PVH: set EFER.NX and EFER.SCE for secondary vcpus

2014-08-27 Thread Mukesh Rathor
vh is added. Please note: We create a new glue assembly entry point because the secondary vcpus come up on kernel page tables that have pte.NX bits set. While on Intel these are ignored if EFER.NX is not set, on AMD a RSVD bit fault is generated. Signed-off-by: Mukesh Rathor --- arch/x86/xen/

Re: [Xen-devel] [V0 PATCH 1/2] AMD-PVH: set EFER.NX and EFER.SCE for the boot vcpu

2014-08-22 Thread Mukesh Rathor
On Fri, 22 Aug 2014 12:09:27 -0700 Mukesh Rathor wrote: > On Fri, 22 Aug 2014 06:41:40 +0200 > Borislav Petkov wrote: > > > On Thu, Aug 21, 2014 at 07:46:56PM -0700, Mukesh Rathor wrote: > > > Intel doesn't have EFER.NX bit. > > > > Of course it

Re: [V0 PATCH 0/2] AMD PVH domU support

2014-08-22 Thread Mukesh Rathor
On Fri, 22 Aug 2014 14:52:41 +0100 David Vrabel wrote: > On 21/08/14 03:16, Mukesh Rathor wrote: > > Hi, > > > > Here's first stab at AMD PVH domU support. Pretty much the only > > thing needed is EFER bits set. Please review. > > I'm not g

Re: [V0 PATCH 0/2] AMD PVH domU support

2014-08-22 Thread Mukesh Rathor
On Fri, 22 Aug 2014 14:55:21 +0100 David Vrabel wrote: > On 22/08/14 14:52, David Vrabel wrote: > > On 21/08/14 03:16, Mukesh Rathor wrote: > >> Hi, > >> > >> Here's first stab at AMD PVH domU support. Pretty much the only > >> thing needed is EF

Re: [Xen-devel] [V0 PATCH 1/2] AMD-PVH: set EFER.NX and EFER.SCE for the boot vcpu

2014-08-22 Thread Mukesh Rathor
On Fri, 22 Aug 2014 06:41:40 +0200 Borislav Petkov wrote: > On Thu, Aug 21, 2014 at 07:46:56PM -0700, Mukesh Rathor wrote: > > Intel doesn't have EFER.NX bit. > > Of course it does. > Right, it does. Some code/comment is misleading... Anyways, reading intel SD

Re: [Xen-devel] [V0 PATCH 1/2] AMD-PVH: set EFER.NX and EFER.SCE for the boot vcpu

2014-08-21 Thread Mukesh Rathor
On Thu, 21 Aug 2014 21:39:04 -0400 Konrad Rzeszutek Wilk wrote: > On Wed, Aug 20, 2014 at 07:16:39PM -0700, Mukesh Rathor wrote: > > On AMD, NX feature must be enabled in the efer for NX to be honored > > in the pte entries, otherwise protection fault. We also set SC for > &g

[V0 PATCH 1/2] AMD-PVH: set EFER.NX and EFER.SCE for the boot vcpu

2014-08-20 Thread Mukesh Rathor
On AMD, NX feature must be enabled in the efer for NX to be honored in the pte entries, otherwise protection fault. We also set SC for system calls to be enabled. Signed-off-by: Mukesh Rathor --- arch/x86/xen/enlighten.c | 12 1 file changed, 12 insertions(+) diff --git a/arch/x86

[V0 PATCH 0/2] AMD PVH domU support

2014-08-20 Thread Mukesh Rathor
Hi, Here's first stab at AMD PVH domU support. Pretty much the only thing needed is EFER bits set. Please review. thanks, Mukesh -- 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.k

[V0 PATCH 2/2] AMD-PVH: set EFER.NX and EFER.SCE for secondary vcpus

2014-08-20 Thread Mukesh Rathor
The secondary vcpus come on kernel page tables which have the NX bit set in pte entries for DS/SS. On AMD, EFER.NX must be set to avoid protection fault. Signed-off-by: Mukesh Rathor --- arch/x86/xen/smp.c | 28 arch/x86/xen/smp.h | 1 + arch/x86/xen/xen

Re: [Xen-devel] [V1 PATCH] dom0 pvh: map foreign pfns in our p2m for toolstack

2014-05-27 Thread Mukesh Rathor
On Tue, 27 May 2014 11:59:26 +0100 David Vrabel wrote: > On 27/05/14 11:43, Roger Pau Monné wrote: > > On 24/05/14 03:33, Mukesh Rathor wrote: > >> When running as dom0 in pvh mode, foreign pfns that are accessed > >> must be added to our p2m which is manag

[V1 PATCH] dom0 pvh linux support

2014-05-23 Thread Mukesh Rathor
Hi, Attached please find patch for linux to support toolstack on pvh dom0. thanks, Mukesh -- 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 r

[V1 PATCH] dom0 pvh: map foreign pfns in our p2m for toolstack

2014-05-23 Thread Mukesh Rathor
When running as dom0 in pvh mode, foreign pfns that are accessed must be added to our p2m which is managed by xen. This is done via XENMEM_add_to_physmap_range hypercall. This is needed for toolstack building guests and mapping guest memory, xentrace mapping xen pages, etc.. Signed-off-by: Mukesh

Re: [PATCH] pvh: set cr4 flags for APs

2014-02-03 Thread Mukesh Rathor
On Mon, 3 Feb 2014 15:43:46 -0500 Konrad Rzeszutek Wilk wrote: > On Mon, Feb 03, 2014 at 02:52:40PM -0500, Konrad Rzeszutek Wilk wrote: > > On Mon, Feb 03, 2014 at 11:30:01AM -0800, Mukesh Rathor wrote: > > > On Mon, 3 Feb 2014 06:49:14 -0500 > > > Konrad Rzeszutek Wil

Re: [PATCH] pvh: set cr4 flags for APs

2014-02-03 Thread Mukesh Rathor
On Mon, 3 Feb 2014 06:49:14 -0500 Konrad Rzeszutek Wilk wrote: > On Wed, Jan 29, 2014 at 04:15:18PM -0800, Mukesh Rathor wrote: > > We need to set cr4 flags for APs that are already set for BSP. > > The title is missing the 'xen' part. The patch is for linux, not xen.

Re: [PATCH V0] linux PVH: Set CR4 flags

2014-01-30 Thread Mukesh Rathor
On Thu, 30 Jan 2014 11:40:44 + Roger Pau Monné wrote: > On 30/01/14 00:15, Mukesh Rathor wrote: > > Konrad, > > > > The CR4 settings were dropped from my earlier patch because you > > didn't wanna enable them. But since you do now, we need to set them > &

[PATCH] pvh: set cr4 flags for APs

2014-01-29 Thread Mukesh Rathor
We need to set cr4 flags for APs that are already set for BSP. Signed-off-by: Mukesh Rathor --- arch/x86/xen/enlighten.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index a4d7b64..201d09a 100644 --- a

[PATCH V0] linux PVH: Set CR4 flags

2014-01-29 Thread Mukesh Rathor
Konrad, The CR4 settings were dropped from my earlier patch because you didn't wanna enable them. But since you do now, we need to set them in the APs also. If you decide not too again, please apply my prev patch "pvh: disable pse feature for now". thanks Mukesh -- To unsubscribe from this list:

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

2014-01-28 Thread Mukesh Rathor
On Tue, 28 Jan 2014 10:39:23 + "Jan Beulich" wrote: > >>> 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

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

2014-01-28 Thread Mukesh Rathor
On Mon, 27 Jan 2014 22:46:34 -0500 Konrad Rzeszutek Wilk wrote: > On Mon, Jan 27, 2014 at 06:18:39PM -0800, 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. >

[V0 PATCH] pvh: Disable PSE feature for now

2014-01-27 Thread Mukesh Rathor
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 feature to avoid flood of bugs. Signed-off-by: Mukesh

pvh: disable pse feature for now

2014-01-27 Thread Mukesh Rathor
Konrad, Following will turn off PSE in linux until we can get to it. It's better to turn it off here than in xen, so if BSD gets there sooner, they are not dependent on us. thanks Mukesh -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to major

Re: [V0 PATCH] xen/pvh: set some cr flags upon vcpu start

2014-01-22 Thread Mukesh Rathor
On Mon, 20 Jan 2014 10:09:30 -0500 Konrad Rzeszutek Wilk wrote: > On Fri, Jan 17, 2014 at 06:24:55PM -0800, Mukesh Rathor wrote: > > pvh was designed to start with pv flags, but a commit in xen tree > > Thank you for posting this! > > > 51e2cac257ec8b4080d89f0855c498cb

[V0 PATCH] xen/pvh: set some cr flags upon vcpu start

2014-01-17 Thread Mukesh Rathor
Konrad, The following patch sets the bits in CR0 and CR4. Please note, I'm working on patch for the xen side. The CR4 features are not currently exported to a PVH guest. Roger, I added your SOB line, please lmk if I need to add anything else. This patch was build on top of a71accb67e7645c68061c

[V0 PATCH] xen/pvh: set some cr flags upon vcpu start

2014-01-17 Thread Mukesh Rathor
pvh was designed to start with pv flags, but a commit in xen tree 51e2cac257ec8b4080d89f0855c498cbbd76a5e5 removed some of the flags as they are not necessary. As a result, these CR flags must be set in the guest. Signed-off-by: Roger Pau Monne Signed-off-by: Mukesh Rathor --- arch/x86/xen

Re: [PATCH v12 10/18] xen/pvh: Update E820 to work with PVH (v2)

2014-01-03 Thread Mukesh Rathor
On Thu, 2 Jan 2014 13:41:34 -0500 Konrad Rzeszutek Wilk wrote: > On Thu, Jan 02, 2014 at 04:14:32PM +, David Vrabel wrote: > > On 01/01/14 04:35, Konrad Rzeszutek Wilk wrote: > > > From: Mukesh Rathor > > > > > > In xen_add_extra_mem() we can skip updat

Re: [PATCH v12 03/18] xen/pvh: Early bootup changes in PV code (v2).

2014-01-03 Thread Mukesh Rathor
On Fri, 3 Jan 2014 12:35:55 -0500 Konrad Rzeszutek Wilk wrote: > On Thu, Jan 02, 2014 at 05:34:38PM -0800, Mukesh Rathor wrote: > > On Thu, 2 Jan 2014 13:32:21 -0500 > > Konrad Rzeszutek Wilk wrote: > > > > > On Thu, Jan 02, 2014 at 03:32:33PM +, David Vrabel

Re: [Xen-devel] [PATCH v11 09/12] xen/pvh: Piggyback on PVHVM XenBus and event channels for PVH.

2014-01-03 Thread Mukesh Rathor
On Wed, 18 Dec 2013 16:17:39 -0500 Konrad Rzeszutek Wilk wrote: > On Wed, Dec 18, 2013 at 06:31:43PM +, Stefano Stabellini wrote: > > On Tue, 17 Dec 2013, Konrad Rzeszutek Wilk wrote: > > > From: Mukesh Rathor > > > > > > PVH is a PV guest with a twist -

Re: [Xen-devel] [PATCH v11 09/12] xen/pvh: Piggyback on PVHVM XenBus and event channels for PVH.

2014-01-03 Thread Mukesh Rathor
On Fri, 3 Jan 2014 15:04:27 + Stefano Stabellini wrote: > On Tue, 31 Dec 2013, Konrad Rzeszutek Wilk wrote: > > > > --- a/drivers/xen/xenbus/xenbus_client.c > > > > +++ b/drivers/xen/xenbus/xenbus_client.c > > > > @@ -45,6 +45,7 @@ > > > > #include > > > > #include > > > > #include > >

Re: [PATCH v12 06/18] xen/pvh: MMU changes for PVH (v2)

2014-01-02 Thread Mukesh Rathor
On Thu, 2 Jan 2014 11:24:50 + David Vrabel wrote: > On 01/01/14 04:35, Konrad Rzeszutek Wilk wrote: > > From: Mukesh Rathor > > > > .. which are surprinsingly small compared to the amount for PV code. > > > > PVH uses mostly native mmu ops, we leave t

Re: [PATCH v12 03/18] xen/pvh: Early bootup changes in PV code (v2).

2014-01-02 Thread Mukesh Rathor
On Thu, 2 Jan 2014 13:32:21 -0500 Konrad Rzeszutek Wilk wrote: > On Thu, Jan 02, 2014 at 03:32:33PM +, David Vrabel wrote: > > On 01/01/14 04:35, Konrad Rzeszutek Wilk wrote: > > > From: Mukesh Rathor > > > > > > In the bootup code for PVH we can trap c

Re: [Xen-devel] [PATCH v11 05/12] xen/pvh: Update E820 to work with PVH

2013-12-18 Thread Mukesh Rathor
On Wed, 18 Dec 2013 18:25:15 + Stefano Stabellini wrote: > On Tue, 17 Dec 2013, Konrad Rzeszutek Wilk wrote: > > From: Mukesh Rathor > > > > In xen_add_extra_mem() we can skip updating P2M as it's managed > > by Xen. PVH maps the entire IO space, b

[PATCH V1]PVH: vcpu info placement, load CS selector, and remove debug printk.

2013-06-05 Thread Mukesh Rathor
This patch addresses 3 things: - Resolve vcpu info placement fixme. - Load CS selector for PVH after switching to new gdt. - Remove printk in case of failure to map pnfs in p2m. This because qemu has lot of expected failures when mapping HVM pages. Signed-off-by: Mukesh Rathor

Re: [Xen-devel] [PATCH] PVH: vcpu info placement, load selectors, and remove debug printk.

2013-06-05 Thread Mukesh Rathor
On Wed, 05 Jun 2013 08:03:12 +0100 "Jan Beulich" wrote: > >>> On 04.06.13 at 23:53, Mukesh Rathor > >>> wrote: > > Following OK? : > > > > if (xen_feature(XENFEAT_auto_translated_physmap)) { > > s

Re: [Xen-devel] [PATCH] PVH: vcpu info placement, load selectors, and remove debug printk.

2013-06-04 Thread Mukesh Rathor
On Tue, 04 Jun 2013 09:27:03 +0100 "Jan Beulich" wrote: > >>> On 04.06.13 at 02:43, Mukesh Rathor > >>> wrote: > > @@ -1327,6 +1329,18 @@ static void __init > > xen_setup_stackprotector(void) /* PVH TBD/FIXME: investigate > &g

[PATCH] PVH: vcpu info placement, load selectors, and remove debug printk.

2013-06-03 Thread Mukesh Rathor
This patch addresses 3 things: - Resolve vcpu info placement fixme. - Load DS/SS/CS selectors for PVH after switching to new gdt. - Remove printk in case of failure to map pnfs in p2m. This because qemu has lot of benign failures when mapping HVM pages. Signed-off-by: Mukesh Rathor

[PATCH]: PVH linux: don't print warning in case of failed mapping

2013-02-15 Thread Mukesh Rathor
Remove the printing of warning in case of failed mappings. Sometimes they are expected as in case of Qemu mapping pages during HVM guest creation. Signed-off-by: Mukesh Rathor --- arch/x86/xen/mmu.c |3 --- 1 files changed, 0 insertions(+), 3 deletions(-) diff --git a/arch/x86/xen/mmu.c b

Re: [PATCH] PVH: remove code to map iomem from guest

2013-02-06 Thread Mukesh Rathor
On Wed, 6 Feb 2013 10:39:13 -0500 Konrad Rzeszutek Wilk wrote: > On Wed, Jan 30, 2013 at 02:55:29PM -0800, Mukesh Rathor wrote: > > It was decided during xen patch review that xen map the iomem > > transparently, so remove xen_set_clr_mmio_pvh_pte() and the sub > > hypercal

Re: [PATCH] PVH linux: Use ballooning to allocate grant table pages

2013-02-06 Thread Mukesh Rathor
On Wed, 6 Feb 2013 10:49:13 -0500 Konrad Rzeszutek Wilk wrote: > On Thu, Jan 31, 2013 at 06:30:15PM -0800, Mukesh Rathor wrote: > > This patch fixes a fixme in Linux to use alloc_xenballooned_pages() > > to allocate pfns for grant table pages instead of kmalloc. This also > &

[PATCH] PVH linux: Use ballooning to allocate grant table pages

2013-02-05 Thread Mukesh Rathor
This patch fixes a fixme in Linux to use alloc_xenballooned_pages() to allocate pfns for grant table pages instead of kmalloc. This also simplifies add to physmap on the xen side a bit. Signed-off-by: Mukesh Rathor diff --git a/drivers/xen/grant-table.c b/drivers/xen/grant-table.c index 9c0019d

Re: [Xen-devel] [PATCH] PVH linux: Use ballooning to allocate grant table pages

2013-02-01 Thread Mukesh Rathor
On Fri, 1 Feb 2013 14:00:58 -0800 Mukesh Rathor wrote: > On Thu, 31 Jan 2013 18:44:46 -0800 > Mukesh Rathor wrote: > > > On Thu, 31 Jan 2013 18:30:15 -0800 > > Mukesh Rathor wrote: > > > > > This patch fixes a fixme in Linux to use > > > alloc_xe

Re: [Xen-devel] [PATCH] PVH linux: Use ballooning to allocate grant table pages

2013-02-01 Thread Mukesh Rathor
On Thu, 31 Jan 2013 18:44:46 -0800 Mukesh Rathor wrote: > On Thu, 31 Jan 2013 18:30:15 -0800 > Mukesh Rathor wrote: > > > This patch fixes a fixme in Linux to use alloc_xenballooned_pages() > > to allocate pfns for grant table pages instead of kmalloc. This also > >

Re: [Xen-devel] [PATCH] PVH linux: Use ballooning to allocate grant table pages

2013-01-31 Thread Mukesh Rathor
On Thu, 31 Jan 2013 18:30:15 -0800 Mukesh Rathor wrote: > This patch fixes a fixme in Linux to use alloc_xenballooned_pages() to > allocate pfns for grant table pages instead of kmalloc. This also > simplifies add to physmap on the xen side a bit. Looking at it again, I realized rc

[PATCH] PVH linux: Use ballooning to allocate grant table pages

2013-01-31 Thread Mukesh Rathor
This patch fixes a fixme in Linux to use alloc_xenballooned_pages() to allocate pfns for grant table pages instead of kmalloc. This also simplifies add to physmap on the xen side a bit. Signed-off-by: Mukesh Rathor --- drivers/xen/grant-table.c | 37 ++--- 1

[PATCH] PVH: remove code to map iomem from guest

2013-01-30 Thread Mukesh Rathor
It was decided during xen patch review that xen map the iomem transparently, so remove xen_set_clr_mmio_pvh_pte() and the sub hypercall PHYSDEVOP_map_iomem. --- arch/x86/xen/mmu.c | 14 -- arch/x86/xen/setup.c| 16 include/xen/interface/ph

Re: [PATCH]: PVH: remove FEATURES_PVH macro

2012-11-27 Thread Mukesh Rathor
On Mon, 26 Nov 2012 14:54:00 -0500 Konrad Rzeszutek Wilk wrote: > On Wed, Nov 14, 2012 at 06:19:33PM -0800, Mukesh Rathor wrote: > > PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE > > line, because there's a null char before FEATURES_PVH and in the >

[PATCH]: PVH: remove FEATURES_PVH macro

2012-11-14 Thread Mukesh Rathor
PVH: remove macro FEATURES_PVH and put PVH strings in the ELFNOTE line, because there's a null char before FEATURES_PVH and in the FEATURES_PVH strings since this is not C file Signed-off-by: Mukesh Rathor --- arch/x86/xen/xen-head.S | 14 +- 1 files changed, 5 insertions(

Re: [Xen-devel] [PATCH 4/5] xen: arm: implement remap interfaces needed for privcmd mappings.

2012-10-25 Thread Mukesh Rathor
On Thu, 25 Oct 2012 08:46:59 +0100 Ian Campbell wrote: > On Thu, 2012-10-25 at 01:07 +0100, Mukesh Rathor wrote: > > On Wed, 24 Oct 2012 16:44:11 -0700 > > Mukesh Rathor wrote: > > > > > > > > > > +/* Indexes into space being mapped. *

Re: [Xen-devel] [PATCH 5/5] xen: x86 pvh: use XENMEM_add_to_physmap_range for foreign gmfn mappings

2012-10-25 Thread Mukesh Rathor
On Wed, 24 Oct 2012 14:19:37 +0100 Ian Campbell wrote: > Squeezing the necessary fields into the existing XENMEM_add_to_physmap > interface was proving to be a bit tricky so we have decided to go with > a new interface upstream (the XENMAPSPACE_gmfn_foreign interface using > XENMEM_add_to_physmap

Re: [Xen-devel] [PATCH 4/5] xen: arm: implement remap interfaces needed for privcmd mappings.

2012-10-24 Thread Mukesh Rathor
On Wed, 24 Oct 2012 17:07:46 -0700 Mukesh Rathor wrote: > On Wed, 24 Oct 2012 16:44:11 -0700 > Mukesh Rathor wrote: > > > > > > > #ifndef HYPERVISOR_VIRT_START > > > diff --git a/include/xen/interface/memory.h > > > b/include/xen/interface/memor

Re: [Xen-devel] [PATCH 4/5] xen: arm: implement remap interfaces needed for privcmd mappings.

2012-10-24 Thread Mukesh Rathor
On Wed, 24 Oct 2012 16:44:11 -0700 Mukesh Rathor wrote: > > > > #ifndef HYPERVISOR_VIRT_START > > diff --git a/include/xen/interface/memory.h > > b/include/xen/interface/memory.h index ad0dff5..5de2b36 100644 > > --- a/include/xen/interface/memory.h > >

Re: [Xen-devel] [PATCH 4/5] xen: arm: implement remap interfaces needed for privcmd mappings.

2012-10-24 Thread Mukesh Rathor
> > #ifndef HYPERVISOR_VIRT_START > diff --git a/include/xen/interface/memory.h > b/include/xen/interface/memory.h index ad0dff5..5de2b36 100644 > --- a/include/xen/interface/memory.h > +++ b/include/xen/interface/memory.h > @@ -188,6 +188,24 @@ DEFINE_GUEST_HANDLE_STRUCT(xen_add_to_physmap); >

Re: [PATCH 4/6] xen/pvh: bootup and setup related changes.

2012-10-23 Thread Mukesh Rathor
On Tue, 23 Oct 2012 14:07:06 +0100 Stefano Stabellini wrote: > On Mon, 22 Oct 2012, Konrad Rzeszutek Wilk wrote: > > On Mon, Oct 22, 2012 at 02:34:44PM +0100, Stefano Stabellini wrote: > > > On Sat, 20 Oct 2012, Konrad Rzeszutek Wilk wrote: > >

Re: [Xen-devel] [PATCH 4/6] xen/pvh: bootup and setup related changes.

2012-10-23 Thread Mukesh Rathor
On Tue, 23 Oct 2012 17:03:10 -0700 Mukesh Rathor wrote: > On Tue, 23 Oct 2012 16:47:29 -0700 > Mukesh Rathor wrote: > > > On Tue, 23 Oct 2012 14:07:06 +0100 > > Stefano Stabellini wrote: > > > > > On Mon, 22 Oct 2012, Konrad Rzeszutek Wilk wrote: > &

Re: [Xen-devel] [PATCH 4/6] xen/pvh: bootup and setup related changes.

2012-10-23 Thread Mukesh Rathor
On Tue, 23 Oct 2012 16:47:29 -0700 Mukesh Rathor wrote: > On Tue, 23 Oct 2012 14:07:06 +0100 > Stefano Stabellini wrote: > > > On Mon, 22 Oct 2012, Konrad Rzeszutek Wilk wrote: > > > On Mon, Oct 22, 2012 at 02:34:44PM +0100, Stefano Stabellini > > > wrote: &g

Re: [PATCH 2/6] xen/pvh: Extend vcpu_guest_context, p2m, event, and xenbus to support PVH.

2012-10-22 Thread Mukesh Rathor
On Mon, 22 Oct 2012 16:14:51 -0400 Konrad Rzeszutek Wilk wrote: > On Mon, Oct 22, 2012 at 11:31:54AM -0700, Mukesh Rathor wrote: > > On Mon, 22 Oct 2012 14:44:40 +0100 > > Stefano Stabellini wrote: > > > > > On Sat, 20 Oct 2012, Konrad Rzeszutek Wilk wrot

Re: [PATCH 2/6] xen/pvh: Extend vcpu_guest_context, p2m, event, and xenbus to support PVH.

2012-10-22 Thread Mukesh Rathor
On Mon, 22 Oct 2012 14:44:40 +0100 Stefano Stabellini wrote: > On Sat, 20 Oct 2012, Konrad Rzeszutek Wilk wrote: > > From: Mukesh Rathor > > > > make gdt_frames[]/gdt_ents into a union with {gdtaddr, gdtsz}, as > > PVH only needs to send down gdtaddr and gdtsz. &

Re: [Xen-devel] [PATCH V3 6/6]: PVH:privcmd changes.

2012-10-18 Thread Mukesh Rathor
On Thu, 18 Oct 2012 11:35:53 +0100 Ian Campbell wrote: > > > @@ -439,6 +490,19 @@ static long privcmd_ioctl(struct file *file, > > return ret; > > } > > > > +static void privcmd_close(struct vm_area_struct *vma) > > +{ > > + struct page **pages = vma ? vma->vm_private_data : NULL; > >

Re: [Xen-devel] [PATCH V3 4/6]: PVH:bootup and setup related changes.

2012-10-18 Thread Mukesh Rathor
On Thu, 18 Oct 2012 11:49:31 +0100 Ian Campbell wrote: > On Thu, 2012-10-18 at 01:32 +0100, Mukesh Rathor wrote: > > > > + /* PVH TBD/FIXME: vcpu info placement in phase 2 */ > > + if (xen_pvh_domain()) > > + return; > > Do you have

Re: [Xen-devel] [PATCH V3 2/6]: (RESEND) PVH: use native irq, enable callback, use HVM ring ops, smp, ...

2012-10-18 Thread Mukesh Rathor
-by: Mukesh Rathor --- arch/x86/include/asm/xen/interface.h | 11 +- arch/x86/xen/irq.c |5 ++- arch/x86/xen/p2m.c |2 +- arch/x86/xen/smp.c | 75 ++ drivers/xen/cpu_hotplug.c|4

Re: [Xen-devel] [PATCH V3 2/6]: PVH: use native irq, enable callback, use HVM ring ops, smp, ...

2012-10-18 Thread Mukesh Rathor
On Thu, 18 Oct 2012 11:44:37 +0100 Ian Campbell wrote: > On Thu, 2012-10-18 at 01:30 +0100, Mukesh Rathor wrote: > > PVH: make gdt_frames[]/gdt_ents into a union with {gdtaddr, gdtsz}, > > PVH only needs to send down gdtaddr and gdtsz. irq.c: PVH uses > > native_irq

Re: [PATCH V3 3/6]: PVH: mmu related changes.

2012-10-18 Thread Mukesh Rathor
On Thu, 18 Oct 2012 12:31:08 +0100 Stefano Stabellini wrote: > On Thu, 18 Oct 2012, Mukesh Rathor wrote: > > PVH: This patch implements mmu changes for PVH. First the set/clear > > mmio pte function makes a hypercall to update the p2m in xen with > > 1:1 mapping. PVH uses

[PATCH V3 6/6]: PVH:privcmd changes.

2012-10-17 Thread Mukesh Rathor
close call. Signed-off-by: Mukesh Rathor --- drivers/xen/privcmd.c | 69 +++- 1 files changed, 67 insertions(+), 2 deletions(-) diff --git a/drivers/xen/privcmd.c b/drivers/xen/privcmd.c index 63d9ee8..835166a 100644 --- a/drivers/xen/privcmd.c

[PATCH V3 5/6]: PVH:balloon and grant changes

2012-10-17 Thread Mukesh Rathor
PVH: balloon and grant changes. For balloon changes we skip setting of local p2m as it's updated in xen. For grant, the shared grant frame is the pfn and not mfn, hence its mapped via the same code path as HVM Signed-off-by: Mukesh Rathor --- drivers/xen/balloon.c |

[PATCH V3 4/6]: PVH:bootup and setup related changes.

2012-10-17 Thread Mukesh Rathor
it's managed by xen. PVH maps the entire IO space, but only RAM pages need to be repopulated. Finally, pure PV settings are moved to a separate function that is only called for pure pv, ie, pv with pvmmu. Signed-off-by: Mukesh Rathor --- arch/x86/xen/enlighte

[PATCH V3 3/6]: PVH: mmu related changes.

2012-10-17 Thread Mukesh Rathor
so the privcmd pte entries can be cleared in xen p2m table. Signed-off-by: Mukesh Rathor --- arch/x86/xen/mmu.c| 174 ++--- arch/x86/xen/mmu.h|2 + drivers/xen/privcmd.c |5 +- include/xen/xen-ops.h |5 +- 4 files changed, 174

[PATCH V3 2/6]: PVH: use native irq, enable callback, use HVM ring ops, smp, ...

2012-10-17 Thread Mukesh Rathor
ring 0, so syscalls are native. Also, the vcpu context is send down via the hcall to be set in the vmcs. gdtaddr and gdtsz are unionionized as PVH only needs to send these two to be set in the vmcs. Finally, PVH ring ops uses HVM paths for xenbus. Signed-off-by: Mukesh Rathor --- arch/x86/include

[PATCH V3 1/6]: PVH: basic and header changes, elfnote changes, ...

2012-10-17 Thread Mukesh Rathor
[PATCH 1/6] PVH: is a PV linux guest that has extended capabilities. This patch allows it to be configured and enabled. Also, basic header file changes to add new subcalls to physmap hypercall. Lastly, mfn_to_local_pfn must return mfn for paging mode translate. Signed-off-by: Mukesh Rathor

[PATCH V3 0/6]: PVH: PV guest with extensions

2012-10-17 Thread Mukesh Rathor
Hi guys, Ok, I've made the changes from prev V2 patch submission comments. Tested all the combinations. I am building xen patch just for the corresponding header file changes. Following that I'll refresh xen tree, debug, test, and send patches. For linux kernel mailing list introduction, PVH is a

Re: [PATCH 6/6] xen: x86 pvh: use XENMEM_add_to_physmap_range for foreign gmfn mappings

2012-10-17 Thread Mukesh Rathor
On Wed, 17 Oct 2012 12:32:12 +0100 Ian Campbell wrote: > Squeezing the necessary fields into the existing XENMEM_add_to_physmap > interface was proving to be a bit tricky so we have decided to go with > a new interface upstream (the XENMAPSPACE_gmfn_foreign interface using > XENMEM_add_to_physmap

Re: [Xen-devel] [PATCH V2 6/7]: PVH: balloon and grant changes

2012-10-16 Thread Mukesh Rathor
On Fri, 12 Oct 2012 10:06:57 +0100 Ian Campbell wrote: > On Thu, 2012-10-11 at 23:01 +0100, Mukesh Rathor wrote: > > PVH: balloon and grant changes. For balloon changes we skip setting > > of local p2m as it's updated in xen. For grant, the shared grant > > frame is

Re: [Xen-devel] [PATCH V2 2/7]: PVH: use native irq, enable callback, use HVM ring ops, ...

2012-10-16 Thread Mukesh Rathor
On Mon, 15 Oct 2012 09:58:17 +0100 Ian Campbell wrote: > On Fri, 2012-10-12 at 20:06 +0100, Mukesh Rathor wrote: > > On Fri, 12 Oct 2012 09:52:17 +0100 > > Ian Campbell wrote: > > > > > > drivers/xen/cpu_hotplug.c|4 +++- > > > >

Re: [Xen-devel] [PATCH V2 3/7]: PVH: mmu related changes.

2012-10-16 Thread Mukesh Rathor
On Tue, 16 Oct 2012 17:27:01 +0100 Ian Campbell wrote: > On Fri, 2012-10-12 at 09:57 +0100, Ian Campbell wrote: > > > +int xen_unmap_domain_mfn_range(struct vm_area_struct *vma) > > > +{ > > > + int numpgs = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; > > > + struct page **pages = vm

Re: [Xen-devel] [PATCH V2 0/7]: PVH: PV guest with extensions

2012-10-15 Thread Mukesh Rathor
On Mon, 15 Oct 2012 17:15:43 +0100 Ian Campbell wrote: > On Thu, 2012-10-11 at 22:49 +0100, Mukesh Rathor wrote: > > Hi guys, > > > > Ok, I've made all the changes from prev RFC patch submissions. > > Tested all the combinations. The patches are organized sl

Re: [Xen-devel] [PATCH V2 3/7]: PVH: mmu related changes.

2012-10-12 Thread Mukesh Rathor
On Fri, 12 Oct 2012 09:57:56 +0100 Ian Campbell wrote: > On Thu, 2012-10-11 at 22:58 +0100, Mukesh Rathor wrote: > > @@ -2177,8 +2210,19 @@ static const struct pv_mmu_ops xen_mmu_ops > > __initconst = { > > > > void _

Re: [Xen-devel] [PATCH V2 1/7]: PVH: basic and header changes, elfnote changes, ...

2012-10-12 Thread Mukesh Rathor
On Fri, 12 Oct 2012 09:48:48 +0100 Ian Campbell wrote: > > index fdce49c..9323b8c 100644 > > --- a/arch/x86/xen/Kconfig > > +++ b/arch/x86/xen/Kconfig > > @@ -50,3 +50,13 @@ config XEN_DEBUG_FS > > Enable statistics output and various tuning options in > > debugfs. Enabling this option may

Re: [Xen-devel] [PATCH V2 0/7]: PVH: PV guest with extensions

2012-10-12 Thread Mukesh Rathor
On Fri, 12 Oct 2012 10:18:31 +0100 Ian Campbell wrote: > On Thu, 2012-10-11 at 22:49 +0100, Mukesh Rathor wrote: > > Hi guys, > > > > Ok, I've made all the changes from prev RFC patch submissions. > > Tested all the combinations. The patches are organized sl

Re: [Xen-devel] [PATCH V2 2/7]: PVH: use native irq, enable callback, use HVM ring ops, ...

2012-10-12 Thread Mukesh Rathor
On Fri, 12 Oct 2012 09:52:17 +0100 Ian Campbell wrote: > > drivers/xen/cpu_hotplug.c|4 +++- > > drivers/xen/events.c |9 - > > drivers/xen/xenbus/xenbus_client.c |3 ++- > > 7 files changed, 27 insertions(+), 8 deletions(-) > > > > diff --git a

[PATCH V2 7/7]: PVH: privcmd changes.

2012-10-11 Thread Mukesh Rathor
PVH: privcmd changes. PVH only supports the batch interface. To map a foreign page to a process, pfn must be allocated. PVH path uses ballooning for that purpose. The returned pfn is then mapped to the foreign page. xen_unmap_domain_mfn_range() is introduced to unmap these pages via the privcmd clo

[PATCH V2 6/7]: PVH: balloon and grant changes

2012-10-11 Thread Mukesh Rathor
PVH: balloon and grant changes. For balloon changes we skip setting of local p2m as it's updated in xen. For grant, the shared grant frame is the pfn and not mfn, hence its mapped via the same code path as HVM Signed-off-by: Mukesh R --- drivers/xen/balloon.c | 18 +++--- drive

[PATCH V2 5/7]: PVH: smp changes.

2012-10-11 Thread Mukesh Rathor
PVH: smp changes. This pertains to bringing up smp vcpus. PVH runs in ring 0, so syscalls are native. Also, the vcpu context is send down via the hcall to be set in the vmcs. gdtaddr and gdtsz are unionionized as PVH only needs to send these two to be set in the vmcs Signed-off-by: Mukesh R ---

[PATCH V2 4/7]: PVH: bootup and setup related changes.

2012-10-11 Thread Mukesh Rathor
PVH: bootup and setup related changes. enlighten.c: for PVH we can trap cpuid via vmexit, so don't need to use emulated prefix call. Check for vector callback early on, as it is a required feature. PVH runs at default kernel iopl. setup.c: in xen_add_extra_mem() we can skip updating p2m as it's man

[PATCH V2 3/7]: PVH: mmu related changes.

2012-10-11 Thread Mukesh Rathor
PVH: This patch implements mmu changes for PVH. First the set/clear mmio pte function makes a hypercall to update the p2m in xen with 1:1 mapping. PVH uses mostly native mmu ops. Two local functions are introduced to add to xen physmap for xen remap interface. xen unmap interface is introduced so t

[PATCH V2 2/7]: PVH: use native irq, enable callback, use HVM ring ops,...

2012-10-11 Thread Mukesh Rathor
PVH: make gdt_frames[]/gdt_ents into a union with {gdtaddr, gdtsz}, PVH only needs to send down gdtaddr and gdtsz. irq.c: PVH uses native_irq_ops. vcpu hotplug is currently not available for PVH. events.c: setup callback vector for PVH. Finally, PVH ring ops uses HVM paths for xenbus. Signed-off-b

[PATCH V2 1/7]: PVH: basic and header changes, elfnote changes, ...

2012-10-11 Thread Mukesh Rathor
PVH: is a PV linux guest that has extended capabilities. This patch allows it to be configured and enabled. Also, basic header file changes to add new subcalls to physmap hypercall. Lastly, mfn_to_local_pfn must return mfn for paging mode translate Signed-off-by: Mukesh R --- arch/x86/includ

[PATCH V2 0/7]: PVH: PV guest with extensions

2012-10-11 Thread Mukesh Rathor
Hi guys, Ok, I've made all the changes from prev RFC patch submissions. Tested all the combinations. The patches are organized slightly differently from prev version because of the nature of changes after last review. I am building xen patch just for the corresponding header file changes. Followin

Re: [PATCH 20/24] xen: update xen_add_to_physmap interface

2012-08-01 Thread Mukesh Rathor
On Wed, 1 Aug 2012 10:52:15 -0400 Konrad Rzeszutek Wilk wrote: > On Thu, Jul 26, 2012 at 04:34:02PM +0100, Stefano Stabellini wrote: > > Update struct xen_add_to_physmap to be in sync with Xen's version > > of the structure. > > The size field was introduced by: > > > > changeset: 24164:707d27