Re: [Xen-devel] [PATCH] mem_access: Fix npfec.kind propagation

2018-10-17 Thread Razvan Cojocaru
On 10/5/18 2:00 PM, Razvan Cojocaru wrote: > On 9/27/18 2:25 PM, George Dunlap wrote: >> The name of the "with_gla" flag is confusing; it has nothing to do >> with the existence or lack thereof of a faulting GLA, but rather where >> the fault originated. The npfec.

Re: [Xen-devel] [PATCH v2 2/4] xen/arm: initialize access

2018-10-17 Thread Razvan Cojocaru
mas K Lengyel Acked-by: Razvan Cojocaru Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

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

2018-10-18 Thread Razvan Cojocaru
changes to all valid altp2ms. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- xen/arch/x86/mm/p2m-ept.c | 31 ++- xen/arch/x86/mm/p2m.c | 112 -- xen/drivers/passthrough/pci.c | 2 +- xen/include/asm-x86/hvm

[Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-18 Thread Razvan Cojocaru
Hello, 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 first patch propagates ept.ad changes to all active altp2ms, and the second one allocates a new logdirty rangeset for each new altp2

[Xen-devel] [PATCH 1/2] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-10-18 Thread Razvan Cojocaru
tp2ms will inherit the hostp2m's ept.ad value. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- xen/arch/x86/mm/p2m-ept.c | 57 +++ xen/arch/x86/mm/p2m.c | 8 --- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-18 Thread Razvan Cojocaru
On 10/18/18 11:08 PM, Tamas K Lengyel wrote: > On Thu, Oct 18, 2018 at 4:09 AM Razvan Cojocaru > wrote: >> >> Hello, >> >> This series aims to prevent the display from freezing when >> enabling altp2m and switching to a new view (and assorted problems >

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

2018-10-19 Thread Razvan Cojocaru
On 10/18/18 1:57 PM, Andrew Cooper wrote: > On 18/10/18 11:07, Razvan Cojocaru wrote: >> When an new altp2m view is created very early on guest boot, the >> display will freeze (although the guest will run normally). This >> may also happen on resizing the display. The rea

Re: [Xen-devel] Definitive Guide to the Xen Hypervisor

2018-10-21 Thread Razvan Cojocaru
On 10/22/18 12:03 AM, Aaron Gray wrote: > How relevant is David Chisnall's book *Definitive Guide to the Xen > Hypervisor* now with regards to studying Xen's source code now ? FWIW, I've found it largely irrelevant. It's been published more than a decade ago now, so that's fair enough. I suppose

Re: [Xen-devel] Definitive Guide to the Xen Hypervisor

2018-10-21 Thread Razvan Cojocaru
On 10/22/18 12:47 AM, Aaron Gray wrote: > Where is the best place to start for getting a logical unit level > overview of the source code please ? There's some documentation under docs/ in the source code repo, there are various recorded presentations from events such as the Xen Developer Summit o

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-22 Thread Razvan Cojocaru
On 10/22/18 11:48 PM, Tamas K Lengyel wrote: > On Thu, Oct 18, 2018 at 3:12 PM Razvan Cojocaru > wrote: >> >> On 10/18/18 11:08 PM, Tamas K Lengyel wrote: >>> On Thu, Oct 18, 2018 at 4:09 AM Razvan Cojocaru >>> wrote: >>>> >>>> H

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-22 Thread Razvan Cojocaru
With the config fixed it boots but when I run DRAKVUF on the domain I get the following crash: (XEN) [ Xen-4.12-unstable x86_64 debug=y Not tainted ] (XEN) CPU:0 (XEN) RIP:e008:[<7bdb630c>] 7bdb630c (XEN) RFLAGS: 0001028

[Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-23 Thread Razvan Cojocaru
Tamas, could you please give this a spin? https://github.com/razvan-cojocaru/xen/tree/altp2m-logdirty-take2 It _should_ solve the crashes. Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman

[Xen-devel] [PATCH V2 1/3] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-10-23 Thread Razvan Cojocaru
tp2ms will inherit the hostp2m's ept.ad value. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- xen/arch/x86/mm/p2m-ept.c | 57 +++ xen/arch/x86/mm/p2m.c | 8 --- 2 files changed, 53 insertions(+), 12 deletions(-) diff --git a/

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

2018-10-23 Thread Razvan Cojocaru
Hello, 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). Since the last version of the series, what was previously the second (and last) patch has been split in two patches, the first of which o

[Xen-devel] [PATCH V2 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-10-23 Thread Razvan Cojocaru
This patch is a pre-requisite for the one fixing VGA logdirty freezes when using altp2m. It only concerns itself with the ranges allocation / deallocation / initialization part. While touching the code, I've switched global_logdirty from bool_t to bool. Signed-off-by: Razvan Cojocaru ---

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

2018-10-23 Thread Razvan Cojocaru
p2m_change_entry_type_global(), p2m_memory_type_changed and p2m_change_type_range() to propagate their changes to all valid altp2ms. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- xen/arch/x86/mm/p2m-ept.c | 8 + xen/arch/x86/mm/p2m.c | 83

Re: [Xen-devel] [PATCH] SUPPORT: Correct the description of altp2m

2018-10-23 Thread Razvan Cojocaru
On 10/23/18 4:51 PM, Andrew Cooper wrote: > Altp2m aids monitoring guest memory, not hypervisor memory. Also, put its > common name in brackets to aid searching. > > Signed-off-by: Andrew Cooper Reviewed-by: Razvan Cojocaru Thanks, Razvan ___

Re: [Xen-devel] [PATCH 1/2] x86/monitor: Introduce a boolean to suppress nested monitoring events

2018-10-23 Thread Razvan Cojocaru
> > Signed-off-by: Andrew Cooper > --- > CC: Razvan Cojocaru > CC: Tamas K Lengyel > CC: Jan Beulich > CC: Wei Liu > > RFC - This probably wants wiring up on ARM as well, but all I see is > monitor_smc() and no equivalent parts to hvm_do_resume() where we may inje

Re: [Xen-devel] [PATCH 2/2] x86/hvm: Drop the may_defer boolean from hvm_* helpers

2018-10-23 Thread Razvan Cojocaru
e function "please don't write the value in this MSR, just send a vm_event for now, _unless_ the introspection agent didn't subscribe to writes in this particular MSR". The actual write is done in the code called by hvm_vm_event_do_resume(), if the vm_event reply allows it. &g

Re: [Xen-devel] [PATCH 1/2] x86/monitor: Introduce a boolean to suppress nested monitoring events

2018-10-23 Thread Razvan Cojocaru
On 10/23/18 6:08 PM, Andrew Cooper wrote: > On 23/10/18 15:54, Razvan Cojocaru wrote: >> On 10/23/18 5:35 PM, Andrew Cooper wrote: >>> diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/hvm/monitor.c >>> index 2a41ccc..f1a196f 100644 >>> --- a/xen/arch/x86/

Re: [Xen-devel] [PATCH v1] x86/hvm: Clean up may_defer from hvm_* helpers

2018-10-24 Thread Razvan Cojocaru
On 10/24/18 12:19 PM, Alexandru Stefan ISAILA wrote: > The may_defer var was left with the older bool_t type. This patch > changes the type to bool. > > Signed-off-by: Alexandru Isaila Acked-by: Razvan Cojocaru ___ Xen-devel mailing li

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-24 Thread Razvan Cojocaru
On 10/24/18 8:09 PM, Tamas K Lengyel wrote: > On Tue, Oct 23, 2018 at 6:37 AM Razvan Cojocaru > wrote: >> >> Tamas, could you please give this a spin? >> >> https://github.com/razvan-cojocaru/xen/tree/altp2m-logdirty-take2 >> >> It _should_ solve the

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-24 Thread Razvan Cojocaru
On 10/24/18 8:52 PM, Tamas K Lengyel wrote: > On Wed, Oct 24, 2018 at 11:31 AM Tamas K Lengyel > wrote: >> >> On Wed, Oct 24, 2018 at 11:20 AM Razvan Cojocaru >> wrote: >>> >>> On 10/24/18 8:09 PM, Tamas K Lengyel wrote: >>>> On Tu

Re: [Xen-devel] [PATCH v3] arch/x86: Add registers to vm_event

2018-10-25 Thread Razvan Cojocaru
On 10/25/18 4:10 PM, Alexandru Stefan ISAILA wrote: > On 25.10.2018 14:55, Jan Beulich wrote: > On 18.10.18 at 11:02, wrote: >>> +struct x86_selector_reg { >>> +union >>> +{ >>> +uint64_t bytes; >>> +struct >>> +{ >>> +uint32_t base; >>> +

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-25 Thread Razvan Cojocaru
On 10/24/18 8:52 PM, Tamas K Lengyel wrote: > On Wed, Oct 24, 2018 at 11:31 AM Tamas K Lengyel > wrote: >> >> On Wed, Oct 24, 2018 at 11:20 AM Razvan Cojocaru >> wrote: >>> >>> On 10/24/18 8:09 PM, Tamas K Lengyel wrote: >>>> On Tu

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-25 Thread Razvan Cojocaru
On 10/25/18 5:55 PM, Tamas K Lengyel wrote: > On Thu, Oct 25, 2018 at 8:24 AM Razvan Cojocaru > wrote: >> >> On 10/24/18 8:52 PM, Tamas K Lengyel wrote: >>> On Wed, Oct 24, 2018 at 11:31 AM Tamas K Lengyel >>> wrote: >>>> >>>>

Re: [Xen-devel] Fix VGA logdirty related display freezes with altp2m

2018-10-25 Thread Razvan Cojocaru
On 10/25/18 11:11 PM, Tamas K Lengyel wrote: > On Thu, Oct 25, 2018 at 9:08 AM Tamas K Lengyel > wrote: >> >> On Thu, Oct 25, 2018 at 9:02 AM Razvan Cojocaru >> wrote: >>> >>> On 10/25/18 5:55 PM, Tamas K Lengyel wrote: >>>> On Th

Re: [Xen-devel] [PATCH] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-01-29 Thread Razvan Cojocaru
On 01/26/2018 12:27 PM, Jan Beulich wrote: On 26.01.18 at 10:39, wrote: >> --- a/xen/arch/x86/hvm/hvm.c >> +++ b/xen/arch/x86/hvm/hvm.c >> @@ -2324,6 +2324,9 @@ int hvm_set_cr3(unsigned long value, bool_t may_defer) >> } >> } >> >> +if ( hvm_pcid_enabled(v) ) /* Clear the

Re: [Xen-devel] [PATCH] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-01-29 Thread Razvan Cojocaru
On 01/29/2018 02:58 PM, Jan Beulich wrote: On 29.01.18 at 13:44, wrote: >> On 01/26/2018 12:27 PM, Jan Beulich wrote: >> On 26.01.18 at 10:39, wrote: --- a/xen/arch/x86/hvm/hvm.c +++ b/xen/arch/x86/hvm/hvm.c @@ -2324,6 +2324,9 @@ int hvm_set_cr3(unsigned long value, bool_t

[Xen-devel] [PATCH] tests/xen-access: disable CR4 write events on application exit

2018-01-29 Thread Razvan Cojocaru
On exit, xen-access did not unsubscribe from CR4 write vm_events, potentially leaving the guest stuck. Signed-off-by: Razvan Cojocaru --- tools/tests/xen-access/xen-access.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen

Re: [Xen-devel] [PATCH] tests/xen-access: disable CR4 write events on application exit

2018-01-29 Thread Razvan Cojocaru
On 01/29/2018 07:58 PM, Tamas K Lengyel wrote: > On Mon, Jan 29, 2018 at 10:10 AM, Razvan Cojocaru > wrote: >> On exit, xen-access did not unsubscribe from CR4 write vm_events, >> potentially leaving the guest stuck. >> >> Signed-off-by: Razvan Cojocaru >>

[Xen-devel] [PATCH V2] tests/xen-access: disable CR4 write events on application exit

2018-01-29 Thread Razvan Cojocaru
On exit, xen-access did not unsubscribe from CR4 write vm_events, potentially leaving the guest stuck. Signed-off-by: Razvan Cojocaru --- Changes since V1: - Made all the ignored parameters of xc_monitor_write_ctrlreg() zeroes. --- tools/tests/xen-access/xen-access.c | 2 ++ 1 file changed, 2

[Xen-devel] [PATCH V2 1/2] tests/xen-access: disable CR4 write events on application exit

2018-01-30 Thread Razvan Cojocaru
On exit, xen-access did not unsubscribe from CR4 write vm_events, potentially leaving the guest stuck. Signed-off-by: Razvan Cojocaru --- tools/tests/xen-access/xen-access.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen

[Xen-devel] [PATCH V2 2/2] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-01-30 Thread Razvan Cojocaru
the noflush bit in hvm_set_cr3(). CR3 values in hvm_monitor_cr() are also sanitized. Additionally, a bool parameter now propagates to {svm,vmx}_update_guest_cr(), so that no flushes occur when the bit was set. Signed-off-by: Razvan Cojocaru Reported-by: Bitweasil Suggested-by: Andrew Cooper

Re: [Xen-devel] [PATCH V2 1/2] tests/xen-access: disable CR4 write events on application exit

2018-01-30 Thread Razvan Cojocaru
On 01/30/2018 11:16 AM, Razvan Cojocaru wrote: > On exit, xen-access did not unsubscribe from CR4 write vm_events, > potentially leaving the guest stuck. > > Signed-off-by: Razvan Cojocaru > --- > tools/tests/xen-access/xen-access.c | 2 ++ > 1 file changed, 2 insertions

Re: [Xen-devel] [PATCH V2] tests/xen-access: disable CR4 write events on application exit

2018-01-31 Thread Razvan Cojocaru
On 01/29/2018 11:48 PM, Razvan Cojocaru wrote: > On exit, xen-access did not unsubscribe from CR4 write vm_events, > potentially leaving the guest stuck. > > Signed-off-by: Razvan Cojocaru > > --- > Changes since V1: > - Made all the ignored parameters of xc_monito

[Xen-devel] [PATCH V3] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-02 Thread Razvan Cojocaru
the noflush bit in hvm_set_cr3(). CR3 values in hvm_monitor_cr() are also sanitized. Additionally, a bool parameter now propagates to {svm,vmx}_update_guest_cr(), so that no flushes occur when the bit was set. Signed-off-by: Razvan Cojocaru Reported-by: Bitweasil Suggested-by: Andrew Cooper

Re: [Xen-devel] [PATCH V3] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-07 Thread Razvan Cojocaru
On 02/07/2018 07:01 PM, Jan Beulich wrote: On 02.02.18 at 09:14, wrote: >> @@ -2313,6 +2314,12 @@ int hvm_set_cr3(unsigned long value, bool_t may_defer) >> } >> } >> >> +if ( hvm_pcid_enabled(v) ) /* Clear the noflush bit. */ >> +{ >> +noflush = !!(value & X86_

Re: [Xen-devel] [PATCH V3] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-08 Thread Razvan Cojocaru
On 02/07/2018 07:42 PM, Razvan Cojocaru wrote: > On 02/07/2018 07:01 PM, Jan Beulich wrote: >>> --- a/xen/include/asm-x86/hvm/hvm.h >>> +++ b/xen/include/asm-x86/hvm/hvm.h >>> @@ -34,6 +34,9 @@ extern bool_t opt_hvm_fep; >>> #define opt_hvm_fep 0 >>

[Xen-devel] [PATCH V4] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-09 Thread Razvan Cojocaru
the noflush bit in hvm_set_cr3(). CR3 values in hvm_monitor_cr() are also sanitized. Additionally, a bool parameter now propagates to {svm,vmx}_update_guest_cr(), so that no flushes occur when the bit was set. Signed-off-by: Razvan Cojocaru Reported-by: Bitweasil Suggested-by: Andrew Cooper

Re: [Xen-devel] [PATCH V4] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-14 Thread Razvan Cojocaru
On 02/14/2018 05:35 PM, Tamas K Lengyel wrote: > On Fri, Feb 9, 2018 at 4:01 AM, Razvan Cojocaru > wrote: >> The emulation layers of Xen lack PCID support, and as we only offer >> PCID to HAP guests, all writes to CR3 are handled by hardware, >> except when introspection i

Re: [Xen-devel] [PATCH v3 1/4] asm-x86/monitor: Fix monitor capability reporting on SVM systems

2018-02-14 Thread Razvan Cojocaru
s on AMD. >>> >>> Signed-off-by: Alexandru Isaila > > This patch still needs an ack from Tamas or Razvan, but there is no > comment so far that I can find. I think Tamas probably wouldn't object, so FWIW: Acked-by: Razvan Cojocaru Thanks, Razvan _

Re: [Xen-devel] [PATCH v4 0/4] hvm/svm: Enable vm events for SVM

2018-02-15 Thread Razvan Cojocaru
On 02/15/2018 02:36 PM, Andrew Cooper wrote: > One thing I note however is that patch 2 and 3 both turn on intercepts > and have no way of turning them back off.  This appears to be consistent > with the Intel side of things, but it is suboptimal for the guest when > an introspection agent detaches

Re: [Xen-devel] [PATCH V4] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-15 Thread Razvan Cojocaru
On 02/15/2018 06:50 PM, Jan Beulich wrote: On 09.02.18 at 12:01, wrote: >> @@ -563,13 +563,19 @@ void svm_update_guest_cr(struct vcpu *v, unsigned int >> cr) >> case 3: >> vmcb_set_cr3(vmcb, v->arch.hvm_vcpu.hw_cr[3]); >> if ( !nestedhvm_enabled(v->domain) ) >> -

Re: [Xen-devel] [PATCH] vmx/hap: optimize CR4 trapping

2018-02-15 Thread Razvan Cojocaru
ing is currently only applied to guests >> running with HAP on Intel hardware. If using shadow paging more CR4 >> bits need to be unconditionally trapped, which makes this approach >> unlikely to yield any important performance improvements. >> >> Reported-by: An

[Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-16 Thread Razvan Cojocaru
the noflush bit in hvm_set_cr3(). CR3 values in hvm_monitor_cr() are also sanitized. Additionally, a bool parameter now propagates to {svm,vmx}_update_guest_cr(), so that no flushes occur when the bit was set. Signed-off-by: Razvan Cojocaru Reported-by: Bitweasil Suggested-by: Andrew Cooper

Re: [Xen-devel] [PATCH] vmx/hap: optimize CR4 trapping

2018-02-16 Thread Razvan Cojocaru
On 02/16/2018 01:25 PM, Roger Pau Monné wrote: > On Thu, Feb 15, 2018 at 09:32:00PM +0200, Razvan Cojocaru wrote: >> On 02/15/2018 08:57 PM, Andrew Cooper wrote: >>> On 15/02/18 16:25, Roger Pau Monne wrote: >>>> There a bunch of bits in CR4 that should be allowed

Re: [Xen-devel] [PATCH] hvm/monitor: fix usage of the control register mask

2018-02-16 Thread Razvan Cojocaru
f-by: Roger Pau Monné > --- > Cc: Razvan Cojocaru > Cc: Tamas K Lengyel > Cc: Jan Beulich > Cc: Andrew Cooper > --- > xen/arch/x86/hvm/monitor.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/xen/arch/x86/hvm/monitor.c b/xen/arch/x86/

Re: [Xen-devel] [PATCH v2 2/2] vmx/hap: optimize CR4 trapping

2018-02-16 Thread Razvan Cojocaru
On 02/16/2018 02:10 PM, Roger Pau Monne wrote: > diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c > index f229e69948..4317658c56 100644 > --- a/xen/arch/x86/monitor.c > +++ b/xen/arch/x86/monitor.c > @@ -189,10 +189,11 @@ int arch_monitor_domctl_event(struct domain *d, > ad

Re: [Xen-devel] [PATCH v2 2/2] vmx/hap: optimize CR4 trapping

2018-02-16 Thread Razvan Cojocaru
On 02/16/2018 02:37 PM, Roger Pau Monné wrote: > On Fri, Feb 16, 2018 at 02:30:55PM +0200, Razvan Cojocaru wrote: >> On 02/16/2018 02:10 PM, Roger Pau Monne wrote: >>> diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c >>> index f229e69948..4317658c56 10

Re: [Xen-devel] [PATCH v2 2/2] vmx/hap: optimize CR4 trapping

2018-02-16 Thread Razvan Cojocaru
On 02/16/2018 02:39 PM, Razvan Cojocaru wrote: > On 02/16/2018 02:37 PM, Roger Pau Monné wrote: >> On Fri, Feb 16, 2018 at 02:30:55PM +0200, Razvan Cojocaru wrote: >>> On 02/16/2018 02:10 PM, Roger Pau Monne wrote: >>>> diff --git a/xen/arch/x86/monitor.c b/xen

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-19 Thread Razvan Cojocaru
; {svm,vmx}_update_guest_cr(), so that no flushes occur when >> the bit was set. >> >> Signed-off-by: Razvan Cojocaru >> Reported-by: Bitweasil >> Suggested-by: Andrew Cooper >> Acked-by: Tamas K Lengyel > > Reviewed-by: Jan Beuli

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-19 Thread Razvan Cojocaru
t in >>>> hvm_set_cr3(). CR3 values in hvm_monitor_cr() are also sanitized. >>>> Additionally, a bool parameter now propagates to >>>> {svm,vmx}_update_guest_cr(), so that no flushes occur when >>>> the bit was set. >>>> >>>> Signe

Re: [Xen-devel] [PATCH v1 1/2] asm-x86/monitor: Add MONITOR_EVENT_INTERRUPT to common capabilities

2018-02-19 Thread Razvan Cojocaru
t; (1U << > XEN_DOMCTL_MONITOR_EVENT_EMUL_UNIMPLEMENTED)); > > /* Since we know this is on VMX, we can just call the hvm func */ > 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 v1 2/2] hvm/svm: Implement CPUID events

2018-02-19 Thread Razvan Cojocaru
On 02/19/2018 05:25 PM, Tamas K Lengyel wrote: > On Mon, Feb 19, 2018 at 6:07 AM, Alexandru Isaila > wrote: >> At this moment the CPUID events for the AMD architecture are not >> forwarded to the monitor layer. >> >> This patch adds the CPUID event to the common capabilities and then >> forwards t

Re: [Xen-devel] [PATCH v4 16/16] xen: Convert page_to_mfn and mfn_to_page to use typesafe MFN

2018-02-21 Thread Razvan Cojocaru
given that > most of the callers are now switched to _mfn(domain_page_to_mfn(...)). > > Signed-off-by: Julien Grall Acked-by: Razvan Cojocaru Thanks, Razvan ___ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-22 Thread Razvan Cojocaru
On 02/23/2018 06:53 AM, Tian, Kevin wrote: >> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] >> Sent: Friday, February 16, 2018 6:22 PM >> >> The emulation layers of Xen lack PCID support, and as we only offer >> PCID to HAP guests, all writes to CR3 are

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-22 Thread Razvan Cojocaru
On 02/23/2018 09:29 AM, Razvan Cojocaru wrote: > Lacking PCID support in the emulation layer creates two different way of > handling the NOFLUSH being set: one is in hardware, and this happens for > everything except the introspection case, and one in the emulation layer > (this hap

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Razvan Cojocaru
On 02/24/2018 12:06 AM, Tamas K Lengyel wrote: > On Mon, Jan 8, 2018 at 5:49 AM, Alexandru Isaila > wrote: >> This patch is adding a way to enable/disable nested pagefault >> events. It introduces the xc_monitor_nested_pagefault function >> and adds the nested_pagefault_disabled in the monitor str

Re: [Xen-devel] [PATCH v2] x86/mm: Suppresses vm_events caused by page-walks

2018-02-23 Thread Razvan Cojocaru
On 02/24/2018 12:31 AM, Tamas K Lengyel wrote: > On Fri, Feb 23, 2018 at 3:25 PM, Razvan Cojocaru > wrote: >> On 02/24/2018 12:06 AM, Tamas K Lengyel wrote: >>> On Mon, Jan 8, 2018 at 5:49 AM, Alexandru Isaila >>> wrote: >>>> This patch is addin

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-27 Thread Razvan Cojocaru
On 02/27/2018 05:53 PM, George Dunlap wrote: > On 02/23/2018 07:29 AM, Razvan Cojocaru wrote: >> On 02/23/2018 06:53 AM, Tian, Kevin wrote: >>>> From: Razvan Cojocaru [mailto:rcojoc...@bitdefender.com] >>>> Sent: Friday, February 16, 2018 6:22 PM >>>&g

Re: [Xen-devel] [PATCH V5] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-27 Thread Razvan Cojocaru
On 02/27/2018 06:26 PM, George Dunlap wrote: >>> As an aside -- are you sure clearing the NOFLUSH from reported CR3 >>> values during introspection is the right thing to do? You don't think >>> your introspection engine will ever want to know if the guest OS is >>> setting this bit? >> >> We can't

[Xen-devel] [PATCH V6] x86/hvm: fix domain crash when CR3 has the noflush bit set

2018-02-28 Thread Razvan Cojocaru
to be used on VMs whose operating system uses the NOFLUSH bit. Signed-off-by: Razvan Cojocaru Reported-by: Bitweasil Suggested-by: Andrew Cooper Acked-by: Tamas K Lengyel Reviewed-by: Jan Beulich Reviewed-by: Kevin Tian Acked-by: George Dunlap --- Changes since V5: - Updated the comm

Re: [Xen-devel] [PATCH v3] x86/mm: Suppresses vm_events caused by page-walks

2018-03-01 Thread Razvan Cojocaru
On 02/28/2018 03:56 PM, Jan Beulich wrote: On 28.02.18 at 14:41, wrote: > On 28.02.18 at 14:25, wrote: >>> --- a/xen/arch/x86/mm/mem_access.c >>> +++ b/xen/arch/x86/mm/mem_access.c >>> @@ -137,6 +137,23 @@ bool p2m_mem_access_emulate_check(struct vcpu *v, >>> return violation; >>>

Re: [Xen-devel] [PATCH v3] x86/mm: Suppresses vm_events caused by page-walks

2018-03-01 Thread Razvan Cojocaru
On 03/01/2018 12:09 PM, Jan Beulich wrote: On 01.03.18 at 11:00, wrote: >> On 02/28/2018 03:56 PM, Jan Beulich wrote: >> On 28.02.18 at 14:41, wrote: >>> On 28.02.18 at 14:25, wrote: > --- a/xen/arch/x86/mm/mem_access.c > +++ b/xen/arch/x86/mm/mem_access.c > @@ -137,6

Re: [Xen-devel] [PATCH v4 00/20] x86: emulator enhancements

2018-03-02 Thread Razvan Cojocaru
On 02/28/2018 02:50 PM, Jan Beulich wrote: > 01: extend vbroadcasts{s,d} to AVX2 > 02: support most remaining AVX2 insns > 03: support AVX2 gather insns > 04: support XOP insns > 05: support 3DNow! insns > 06: place test blobs in executable section > 07: move and rename XSTATE_* > 08: abstract out

Re: [Xen-devel] [PATCH V3] x86/altp2m: clean up p2m_{get/set}_suppress_ve()

2018-10-26 Thread Razvan Cojocaru
SSERT()), >> move the VMX-isms (cpu_has_vmx_virt_exceptions checks) to >> p2m_ept_{get/set}_entry(), and fix locking code in >> p2m_get_suppress_ve(). >> >> Signed-off-by: Razvan Cojocaru >> >> --- >> Changes since V2: >> - Rebased

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

2018-10-26 Thread Razvan Cojocaru
On 10/26/18 5:47 PM, Jan Beulich wrote: On 23.10.18 at 15:19, wrote: >> xen/arch/x86/mm/p2m-ept.c | 8 + >> xen/arch/x86/mm/p2m.c | 83 >> +++ >> 2 files changed, 78 insertions(+), 13 deletions(-) > > What about p2m-pt.c? Thank you for

Re: [Xen-devel] [PATCH V2 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-10-26 Thread Razvan Cojocaru
On 10/26/18 5:54 PM, Jan Beulich wrote: On 23.10.18 at 15:19, wrote: >> --- a/xen/arch/x86/mm/p2m-ept.c >> +++ b/xen/arch/x86/mm/p2m-ept.c >> @@ -1348,6 +1348,8 @@ int ept_p2m_init(struct p2m_domain *p2m) >> void ept_p2m_uninit(struct p2m_domain *p2m) >> { >> struct ept_data *ept = &p2

[Xen-devel] [PATCH V3 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-10-29 Thread Razvan Cojocaru
This patch is a pre-requisite for the one fixing VGA logdirty freezes when using altp2m. It only concerns itself with the ranges allocation / deallocation / initialization part. While touching the code, I've switched global_logdirty from bool_t to bool. Signed-off-by: Razvan Cojocaru -

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

2018-10-29 Thread Razvan Cojocaru
p2m_change_entry_type_global(), p2m_memory_type_changed and p2m_change_type_range() to propagate their changes to all valid altp2ms. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu --- Changes

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

2018-10-29 Thread Razvan Cojocaru
Hello, 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). Since the last version of the series, what was previously the second (and last) patch has been split in two patches, the first of which o

[Xen-devel] [PATCH V3 1/3] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-10-29 Thread Razvan Cojocaru
tp2ms will inherit the hostp2m's ept.ad value. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu --- xen/arch/x86/mm/p2m-ept.c | 57 +++

Re: [Xen-devel] [PATCH v5] arch/x86: Add registers to vm_event

2018-10-30 Thread Razvan Cojocaru
On 10/30/18 1:33 PM, Jan Beulich wrote: On 30.10.18 at 11:07, wrote: >> --- a/xen/include/public/vm_event.h >> +++ b/xen/include/public/vm_event.h >> @@ -29,7 +29,7 @@ >> >> #include "xen.h" >> >> -#define VM_EVENT_INTERFACE_VERSION 0x0003 >> +#define VM_EVENT_INTERFACE_VERSION 0x000

Re: [Xen-devel] [PATCH V3 1/3] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-10-30 Thread Razvan Cojocaru
review. >> The new ept_set_ad_sync() function has been added to update all >> active altp2ms' ept.ad. New altp2ms will inherit the hostp2m's >> ept.ad value. >> >> Signed-off-by: Razvan Cojocaru >> Suggested-by: George Dunlap > > I'm okay

Re: [Xen-devel] [PATCH V3 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-10-30 Thread Razvan Cojocaru
On 10/30/18 6:22 PM, Jan Beulich wrote: On 29.10.18 at 13:40, wrote: >> This patch is a pre-requisite for the one fixing VGA logdirty >> freezes when using altp2m. It only concerns itself with the >> ranges allocation / deallocation / initialization part. > > But while looking (briefly only

Re: [Xen-devel] [PATCH V3 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-10-30 Thread Razvan Cojocaru
On 10/30/18 6:28 PM, Andrew Cooper wrote: > On 30/10/18 16:22, Jan Beulich wrote: > On 29.10.18 at 13:40, wrote: >>> This patch is a pre-requisite for the one fixing VGA logdirty >>> freezes when using altp2m. It only concerns itself with the >>> ranges allocation / deallocation / initializati

Re: [Xen-devel] [PATCH V3 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-10-30 Thread Razvan Cojocaru
On 10/30/18 6:54 PM, Andrew Cooper wrote: > On 30/10/18 16:51, Razvan Cojocaru wrote: >> On 10/30/18 6:28 PM, Andrew Cooper wrote: >>> On 30/10/18 16:22, Jan Beulich wrote: >>>>>>> On 29.10.18 at 13:40, wrote: >>>>> This patch is a pre-requis

Re: [Xen-devel] [PATCH V6] x86/altp2m: Add a subop for obtaining the mem access of a page

2018-10-31 Thread Razvan Cojocaru
On 10/31/18 6:39 PM, Wei Liu wrote: > On Thu, Sep 27, 2018 at 10:58:54AM +0300, Razvan Cojocaru wrote: >> Currently there is a subop for setting the memaccess of a page, but not >> for consulting it. The new HVMOP_altp2m_get_mem_access adds this >> functionality. >>

Re: [Xen-devel] [PATCH v1] x86/hvm: Clean up may_defer from hvm_* helpers

2018-11-01 Thread Razvan Cojocaru
On 10/30/18 8:19 AM, Tian, Kevin wrote: >> From: Alexandru Stefan ISAILA [mailto:aisa...@bitdefender.com] >> Sent: Wednesday, October 24, 2018 5:19 PM >> >> The may_defer var was left with the older bool_t type. This patch >> changes the type to bool. >> >> Signed-off-by: Alexandru Isaila > > Rev

Re: [Xen-devel] [PATCH v1] x86/hvm: Clean up may_defer from hvm_* helpers

2018-11-01 Thread Razvan Cojocaru
On 11/1/18 3:58 PM, Jan Beulich wrote: >>>> Razvan Cojocaru 11/01/18 11:31 AM >>> >> On 10/30/18 8:19 AM, Tian, Kevin wrote: >>>> From: Alexandru Stefan ISAILA [mailto:aisa...@bitdefender.com] >>>> Sent: Wednesday, October 24, 2018 5:19 PM

[Xen-devel] [PATCH V4 1/3] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-11-01 Thread Razvan Cojocaru
en,dis}able_pml()). Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap Tested-by: Tamas K Lengyel --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu --- Changes since V3: - Expanded the comment to bring attention to the altered lo

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

2018-11-01 Thread Razvan Cojocaru
Hello, 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). Since the last version of the series, what was previously the second (and last) patch has been split in two patches, the first of which o

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

2018-11-01 Thread Razvan Cojocaru
p2m_change_entry_type_global(), p2m_memory_type_changed and p2m_change_type_range() to propagate their changes to all valid altp2ms. Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap --- CC: Jun Nakajima CC: Kevin Tian CC: George Dunlap CC: Jan Beulich CC: Andrew Cooper CC: Wei Liu --- Changes

[Xen-devel] [PATCH V4 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-11-01 Thread Razvan Cojocaru
This patch is a pre-requisite for the one fixing VGA logdirty freezes when using altp2m. It only concerns itself with the ranges allocation / deallocation / initialization part. While touching the code, I've switched global_logdirty from bool_t to bool. Signed-off-by: Razvan Cojocaru -

Re: [Xen-devel] [PATCH v2] x86/hvm: Clean up the rest of bool_t from vm_event

2018-11-05 Thread Razvan Cojocaru
On 11/5/18 6:17 PM, George Dunlap wrote: > On 10/29/2018 03:53 PM, Alexandru Stefan ISAILA wrote: >> Signed-off-by: Alexandru Isaila >> Acked-by: Tamas K Lengyel >> Acked-by: Jan Beulich >> >> --- >> Changes since V1: >> - Made style corrections suggested by Jan. >> --- >> xen/arch/x86/hvm

Re: [Xen-devel] [PATCH v8] arch/x86: Add registers to vm_event

2018-11-08 Thread Razvan Cojocaru
On 11/6/18 7:16 PM, Tamas K Lengyel wrote: > On Mon, Nov 5, 2018 at 2:54 AM Alexandru Stefan ISAILA > wrote: >> >> This patch adds a couple of regs to the vm_event that are used by >> the introspection. The base, limit and ar >> bits are compressed into a uint64_t union so as not to enlarge the >>

Re: [Xen-devel] [PATCH v8] arch/x86: Add registers to vm_event

2018-11-08 Thread Razvan Cojocaru
On 11/8/18 5:53 PM, Wei Liu wrote: > On Thu, Nov 08, 2018 at 05:19:48PM +0200, Razvan Cojocaru wrote: >> On 11/6/18 7:16 PM, Tamas K Lengyel wrote: >>> On Mon, Nov 5, 2018 at 2:54 AM Alexandru Stefan ISAILA >>> wrote: >>>> >>>> This patch add

Re: [Xen-devel] [PATCH V4 1/3] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-11-08 Thread Razvan Cojocaru
On 11/8/18 6:56 PM, George Dunlap wrote: > On 11/01/2018 02:45 PM, Razvan Cojocaru wrote: >> This patch is a pre-requisite for fixing the logdirty VGA issue >> (display freezes when switching to a new altp2m view early in a >> domain's lifetime), but sent separately for

Re: [Xen-devel] [PATCH v8] arch/x86: Add registers to vm_event

2018-11-08 Thread Razvan Cojocaru
On 11/8/18 7:22 PM, Wei Liu wrote: > On Thu, Nov 08, 2018 at 05:56:07PM +0200, Razvan Cojocaru wrote: >> On 11/8/18 5:53 PM, Wei Liu wrote: >>> On Thu, Nov 08, 2018 at 05:19:48PM +0200, Razvan Cojocaru wrote: >>>> On 11/6/18 7:16 PM, Tamas K Lengyel wrote: >&g

Re: [Xen-devel] [PATCH v8] arch/x86: Add registers to vm_event

2018-11-08 Thread Razvan Cojocaru
On 11/8/18 8:02 PM, Wei Liu wrote: > Speaking of build breakage: would you guys consider signing up to gitlab > so that you can use all the build test infrastructure there before > submission? It would probably say you from building local for different > distros and configs. > > See https://gitlab

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

2018-11-08 Thread Razvan Cojocaru
On 11/8/18 8:14 PM, George Dunlap wrote: > On 11/01/2018 02:45 PM, Razvan Cojocaru wrote: >> When an new altp2m view is created very early on guest boot, the >> display will freeze (although the guest will run normally). This >> may also happen on resizing the display. The rea

Re: [Xen-devel] [PATCH v8] arch/x86: Add registers to vm_event

2018-11-08 Thread Razvan Cojocaru
On 11/8/18 8:27 PM, Wei Liu wrote: > On Thu, Nov 08, 2018 at 08:22:06PM +0200, Razvan Cojocaru wrote: >> On 11/8/18 8:02 PM, Wei Liu wrote: >>> Speaking of build breakage: would you guys consider signing up to gitlab >>> so that you can use all the build test

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

2018-11-09 Thread Razvan Cojocaru
On 11/9/18 12:34 PM, Jan Beulich wrote: On 08.11.18 at 19:37, wrote: >> On the first patch of the series: can it go in independently, since Jan >> is OK with it and it just got your ack? Or should I just add the ack and >> carry it over to the next version of the series? > > Well, I would ha

Re: [Xen-devel] [PATCH V4 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-11-09 Thread Razvan Cojocaru
On 11/9/18 2:29 PM, George Dunlap wrote: > On 11/1/18 2:45 PM, Razvan Cojocaru wrote: >> This patch is a pre-requisite for the one fixing VGA logdirty >> freezes when using altp2m. It only concerns itself with the >> ranges allocation / deallocation / initialization part.

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

2018-11-09 Thread Razvan Cojocaru
On 11/8/18 8:14 PM, George Dunlap wrote: > On 11/01/2018 02:45 PM, Razvan Cojocaru wrote: > ...here and... > >> + >> int p2m_set_ioreq_server(struct domain *d, >> unsigned int flags, >> struct hvm_ioreq_server

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

2018-11-09 Thread Razvan Cojocaru
On 11/9/18 4:19 PM, Razvan Cojocaru wrote: > (XEN) Xen call trace: > (XEN)[] vcpu_sleep_sync+0x40/0x71 > (XEN)[] domain.c#do_domain_pause+0x33/0x4f > (XEN)[] domain_pause+0x25/0x27 > (XEN)[] hap_track_dirty_vram+0x2b3/0x491 > (XEN)[] dm.c#dm_op+

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

2018-11-09 Thread Razvan Cojocaru
On 11/9/18 4:19 PM, Razvan Cojocaru wrote: > On 11/8/18 8:14 PM, George Dunlap wrote: >> On 11/01/2018 02:45 PM, Razvan Cojocaru wrote: >> ...here and... >> >>> + >>> int p2m_set_ioreq_server(struct domain *d, >>> unsigned

[Xen-devel] [PATCH V5 1/3] x86/altp2m: propagate ept.ad changes to all active altp2ms

2018-11-11 Thread Razvan Cojocaru
en,dis}able_pml()). Signed-off-by: Razvan Cojocaru Suggested-by: George Dunlap 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 --- Changes since V4: - Added George's ack. --- xen/a

[Xen-devel] [PATCH V5 2/3] x86/mm: allocate logdirty_ranges for altp2ms

2018-11-11 Thread Razvan Cojocaru
This patch is a pre-requisite for the one fixing VGA logdirty freezes when using altp2m. It only concerns itself with the ranges allocation / deallocation / initialization part. While touching the code, I've switched global_logdirty from bool_t to bool. Signed-off-by: Razvan Cojocaru -

<    1   2   3   4   5   6   >