Hi Thomas,
On Wed, Aug 26, 2020 at 01:16:28PM +0200, Thomas Gleixner wrote:
[...]
>
> The whole lot is also available from git:
>
>git://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git device-msi
>
> This has been tested on Intel/AMD/KVM but lacks testing on:
>
> - HYPERV (-ENOD
Hi Thomas,
I hit a compiler error while I was trying to compile this patchset:
arch/x86/kernel/devicetree.c: In function ‘dt_irqdomain_alloc’:
arch/x86/kernel/devicetree.c:232:6: error: ‘struct irq_alloc_info’ has no
member named ‘ioapic_id’; did you mean ‘ioapic’?
232 | tmp.ioapic_id = mpc_i
On Fri, Jan 24, 2020 at 10:24:44AM +, Vincenzo Frascino wrote:
> Hi Boqun Feng,
>
> On 24/01/2020 06:32, Boqun Feng wrote:
> > Hi Vincenzo,
> >
>
> [...]
>
> >>
> >> I had a look to your patches and overall, I could not understand why we
&
Hi Vincenzo,
On Thu, Jan 23, 2020 at 10:48:07AM +, Vincenzo Frascino wrote:
> Hi Boqun Feng,
>
> sorry for the late reply.
>
That's OK, thanks for your review ;-)
> On 16/12/2019 00:19, Boqun Feng wrote:
> > Hi,
> >
> > This is the RFC patchset for v
On Tue, Dec 17, 2019 at 03:10:16PM +0100, Vitaly Kuznetsov wrote:
> Boqun Feng writes:
>
> > Similar to x86, add a new vclock_mode VCLOCK_HVCLOCK, and reuse the
> > hv_read_tsc_page() for userspace to read tsc page clocksource.
> >
> > Signed-off-by: Boqun Feng
Since reading hyperv-timer clocksource requires reading cntvct,
userspace should be allowed to read it, otherwise reading cntvct will
result in traps, which makes vsyscall's cost similar compared to
syscall's.
So enable it on every cpu when a Hyper-V guest booting up.
Signed-off-by:
Hi,
This is the RFC patchset for vDSO support in ARM64 Hyper-V guest. To
test it, Michael's ARM64 support patchset:
https://lore.kernel.org/linux-arm-kernel/1570129355-16005-1-git-send-email-mikel...@microsoft.com/
is needed.
Similar as x86, Hyper-V on ARM64 use a TSC page for guests t
Similar to x86, add a new vclock_mode VCLOCK_HVCLOCK, and reuse the
hv_read_tsc_page() for userspace to read tsc page clocksource.
Signed-off-by: Boqun Feng (Microsoft)
---
arch/arm64/include/asm/clocksource.h | 3 ++-
arch/arm64/include/asm/mshyperv.h | 2 +-
arch/arm64
userspace need to
be adjusted with some data from a page maintained by the hypervisor. For
example, the TSC page in Hyper-V.
This is a prerequisite for vDSO support in ARM64 on Hyper-V.
Signed-off-by: Boqun Feng (Microsoft)
---
arch/arm64/kernel/vdso.c | 43
1
driver and require arch_clocksource_data having
the same field.
Signed-off-by: Boqun Feng (Microsoft)
---
arch/arm/include/asm/clocksource.h| 6 +-
arch/arm/kernel/vdso.c| 1 -
arch/arm64/include/asm/clocksource.h | 6 +-
arch/arm64
inter initialized (using a kernel address) by the arch timer
driver, therefore not usable in vDSO.
Fix this by allowing a previous definition to override the default one,
so that in vDSO code, we can define it as a function callable in
userspace.
Signed-off-by: Boqun Feng (Microsoft)
---
arch/
vDSO set-up in __vdso_init() to do this.
Note: if HYPERV_TIMER=y but the kernel is using other clocksource or
doesn't have the hyperv timer clocksource, tsc page will still be mapped
into userspace.
Signed-off-by: Boqun Feng (Microsoft)
---
arch/arm64/kernel/vdso.c | 12
On Mon, Dec 04, 2017 at 08:15:11AM +0800, Boqun Feng wrote:
> Hi all,
>
> This is the v2 of RFC SGX Virtualization design and draft patches, you
Ping ;-)
Any comments?
Regards,
Boqun
> can find v1 at:
>
> https://lists.gt.net/xen/devel/483404
>
> In the new ver
On Mon, Dec 04, 2017 at 07:13:52AM -0700, Jan Beulich wrote:
> >>> On 04.12.17 at 14:10, wrote:
> > On Mon, Dec 04, 2017 at 11:13:45AM +, Julien Grall wrote:
> >> I am not sure to understand why I am being CCed. But it looks like you CC
> >> everyone on each patch... Please CC only relevant pe
et will provide more context for
the reviewers. Will drop you from unrelevant patches in next verion. And
I guess it's OK for me to drop you from replies on unrelevant patches of
this version too?
Regards,
Boqun
> Cheers,
>
> On 04/12/17 00:15, Boqun Feng wrote:
> > From: Ka
From: Kai Huang
In libxc, a new structure 'xc_cpuid_policy_build_info_t' is added to carry
domain's EPC base and size info from libxl. libxl_cpuid_apply_policy is also
changed to take 'libxl_domain_build_info_t' as parameter, where domain's EPC
base and size can be got and passed to xc_cpuid_appl
* If 'lehash' is set, set the domain's virtual IA32_SGXLEPUBKEYHASHn
with its value, and later on the vcpu's virtual IA32_SGXLEPUBKEYHASHn
will be set with the same value.
If the physical IA32_SGXLEPUBKEYHASHn MSRs are not writable, using
'lehash' or 'lewr'
From: Kai Huang
If ENCLS VMEXIT is not present then we cannot support SGX virtualization.
This patch detects presence of ENCLS VMEXIT, and disable SGX if ENCLS
VMEXIT not present
Signed-off-by: Kai Huang
Signed-off-by: Boqun Feng
---
xen/arch/x86/hvm/vmx/vmcs.c| 16
to physical MSRs when vcpu is
scheduled in. Moreover, we cache the recent IA32_SGXLEPUBKEYHASHn in a
percpu variable, so that we won't need to update with wrmsr if the value
not changed.
Signed-off-by: Kai Huang
Signed-off-by: Boqun Feng
---
xen/arch/x86/domctl.c| 28 -
running in ring 3, or
by PV ENCLS but it is really not necessary at this stage.
SGX Launch Control is also exposed in CPU featureset for HVM domain. SGX
Launch Control depends on SGX.
Signed-off-by: Kai Huang
Signed-off-by: Boqun Feng
---
xen/include/public/arch-x86/cpufeatureset.h | 3 ++-
xen
: Boqun Feng
---
xen/arch/x86/mm.c| 9 +++--
xen/include/asm-x86/mm.h | 7 +++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
index 886a5ee327df..db1d1f40 100644
--- a/xen/arch/x86/mm.c
+++ b/xen/arch/x86/mm.c
@@ -5207,7 +5207,7
and unscrubbable pages to get merged, therefore 'page_mergeable'
is introduced, and it simply test whether two pages have the same
scrubbable attributes.
In 'scrub_one_page', scrubbing is aborted once the page is found
unscrubbable.
Signed-off-by: Boqun Feng
---
xen/common/
From: Kai Huang
EPC is destroyed when power state goes to S3-S5. Emulate this behavior.
A new function s3_suspend is added to hvm_function_table for this purpose.
Signed-off-by: Kai Huang
---
xen/arch/x86/hvm/hvm.c| 3 +++
xen/arch/x86/hvm/vmx/vmx.c| 7 +++
xen/include/asm-x86
are also added to
'xc_dom_image' in order to add EPC to e820 table. EPC base is calculated
internally.
Signed-off-by: Kai Huang
Signed-off-by: Boqun Feng
---
tools/libxc/include/xc_dom.h | 4 +++
tools/libxl/libxl_create.c | 10 ++
tools/libxl/libxl_dom.c | 30
From: Kai Huang
Currently EPC are statically allocated and mapped to guest, we don't have
to trap ENCLS as it runs perfectly in VMX non-root mode. But exposing SGX
to guest means we also expose ENABLE_ENCLS bit to L1 hypervisor, therefore
we cannot stop L1 from enabling ENCLS VMEXIT. For ENCLS VM
need to do is to populate the portion of EPC pages in
the 'frame_table' and set up the mapping properly.
SGX would be disabled, if EPC initialization found any problem.
Signed-off-by: Boqun Feng
---
xen/arch/x86/sgx.c| 161 ++
xen/i
h free EPC pages) results in
domain creation failure by making XEN_DOMCTL_set_cpuid return error.
Signed-off-by: Kai Huang
Signed-off-by: Boqun Feng
---
xen/arch/x86/cpuid.c| 62 -
xen/arch/x86/domctl.c | 59
From: Kai Huang
VMX adds new bit to both exit_reason and GUEST_INTERRUPT_STATE to indicate
whether VMEXIT happens in Enclave. Several instructions are also invalid or
behave differently in enclave according to SDM. This patch handles those
cases.
Signed-off-by: Kai Huang
---
xen/arch/x86/hvm/v
From: Kai Huang
A new 'p2m_epc' type is added for EPC mapping type. Two wrapper functions
set_epc_p2m_entry and clear_epc_p2m_entry are also added for further use.
Signed-off-by: Kai Huang
---
xen/arch/x86/mm/p2m-ept.c | 3 +++
xen/arch/x86/mm/p2m.c | 41 ++
ntry of EPC pages in m2p table, as it's not used, so related setting is
skipped.
Besides, a 'MEMF_epc' memflag is introduced to tell the allocator to get
EPC pages rather than normal memory.
Signed-off-by: Boqun Feng
---
xen/common/page_alloc.c | 31 +--
for those guests, destination VM will behavior in unexpected
manner. But I am not sure we need to care about other OSes.
For the same reason, we are able to support check pointing for SGX guest (only
Linux and Windows);
For snapshot, we can support snapshot SGX guest by either:
- Suspend
lid. Used when domain
goes to S3-S5, or being destroyed.
- domain_destroy_epc # destroy and free domain's EPC.
For now, those functions only work for HVM domain, and will return
-EFAULT if calling these for non-HVM domain.
Signed-off-by: Kai Huang
Signed
_has_sgx' should be the only way to query for the SGX support
enabled or not in the whole system.
Dedicated files sgx.c and sgx.h are added for bulk of above SGX
detection code detection code, and for further SGX code as well.
Signed-off-by: Kai Huang
Signed-off-by: Boqun Feng
---
docs/misc
33 matches
Mail list logo