[Xen-devel] Commit 16cc3362aed39e3093419b9df6ec73269071d063 configure failure

2019-03-13 Thread Razvan Cojocaru
Hello, Commit "build/m4: make python_devel.m4 work with both python 2 and 3" makes my configure run fail, at least on my Ubuntu 16.04.6 LTS machine. http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=16cc3362aed39e3093419b9df6ec73269071d063 checking for python-config... /usr/bin/python-c

Re: [Xen-devel] Commit 16cc3362aed39e3093419b9df6ec73269071d063 configure failure

2019-03-13 Thread Razvan Cojocaru
On 3/13/19 1:28 PM, Wei Liu wrote: On Wed, Mar 13, 2019 at 01:24:06PM +0200, Razvan Cojocaru wrote: Hello, Commit "build/m4: make python_devel.m4 work with both python 2 and 3" makes my configure run fail, at least on my Ubuntu 16.04.6 LTS machine. http://xenbits.xen.org/gitweb/?p

Re: [Xen-devel] Commit 16cc3362aed39e3093419b9df6ec73269071d063 configure failure

2019-03-13 Thread Razvan Cojocaru
On 3/13/19 5:02 PM, Wei Liu wrote: On Wed, Mar 13, 2019 at 01:31:22PM +0200, Razvan Cojocaru wrote: On 3/13/19 1:28 PM, Wei Liu wrote: On Wed, Mar 13, 2019 at 01:24:06PM +0200, Razvan Cojocaru wrote: Hello, Commit "build/m4: make python_devel.m4 work with both python 2 and 3"

Re: [Xen-devel] [PATCH 04/12] xen/arm: memaccess: Initialize correctly *access in __p2m_get_mem_access

2019-03-27 Thread Razvan Cojocaru
ween the 2 enums. > > Fixes: 8d84e701fd ("xen/arm: initialize access") > Signed-off-by: Julien Grall Acked-by: Razvan Cojocaru ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH] x86/altp2m: treat view 0 as the hostp2m in p2m_get_mem_access()

2019-04-03 Thread Razvan Cojocaru
p2m_set_mem_access() (and other places) treat view 0 as the hostp2m, but p2m_get_mem_access() does not. Correct that inconsistency. Signed-off-by: Razvan Cojocaru --- xen/arch/x86/mm/mem_access.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xen/arch/x86/mm/mem_access.c b

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-03 Thread Razvan Cojocaru
On 4/3/19 5:58 PM, Jan Beulich wrote: On 03.04.19 at 16:29, wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -3011,8 +3011,16 @@ int p2m_set_suppress_ve(struct domain *d, gfn_t gfn, bool suppress_ve, mfn = p2m->get_entry(p2m, gfn, &t, &a, 0, NULL, NULL); if ( !mfn_

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-03 Thread Razvan Cojocaru
On 4/3/19 6:30 PM, Jan Beulich wrote: On 03.04.19 at 17:17, wrote: Changes to the hostp2m (also known as altp2m view 0) propagate to all existing altp2ms, but they do so in a lazy manner, and also that won't happen for altp2ms created after a while. So altp2ms will not necessarily know about a

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-03 Thread Razvan Cojocaru
On 4/3/19 7:16 PM, Tamas K Lengyel wrote: > It is right to fully populate a slot when for example we want > different mem_access permissions in different altp2m views. We can't > wait for the domain to on-demand populate the altp2m view because we > don't know when (and if) that will actually happe

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-03 Thread Razvan Cojocaru
On 4/3/19 7:04 PM, Jan Beulich wrote: On 03.04.19 at 17:48, wrote: >> On 4/3/19 6:30 PM, Jan Beulich wrote: >> On 03.04.19 at 17:17, wrote: Changes to the hostp2m (also known as altp2m view 0) propagate to all existing altp2ms, but they do so in a lazy manner, and also that won

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Razvan Cojocaru
On 4/3/19 6:30 PM, Jan Beulich wrote: On 03.04.19 at 17:17, wrote: On 4/3/19 5:58 PM, Jan Beulich wrote: On 03.04.19 at 16:29, wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -3011,8 +3011,16 @@ int p2m_set_suppress_ve(struct domain *d, gfn_t gfn, bool suppress_ve,

Re: [Xen-devel] [PATCH v1] Fix p2m_set_suppress_ve

2019-04-04 Thread Razvan Cojocaru
On 4/4/19 3:46 PM, Razvan Cojocaru wrote: On 4/3/19 6:30 PM, Jan Beulich wrote: On 03.04.19 at 17:17, wrote: On 4/3/19 5:58 PM, Jan Beulich wrote: On 03.04.19 at 16:29, wrote: --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -3011,8 +3011,16 @@ int p2m_set_suppress_ve(struct

Re: [Xen-devel] [PATCH] vm_event: Fix XEN_VM_EVENT_RESUME domctl

2019-04-05 Thread Razvan Cojocaru
esume in order to simplify the code. Signed-off-by: Petre Pircalabu Acked-by: Razvan Cojocaru ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86/hvm: Fix altp2m_op hypercall continuations

2019-04-08 Thread Razvan Cojocaru
ate_continuation() call, and return -ERESTART, which > will cause the compat case to start working correctly. > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Wei Liu > CC: Roger Pau Monné > CC: Razvan Cojocaru > CC: Petre Pircalabu > --- > x

Re: [Xen-devel] [PATCH] x86/hvm: Fix altp2m_op hypercall continuations

2019-04-09 Thread Razvan Cojocaru
On 4/8/19 9:34 PM, Andrew Cooper wrote: On 08/04/2019 19:13, Razvan Cojocaru wrote: The changes certainly look correct. I'll run some tests tomorrow as well. Thanks, Continuation appears to work correctly with our tests (64-bit PV domain calling 64-bit Xen / dom0). Since we're

Re: [Xen-devel] Xen 4.11.1: guest uses altp2m to crash host

2019-04-15 Thread Razvan Cojocaru
Hello Matt, Judging by the description of your problem, I believe that it has already been fixed by this commit: http://xenbits.xen.org/gitweb/?p=xen.git;a=commitdiff;h=1dddfff4c39d3db17dfa709b1c57f44e3ed352e3;hp=68465944c81fa2fbc40bf29ec6084072af5e48ec Could you please either try to reproduc

Re: [Xen-devel] Xen 4.11.1: guest uses altp2m to crash host

2019-04-15 Thread Razvan Cojocaru
On 4/15/19 5:04 PM, Matt Leinhos wrote: You are correct -- cherry picking that commit into RELEASE-4.11.1 addresses the crash. The problem cannot be reproduced on 4.12. I hope this helps. Thank you for confirming the fix! To the deciders: would it be reasonable to ask patches like this to be

Re: [Xen-devel] VMI: singlestep event not received

2019-04-22 Thread Razvan Cojocaru
On 4/22/19 1:26 AM, Mathieu Tarral wrote: The problem is that RtlUserThreadStart is paged-out, so i'm trying to reach it via singlestepping as a backup solution. FWIW, you can just use xc_hvm_inject_trap() with a TRAP_page_fault parameter to cause the OS to bring a paged out page back into ma

Re: [Xen-devel] [PATCH v1] x86/mm: Make change_type_range return error

2019-04-24 Thread Razvan Cojocaru
On 4/24/19 5:46 PM, Roger Pau Monné wrote: On Wed, Apr 24, 2019 at 02:27:32PM +, Alexandru Stefan ISAILA wrote: diff --git a/xen/arch/x86/mm/p2m.c b/xen/arch/x86/mm/p2m.c index 9e81a30cc4..27697d5a77 100644 --- a/xen/arch/x86/mm/p2m.c +++ b/xen/arch/x86/mm/p2m.c @@ -1028,7 +1028,7 @@ int p2m

Re: [Xen-devel] VMI: singlestep event not received

2019-04-24 Thread Razvan Cojocaru
On 4/24/19 6:25 PM, Tamas K Lengyel wrote: On Mon, Apr 22, 2019 at 6:00 PM Mathieu Tarral wrote: On Monday 22 April 2019 11:22, Razvan Cojocaru wrote: On 4/22/19 1:26 AM, Mathieu Tarral wrote: The problem is that RtlUserThreadStart is paged-out, so i'm trying to reach it

Re: [Xen-devel] Xen 4.11.1: guest uses altp2m to crash host

2019-04-25 Thread Razvan Cojocaru
On 4/25/19 1:04 PM, Jan Beulich wrote: On 15.04.19 at 16:10, wrote: >> On 4/15/19 5:04 PM, Matt Leinhos wrote: >>> You are correct -- cherry picking that commit into RELEASE-4.11.1 >>> addresses the crash. The problem cannot be reproduced on 4.12. >>> >>> I hope this helps. >> >> Thank you f

Re: [Xen-devel] [PATCH] x86/vm_event: correctly gather gs_shadow value

2019-05-01 Thread Razvan Cojocaru
e the event > was recorded. This prevents vm_event subscribers from correctly finding kernel > structures in the guest when it is trapped while in ring3. Isn't the VCPU always scheduled out (since it is paused) with sync vm_events? Is this an async fix only? In any case, Acked-by: Razva

Re: [Xen-devel] [PATCH] x86/vm_event: correctly gather gs_shadow value

2019-05-01 Thread Razvan Cojocaru
On 5/1/19 4:58 PM, Tamas K Lengyel wrote: >>> It might be worth introducing a "sync state from hw" hook which collects >>> all the data we intend to pass to the introspection agent. >> >> You mean adding another hvm hook? > > Actually, instead of another hook I think what would make sense it to >

Re: [Xen-devel] [PATCH for-next] x86/svm: Correct vm_event API for descriptor accesses

2019-11-28 Thread Razvan COJOCARU
1 bytes). > > Signed-off-by: Andrew Cooper > --- > CC: Jan Beulich > CC: Wei Liu > CC: Roger Pau Monné > CC: Razvan Cojocaru > CC: Tamas K Lengyel > CC: Alexandru Isaila > CC: Petre Pircalabu > CC: Adrian Pop > > Adrian: Do you recall what informatio

[Xen-devel] [PATCH] Remove myself as vm_event maintainer

2019-12-08 Thread Razvan Cojocaru
: Razvan Cojocaru M: Tamas K Lengyel R: Alexandru Isaila R: Petre Pircalabu -- 2.17.1 ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

[Xen-devel] [PATCH V2] Remove myself as vm_event maintainer

2019-12-10 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru --- MAINTAINERS | 1 - 1 file changed, 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9c827ad759..012c847ebd 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -428,7 +428,6 @@ L: xen-devel@lists.xenproject.org F: unmodified_drivers/linux-2.6/ VM

Re: [Xen-devel] [PATCH] Remove myself as vm_event maintainer

2019-12-10 Thread Razvan COJOCARU
On 12/10/19 11:57 AM, Jan Beulich wrote: > On 08.12.2019 11:07, Razvan Cojocaru wrote: >> --- >> MAINTAINERS | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/MAINTAINERS b/MAINTAINERS >> index 9c827ad759..012c847ebd 100644 >> --- a/

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-27 Thread Razvan Cojocaru
>> _However_, please picture an instruction that both writes into a page P1 >> we're interested in, _and_ causes a write into a read-only page-walk >> related page P2. Emulating the current instruction, as the upstream >> patch does, does eliminate the vm_event caused by writing into P2, but >> wit

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-27 Thread Razvan Cojocaru
On 11/23/18 11:07 AM, Jan Beulich wrote: On 22.11.18 at 19:24, wrote: >> _However_, please picture an instruction that both writes into a page P1 >> we're interested in, _and_ causes a write into a read-only page-walk >> related page P2. Emulating the current instruction, as the upstream >> p

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-27 Thread Razvan Cojocaru
>> About the emulator and events: if we could have a toggle for the >> emulator to tell it "emulate the current instruction and send out a >> vm_event only if it touches a protected page that's NOT part of the page >> walk", that would also work - though I can't at this point tell how >> feasible t

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-27 Thread Razvan Cojocaru
On 11/27/18 1:32 PM, Roger Pau Monné wrote: > Would it be possible to add some kind of flag to the emulator to > signal whether p2m restrictions should be enforced/ignored? > hvmemul_acquire_page seems like a suitable place, but I'm not that > familiar with the emulator. > > Then you could generat

Re: [Xen-devel] [PATCH v1] x86/hvm: Generic instruction re-execution mechanism for execute faults

2018-11-27 Thread Razvan Cojocaru
On 11/27/18 1:59 PM, Andrew Cooper wrote: > On 27/11/2018 11:45, Razvan Cojocaru wrote: >> On 11/27/18 1:32 PM, Roger Pau Monné wrote: >>> Would it be possible to add some kind of flag to the emulator to >>> signal whether p2m restrictions should be enforced/ignored? >

Re: [Xen-devel] [PATCH RFC 5/6] xen-access: add support for slotted channel vm_events

2018-11-28 Thread Razvan Cojocaru
On 11/28/18 5:29 PM, Petre Pircalabu wrote: > Signed-off-by: Petre Pircalabu > --- > tools/tests/xen-access/xen-access.c | 510 > > 1 file changed, 408 insertions(+), 102 deletions(-) > > diff --git a/tools/tests/xen-access/xen-access.c > b/tools/tests/xen-

Re: [Xen-devel] [PATCH V9 5/7] x86/altp2m: fix display frozen when switching to a new view early

2018-11-28 Thread Razvan Cojocaru
On 11/26/18 2:08 PM, Jan Beulich wrote: On 22.11.18 at 12:40, wrote: >> @@ -956,18 +1003,14 @@ int p2m_change_type_one(struct domain *d, unsigned >> long gfn_l, >> } >> >> /* Modify the p2m type of a range of gfns from ot to nt. */ >> -void p2m_change_type_range(struct domain *d, >> -

[Xen-devel] [PATCH V10 1/5] x86/p2m: allocate logdirty_ranges for altp2ms

2018-11-28 Thread Razvan Cojocaru
-off-by: Razvan Cojocaru --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V9: - None. --- xen/arch/x86/mm/p2m.c | 46 +++--- 1 file changed, 39 insertions(+), 7 deletions(-) diff -

[Xen-devel] [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets

2018-11-28 Thread Razvan Cojocaru
tart >= hostp2m->max_mapped_pfn Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V9: - Removed the patch RFC (replaced by a printk(XENLOG_G_WARNI

[Xen-devel] [PATCH V10 3/5] x86/altp2m: fix display frozen when switching to a new view early

2018-11-28 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V9: - Moved the ->defer_nested_flush assignments and the p2m_flush_nestedp2m(d) call to p2m_chan

[Xen-devel] [PATCH V10 0/5] Fix VGA logdirty related display freezes with altp2m

2018-11-28 Thread Razvan Cojocaru
This series aims to prevent the display from freezing when enabling altp2m and switching to a new view (and assorted problems when resizing the display). The series allocates a new logdirty rangeset for each new altp2m, and propagates (under lock) changes to all p2ms. [PATCH V10 1/5] x86/p2m: all

[Xen-devel] [PATCH V10 2/5] x86/p2m: refactor p2m_reset_altp2m()

2018-11-28 Thread Razvan Cojocaru
the altp2m idx was disabled; so before getting used again, p2m_init_altp2m_ept() would get called, which resets them. Always setting them in p2m_reset_altp2m(), while redundant, is preferable to an extra conditional. Signed-off-by: Razvan Cojocaru --- CC: George Dunlap CC: Jan Beulich CC: Andrew

[Xen-devel] [PATCH V10 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-11-28 Thread Razvan Cojocaru
he invalidation range for alternate p2ms. Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Reviewed-by: Jan Beulich --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V9: - Corrected function name in patch su

Re: [Xen-devel] [PATCH V10 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-11-28 Thread Razvan Cojocaru
On 11/28/18 11:56 PM, Razvan Cojocaru wrote: > change_range_type() invalidates gfn ranges to lazily change the type > of a range of gfns, and also modifies the logdirty rangesets of that > p2m. At the moment, it clips both down by the hostp2m. > > While this will result in correct

Re: [Xen-devel] [PATCH V10 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-11-29 Thread Razvan Cojocaru
alculation of the two ranges. Keep using the >> hostp2m's max_mapped_pfn to clip the logdirty ranges, but use the >> current p2m's max_mapped_pfn to further clip the invalidation range >> for alternate p2ms. >> >> Signed-off-by: George Dunlap >> Signed

[Xen-devel] [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets

2018-11-29 Thread Razvan Cojocaru
On 11/29/18 12:04 PM, Jan Beulich wrote: On 28.11.18 at 22:56, wrote: >> Changes since V9: >> - Removed the patch RFC (replaced by a printk(XENLOG_G_WARNING). >> - Reused start and end in change_type_range() and removed the >>intermediary variables range_start and range_end. >> - Added

Re: [Xen-devel] [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets

2018-11-30 Thread Razvan Cojocaru
On 11/29/18 3:58 PM, Jan Beulich wrote: On 29.11.18 at 14:23, wrote: >> On 11/29/18 12:04 PM, Jan Beulich wrote: >> On 28.11.18 at 22:56, wrote: Changes since V9: - Removed the patch RFC (replaced by a printk(XENLOG_G_WARNING). - Reused start and end in change_type_range

Re: [Xen-devel] [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-04 Thread Razvan Cojocaru
On 12/3/18 10:49 AM, Jan Beulich wrote: On 30.11.18 at 22:59, wrote: >> On 11/29/18 3:58 PM, Jan Beulich wrote: >>> Altp2m-s don't matter here at all. My point is that the present, >>> unpatched p2m_change_type_range() updates the log-dirty >>> ranges with the unclipped [start,end), but calls

Re: [Xen-devel] [PATCH V10 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-04 Thread Razvan Cojocaru
On 12/4/18 2:54 PM, Jan Beulich wrote: On 04.12.18 at 13:18, wrote: >> Right, so you're saying that the series would be able to go in provided >> that the situation is not made worse than it currently is. > > Well, I'm not the maintainer of this code, so in principle the > series can go in d

Re: [Xen-devel] [PATCH for-4.12 v2 11/17] xen/arm: p2m: Extend p2m_get_entry to return the value of bit[0] (valid bit)

2018-12-04 Thread Razvan Cojocaru
perform a specific > action. So extend p2m_get_entry to return the value of bit[0] (valid bit). > > Signed-off-by: Julien Grall Other than that, Acked-by: Razvan Cojocaru Thanks, Razvan ___ Xen-devel mailing list Xen-deve

[Xen-devel] [PATCH V11 0/5] Fix VGA logdirty related display freezes with altp2m

2018-12-05 Thread Razvan Cojocaru
This series aims to prevent the display from freezing when enabling altp2m and switching to a new view (and assorted problems when resizing the display). The series introduces p2m_{init,free}_logdirty(), allocates a new logdirty rangeset for each new altp2m, and propagates (under lock) changes to

[Xen-devel] [PATCH V11 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-05 Thread Razvan Cojocaru
tart >= hostp2m->max_mapped_pfn Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V10: - Fixed a double-space in the patch descr

[Xen-devel] [PATCH V11 2/5] x86/p2m: refactor p2m_reset_altp2m()

2018-12-05 Thread Razvan Cojocaru
the altp2m idx was disabled; so before getting used again, p2m_init_altp2m_ept() would get called, which resets them. Always setting them in p2m_reset_altp2m(), while redundant, is preferable to an extra conditional. Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunl

[Xen-devel] [PATCH V11 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-12-05 Thread Razvan Cojocaru
he invalidation range for alternate p2ms. Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Reviewed-by: Jan Beulich Tested-by: Tamas K Lengyel --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V10: - Corrected

[Xen-devel] [PATCH V11 3/5] x86/altp2m: fix display frozen when switching to a new view early

2018-12-05 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V10: - Added Tamas' Tested-by. --- xen/arch/x86/mm/p2m-ept.c | 9 ++- xen/

[Xen-devel] [PATCH V11 1/5] x86/p2m: allocate logdirty_ranges for altp2ms

2018-12-05 Thread Razvan Cojocaru
-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V10: - Added Tamas' Tested-by. --- xen/arch/x86/mm/p2m.c | 46 +++--- 1 f

[Xen-devel] [PATCH] x86/vm_event: block interrupt injection for sync vm_events

2018-12-08 Thread Razvan Cojocaru
then overwrites the active interrupt in the VMCS. Signed-off-by: Razvan Cojocaru --- xen/arch/x86/hvm/vm_event.c| 2 ++ xen/arch/x86/hvm/vmx/intr.c| 8 xen/arch/x86/vm_event.c| 5 + xen/common/monitor.c | 6 ++ xen/include/asm-arm/vm_event.h | 6 ++ xen

Re: [Xen-devel] [PATCH] x86/vm_event: block interrupt injection for sync vm_events

2018-12-10 Thread Razvan Cojocaru
On 12/10/18 4:32 PM, Jan Beulich wrote: On 08.12.18 at 21:48, wrote: >> Block interrupts (in vmx_intr_assist()) for the duration of >> processing a sync vm_event (similarly to the strategy >> currently used for single-stepping). Otherwise, attempting >> to emulate an instruction when requeste

[Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-10 Thread Razvan Cojocaru
(), which then overwrites the active interrupt in the VMCS. Signed-off-by: Razvan Cojocaru --- Changes since V1: - Added "e.g." to the patch description to counter the impression that the only possibility of overwriting the active interrupt in the VMCS is hvm_inject_page_fault(). -

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-10 Thread Razvan Cojocaru
On 12/10/18 6:49 PM, Roger Pau Monné wrote: > On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: >> diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h >> index 66f2474..b63249e 100644 >> --- a/xen/include/asm-arm/vm_event.h >>

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Razvan Cojocaru
On 12/10/18 6:59 PM, Razvan Cojocaru wrote: > On 12/10/18 6:49 PM, Roger Pau Monné wrote: >> On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojocaru wrote: >>> diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h >>> index 66f2474..b63249e 10064

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Razvan Cojocaru
On 12/11/18 12:14 PM, Roger Pau Monné wrote: > On Tue, Dec 11, 2018 at 12:01:53PM +0200, Razvan Cojocaru wrote: >> On 12/10/18 6:59 PM, Razvan Cojocaru wrote: >>> On 12/10/18 6:49 PM, Roger Pau Monné wrote: >>>> On Mon, Dec 10, 2018 at 06:01:49PM +0200, Razvan Cojo

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-11 Thread Razvan Cojocaru
On 12/11/18 1:59 PM, Julien Grall wrote: > Hi, > > On 11/12/2018 10:21, Razvan Cojocaru wrote: >> On 12/11/18 12:14 PM, Roger Pau Monné wrote: >>> On Tue, Dec 11, 2018 at 12:01:53PM +0200, Razvan Cojocaru wrote: >>>> On 12/10/18 6:59 PM, Razvan Cojocaru wrote:

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 8:54 AM, Tian, Kevin wrote: >> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] >> Sent: Tuesday, December 11, 2018 8:33 PM >> >>> In any case, I think you want to rename the function and/or document >>> more that expected behavior. >>

Re: [Xen-devel] [PATCH V11 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-13 Thread Razvan Cojocaru
On 12/5/18 6:30 PM, Jan Beulich wrote: On 05.12.18 at 10:18, wrote: >> --- a/xen/arch/x86/mm/p2m.c >> +++ b/xen/arch/x86/mm/p2m.c >> @@ -1002,30 +1002,43 @@ int p2m_change_type_one(struct domain *d, unsigned >> long gfn_l, >> return rc; >> } >> >> -/* Modify the p2m type of a range o

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 2:04 PM, Julien Grall wrote: > Hi, > > On 12/13/18 8:03 AM, Razvan Cojocaru wrote: >> On 12/13/18 8:54 AM, Tian, Kevin wrote: >>>> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] >>>> Sent: Tuesday, December 11, 2018 8:33 PM >>>

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 2:39 PM, Julien Grall wrote: > Hi, > > On 12/13/18 12:15 PM, Razvan Cojocaru wrote: >> On 12/13/18 2:04 PM, Julien Grall wrote: >>> Hi, >>> >>> On 12/13/18 8:03 AM, Razvan Cojocaru wrote: >>>> On 12/13/18 8:54 AM, Tian, Ke

Re: [Xen-devel] [PATCH V2] x86/vm_event: block interrupt injection for sync vm_events

2018-12-13 Thread Razvan Cojocaru
On 12/13/18 4:58 PM, Jan Beulich wrote: On 13.12.18 at 14:18, wrote: >> So, long story short, on VMX we first send out the vm_event, while >> processing it an interrupt / exception may become pending, before >> resuming the VCPU that has sent out the vm_event there's a Xen function >> that pi

[Xen-devel] [PATCH V3] x86/vm_event: block interrupt injection for sync vm_events

2018-12-14 Thread Razvan Cojocaru
rwriting the VM_ENTRY_INTR_INFO value). This patch may also be helpful for the future removal of may_defer in hvm_set_cr{0,3,4} and hvm_set_msr(). Signed-off-by: Razvan Cojocaru --- Changes since V2: - Renamed intr_block to sync_event and vm_event_block_interrupts() to vm_event_sync_event(). - Rephra

[Xen-devel] [PATCH] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-14 Thread Razvan Cojocaru
;When Virtualization Exceptions are Enabled, EPT Violations May Generate Erroneous Virtualization Exceptions") on Xeon CPUs. Signed-off-by: Razvan Cojocaru --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_altp2m.c | 22 ++ xen/arch/x86/hvm/hvm.c

Re: [Xen-devel] Xen 4.12 Development Update

2018-12-17 Thread Razvan Cojocaru
Hello, On 12/17/18 4:14 PM, Juergen Gross wrote: > This email only tracks big items for xen.git tree. Please reply for items you > would like to see in 4.12 so that people have an idea what is going on and > prioritise accordingly. > > You're welcome to provide description and use cases of the fe

Re: [Xen-devel] [PATCH] x86emul: fix 3-operand IMUL

2018-12-18 Thread Razvan Cojocaru
t; > Reported-by: Andrei Lutas > Signed-off-by: Jan Beulich Tested-by: Razvan Cojocaru Thank you, Razvan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
On 12/18/18 4:10 PM, Jan Beulich wrote: On 14.12.18 at 18:17, wrote: >> Allow altp2m users to disable #VE/VMFUNC alone. Currently it is >> only possible to disable this functionality when we disable altp2m >> completely; #VE/VMFUNC can only be enabled once per altp2m session. >> >> In additio

[Xen-devel] [PATCH V2] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
;When Virtualization Exceptions are Enabled, EPT Violations May Generate Erroneous Virtualization Exceptions") on Xeon E-2100 CPUs. Signed-off-by: Razvan Cojocaru --- Changes since V1: - Updated the patch description to specify E-2100. - Made trying to disable #VE when it's already d

Re: [Xen-devel] [PATCH V2] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
On 12/18/18 4:54 PM, Razvan Cojocaru wrote: > Allow altp2m users to disable #VE/VMFUNC alone. Currently it is > only possible to disable this functionality when we disable altp2m > completely; #VE/VMFUNC can only be enabled once per altp2m session. > > In addition to making

[Xen-devel] [PATCH V3] x86/altp2m: add altp2m_vcpu_disable_notify

2018-12-18 Thread Razvan Cojocaru
;When Virtualization Exceptions are Enabled, EPT Violations May Generate Erroneous Virtualization Exceptions") on Xeon E-2100 CPUs. Signed-off-by: Razvan Cojocaru --- Changes since V2: - Fixed compilation by completing the removal of all references to "pad". Changes since V1:

Re: [Xen-devel] [PATCH V11 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-20 Thread Razvan Cojocaru
On 12/20/18 4:49 PM, Jan Beulich wrote: On 20.12.18 at 15:38, wrote: >> Can we just for now take the text as I proposed it? You can argue about >> the right thing to do when we do the alleged clean-up. > > With the "We should probably return an error ..." part dropped > or replaced by e.g.

Re: [Xen-devel] [PATCH V11 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-20 Thread Razvan Cojocaru
On 12/20/18 6:09 PM, George Dunlap wrote: > On 12/5/18 9:18 AM, Razvan Cojocaru wrote: >> The logdirty rangesets of the altp2ms need to be kept in sync with the >> hostp2m. This means when iterating through the altp2ms, we need to >> use the host p2m to clip the ranges

Re: [Xen-devel] [PATCH V11 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-20 Thread Razvan Cojocaru
On 12/20/18 6:31 PM, George Dunlap wrote: > On 12/5/18 9:18 AM, Razvan Cojocaru wrote: >> The logdirty rangesets of the altp2ms need to be kept in sync with the >> hostp2m. This means when iterating through the altp2ms, we need to >> use the host p2m to clip the ranges

[Xen-devel] [PATCH V12 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-20 Thread Razvan Cojocaru
tart >= hostp2m->max_mapped_pfn Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V11: - Added end_exclusive, to avoid modifying f

[Xen-devel] [PATCH V12 0/5] Fix VGA logdirty related display freezes with altp2m

2018-12-20 Thread Razvan Cojocaru
This series aims to prevent the display from freezing when enabling altp2m and switching to a new view (and assorted problems when resizing the display). The series introduces p2m_{init,free}_logdirty(), allocates a new logdirty rangeset for each new altp2m, and propagates (under lock) changes to

[Xen-devel] [PATCH V12 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-12-20 Thread Razvan Cojocaru
he invalidation range for alternate p2ms. Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Reviewed-by: Jan Beulich Tested-by: Tamas K Lengyel Acked-by: George Dunlap --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Chang

[Xen-devel] [PATCH V12 3/5] x86/altp2m: fix display frozen when switching to a new view early

2018-12-20 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel Acked-by: George Dunlap --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V11: - Added George's Acked-by. --- xen/arch/x

[Xen-devel] [PATCH V12 1/5] x86/p2m: allocate logdirty_ranges for altp2ms

2018-12-20 Thread Razvan Cojocaru
-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V11: - None. --- xen/arch/x86/mm/p2m.c | 46 +++--- 1 file changed, 39 insert

[Xen-devel] [PATCH V12 2/5] x86/p2m: refactor p2m_reset_altp2m()

2018-12-20 Thread Razvan Cojocaru
the altp2m idx was disabled; so before getting used again, p2m_init_altp2m_ept() would get called, which resets them. Always setting them in p2m_reset_altp2m(), while redundant, is preferable to an extra conditional. Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunl

Re: [Xen-devel] [PATCH V12 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-21 Thread Razvan Cojocaru
On 12/21/18 8:24 PM, George Dunlap wrote: > >> On Dec 20, 2018, at 5:38 PM, Razvan Cojocaru >> wrote: >> >> The logdirty rangesets of the altp2ms need to be kept in sync with the >> hostp2m. This means when iterating through the altp2ms, we need to >> use

[Xen-devel] [PATCH for-4.12 V13 5/5] p2m: change_type_range: Only invalidate mapped gfns

2018-12-21 Thread Razvan Cojocaru
he invalidation range for alternate p2ms. Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Reviewed-by: Jan Beulich Tested-by: Tamas K Lengyel Acked-by: George Dunlap --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Change

[Xen-devel] [PATCH for-4.12 V13 2/5] x86/p2m: refactor p2m_reset_altp2m()

2018-12-21 Thread Razvan Cojocaru
the altp2m idx was disabled; so before getting used again, p2m_init_altp2m_ept() would get called, which resets them. Always setting them in p2m_reset_altp2m(), while redundant, is preferable to an extra conditional. Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel Reviewed-by: Ge

[Xen-devel] [PATCH for-4.12 V13 3/5] x86/altp2m: fix display frozen when switching to a new view early

2018-12-21 Thread Razvan Cojocaru
Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel Acked-by: George Dunlap --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V12: - None. --- xen/arch/x86/mm/p2m-ept.c | 9 ++- xe

[Xen-devel] [PATCH for-4.12 V13 4/5] p2m: Always use hostp2m when clipping rangesets

2018-12-21 Thread Razvan Cojocaru
tart >= hostp2m->max_mapped_pfn Signed-off-by: George Dunlap Signed-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V12: - Corrected the clipping warning placem

[Xen-devel] [PATCH for-4.12 V13 0/5] Fix VGA logdirty related display freezes with altp2m

2018-12-21 Thread Razvan Cojocaru
This series aims to prevent the display from freezing when enabling altp2m and switching to a new view (and assorted problems when resizing the display). The series introduces p2m_{init,free}_logdirty(), allocates a new logdirty rangeset for each new altp2m, and propagates (under lock) changes to

[Xen-devel] [PATCH for-4.12 V13 1/5] x86/p2m: allocate logdirty_ranges for altp2ms

2018-12-21 Thread Razvan Cojocaru
-off-by: Razvan Cojocaru Tested-by: Tamas K Lengyel Reviewed-by: George Dunlap --- CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu CC: "Roger Pau Monné" --- Changes since V12: - Added George's Reviewed-by. --- xen/arch/x8

Re: [Xen-devel] [PATCH v10] x86/altp2m: support for setting restrictions for an array of pages

2018-03-30 Thread Razvan Cojocaru
On 03/30/2018 01:03 PM, George Dunlap wrote: > On 03/30/2018 07:34 AM, Razvan Cojocaru wrote: >> On 03/13/2018 07:44 PM, Wei Liu wrote: >>> On Wed, Dec 13, 2017 at 04:22:20PM +0200, Petre Pircalabu wrote: >>> [...] >>> Tabs here. >>> >>>

Re: [Xen-devel] [PATCH v10] x86/altp2m: support for setting restrictions for an array of pages

2018-03-30 Thread Razvan Cojocaru
On 03/30/2018 02:16 PM, George Dunlap wrote: > On Wed, Dec 13, 2017 at 2:22 PM, Petre Pircalabu > wrote: >> From: Razvan Cojocaru >> >> For the default EPT view we have xc_set_mem_access_multi(), which >> is able to set an array of pages to an array of access rig

[Xen-devel] SVM NPT mem_access and npfec.insn_fetch

2018-03-30 Thread Razvan Cojocaru
Hello, We've been trying to enable mem_access events for SVM, and we do receive some events with xen-access if we set the pages read-only. However, the exec xen-access tests fails, because it appears that npfec.insn_fetch is always 0 here (or at least we haven't seen it to be 1 in a lot of testing

Re: [Xen-devel] SVM NPT mem_access and npfec.insn_fetch

2018-03-30 Thread Razvan Cojocaru
On 03/31/2018 12:14 AM, Andrew Cooper wrote: > On 30/03/2018 22:06, Razvan Cojocaru wrote: >> Hello, >> >> We've been trying to enable mem_access events for SVM, and we do receive >> some events with xen-access if we set the pages read-only. However, the >> e

Re: [Xen-devel] SVM NPT mem_access and npfec.insn_fetch

2018-03-30 Thread Razvan Cojocaru
On 03/31/2018 12:52 AM, Andrew Cooper wrote: > Well... If you don't set the real permissions bits, how is hardware > going to know that you don't want this page to be executed, and raise a > nested page fault in the first place? Right, it's obvious in retrospect. We were fooled by the way it seeme

Re: [Xen-devel] [PATCH v11] x86/altp2m: support for setting restrictions for an array of pages

2018-04-04 Thread Razvan Cojocaru
On 03/30/2018 06:39 PM, Petre Pircalabu wrote: > From: Razvan Cojocaru > > For the default EPT view we have xc_set_mem_access_multi(), which > is able to set an array of pages to an array of access rights with > a single hypercall. However, this functionality was lacking f

[Xen-devel] Weird altp2m behaviour when switching early to a new view

2018-04-08 Thread Razvan Cojocaru
Hello, I've noticed altp2m behaviour I can't explain yet - I'm not all that familiar with all the ways the new views corellate with the previous EPT-based "view 0". In short, if we create a new view and simply switch to it early in the boot process of the guest, something goes wrong and the guest

Re: [Xen-devel] Weird altp2m behaviour when switching early to a new view

2018-04-10 Thread Razvan Cojocaru
On 04/09/2018 05:12 PM, George Dunlap wrote: > The obvious place to look is the logdirtyvram functionality, which is > used to make it easier for QEMU to figure out which bits of the display > buffer have been modified. One of the big reasons the altp2m > functionality is still considered "experim

Re: [Xen-devel] Weird altp2m behaviour when switching early to a new view

2018-04-11 Thread Razvan Cojocaru
> After much debugging, it turns out that the > "p2m_is_ram(p2mt)" test in hvm_hap_nested_page_fault() fails if I switch > to the new altp2m view fast enough, and that in turn disables the > logdirty processing gated on it Actually as it turns out the exit doesn't happen at all anymore so hvm_hap_

Re: [Xen-devel] X86 Community Call: Wed March 14, 15:00 - 16:00 UTC - Meeting Minutes

2018-04-11 Thread Razvan Cojocaru
On 04/11/2018 08:10 PM, Lars Kurth wrote: > ### [PATCH RFC 00/14] EPT-Based Sub-page Write Protection Support > > ### (​Zhang Yi) > > RFC posted by Zhang Yi Oct 19, 2017 > https://marc.info/?l=xen-devel&m= > https://xen.markmail.org/thread/m75h6b2aiwk5h7fx > > > No acks, reviews only by memacce

Re: [Xen-devel] Weird altp2m behaviour when switching early to a new view

2018-04-12 Thread Razvan Cojocaru
On 04/11/2018 11:17 PM, Tamas K Lengyel wrote: > On Wed, Apr 11, 2018 at 12:39 AM, Razvan Cojocaru > wrote: >> Also related to this part of the altp2m design, I've also noticed that >> creating a new EPT view with libxc involves this function: >> >> int xc_altp

Re: [Xen-devel] Weird altp2m behaviour when switching early to a new view

2018-04-12 Thread Razvan Cojocaru
On 04/11/2018 11:04 AM, Razvan Cojocaru wrote: >> After much debugging, it turns out that the >> "p2m_is_ram(p2mt)" test in hvm_hap_nested_page_fault() fails if I switch >> to the new altp2m view fast enough, and that in turn disables the >> logdirty processi

<    1   2   3   4   5   6   >