Re: [Xen-devel] Issues with the xen-access.c model

2016-04-05 Thread Tamas K Lengyel
On Tue, Apr 5, 2016 at 6:13 AM, Andrew Cooper wrote: > On 05/04/16 11:55, Razvan Cojocaru wrote: > > Hello, > > > > xen-access.c does roughly this: > > > > for (;;) { > > poll_evt_channel(); > > > > if (new_events) { > > while (ring_buffer_has_requests) { > >

[Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-11 Thread Tamas K Lengyel
From: Tamas K Lengyel The ARM SMC instructions are already configured to trap to Xen by default. In this patch we allow a user-space process in a privileged domain to receive notification of when such event happens through the vm_event subsystem. This patch will likely needs to be broken up

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-12 Thread Tamas K Lengyel
On Apr 12, 2016 01:51, "Corneliu ZUZU" wrote: > > On 4/11/2016 10:47 PM, Tamas K Lengyel wrote: >> >> From: Tamas K Lengyel >> >> The ARM SMC instructions are already configured to trap to Xen by default. In >> this patch we allow a user-s

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-12 Thread Tamas K Lengyel
On Apr 11, 2016 22:31, "Jan Beulich" wrote: > > >>> Tamas K Lengyel 04/11/16 9:47 PM >>> > >--- a/xen/include/public/vm_event.h > >+++ b/xen/include/public/vm_event.h > >@@ -166,6 +166,31 @@ struct vm_event_regs_x86 { > &

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-12 Thread Tamas K Lengyel
On Apr 12, 2016 08:58, "Konrad Rzeszutek Wilk" wrote: > > On Mon, Apr 11, 2016 at 01:47:22PM -0600, Tamas K Lengyel wrote: > > From: Tamas K Lengyel > > > > The ARM SMC instructions are already configured to trap to Xen by default. In > > this patch we al

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-12 Thread Tamas K Lengyel
> >> @@ -254,6 +279,7 @@ typedef struct vm_event_st { > > >union { > > >union { > > >struct vm_event_regs_x86 x86; > >> +struct vm_event_regs_arm arm; > > >} regs; > > > > Does this alter the x86 ABI? Perhaps the ARM structure is small enough

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-12 Thread Tamas K Lengyel
On Tue, Apr 12, 2016 at 11:05 AM, Corneliu ZUZU wrote: > On 4/12/2016 7:24 PM, Julien Grall wrote: > >> Hello, >> >> On 12/04/2016 16:01, Tamas K Lengyel wrote: >> >>> >>> On Apr 12, 2016 01:51, "Corneliu ZUZU" >> <mailto:cz...@

Re: [Xen-devel] [PATCH] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-12 Thread Tamas K Lengyel
> > diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c > index 1fec412..1be058a 100644 > --- a/xen/arch/x86/monitor.c > +++ b/xen/arch/x86/monitor.c > @@ -20,6 +20,7 @@ > */ > > #include > +#include > #include > > int arch_monitor_domctl_event(struct domain *d, > @@ -77,25 +78,25

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-12 Thread Tamas K Lengyel
Yes, I have been shuffling this struct around and didn't check the >> layout. Will fix. I'll also try to make this struct usable for aarch64 >> too. >> > > You may want to give a look to vcpu_guest_core_regs in public/arch-arm.h > Thanks, so the easiest way to be compatible with both it seems is t

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-13 Thread Tamas K Lengyel
On Apr 13, 2016 6:06 AM, "Andrew Cooper" wrote: > > On 13/04/16 11:53, Corneliu ZUZU wrote: >> >> On 4/13/2016 1:17 PM, Andrew Cooper wrote: >>> >>> On 13/04/16 09:55, Corneliu ZUZU wrote: >>> I would have to double check but AFAIK those instructions can't be >

Re: [Xen-devel] [PATCH V2] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-13 Thread Tamas K Lengyel
> diff --git a/xen/arch/x86/monitor.c b/xen/arch/x86/monitor.c > index 1fec412..4c96968 100644 > --- a/xen/arch/x86/monitor.c > +++ b/xen/arch/x86/monitor.c > @@ -22,6 +22,58 @@ > #include > #include > > +static int arch_monitor_enable_msr(struct domain *d, u32 msr) > IMHO there is no need to

Re: [Xen-devel] [PATCH V2] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-13 Thread Tamas K Lengyel
> >> diff --git a/xen/include/public/domctl.h b/xen/include/public/domctl.h > >> index 2457698..875c09a 100644 > >> --- a/xen/include/public/domctl.h > >> +++ b/xen/include/public/domctl.h > >> @@ -1107,8 +1107,7 @@ struct xen_domctl_monitor_op { > >> } mov_to_cr; > >> > >> struct

Re: [Xen-devel] [PATCH V2] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-13 Thread Tamas K Lengyel
On Wed, Apr 13, 2016 at 9:01 AM, Andrew Cooper wrote: > On 13/04/16 15:56, Razvan Cojocaru wrote: > > On 04/13/2016 05:52 PM, Tamas K Lengyel wrote: > >> >> diff --git a/xen/include/public/domctl.h > >> b/xen/include/public/domctl.h > >

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-13 Thread Tamas K Lengyel
On Wed, Apr 13, 2016 at 9:06 AM, Lars Kurth wrote: > > On 13 Apr 2016, at 14:25, Tamas K Lengyel > wrote: > > In the DRAKVUF system that's exactly what I do, I mark the page execute > only so that the guest is unable to locate/overwrite injected breakpoints > wit

Re: [Xen-devel] [PATCH] vm_event: Implement ARM SMC events

2016-04-13 Thread Tamas K Lengyel
> > > >>> I would have to double check but AFAIK those instructions can't be configured to trap to the hypervisor directly. So while SMC was not intended to be a breakpoint, conceptually it's the closest thing we have an on ARM to the INT3 instruction when configured to trap to

Re: [Xen-devel] [for-4.7 2/2] xen/arm: traps: Correctly interpret the content of the register HPFAR_EL2

2016-04-13 Thread Tamas K Lengyel
On Wed, Apr 13, 2016 at 9:55 AM, Julien Grall wrote: > The register HPFAR_EL2 (resp. HPFAR on arm32) contains the bits [47:12] > (resp. [39:12]) of the faulting IPA. Unlike other registers that represent > an address, the upper bits of the IPA are stored in the register bits > [4:39] (resp. [4:21

Re: [Xen-devel] [PATCH V2] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-14 Thread Tamas K Lengyel
On Thu, Apr 14, 2016 at 9:20 AM, Jan Beulich wrote: > >>> Razvan Cojocaru 04/14/16 11:37 AM >>> > >On 04/13/2016 06:05 PM, Tamas K Lengyel wrote: > >> > >> Yea, well then we need to introduce a new struct with a new subop to > >> pass th

[Xen-devel] [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities

2016-04-14 Thread Tamas K Lengyel
The monitor_get_capabilities check actually belongs to the monitor subsystem so relocating and renaming it to sanitize the code's name and location. Signed-off-by: Tamas K Lengyel Cc: Razvan Cojocaru Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Cc: Stefano Stabellini Cc: Julien

Re: [Xen-devel] [PATCH] monitor: Rename vm_event_monitor_get_capabilities to arch_monitor_get_capabilities

2016-04-14 Thread Tamas K Lengyel
On Thu, Apr 14, 2016 at 10:36 AM, Andrew Cooper wrote: > On 14/04/16 17:33, Tamas K Lengyel wrote: > > The monitor_get_capabilities check actually belongs to the monitor > subsystem so > > relocating and renaming it to sanitize the code's name and location. > > >

Re: [Xen-devel] domain crashed when using VMFUNC

2016-04-15 Thread Tamas K Lengyel
On Apr 15, 2016 07:46, "liuweijie" wrote: > > Dear list, > > When I use VMFUNC instructions on a Xen HVM, domain crashes sometimes. > > My serial console shows like this: > > domain_crash called from p2m.c:2204 > Domain 1 (vcpu#0) crashed on cpu#7 > …… > > My testbed runs on Xen-4.6.0, and my CPU

Re: [Xen-devel] [PATCH V3] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-15 Thread Tamas K Lengyel
On Fri, Apr 15, 2016 at 3:02 AM, Razvan Cojocaru wrote: > Previously, subscribing to MSR write events was an all-or-none > approach, with special cases for introspection MSR-s. This patch > allows the vm_event consumer to specify exactly what MSR-s it is > interested in, and as a side-effect gets

Re: [Xen-devel] [PATCH V3] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-15 Thread Tamas K Lengyel
On Fri, Apr 15, 2016 at 11:18 AM, Andrew Cooper wrote: > On 15/04/16 18:12, Tamas K Lengyel wrote: > > > > On Fri, Apr 15, 2016 at 3:02 AM, Razvan Cojocaru < > rcojoc...@bitdefender.com> wrote: > >> Previously, subscribing to MSR write events was an all-or-non

Re: [Xen-devel] [PATCH V3] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-15 Thread Tamas K Lengyel
On Fri, Apr 15, 2016 at 11:19 AM, Razvan Cojocaru wrote: > On 04/15/16 20:12, Tamas K Lengyel wrote: > > > > > > On Fri, Apr 15, 2016 at 3:02 AM, Razvan Cojocaru > > mailto:rcojoc...@bitdefender.com>> wrote: > > > > Previously, subsc

Re: [Xen-devel] [PATCH V4] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-17 Thread Tamas K Lengyel
side-effect gets rid of the > vmx_introspection_force_enabled_msrs[] special case. > This replaces the previously posted "xen: Filter out MSR write > events" patch. > > Signed-off-by: Razvan Cojocaru > Acked-by: Wei Liu > Acked-by: Tamas K Lengyel __

Re: [Xen-devel] Xen Memory de-duplication

2016-04-20 Thread Tamas K Lengyel
On Wed, Apr 20, 2016 at 7:24 AM, Wei Liu wrote: > On Tue, Apr 19, 2016 at 07:07:01AM -0400, Maryam Masoudian wrote: > > Thanks. > > One more thing, is it possible to see the percentage of shared memory > among > > VMs by xl tool? > > As there is a xl sharing and I want to know whether this provid

Re: [Xen-devel] Xen Memory de-duplication

2016-04-20 Thread Tamas K Lengyel
On Apr 20, 2016 12:34, "Dario Faggioli" wrote: > > On Wed, 2016-04-20 at 10:25 -0600, Tamas K Lengyel wrote: > > > > > > On Wed, Apr 20, 2016 at 7:24 AM, Wei Liu wrote: > > > On Tue, Apr 19, 2016 at 07:07:01AM -0400, Maryam Masoudian wrote: > > &

[Xen-devel] [PATCH] xenaccess: minor fixes and extra printouts

2016-04-20 Thread Tamas K Lengyel
Without specifying the altp2m flag on the response the view never got switched. Also, add extra information printouts that can be useful during debugging. Signed-off-by: Tamas K Lengyel --- Cc: Razvan Cojocaru Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xen-access/xen-access.c | 10

Re: [Xen-devel] Xen Memory de-duplication

2016-04-21 Thread Tamas K Lengyel
On Thu, Apr 21, 2016 at 9:13 AM, Maryam Masoudian wrote: > > > On Thu, Apr 21, 2016 at 5:17 PM, Dario Faggioli > wrote: > >> On Wed, 2016-04-20 at 13:01 -0600, Tamas K Lengyel wrote: >> > On Apr 20, 2016 12:34, "Dario Faggioli" >> > wrote:

[Xen-devel] [PATCH] altp2m: Allow the hostp2m to be shared

2016-04-21 Thread Tamas K Lengyel
Don't propagate altp2m changes from ept_set_entry for memshare as memshare already has the lock. We call altp2m propagate changes once memshare successfully finishes. Also, allow the hostp2m entries to be of type p2m_ram_shared. Signed-off-by: Tamas K Lengyel --- Cc: George Dunlap Cc:

Re: [Xen-devel] [PATCH V4] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-22 Thread Tamas K Lengyel
> > > >> diff --git a/xen/arch/x86/vm_event.c b/xen/arch/x86/vm_event.c > >> index 5635603..22819c5 100644 > >> --- a/xen/arch/x86/vm_event.c > >> +++ b/xen/arch/x86/vm_event.c > >> @@ -20,6 +20,7 @@ > >> > >> #include > >> #include > >> +#include > >> #include > >> > >> /* Implicitly seria

Re: [Xen-devel] [PATCH V5] vm_event: Allow subscribing to write events for specific MSR-s

2016-04-26 Thread Tamas K Lengyel
> > @@ -55,6 +61,9 @@ void vm_event_cleanup_domain(struct domain *d) > > v->arch.vm_event = NULL; > > } > > > > +xfree(d->arch.monitor_msr_bitmap); > > +d->arch.monitor_msr_bitmap = NULL; > > + > > d->arch.mem_access_emulate_each_rep = 0; > > memset(&d->arch.monitor,

Re: [Xen-devel] [PATCH] altp2m: Allow the hostp2m to be shared

2016-04-27 Thread Tamas K Lengyel
On Wed, Apr 27, 2016 at 9:01 AM, George Dunlap wrote: > On 21/04/16 18:10, Tamas K Lengyel wrote: > > Don't propagate altp2m changes from ept_set_entry for memshare as > memshare > > already has the lock. We call altp2m propagate changes once memshare > > successfu

Re: [Xen-devel] [PATCH] altp2m: Allow the hostp2m to be shared

2016-04-27 Thread Tamas K Lengyel
On Wed, Apr 27, 2016 at 9:31 AM, George Dunlap wrote: > On 27/04/16 16:18, Tamas K Lengyel wrote: > > On Wed, Apr 27, 2016 at 9:01 AM, George Dunlap > > > wrote: > > > >> On 21/04/16 18:10, Tamas K Lengyel wrote: > >>> Don't propagate

[Xen-devel] [PATCH v2] altp2m: Allow the hostp2m to be shared

2016-04-27 Thread Tamas K Lengyel
tting altp2m mem_access to be in-line with non-altp2m mem_access path. Signed-off-by: Tamas K Lengyel --- Cc: George Dunlap Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Cc: Jun Nakajima Cc: Kevin Tian v2: Cosmetic fixes and addressing PoD in the commit message --- xen/arch/x

[Xen-devel] [PATCH] x86/hvm: Add debug exception vm_events

2016-04-27 Thread Tamas K Lengyel
introduce the necessary monitor_op domctl's to enable subscribing to the events. Signed-off-by: Tamas K Lengyel --- Cc: Razvan Cojocaru Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Cc: Jun Nakajima Cc: Kevin Tian --- tools/libxc/include/xenctrl.h | 3 +- tools/libxc/xc_moni

Re: [Xen-devel] [PATCH v2] altp2m: Allow the hostp2m to be shared

2016-04-28 Thread Tamas K Lengyel
On Thu, Apr 28, 2016 at 4:36 AM, George Dunlap wrote: > On 27/04/16 16:48, Tamas K Lengyel wrote: > > Don't propagate altp2m changes from ept_set_entry for memshare as > memshare > > already has the lock. We call altp2m propagate changes once memshare > > successfull

Re: [Xen-devel] how to set up a #VE

2016-04-28 Thread Tamas K Lengyel
On Thu, Apr 28, 2016 at 8:36 AM, Big Strong wrote: > I want to set up an EPT page so as to trigger the #VE for testing purpose. > However, some problems are met. > > As the Intel Manual said, there are many conditions to trigger a #VE: > > a) If an access to a guest-physical address causes a

Re: [Xen-devel] [PATCH] x86/hvm: Add debug exception vm_events

2016-04-28 Thread Tamas K Lengyel
On Wed, Apr 27, 2016 at 11:57 PM, Razvan Cojocaru wrote: > On 04/27/16 23:33, Tamas K Lengyel wrote: > > Since in-guest debug exceptions are now unconditionally trapped to Xen, > adding > > a hook for vm_event subscribers to tap into this new always-on guest > event. We >

Re: [Xen-devel] [PATCH] x86/hvm: Add debug exception vm_events

2016-04-28 Thread Tamas K Lengyel
On Thu, Apr 28, 2016 at 8:29 PM, Tian, Kevin wrote: > > From: Tamas K Lengyel [mailto:ta...@tklengyel.com] > > Sent: Thursday, April 28, 2016 4:33 AM > > > > Since in-guest debug exceptions are now unconditionally trapped to Xen, > adding > > a hook for vm_event

[Xen-devel] [PATCH v3] altp2m: Allow the hostp2m to be shared

2016-04-29 Thread Tamas K Lengyel
tting altp2m mem_access to be in-line with non-altp2m mem_access path. Signed-off-by: Tamas K Lengyel --- Cc: George Dunlap Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Cc: Jun Nakajima Cc: Kevin Tian v3: Add comment to the unshare routine pointing out where altp2m gets updated v2: Cos

[Xen-devel] [PATCH v2 5/5] MAINTAINERS: Update monitor/vm_event covered code

2016-04-29 Thread Tamas K Lengyel
Add headers to the covered list. Signed-off-by: Tamas K Lengyel --- Cc: Razvan Cojocaru Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Jan Beulich Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- MAINTAINERS | 5 - 1 file changed, 4

[Xen-devel] [PATCH v2 4/5] x86/hvm: Add debug exception vm_events

2016-04-29 Thread Tamas K Lengyel
introduce the necessary monitor_op domctl's to enable subscribing to the events. Signed-off-by: Tamas K Lengyel --- Cc: Razvan Cojocaru Cc: Keir Fraser Cc: Jan Beulich Cc: Andrew Cooper Cc: Jun Nakajima Cc: Kevin Tian v2: Rename hvm_monitor_event to hvm_monitor_debug --- tools/libxc/in

[Xen-devel] [PATCH v2 1/5] monitor: Rename vm_event_monitor_get_capabilities

2016-04-29 Thread Tamas K Lengyel
The monitor_get_capabilities check actually belongs to the monitor subsystem so relocating and renaming it to sanitize the code's name and location. Mechanical patch, no code changes introduced. Signed-off-by: Tamas K Lengyel Acked-by: Andrew Cooper Acked-by: Razvan Cojocaru --- Cc: R

[Xen-devel] [PATCH v2 3/5] x86/hvm: Rename hvm/event to hvm/monitor

2016-04-29 Thread Tamas K Lengyel
Mechanical renaming to better describe that the code in hvm/event is part of the monitor subsystem. Signed-off-by: Tamas K Lengyel --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Razvan Cojocaru Cc: Jun Nakajima Cc: Kevin Tian --- MAINTAINERS| 1 - xen/arch

[Xen-devel] [PATCH v2 2/5] vm_event: Implement ARM SMC events

2016-04-29 Thread Tamas K Lengyel
The ARM SMC instructions are already configured to trap to Xen by default. In this patch we allow a user-space process in a privileged domain to receive notification of when such event happens through the vm_event subsystem by introducing the PRIVILEGED_CALL type. Signed-off-by: Tamas K Lengyel

Re: [Xen-devel] how to set up a #VE

2016-04-29 Thread Tamas K Lengyel
On Thu, Apr 28, 2016 at 10:27 PM, Big Strong wrote: > You can always just add a new page to the domain to be used for #VE. > > It's there a method to directly assign physical pages to guest from dom0? > Using xc_map_foreign_address just like libvmi? > Please don't top-post on xen-devel. You cou

Re: [Xen-devel] [PATCH v2 2/5] vm_event: Implement ARM SMC events

2016-04-29 Thread Tamas K Lengyel
> @@ -2491,6 +2492,21 @@ bad_data_abort: > > inject_dabt_exception(regs, info.gva, hsr.len); > > } > > > > +static void do_trap_smc(struct cpu_user_regs *regs, const union hsr hsr) > > +{ > > +int rc = 0; > > +if ( current->domain->arch.monitor.privileged_call_enabled ) > > +{ > >

Re: [Xen-devel] [PATCH v2 2/5] vm_event: Implement ARM SMC events

2016-04-29 Thread Tamas K Lengyel
> > > > >> >> > diff --git a/xen/common/vm_event.c b/xen/common/vm_event.c >> > index 2906407..a29bda8 100644 >> > --- a/xen/common/vm_event.c >> > +++ b/xen/common/vm_event.c >> > @@ -818,7 +818,6 @@ int vm_event_monitor_traps(struct vcpu *v, uint8_t >> sync, >> > req->altp2m_idx = altp2m

Re: [Xen-devel] [PATCH v2 4/5] x86/hvm: Add debug exception vm_events

2016-05-02 Thread Tamas K Lengyel
On May 2, 2016 07:12, "Jan Beulich" wrote: > > >>> On 29.04.16 at 20:07, wrote: > > @@ -229,8 +231,15 @@ struct vm_event_write_ctrlreg { > > uint64_t old_value; > > }; > > > > +struct vm_event_singlestep { > > +uint64_t gfn; > > +}; > > + > > struct vm_event_debug { > > uint64_t g

Re: [Xen-devel] [PATCH v2 4/5] x86/hvm: Add debug exception vm_events

2016-05-02 Thread Tamas K Lengyel
On May 2, 2016 09:40, "Jan Beulich" wrote: > > >>> On 02.05.16 at 17:35, wrote: > > On May 2, 2016 07:12, "Jan Beulich" wrote: > >> > >> >>> On 29.04.16 at 20:07, wrote: > >> > @@ -229,8 +231,15 @@ struct vm_event_write_ctrlreg { > >> > uint64_t old_value; > >> > }; > >> > > >> > +struct

Re: [Xen-devel] [PATCH V3] x86/monitor: Disallow setting mem_access_emulate_each_rep when vm_event is NULL

2016-05-03 Thread Tamas K Lengyel
>> +return rc; > >>> } > >>> > >>> int arch_monitor_domctl_event(struct domain *d, > >> > >> According to the previous list discussion with Andrew Cooper, this fix > >> might be considered for the 4.7 release, so CC-ing Wei for a release > >> ack, as suggested. > > > > Even if - without the pending ./MAINTAINERS adjustment - not > > formally required, I don't understand why you didn't Cc Tamas on > > this patch. I don't think this should go in without his ack. > > Of course, I was under the impression that he was in the recipients list > (I let scripts/maintaners.pl do the work and didn't pay much attention > to its output). > > By all means. > The maintainers file wasn't covering this header properly. Fixed in my other patch-set. Acked-by: Tamas K Lengyel ___ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH v2 2/5] vm_event: Implement ARM SMC events

2016-05-03 Thread Tamas K Lengyel
On Tue, May 3, 2016 at 5:31 AM, Julien Grall wrote: > Hi Tamas, > > > On 29/04/16 19:07, Tamas K Lengyel wrote: > >> The ARM SMC instructions are already configured to trap to Xen by >> default. In >> this patch we allow a user-space process in a privileged dom

Re: [Xen-devel] [PATCH v2 2/5] vm_event: Implement ARM SMC events

2016-05-04 Thread Tamas K Lengyel
> On 03/05/2016 19:48, Tamas K Lengyel wrote: >> >> >> >> On Tue, May 3, 2016 at 5:31 AM, Julien Grall > <mailto:julien.gr...@arm.com>> wrote: >> On 29/04/16 19:07, Tamas K Lengyel wrote: >> >> The ARM SMC instructions are al

Re: [Xen-devel] [PATCH v2 2/5] vm_event: Implement ARM SMC events

2016-05-04 Thread Tamas K Lengyel
On Wed, May 4, 2016 at 8:03 AM, Julien Grall wrote: > > > On 04/05/2016 14:30, Razvan Cojocaru wrote: >> >> On 05/04/2016 04:26 PM, Julien Grall wrote: >>> >>> I may misunderstand some parts of the vm event subsystem. To get/set the >>> full set of registers, the user will have to use the >>> DOMC

[Xen-devel] [PATCH v3 1/9] monitor: Rename vm_event_monitor_get_capabilities

2016-05-04 Thread Tamas K Lengyel
The monitor_get_capabilities check actually belongs to the monitor subsystem so relocating and renaming it to sanitize the code's name and location. Mechanical patch, no code changes introduced. Signed-off-by: Tamas K Lengyel Acked-by: Andrew Cooper Acked-by: Razvan Cojocaru --- Jan Be

[Xen-devel] [PATCH v3 6/9] tools/xen-access: add test-case for ARM SMC

2016-05-04 Thread Tamas K Lengyel
Signed-off-by: Tamas K Lengyel --- Cc: Razvan Cojocaru Cc: Ian Jackson Cc: Wei Liu --- tools/tests/xen-access/xen-access.c | 32 ++-- 1 file changed, 30 insertions(+), 2 deletions(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen

[Xen-devel] [PATCH v3 7/9] x86/hvm: Rename hvm/event to hvm/monitor

2016-05-04 Thread Tamas K Lengyel
Mechanical renaming to better describe that the code in hvm/event is part of the monitor subsystem. Signed-off-by: Tamas K Lengyel Acked-by: Kevin Tian --- Cc: Jan Beulich Cc: Andrew Cooper Cc: Razvan Cojocaru Cc: Jun Nakajima --- xen/arch/x86/hvm/Makefile | 2 +- xen

[Xen-devel] [PATCH v3 9/9] MAINTAINERS: Update monitor/vm_event covered code

2016-05-04 Thread Tamas K Lengyel
Add headers to the covered list. Signed-off-by: Tamas K Lengyel Acked-by: Jan Beulich --- Cc: Andrew Cooper Cc: George Dunlap Cc: Ian Jackson Cc: Konrad Rzeszutek Wilk Cc: Stefano Stabellini Cc: Tim Deegan Cc: Wei Liu --- MAINTAINERS | 12 ++-- 1 file changed, 6 insertions(+), 6

[Xen-devel] [PATCH v3 5/9] tools/libxc: add xc_monitor_privileged_call

2016-05-04 Thread Tamas K Lengyel
These are the user-space components for the new ARM SMC events. Signed-off-by: Tamas K Lengyel Acked-by: Wei Liu --- Cc: Ian Jackson --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 24 2 files changed, 26 insertions(+) diff --git a/tools

[Xen-devel] [PATCH v3 2/9] monitor: Don't call vm_event_fill_regs from common

2016-05-04 Thread Tamas K Lengyel
: Tamas K Lengyel --- Cc: Stefano Stabellini Cc: Julien Grall Cc: Jan Beulich Cc: Andrew Cooper Cc: Razvan Cojocaru --- xen/arch/arm/Makefile | 1 + xen/arch/arm/hvm.c | 4 ++-- xen/arch/arm/monitor.c | 48 ++ xen/arch/x86/hvm/event.c

[Xen-devel] [PATCH v3 8/9] x86/hvm: Add debug exception vm_events

2016-05-04 Thread Tamas K Lengyel
introduce the necessary monitor_op domctl's to enable subscribing to the events. Signed-off-by: Tamas K Lengyel --- Cc: Ian Jackson Cc: Wei Liu Cc: Razvan Cojocaru Cc: Jan Beulich Cc: Andrew Cooper Cc: Jun Nakajima Cc: Kevin Tian v3: Increment vm_event interface version v2: R

[Xen-devel] [PATCH v3 4/9] arm/vm_event: get/set registers

2016-05-04 Thread Tamas K Lengyel
Add support for getting/setting registers through vm_event on ARM. Signed-off-by: Tamas K Lengyel --- Cc: Stefano Stabellini Cc: Julien Grall Cc: Razvan Cojocaru --- xen/arch/arm/Makefile | 1 + xen/arch/arm/vm_event.c| 141 + xen

[Xen-devel] [PATCH v3 3/9] monitor: ARM SMC events

2016-05-04 Thread Tamas K Lengyel
Add support for monitoring ARM SMC events. This patch only adds the required bits to enable/disable monitoring and forwarding the event through vm_event. Signed-off-by: Tamas K Lengyel --- Cc: Stefano Stabellini Cc: Julien Grall Cc: Razvan Cojocaru v3: Split parts off as separate patches

Re: [Xen-devel] [PATCH v3 6/9] tools/xen-access: add test-case for ARM SMC

2016-05-04 Thread Tamas K Lengyel
On May 4, 2016 09:35, "Jan Beulich" wrote: > > >>> On 04.05.16 at 16:51, wrote: > > --- a/tools/tests/xen-access/xen-access.c > > +++ b/tools/tests/xen-access/xen-access.c > > @@ -1,4 +1,3 @@ > > -/* > > * xen-access.c > > * > > * Exercises the basic per-page access mechanisms > > Are you s

Re: [Xen-devel] [PATCH V7] vm_event: Allow subscribing to write events for specific MSR-s

2016-05-04 Thread Tamas K Lengyel
> >> --- a/xen/include/asm-x86/domain.h >> +++ b/xen/include/asm-x86/domain.h >> @@ -401,12 +401,12 @@ struct arch_domain >> unsigned int write_ctrlreg_enabled : 4; >> unsigned int write_ctrlreg_sync : 4; >> unsigned int write_ctrlreg_onchangeonly : 4; >>

Re: [Xen-devel] [PATCH v3 6/9] tools/xen-access: add test-case for ARM SMC

2016-05-04 Thread Tamas K Lengyel
On May 4, 2016 11:34, "Wei Liu" wrote: > > On Wed, May 04, 2016 at 11:16:24AM -0600, Tamas K Lengyel wrote: > > On May 4, 2016 09:35, "Jan Beulich" wrote: > > > > > > >>> On 04.05.16 at 16:51, wrote: > > > > --- a/tools

Re: [Xen-devel] [PATCH v3 5/9] tools/libxc: add xc_monitor_privileged_call

2016-05-04 Thread Tamas K Lengyel
On Wed, May 4, 2016 at 2:08 PM, Konrad Rzeszutek Wilk wrote: >> +/* >> ++ * Local variables: >> ++ * mode: C >> ++ * c-file-style: "BSD" >> ++ * c-basic-offset: 4 >> ++ * tab-width: 4 >> ++ * indent-tabs-mode: nil >> ++ * End: >> ++ */ > > ++ ? > > Why the extra + ? Will fix. Thanks, Tamas

Re: [Xen-devel] [PATCH v3 6/9] tools/xen-access: add test-case for ARM SMC

2016-05-05 Thread Tamas K Lengyel
hard, Graham Norton, HRB 21284 (AG Nürnberg) > > >>> Tamas K Lengyel 05/04/16 7:18 PM >>> > >On May 4, 2016 09:35, "Jan Beulich" wrote: > >> > >> >>> On 04.05.16 at 16:51, wrote: > >> > --- a/tools/tests/xen-acce

Re: [Xen-devel] xc_altp2m_set_vcpu_enable_notify fail

2016-05-07 Thread Tamas K Lengyel
On May 7, 2016 03:34, "Big Strong" wrote: >> >> libxc functions always return -1 when it fails. You need the specific >> errno to know what went wrong. > > > Yeah, I know it means a failure. Actually, I noticed that there is a comment at the source code of xen, which says : > > "This is a bit odd

[Xen-devel] [PATCH v3 1/2] x86/mem-sharing: Bulk mem-sharing entire domains

2016-05-12 Thread Tamas K Lengyel
ntire domains. Signed-off-by: Tamas K Lengyel Acked-by: Wei Liu --- Ian Jackson George Dunlap Jan Beulich Andrew Cooper v3: Bail if domains are not paused Rename bulk_share struct to just bulk Return -ENOMEM error if nomination fails Return total number of shared pages (not keeping sep

[Xen-devel] [PATCH v3 2/2] tests/mem-sharing: Add bulk option to memshrtool

2016-05-12 Thread Tamas K Lengyel
Add the bulk option to the test tool to perform complete deduplication between domains. Signed-off-by: Tamas K Lengyel Acked-by: Wei Liu --- Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell --- tools/tests/mem-sharing/memshrtool.c | 22 ++ 1 file changed, 22

Re: [Xen-devel] xc_altp2m_set_vcpu_enable_notify fail

2016-05-12 Thread Tamas K Lengyel
On Thu, May 12, 2016 at 9:17 AM, Wei Liu wrote: > On Thu, May 12, 2016 at 09:00:12PM +0800, Big Strong wrote: >> I'm still not very clear why would do_altp2m_op change the domain to >> current domain (which is dom0 in my case) when the cmd is >> HVMOP_altp2m_vcpu_enable_notify >>

Re: [Xen-devel] [PATCH v3 1/2] x86/mem-sharing: Bulk mem-sharing entire domains

2016-05-13 Thread Tamas K Lengyel
On Fri, May 13, 2016 at 6:00 AM, Jan Beulich wrote: On 12.05.16 at 17:25, wrote: >> --- a/xen/arch/x86/mm/mem_sharing.c >> +++ b/xen/arch/x86/mm/mem_sharing.c >> @@ -1294,6 +1294,43 @@ int relinquish_shared_pages(struct domain *d) >> return rc; >> } >> >> +static int bulk_share(struct

[Xen-devel] [TESTDAY] Test report

2016-05-13 Thread Tamas K Lengyel
* Hardware: Intel(R) Xeon(R) CPU E5-2430 * Sofware: Debian Jessie dom0 * Functionality tested: xl save/resume vm_event/mem_access/monitor/altp2m Comment: everything works as expected. Cheers, Tamas ___ Xen-devel mailing list Xen-devel@lists.xen.org htt

Re: [Xen-devel] [PATCH v3 1/2] x86/mem-sharing: Bulk mem-sharing entire domains

2016-05-13 Thread Tamas K Lengyel
On Fri, May 13, 2016 at 9:09 AM, Jan Beulich wrote: On 13.05.16 at 16:50, wrote: >> On Fri, May 13, 2016 at 6:00 AM, Jan Beulich wrote: >> On 12.05.16 at 17:25, wrote: +if ( !rc ) +mem_sharing_share_pages(d, bulk->start, sh, cd, bulk->start,

Re: [Xen-devel] [PATCH v3 1/2] x86/mem-sharing: Bulk mem-sharing entire domains

2016-05-13 Thread Tamas K Lengyel
On Fri, May 13, 2016 at 10:12 AM, Jan Beulich wrote: On 13.05.16 at 17:31, wrote: >> On Fri, May 13, 2016 at 9:09 AM, Jan Beulich wrote: >> On 13.05.16 at 16:50, wrote: On Fri, May 13, 2016 at 6:00 AM, Jan Beulich wrote: On 12.05.16 at 17:25, wrote: >> @@ -1468,6 +1

Re: [Xen-devel] [PATCH v3 4/9] arm/vm_event: get/set registers

2016-05-16 Thread Tamas K Lengyel
On May 16, 2016 04:14, "Julien Grall" wrote: > > Hi Tamas, > > > On 04/05/16 15:51, Tamas K Lengyel wrote: >> >> diff --git a/xen/include/asm-arm/vm_event.h b/xen/include/asm-arm/vm_event.h >> index a3fc4ce..814d0da 100644 >> --- a/xen/includ

Re: [Xen-devel] [PATCH v3 4/9] arm/vm_event: get/set registers

2016-05-16 Thread Tamas K Lengyel
On May 16, 2016 09:59, "Julien Grall" wrote: > > Hi Tamas, > > > On 16/05/16 16:37, Tamas K Lengyel wrote: >> >> >> On May 16, 2016 04:14, "Julien Grall" > <mailto:julien.gr...@arm.com>> wrote: >> > On 04/05/16 15

Re: [Xen-devel] xc_altp2m_set_vcpu_enable_notify fail

2016-05-17 Thread Tamas K Lengyel
On Tue, May 17, 2016 at 8:43 PM, Big Strong wrote: > Should the VMFUNC and #VE must run in kernel mode? I.E. as a linux kernel > module or windows driver? if it is, how to invoke hypercall from the domU > kernel, by ioctl(fd, IOCTL_PRIVCMD_HYPERCALL, hypercall) or directly issue > 0x82 interrupt?

Re: [Xen-devel] xc_altp2m_set_vcpu_enable_notify fail

2016-05-18 Thread Tamas K Lengyel
On Wed, May 18, 2016 at 3:48 AM, Wei Liu wrote: > On Tue, May 17, 2016 at 08:05:23PM +0800, Big Strong wrote: >> Is there a libxc function to translate the >> virtual address of malloc() to physical address? > > Only to answer this question: no. There isn't one. > > Wei. Technically there is! The

Re: [Xen-devel] [PATCH] tests/xen-access: Added vm_event emulation tests

2017-04-14 Thread Tamas K Lengyel
On Thu, Apr 13, 2017 at 4:20 AM, Razvan Cojocaru wrote: > On 04/12/2017 08:11 PM, Tamas K Lengyel wrote: > > > > > > On Mon, Apr 10, 2017 at 3:44 AM, Razvan Cojocaru > > mailto:rcojoc...@bitdefender.com>> wrote: > > > > This patch adds s

Re: [Xen-devel] [PATCH] tests/xen-access: Added vm_event emulation tests

2017-04-14 Thread Tamas K Lengyel
On Fri, Apr 14, 2017 at 1:03 PM, Razvan Cojocaru wrote: > On 04/14/2017 09:08 PM, Tamas K Lengyel wrote: > > > > > > On Thu, Apr 13, 2017 at 4:20 AM, Razvan Cojocaru > > mailto:rcojoc...@bitdefender.com>> wrote: > > > >

Re: [Xen-devel] [PATCH V2] tests/xen-access: Added vm_event emulation tests

2017-04-17 Thread Tamas K Lengyel
t of > the first 1000 pages - otherwise the guest would slow to a crawl. > Since the emulator is still incomplete and has trouble with > emulating competing writes in SMP scenarios, the new tests are > only meant for debugging issues. > > Signed-off-by: Razvan Cojocaru > > Acked-

Re: [Xen-devel] [PATCH V2 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-03 Thread Tamas K Lengyel
On Wed, May 3, 2017 at 6:48 AM, Jan Beulich wrote: > >>> On 03.05.17 at 12:37, wrote: > > On 05/03/17 12:51, Jan Beulich wrote: > > On 03.05.17 at 11:10, wrote: > >>> --- /dev/null > >>> +++ b/xen/arch/x86/hvm/vm_event.c > >>> @@ -0,0 +1,101 @@ > >>> +/* > >>> + * arch/x86/hvm/vm_event.c >

Re: [Xen-devel] [PATCH V2 2/2] x86/vm_event: fix race between __context_switch() and vm_event_resume()

2017-05-03 Thread Tamas K Lengyel
dcast TLB flush (read: performance improvement). > > Signed-off-by: Razvan Cojocaru > Signed-off-by: Andrew Cooper Acked-by: Tamas K Lengyel ___ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel

Re: [Xen-devel] [PATCH V2 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-03 Thread Tamas K Lengyel
On Wed, May 3, 2017 at 4:16 PM, Razvan Cojocaru wrote: > On 05/03/2017 11:05 PM, Tamas K Lengyel wrote: >> >> >> On Wed, May 3, 2017 at 6:48 AM, Jan Beulich > <mailto:jbeul...@suse.com>> wrote: >> >> >>> On 03.05.17 at 12:37, > <ma

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Tamas K Lengyel
;>> where HVM-specific vm_event-related code will live. This cleans up >>>> hvm_do_resume() and ensures that the vm_event maintainers are >>>> responsible for changes to that code. >>>> >>>> Signed-off-by: Razvan Cojocaru >>>> Acked-by: T

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-04 Thread Tamas K Lengyel
On Thu, May 4, 2017 at 11:17 AM, Razvan Cojocaru wrote: > On 05/04/17 17:57, Tamas K Lengyel wrote: >> On Thu, May 4, 2017 at 5:22 AM, Jan Beulich wrote: >>>>>> On 04.05.17 at 11:14, wrote: >>>> On 05/04/17 12:11, Jan Beulich wrote: >>>>>>

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-05 Thread Tamas K Lengyel
On Thu, May 4, 2017 at 11:37 AM, Jan Beulich wrote: >>>> On 04.05.17 at 17:17, wrote: >> On 05/04/17 17:57, Tamas K Lengyel wrote: >>> On Thu, May 4, 2017 at 5:22 AM, Jan Beulich wrote: >>>>>>> On 04.05.17 at 11:14, wrote: >>>>> On

Re: [Xen-devel] [PATCH V3 1/2] x86/vm_event: added hvm/vm_event.{h, c}

2017-05-05 Thread Tamas K Lengyel
On Fri, May 5, 2017 at 10:47 AM, Jan Beulich wrote: >>>> On 05.05.17 at 16:42, wrote: >> On Thu, May 4, 2017 at 11:37 AM, Jan Beulich wrote: >>>>>> On 04.05.17 at 17:17, wrote: >>>> On 05/04/17 17:57, Tamas K Lengyel wrote: >>>>> O

Re: [Xen-devel] [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk

2017-05-08 Thread Tamas K Lengyel
On Mon, May 8, 2017 at 5:44 AM, Julien Grall wrote: > Hi, > > On 08/05/17 10:22, Sergej Proskurin wrote: >> >> On 05/02/2017 05:17 PM, Julien Grall wrote: >>> >>> On 30/04/17 20:48, Sergej Proskurin wrote: >>> Also s/ttbcr/tcr/ >>> +struct domain *d = p2m->domain; + +const u

Re: [Xen-devel] [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk

2017-05-08 Thread Tamas K Lengyel
On Mon, May 8, 2017 at 2:53 PM, Julien Grall wrote: > > > On 05/08/2017 08:42 PM, Tamas K Lengyel wrote: >> >> On Mon, May 8, 2017 at 5:44 AM, Julien Grall wrote: >> Whether the performance is measurable different is going to be very >> usecase specific. If the

Re: [Xen-devel] [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk

2017-05-09 Thread Tamas K Lengyel
On Tue, May 9, 2017 at 2:09 AM, Julien Grall wrote: > > > On 05/09/2017 08:17 AM, Sergej Proskurin wrote: >> >> Hi, >> What you currently do is try gva_to_ipa and if it does not work >> you will call p2m_gva_to_ipa. This sounds a bit pointless to me and waste of time if the underlyi

Re: [Xen-devel] [RFC PATCH 4/4] arm/mem_access: Add software guest-page-table walk

2017-05-09 Thread Tamas K Lengyel
On Tue, May 9, 2017 at 10:22 AM, Julien Grall wrote: > > > On 09/05/17 17:04, Tamas K Lengyel wrote: >> >> On Tue, May 9, 2017 at 2:09 AM, Julien Grall wrote: >>> >>> >>> >>> On 05/09/2017 08:17 AM, Sergej Proskurin wrote: >>>&

Re: [Xen-devel] [PATCH 2/3] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-05-18 Thread Tamas K Lengyel
On Thu, May 18, 2017 at 9:07 AM, Adrian Pop wrote: > Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a > domain to change the value of the #VE suppress bit for a page. > > Signed-off-by: Adrian Pop > --- > xen/arch/x86/hvm/hvm.c | 14 > xen/arch/x86/mm/mem

Re: [Xen-devel] [RFC PATCH v3 10/10] arm/mem_access: Walk the guest's pt in software

2017-06-15 Thread Tamas K Lengyel
re. > > Signed-off-by: Sergej Proskurin > --- > Cc: Razvan Cojocaru > Cc: Tamas K Lengyel > Cc: Stefano Stabellini > Cc: Julien Grall > --- > v2: Check the returned access rights after walking the guest's page tables in > the function p2m_mem_access_check_a

Re: [Xen-devel] [PATCH 15/24] xen/arm: Use the newly introduced MFN <-> MADDR and GFN <-> MADDR helpers

2017-06-15 Thread Tamas K Lengyel
- pfn_to_paddr(gfn_x(...)) => gfn_to_gaddr(...) > - _mfn(... >> PAGE_SHIFT) => maddr_to_mfn(...) > > Signed-off-by: Julien Grall > Cc: Razvan Cojocaru > Cc: Tamas K Lengyel Cool, this makes things a lot more readable!

Re: [Xen-devel] [PATCH 1/2] x86/mm: Change default value for suppress #VE in set_mem_access()

2017-06-15 Thread Tamas K Lengyel
On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: > From: Vlad Ioan Topan > > The default value for the "suppress #VE" bit set by set_mem_access() > currently depends on whether the call is made from the same domain (the > bit is set when called from another domain and cleared if called from > t

Re: [Xen-devel] [PATCH 2/2] x86/altp2m: Add a hvmop for setting the suppress #VE bit

2017-06-15 Thread Tamas K Lengyel
On Fri, Jun 9, 2017 at 10:51 AM, Adrian Pop wrote: > Introduce a new hvmop, HVMOP_altp2m_set_suppress_ve, which allows a > privileged domain to change the value of the #VE suppress bit for a > page. > > Add a libxc wrapper for invoking this hvmop. > > Signed-off-by: Adrian Pop > --- > tools/libx

Re: [Xen-devel] questions on mem_sharing_op*'s and tools/tests/mem-sharing/memshrtool

2017-06-16 Thread Tamas K Lengyel
On Thu, Jun 15, 2017 at 10:00 PM, Zhongze Liu wrote: > 2017-06-16 11:50 GMT+08:00 Zhongze Liu : >> Hi there, >> >> I was experimenting with the mem_sharing_op and I found a handy tool: >> tools/tests/mem-sharing/memshrtool >> I set up two bare metal x86_64 VMS running some simple code in 16-bit >>

  1   2   3   4   5   6   7   8   9   10   >