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

2017-10-24 Thread Petre Pircalabu
- to alter these settings), in the absence of an official position on the issue from the original altp2m designers. Signed-off-by: Razvan Cojocaru Signed-off-by: Petre Pircalabu --- Changed since v2: * Added support for compat arguments translation Changed since v3: * Replaced

[Xen-devel] [PATCH v7] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-16 Thread Petre Pircalabu
- to alter these settings), in the absence of an official position on the issue from the original altp2m designers. Signed-off-by: Razvan Cojocaru Signed-off-by: Petre Pircalabu --- Changed since v2: * Added support for compat arguments translation Changed since v3: * Replaced

[Xen-devel] [PATCH v6] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-15 Thread petre . pircalabu
- to alter these settings), in the absence of an official position on the issue from the original altp2m designers. Signed-off-by: Razvan Cojocaru Signed-off-by: Petre Pircalabu --- Changed since v2: * Added support for compat arguments translation Changed since v3: * Replaced

[Xen-devel] [PATCH v5] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-11 Thread Petre Pircalabu
- to alter these settings), in the absence of an official position on the issue from the original altp2m designers. Signed-off-by: Razvan Cojocaru Signed-off-by: Petre Pircalabu --- Changed since v2: * Added support for compat arguments translation Changed since v3: * Replaced

[Xen-devel] [PATCH v4] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-09 Thread Petre Pircalabu
- to alter these settings), in the absence of an official position on the issue from the original altp2m designers. Signed-off-by: Razvan Cojocaru Signed-off-by: Petre Pircalabu --- Changed since v2: * Added support for compat arguments translation Changed since v3: * Replaced

[Xen-devel] [PATCH v3] x86/altp2m: Added xc_altp2m_set_mem_access_multi()

2017-10-05 Thread Petre Pircalabu
a time. This patch addresses the gap. Signed-off-by: Razvan Cojocaru Signed-off-by: Petre Pircalabu --- Changed since v2: * Added support for compat arguments translation --- tools/libxc/include/xenctrl.h| 3 ++ tools/libxc/xc_altp2m.c | 41 ++ xen/arch

[Xen-devel] [PATCH v13 2/3] x86emul: Add return code information to error messages

2017-09-25 Thread Petre Pircalabu
- print the return code of the last failed emulator operation in hvm_dump_emulation_state. - print the return code in sh_page_fault (SHADOW_PRINTK) to make the distiction between X86EMUL_UNHANDLEABLE and X86EMUL_UNIMPLEMENTED. Signed-off-by: Petre Pircalabu Reviewed-by: Jan Beulich --- Changed

[Xen-devel] [PATCH v13 3/3] x86/monitor: Notify monitor if an emulation fails.

2017-09-25 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu Acked-by: Tamas K Lengyel Acked-by: Wei Liu Acked-by: Jan Beulich --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 5 + xen/arch/x86

[Xen-devel] [PATCH v13 1/3] x86emul: New return code for unimplemented instruction

2017-09-25 Thread Petre Pircalabu
avior of hvm_emulate_one_insn and vmx_realmode_emulate_one was modified to generate an Invalid Opcode trap when X86EMUL_UNRECOGNIZED is returned by the emulator instead of just crash the domain. Signed-off-by: Petre Pircalabu --- Changed since v10: * Added asserts to make sure the return

[Xen-devel] [PATCH v13 0/3] Notify monitor when emulating an unimplemented instruction

2017-09-25 Thread Petre Pircalabu
6EMUL_UNIMPLEMENTED if HAVE_GAS_RDRAND is not defined * create unrecognized_insn label * return X86EMUL_UNRECOGNIZED in case of failure to decode Group #13 instructions. * add a "TODO:" comment to the description of X86EMUL_UNRECOGNIZED stating that for now it can be used

[Xen-devel] [PATCH v12 4/4] x86emul: Raise #UD when emulating an unrecognized instruction.

2017-09-20 Thread Petre Pircalabu
Modified the behavior of hvm_emulate_one_insn and vmx_realmode_emulate_one to generate an Invalid Opcode trap when X86EMUL_UNRECOGNIZED is returned by the emulator instead of just crashing the domain. Signed-off-by: Petre Pircalabu Reviewed-by: Kevin Tian --- xen/arch/x86/hvm/io.c

[Xen-devel] [PATCH v12 1/4] x86emul: New return code for unimplemented instruction

2017-09-20 Thread Petre Pircalabu
ff-by: Petre Pircalabu --- Changed since v10: * Added asserts to make sure the return code cannot be X86EMUL_UNIMPLEMENTED. * Add new return code (X86EMUL_UNRECOGNIZED) to be used when trying to emulate an instruction with an invalid opcode. Changed since v11: * Fixed double negati

[Xen-devel] [PATCH v12 0/4] Notify monitor when emulating an unimplemented instruction

2017-09-20 Thread Petre Pircalabu
86EMUL_UNRECOGNIZED in some cases (a detailed list is provided in the patch description) * Removed "rc=" from the error message. * Check for X86EMUL_UNRECOGNIZED instead of X86EMUL_UNIMPLEMENTED when generating an Invalid Opcode trap Petre Pircalabu (4): x86emul: New

[Xen-devel] [PATCH v12 3/4] x86/monitor: Notify monitor if an emulation fails.

2017-09-20 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu Acked-by: Tamas K Lengyel Acked-by: Wei Liu Acked-by: Jan Beulich --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 5 + xen/arch/x86

[Xen-devel] [PATCH v12 2/4] x86emul: Add return code information to error messages

2017-09-20 Thread Petre Pircalabu
- print the return code of the last failed emulator operation in hvm_dump_emulation_state. - print the return code in sh_page_fault (SHADOW_PRINTK) to make the distiction between X86EMUL_UNHANDLEABLE and X86EMUL_UNIMPLEMENTED. Signed-off-by: Petre Pircalabu Reviewed-by: Jan Beulich --- Changed

[Xen-devel] [PATCH v11 1/5] gitignore: add local vimrc files

2017-09-12 Thread Petre Pircalabu
Signed-off-by: Petre Pircalabu --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ecb198f..cc16649 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,7 @@ cscope.in.out cscope.out cscope.po.out .config +.vimrc dist stubdom/*.tar.gz

[Xen-devel] [PATCH v11 2/5] x86emul: New return code for unimplemented instruction

2017-09-12 Thread Petre Pircalabu
ff-by: Petre Pircalabu --- Changed since v10: * Added asserts to make sure the return code cannot be X86EMUL_UNIMPLEMENTED. * Add new return code (X86EMUL_UNRECOGNIZED) to be used when trying to emulate an instruction with an invalid opcode. --- xen/arch/x86/hvm/emulate.c

[Xen-devel] [PATCH v11 3/5] x86emul: Add return code information to error messages

2017-09-12 Thread Petre Pircalabu
- print the return code of the last failed emulator operation in hvm_dump_emulation_state. - print the return code in sh_page_fault (SHADOW_PRINTK) to make the distiction between X86EMUL_UNHANDLEABLE and X86EMUL_UNIMPLEMENTED. Signed-off-by: Petre Pircalabu --- xen/arch/x86/hvm/emulate.c

[Xen-devel] [PATCH v11 5/5] x86emul: Raise #UD when emulating an unimplemented instruction.

2017-09-12 Thread Petre Pircalabu
Modified the behavior of hvm_emulate_one_insn and vmx_realmode_emulate_one to generate an Invalid Opcode trap when X86EMUL_UNIMPLEMENTED is returned by the emulator instead of just crashing the domain. Signed-off-by: Petre Pircalabu --- xen/arch/x86/hvm/io.c | 6 +- xen/arch/x86

[Xen-devel] [PATCH v11 4/5] x86/monitor: Notify monitor if an emulation fails.

2017-09-12 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu Acked-by: Tamas K Lengyel Acked-by: Wei Liu Acked-by: Jan Beulich --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 5 + xen/arch/x86

[Xen-devel] [PATCH v11 0/5] Notify monitor when emulating an unimplemented instruction

2017-09-12 Thread Petre Pircalabu
Added new return code (X86EMUL_UNRECOGNIZED) to be used when trying to emulate an instruction with an invalid opcode. * Added emulation return code information to error messages. * Raise #UD when emulating an unimplemented instruction instead of just crash the domain Petre Pircalabu (5):

[Xen-devel] [PATCH v10 2/3] x86emul: New return code for unimplemented instruction

2017-09-06 Thread Petre Pircalabu
value returned by hvm_copy_guest_from_phys / hvm_copy_to_guest_phys. Similary, none of this functions should not return X86EMUL_UNIMPLEMENTED. - hvmemul_do_io - hvm_send_buffered_ioreq - hvm_send_ioreq - hvm_broadcast_ioreq - hvmemul_do_io_buffer - hvmemul_validate Signed-off-by: Petre Pirc

[Xen-devel] [PATCH v10 0/3] Notify monitor when emulating an unimplemented instruction

2017-09-06 Thread Petre Pircalabu
the patch comment regarding the usage (and lack of it) of the new X86EMUL_UNIMPLEMENTED return code. * removed 'cannot_emulate' label. * added local vimrc files to the gitignore list. Petre Pircalabu (3): gitignore: add local vimrc files x86emul: New return code for unimplement

[Xen-devel] [PATCH v10 3/3] x86/monitor: Notify monitor if an emulation fails.

2017-09-06 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu Acked-by: Tamas K Lengyel Acked-by: Wei Liu Acked-by: Jan Beulich --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 5 + xen/arch/x86

[Xen-devel] [PATCH v10 1/3] gitignore: add local vimrc files

2017-09-06 Thread Petre Pircalabu
Signed-off-by: Petre Pircalabu --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 594ffd9..8af9c02 100644 --- a/.gitignore +++ b/.gitignore @@ -27,6 +27,7 @@ cscope.in.out cscope.out cscope.po.out .config +.vimrc dist stubdom/*.tar.gz

[Xen-devel] [PATCH v9 2/2] x86/monitor: Notify monitor if an emulation fails.

2017-08-30 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu Acked-by: Tamas K Lengyel Acked-by: Wei Liu Acked-by: Jan Beulich --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 4 xen/arch/x86/hvm

[Xen-devel] [PATCH v9 0/2] Notify monitor when emulating an unimplemented instruction

2017-08-30 Thread Petre Pircalabu
This patchset implements a mechanism which allows XEN to send first an event if the emulator encountered an unsupported instruction. The monitor application can choose to mitigate the error, for example to singlestep the instruction using the real processor and then resume execution of the normal

[Xen-devel] [PATCH v9 1/2] x86emul: New return code for unimplemented instruction

2017-08-30 Thread Petre Pircalabu
x86_emulate_ops callbacks. Signed-off-by: Petre Pircalabu Reviewed-by: Paul Durrant --- xen/arch/x86/hvm/emulate.c | 3 +++ xen/arch/x86/hvm/hvm.c | 1 + xen/arch/x86/hvm/io.c | 1 + xen/arch/x86/hvm/vmx/realmode.c| 2 +- xen/arch/x86/mm

[Xen-devel] [PATCH v8 0/2] Singlestep unimplemented x86emul instructions

2017-08-08 Thread Petre Pircalabu
MUL_UNHANDLEABLE checks the in functions referencing x86_emulate. * Improved comment describing X86EMUL_UNIMPLEMENTED. Petre Pircalabu (2): x86emul: New return code for unimplemented instruction x86/monitor: Notify monitor if an emulation fails. tools/libxc/include/xenctrl.h

[Xen-devel] [PATCH v8 2/2] x86/monitor: Notify monitor if an emulation fails.

2017-08-08 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 4 xen/arch/x86/hvm/monitor.c| 17 + xen/arch/x86/monitor.c

[Xen-devel] [PATCH v8 1/2] x86emul: New return code for unimplemented instruction

2017-08-08 Thread Petre Pircalabu
x86_emulate_ops callbacks. Signed-off-by: Petre Pircalabu --- xen/arch/x86/hvm/emulate.c | 4 xen/arch/x86/hvm/io.c | 2 ++ xen/arch/x86/hvm/vmx/realmode.c| 2 +- xen/arch/x86/mm/shadow/multi.c | 2 +- xen/arch/x86/x86_emulate/x86_emulate.c | 8

[Xen-devel] [PATCH v7 2/2] x86/monitor: Notify monitor if an emulation fails.

2017-08-04 Thread Petre Pircalabu
. altp2m) instead of just crashing. Signed-off-by: Petre Pircalabu --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 4 xen/arch/x86/hvm/monitor.c| 17 + xen/arch/x86/monitor.c

[Xen-devel] [PATCH v7 0/2] Singlestep unimplemented x86emul instructions

2017-08-04 Thread Petre Pircalabu
* add the distinction between unimplemented instructions and emulation failures. * changed "emul_unhandleable" event name to "emul_unimplemented" Petre Pircalabu (2): x86emul: New return code for unimplemented instruction x86/monitor: Notify monitor if an emulation fails.

[Xen-devel] [PATCH v7 1/2] x86emul: New return code for unimplemented instruction

2017-08-04 Thread Petre Pircalabu
Enforce the distinction between an instruction not implemented by the emulator and the failure to emulate that instruction. Signed-off-by: Petre Pircalabu --- xen/arch/x86/hvm/emulate.c | 1 + xen/arch/x86/x86_emulate/x86_emulate.c | 2 +- xen/arch/x86/x86_emulate/x86_emulate.h | 2

[Xen-devel] [PATCH] Makefile: Fix uninstall target

2017-07-27 Thread Petre Pircalabu
"uninstall" target so the files have to be removed manually. Signed-off-by: Petre Pircalabu --- Makefile | 22 +++-- docs/Makefile| 15 - m4/stubdom.m4| 2 ++ stubdom/Makefil

[Xen-devel] [PATCH v6] x86/monitor: Notify monitor if an emulation fails.

2017-07-18 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- Changed since v1: * Removed the emulation kind check when calling hvm_inject_hw_exception Changed since v2: * Removed a file added by mistake Changed since v3: * Removed extra stray line * Added the _enabled suffix to the

[Xen-devel] [PATCH v5] x86/monitor: Notify monitor if an emulation fails.

2017-07-17 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- Changed since v1: * Removed the emulation kind check when calling hvm_inject_hw_exception Changed since v2: * Removed a file added by mistake Changed since v3: * Removed extra stray line * Added the _enabled suffix to the

[Xen-devel] [PATCH v4] x86/monitor: Notify monitor if an emulation fails.

2017-07-17 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- Changed since v1: * Removed the emulation kind check when calling hvm_inject_hw_exception Changed since v2: * Removed a file added by mistake Changed since v3: * Removed extra stray line * Added the _enabled suffix to the

[Xen-devel] [PATCH v4] x86/monitor: Notify monitor if an emulation fails.

2017-07-12 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- Changed since v1: * Removed the emulation kind check when calling hvm_inject_hw_exception Changed since v2: * Removed a file added by mistake Changed since v3: * Removed extra stray line * Added the _enabled suffix to the

[Xen-devel] [PATCH v3] x86/monitor: Notify monitor if an emulation fails.

2017-07-12 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- Changed since v1: * Removed the emulation kind check when calling hvm_inject_hw_exception Changed since v2: * Removed a file added by mistake --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14

[Xen-devel] [PATCH v2] x86/monitor: Notify monitor if an emulation fails.

2017-07-11 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- Changed since v1: * Removed the emulation kind check when calling hvm_inject_hw_exception --- tools/libxc/include/xenctrl.h | 2 + tools/libxc/xc_monitor.c | 14 ++ ...itor-Notify-monitor-if

[Xen-devel] [PATCH] x86/monitor: Notify monitor if an emulation fails.

2017-07-10 Thread Petre Pircalabu
of just crashing. Signed-off-by: Petre Pircalabu --- tools/libxc/include/xenctrl.h | 2 ++ tools/libxc/xc_monitor.c | 14 ++ xen/arch/x86/hvm/emulate.c| 5 - xen/arch/x86/hvm/monitor.c| 19 +++ xen/arch/x86/monitor.c| 12

[Xen-devel] [PATCH v4 2/2] xen-access: write_ctrlreg_c4 test

2017-06-19 Thread Petre Pircalabu
Add test for write_ctrlreg event handling. Signed-off-by: Petre Pircalabu --- tools/tests/xen-access/xen-access.c | 53 - 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c

[Xen-devel] [PATCH v4 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-19 Thread Petre Pircalabu
Add support for filtering out the write_ctrlreg monitor events if they are generated only by changing certains bits. A new parameter (bitmask) was added to the xc_monitor_write_ctrlreg function in order to mask the event generation if the changed bits are set. Signed-off-by: Petre Pircalabu

[Xen-devel] [PATCH v4 0/2] write_ctrlreg event masking

2017-06-19 Thread Petre Pircalabu
This patchset enables masking the reception of write_ctrlreg events depending on the value of certain bits in that register. The most representative example is filtering out events when the CR4.PGE bit is being flipped (global TLB flushes) --- Changed since v2 * fix coding style * use ARRAY_S

[Xen-devel] [PATCH v3 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-06-16 Thread Petre Pircalabu
Add support for filtering out the write_ctrlreg monitor events if they are generated only by changing certains bits. A new parameter (bitmask) was added to the xc_monitor_write_ctrlreg function in order to mask the event generation if the changed bits are set. Signed-off-by: Petre Pircalabu

[Xen-devel] [PATCH v3 0/2] write_ctrlreg event masking

2017-06-16 Thread Petre Pircalabu
This patchset enables masking the reception of write_ctrlreg events depending on the value of certain bits in that register. The most representative example is filtering out events when the CR4.PGE bit is being flipped (global TLB flushes) --- Changed since v2 * fix coding style. * use ARRAY_

[Xen-devel] [PATCH v3 2/2] xen-access: write_ctrlreg_c4 test

2017-06-16 Thread Petre Pircalabu
Add test for write_ctrlreg event handling. Signed-off-by: Petre Pircalabu --- tools/tests/xen-access/xen-access.c | 53 - 1 file changed, 52 insertions(+), 1 deletion(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c

[Xen-devel] write_ctrlreg event masking

2017-05-30 Thread Petre Pircalabu
This patchset enables masking the reception of write_ctrlreg events depending on the value of certain bits in that register. The most representative example is filtering out events when the CR4.PGE bit is being flipped (global TLB flushes) ___ Xen-devel

[Xen-devel] [PATCH v2 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-05-30 Thread Petre Pircalabu
Add support for filtering out the write_ctrlreg monitor events if they are generated only by changing certains bits. A new parameter (bitmask) was added to the xc_monitor_write_ctrlreg function in order to mask the event generation if the changed bits are set. Signed-off-by: Petre Pircalabu

[Xen-devel] [PATCH v2 2/2] xen-access: write_ctrlreg_c4 test

2017-05-30 Thread Petre Pircalabu
Add test for write_ctrlreg event handling. Signed-off-by: Petre Pircalabu --- tools/tests/xen-access/xen-access.c | 47 - 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c

Re: [Xen-devel] [PATCH 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-05-30 Thread Petre PIRCALABU
On Lu, 2017-05-29 at 09:01 -0600, Jan Beulich wrote: > > > > > > > > > > > > > On 26.05.17 at 15:41, wrote: > > --- a/xen/include/public/domctl.h > > +++ b/xen/include/public/domctl.h > > @@ -37,7 +37,7 @@ > > #include "hvm/save.h" > > #include "memory.h" > > > > -#define XEN_DOMCTL_INTERFACE_VE

[Xen-devel] write_ctrlreg event masking

2017-05-26 Thread Petre Pircalabu
Hello, This patchset enables masking the reception of write_ctrlreg events depending on the value of certain bits in that register. The most representative example is filtering out events when the CR4.PGE bit is being flipped (global TLB flushes) Best regards, Petre

[Xen-devel] [PATCH 1/2] x86/monitor: add masking support for write_ctrlreg events

2017-05-26 Thread Petre Pircalabu
Add support for filtering out the write_ctrlreg monitor events if they are generated only by changing certains bits. A new parameter (bitmask) was added to the xc_monitor_write_ctrlreg function in order to mask the event generation if the changed bits are set. Signed-off-by: Petre Pircalabu

[Xen-devel] [PATCH 2/2] xen-access: write_ctrlreg_c4 test

2017-05-26 Thread Petre Pircalabu
Add test for write_ctrlreg event handling. Signed-off-by: Petre Pircalabu --- tools/tests/xen-access/xen-access.c | 43 - 1 file changed, 42 insertions(+), 1 deletion(-) diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c