[PATCH v3] x86/xen: Add support for HVMOP_set_evtchn_upcall_vector

2022-07-28 Thread Jane Malalane
vector-type callback. Also register callback_irq at per-vCPU event channel setup to trick toolstack to think the domain is enlightened. Suggested-by: "Roger Pau Monné" Signed-off-by: Jane Malalane --- CC: Juergen Gross CC: Boris Ostrovsky CC: Thomas Gleixner CC: Ingo Molnar CC

[PATCH v4] x86/xen: Add support for HVMOP_set_evtchn_upcall_vector

2022-07-29 Thread Jane Malalane
vector-type callback. Also register callback_irq at per-vCPU event channel setup to trick toolstack to think the domain is enlightened. Suggested-by: "Roger Pau Monné" Signed-off-by: Jane Malalane Reviewed-by: Boris Ostrovsky --- CC: Juergen Gross CC: Boris Ostrovsky CC: Thomas Gl

[PATCH] xen/lib: Fix strcmp() and strncmp()

2021-07-27 Thread Jane Malalane
The C standard requires that each character be compared as unsigned char. Xen's current behaviour compares as signed char, which changes the answer when chars with a value greater than 0x7f are used. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Andrew Cooper CC: G

Re: [PATCH] xen/lib: Fix strcmp() and strncmp()

2021-07-29 Thread Jane Malalane
On 28/07/2021 11:42, Ian Jackson wrote: [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments unless you have verified the sender and know the content is safe. Jane Malalane writes ("[PATCH] xen/lib: Fix strcmp() and strncmp()"): The C standard requires

[PATCH] xen/bitmap: Make bitmap_long_to_byte() and bitmap_byte_to_long() static

2021-08-09 Thread Jane Malalane
Functions made static as there are no external callers. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson CC: Jan Beulich CC: Julien Grall CC: Stefano Stabellini CC: Wei Liu --- xen/common/bitmap.c | 8 xen

[PATCH] xen/bitmap: Don't open code DIV_ROUND_UP()

2021-08-11 Thread Jane Malalane
Also, change bitmap_long_to_byte() and bitmap_byte_to_long() to take 'unsigned int' instead of 'int' number of bits, to match the type of their callers. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson

[PATCH v2] xen/bitmap: Don't open code DIV_ROUND_UP()

2021-08-12 Thread Jane Malalane
Also, change bitmap_long_to_byte() and bitmap_byte_to_long() to take 'unsigned int' instead of 'int' number of bits, to match the type of their callers. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Andrew Cooper CC: George Dunlap CC: Ian Jackson

[PATCH] x86/pv: Provide more helpful error when CONFIG_PV32 is absent

2021-08-12 Thread Jane Malalane
* (XEN) Panic on CPU 0: (XEN) Could not construct domain 0 (XEN) Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu --- xen/arch/x86/pv/dom0_build.c | 8 ++--

[PATCH 1/2] x86/pv: Provide more helpful error when CONFIG_PV32 is absent

2021-08-13 Thread Jane Malalane
* (XEN) Panic on CPU 0: (XEN) Could not construct domain 0 (XEN) Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu --- xen/arch/x86/pv/dom0_build.c | 8 ++--

Re: [PATCH 1/2] x86/pv: Provide more helpful error when CONFIG_PV32 is absent

2021-08-13 Thread Jane Malalane
On 13/08/2021 11:40, Jane Malalane wrote: Currently, when booting a 32bit dom0 kernel, the message isn't very helpful: (XEN) Xen kernel: 64-bit, lsb (XEN) Dom0 kernel: 32-bit, PAE, lsb, paddr 0x10 -> 0x112000 (XEN) Mismatch between Xen and DOM0 kernel (XEN)

[PATCH] x86/pv: remove unnecessary use of goto out in construct_dom0()

2021-08-13 Thread Jane Malalane
elf_check_broken() only needs to be invoked after elf_xen_parse() and after elf_load_binary(). Suggested-by: Jan Beulich Signed-off-by: Jane Malalane --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu --- xen/arch/x86/pv/dom0_build.c | 15 +

[PATCH 1/2] x86/pv: remove unnecessary use of goto out in construct_dom0()

2021-08-16 Thread Jane Malalane
elf_check_broken() only needs to be invoked after elf_xen_parse() and after elf_load_binary(). Suggested-by: Jan Beulich Signed-off-by: Jane Malalane Reviewed-by: Jan Beulich --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu v2: * add into series * fixu

[PATCH 0/2] xen/pv: Improvements to construct_dom0()

2021-08-16 Thread Jane Malalane
Jane Malalane (2): x86/pv: remove unnecessary use of goto out in construct_dom0() x86/pv: Provide more helpful error when CONFIG_PV32 is absent xen/arch/x86/pv/dom0_build.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) -- 2.11.0

[PATCH 2/2] x86/pv: Provide more helpful error when CONFIG_PV32 is absent

2021-08-16 Thread Jane Malalane
* (XEN) Panic on CPU 0: (XEN) Could not construct domain 0 (XEN) Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu v2: * switch to EOPNOTSUPP --- xen/arch/x86/p

[PATCH] libs/guest: Move the guest ABI check earlier into xc_dom_parse_image()

2021-08-17 Thread Jane Malalane
ed-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Ian Jackson CC: Wei Liu CC: Juergen Gross --- tools/libs/guest/xg_dom_boot.c | 4 tools/libs/guest/xg_dom_core.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/libs/guest/xg_dom_boot.c b/tools/libs/

[PATCH] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()

2022-05-11 Thread Jane Malalane
Have is_hvm_pv_evtchn_vcpu() return true for vector callbacks for evtchn delivery set up on a per-vCPU basis via HVMOP_set_evtchn_upcall_vector. is_hvm_pv_evtchn_vcpu() returning true is a condition for setting up physical IRQ to event channel mappings. Signed-off-by: Jane Malalane --- CC: Jan

Re: [PATCH] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()

2022-05-16 Thread Jane Malalane
On 13/05/2022 16:39, Roger Pau Monné wrote: > On Wed, May 11, 2022 at 04:14:23PM +0100, Jane Malalane wrote: >> Have is_hvm_pv_evtchn_vcpu() return true for vector callbacks for >> evtchn delivery set up on a per-vCPU basis via >> HVMOP_set_evtchn_upcall_vector. >&g

[PATCH v2] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()

2022-05-17 Thread Jane Malalane
f the hypercall directly (HVMOP_set_evtchn_upcall_vector) without checking the CPUID bit. Signed-off-by: Jane Malalane --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu v2: * Since the naming of the CPUID bit is quite generic, better explain when it shoul

Re: [PATCH] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()

2022-05-18 Thread Jane Malalane
On 18/05/2022 10:09, Jan Beulich wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 13.05.2022 17:39, Roger Pau Monné wrote: >> On Wed, May 11, 2022 at 04:14:23PM +0100, J

Re: [PATCH] x86/hvm: Widen condition for is_hvm_pv_evtchn_vcpu()

2022-05-18 Thread Jane Malalane
On 18/05/2022 10:07, Jan Beulich wrote: > [CAUTION - EXTERNAL EMAIL] DO NOT reply, click links, or open attachments > unless you have verified the sender and know the content is safe. > > On 11.05.2022 17:14, Jane Malalane wrote: >> Have is_hvm_pv_evtchn_vcpu() return true fo

[PATCH v3] x86/hvm: Widen condition for is_hvm_pv_evtchn_domain() and report fix in CPUID

2022-05-18 Thread Jane Malalane
ercall directly (HVMOP_set_evtchn_upcall_vector) without checking the CPUID bit. Signed-off-by: Jane Malalane --- CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Wei Liu v3: * Improve commit message and title. v2: * Since the naming of the CPUID bit is quite generic, better

[PATCH v1 0/2] x86/cpuid: Use AMD's NullSelectorClearsBase CPUID bit

2021-09-06 Thread Jane Malalane
Jane Malalane (2): x86/cpuid: Expose NullSelectorClearsBase CPUID bit to guests x86/cpuid: Detect null segment behaviour on Zen2 CPUs tools/libs/light/libxl_cpuid.c | 1 + tools/misc/xen-cpuid.c | 1 + xen/arch/x86/cpu/amd.c | 18

[PATCH v1 1/2] x86/cpuid: Expose NullSelectorClearsBase CPUID bit to guests

2021-09-06 Thread Jane Malalane
AMD Zen3 adds the NullSelectorClearsBase bit to indicate that loading a NULL segment selector zeroes the base and limit fields, as well as just attributes. Expose bit to all guests. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Wei Liu CC: Jan Beulich CC: Andrew Cooper CC

[PATCH v1 2/2] x86/cpuid: Detect null segment behaviour on Zen2 CPUs

2021-09-06 Thread Jane Malalane
) and synthesizes the bit. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Wei Liu CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Pu Wen CC: Andy Lutomirski --- xen/arch/x86/cpu/amd.c | 18 ++ xen/arch/x86/cpu/cpu.h |

[PATCH v2 2/2] x86/cpuid: Detect null segment behaviour on Zen2 CPUs

2021-09-08 Thread Jane Malalane
e bit, if the behaviour is present. Suggested-by: Andrew Cooper Signed-off-by: Jane Malalane --- CC: Wei Liu CC: Jan Beulich CC: Andrew Cooper CC: "Roger Pau Monné" CC: Pu Wen CC: Andy Lutomirski v2: * Mark detect_zen2_null_seg_behaviour() with __init * Remove model checks --- x

<    1   2