Displaying 20 results from an estimated 79 matches for "__ro_after_init".
2020 Feb 07
0
[RFC PATCH v7 24/78] KVM: x86: add .gpt_translation_fault()
...PF);
}
+static bool svm_gpt_translation_fault(struct kvm_vcpu *vcpu)
+{
+ struct vcpu_svm *svm = to_svm(vcpu);
+ struct vmcb *vmcb = get_host_vmcb(svm);
+
+ if (vmcb->control.exit_info_1 & PFERR_GUEST_PAGE_MASK)
+ return true;
+
+ return false;
+}
+
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -7513,6 +7524,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.fault_gla = svm_fault_gla,
.spt_fault = svm_spt_fault,
+ .gpt_translation_fault = svm_gpt_translation_fault,
};
static int __init svm_i...
2020 Feb 07
0
[RFC PATCH v7 23/78] KVM: x86: add .spt_fault()
...turn svm->vcpu.arch.cr2 ? svm->vcpu.arch.cr2 : ~0ull;
}
+static bool svm_spt_fault(struct kvm_vcpu *vcpu)
+{
+ struct vcpu_svm *svm = to_svm(vcpu);
+ struct vmcb *vmcb = get_host_vmcb(svm);
+
+ return (vmcb->control.exit_code == SVM_EXIT_NPF);
+}
+
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -7504,6 +7512,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.apic_init_signal_blocked = svm_apic_init_signal_blocked,
.fault_gla = svm_fault_gla,
+ .spt_fault = svm_spt_fault,
};
static int __init...
2019 Aug 09
0
[RFC PATCH v6 26/92] kvm: x86: add kvm_mmu_nested_pagefault()
...3a24d360..3c099c56099c 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -7098,6 +7098,11 @@ static int nested_enable_evmcs(struct kvm_vcpu *vcpu,
return -ENODEV;
}
+static bool svm_nested_pagefault(struct kvm_vcpu *vcpu)
+{
+ return false;
+}
+
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -7109,6 +7114,8 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_accelerated_tpr = svm_cpu_has_accelerated_tpr,
.has_emulated_msr = svm_has_emulated_msr,
+ .nested_pagefault = svm_nested_pagefault...
2020 Feb 07
0
[RFC PATCH v7 10/78] KVM: x86: add .bp_intercepted() to struct kvm_x86_ops
...m_vcpu *vcpu)
(svm->vmcb->control.intercept & (1ULL << INTERCEPT_INIT));
}
+static inline bool svm_bp_intercepted(struct kvm_vcpu *vcpu)
+{
+ struct vcpu_svm *svm = to_svm(vcpu);
+
+ return get_exception_intercept(svm, BP_VECTOR);
+}
+
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -7268,6 +7282,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.vcpu_blocking = svm_vcpu_blocking,
.vcpu_unblocking = svm_vcpu_unblocking,
+ .bp_intercepted = svm_bp_intercepted,
.update_bp_intercept =...
2020 Feb 07
0
[RFC PATCH v7 19/78] KVM: x86: add .control_msr_intercept()
..._vcpu *vcpu, unsigned int msr,
+ int type, bool enable)
+{
+ const struct vcpu_svm *svm = to_svm(vcpu);
+ u32 *msrpm = is_guest_mode(vcpu) ? svm->nested.msrpm :
+ svm->msrpm;
+
+ set_msr_interception(vcpu, msrpm, msr, type, !enable);
+}
+
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -7370,6 +7380,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.get_msr_feature = svm_get_msr_feature,
.get_msr = svm_get_msr,
.set_msr = svm_set_msr,
+ .control_msr_intercept = svm_control_msr_intercept...
2020 Feb 07
0
[RFC PATCH v7 12/78] KVM: x86: add .cr3_write_intercepted()
...rite_intercepted(struct kvm_vcpu *vcpu)
+{
+ struct vcpu_svm *svm = to_svm(vcpu);
+
+ return is_cr_intercept(svm, INTERCEPT_CR3_WRITE);
+}
+
static void svm_control_cr3_intercept(struct kvm_vcpu *vcpu, int type,
bool enable)
{
@@ -7311,6 +7318,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.set_cr3 = svm_set_cr3,
.set_cr4 = svm_set_cr4,
.control_cr3_intercept = svm_control_cr3_intercept,
+ .cr3_write_intercepted = svm_cr3_write_intercepted,
.set_efer = svm_set_efer,
.get_idt = svm_get_idt,
.set_idt = svm_set_idt,
diff --git a/arch/x86/kvm/vmx/vmx.c b/arch/x86/kvm/vmx/...
2020 Feb 07
0
[RFC PATCH v7 11/78] KVM: x86: add .control_cr3_intercept() to struct kvm_x86_ops
...& CR_TYPE_R)
+ enable ? set_cr_intercept(svm, INTERCEPT_CR3_READ) :
+ clr_cr_intercept(svm, INTERCEPT_CR3_READ);
+ if (type & CR_TYPE_W)
+ enable ? set_cr_intercept(svm, INTERCEPT_CR3_WRITE) :
+ clr_cr_intercept(svm, INTERCEPT_CR3_WRITE);
+}
+
static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.cpu_has_kvm_support = has_svm,
.disabled_by_bios = is_disabled,
@@ -7297,6 +7310,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.set_cr0 = svm_set_cr0,
.set_cr3 = svm_set_cr3,
.set_cr4 = svm_set_cr4,
+ .control_cr3_intercept = svm_control_cr3_intercept,
.set_efer =...
2020 Feb 12
5
[PATCH 0/5] x86/vmware: Steal time accounting support
Hello,
This patchset introduces steal time accounting support for
the VMware guest. The idea and implementation of guest
steal time support is similar to KVM ones and it is based
on steal clock. The steal clock is a per CPU structure in
a shared memory between hypervisor and guest, initialized
by each CPU through hypercall. Steal clock is got updated
by the hypervisor and read by the guest.
The
2020 Feb 07
0
[RFC PATCH v7 15/78] KVM: x86: export .msr_write_intercepted()
...nt seg);
void (*get_segment)(struct kvm_vcpu *vcpu,
struct kvm_segment *var, int seg);
diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c
index bf1f2bca5357..e3369562d6fe 100644
--- a/arch/x86/kvm/svm.c
+++ b/arch/x86/kvm/svm.c
@@ -7353,6 +7353,7 @@ static struct kvm_x86_ops svm_x86_ops __ro_after_init = {
.get_msr_feature = svm_get_msr_feature,
.get_msr = svm_get_msr,
.set_msr = svm_set_msr,
+ .msr_write_intercepted = msr_write_intercepted,
.get_segment_base = svm_get_segment_base,
.get_segment = svm_get_segment,
.set_segment = svm_set_segment,
diff --git a/arch/x86/kvm/vmx/vmx.c b/a...
2020 Feb 07
0
[RFC PATCH v7 25/78] KVM: x86: add .control_singlestep()
...;
}
+static void vmx_control_singlestep(struct kvm_vcpu *vcpu, bool enable)
+{
+ if (enable)
+ exec_controls_setbit(to_vmx(vcpu),
+ CPU_BASED_MONITOR_TRAP_FLAG);
+ else
+ exec_controls_clearbit(to_vmx(vcpu),
+ CPU_BASED_MONITOR_TRAP_FLAG);
+}
+
static struct kvm_x86_ops vmx_x86_ops __ro_after_init = {
.cpu_has_kvm_support = cpu_has_kvm_support,
.disabled_by_bios = vmx_disabled_by_bios,
@@ -7998,6 +8008,7 @@ static struct kvm_x86_ops vmx_x86_ops __ro_after_init = {
.fault_gla = vmx_fault_gla,
.spt_fault = vmx_spt_fault,
.gpt_translation_fault = vmx_gpt_translation_fault,
+ .control_...
2020 Jul 14
0
[PATCH v4 13/75] x86/boot/compressed/64: Rename kaslr_64.c to ident_map_64.c
...mpressed/kaslr.c
index d7408af55738..7c61a8c5b9cf 100644
--- a/arch/x86/boot/compressed/kaslr.c
+++ b/arch/x86/boot/compressed/kaslr.c
@@ -43,17 +43,8 @@
#define STATIC
#include <linux/decompress/mm.h>
-#ifdef CONFIG_X86_5LEVEL
-unsigned int __pgtable_l5_enabled;
-unsigned int pgdir_shift __ro_after_init = 39;
-unsigned int ptrs_per_p4d __ro_after_init = 1;
-#endif
-
extern unsigned long get_cmd_line_ptr(void);
-/* Used by PAGE_KERN* macros: */
-pteval_t __default_kernel_pte_mask __read_mostly = ~0;
-
/* Simplified build-specific string for starting entropy. */
static const char build_str[] =...
2016 Oct 26
1
[PATCH 3/3] x86/vmware: Add paravirt sched clock
...ypervisor.h>
#include <asm/apic.h>
+#include <asm/timer.h>
#define CPUID_VMWARE_INFO_LEAF 0x40000000
#define VMWARE_HYPERVISOR_MAGIC 0x564D5868
@@ -62,10 +64,46 @@ static unsigned long vmware_get_tsc_khz(void)
}
#ifdef CONFIG_PARAVIRT
+static struct cyc2ns_data vmware_cyc2ns __ro_after_init;
+
+static int vmw_sched_clock __initdata = 1;
+static __init int setup_vmw_sched_clock(char *s)
+{
+ vmw_sched_clock = 0;
+ return 0;
+}
+early_param("no-vmw-sched-clock", setup_vmw_sched_clock);
+
+static unsigned long long vmware_sched_clock(void)
+{
+ unsigned long long ns;
+
+ ns = m...
2016 Oct 26
5
[PATCH 0/3] x86/vmware guest improvements
This patchset includes several VMware guest improvements:
Alexey Makhalov (3):
x86/vmware: Use tsc_khz value for calibrate_cpu()
x86/vmware: Add basic paravirt ops support
x86/vmware: Add paravirt sched clock
Documentation/kernel-parameters.txt | 4 +++
arch/x86/kernel/cpu/vmware.c | 51 +++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
--
2.10.1
2016 Oct 26
5
[PATCH 0/3] x86/vmware guest improvements
This patchset includes several VMware guest improvements:
Alexey Makhalov (3):
x86/vmware: Use tsc_khz value for calibrate_cpu()
x86/vmware: Add basic paravirt ops support
x86/vmware: Add paravirt sched clock
Documentation/kernel-parameters.txt | 4 +++
arch/x86/kernel/cpu/vmware.c | 51 +++++++++++++++++++++++++++++++++++++
2 files changed, 55 insertions(+)
--
2.10.1
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...__visible struct pv_cpu_ops pv_cpu_ops = {
.set_ldt = native_set_ldt,
.load_gdt = native_load_gdt,
.load_idt = native_load_idt,
- .store_idt = native_store_idt,
.store_tr = native_store_tr,
.load_tls = native_load_tls,
#ifdef CONFIG_X86_64
@@ -414,8 +412,6 @@ struct pv_mmu_ops pv_mmu_ops __ro_after_init = {
.set_pte = native_set_pte,
.set_pte_at = native_set_pte_at,
.set_pmd = native_set_pmd,
- .set_pmd_at = native_set_pmd_at,
- .pte_update = paravirt_nop,
.ptep_modify_prot_start = __ptep_modify_prot_start,
.ptep_modify_prot_commit = __ptep_modify_prot_commit,
@@ -427,7 +423,6 @@ struc...
2017 Sep 04
0
[PATCH] x86/paravirt: remove no longer used paravirt functions
...__visible struct pv_cpu_ops pv_cpu_ops = {
.set_ldt = native_set_ldt,
.load_gdt = native_load_gdt,
.load_idt = native_load_idt,
- .store_idt = native_store_idt,
.store_tr = native_store_tr,
.load_tls = native_load_tls,
#ifdef CONFIG_X86_64
@@ -414,8 +412,6 @@ struct pv_mmu_ops pv_mmu_ops __ro_after_init = {
.set_pte = native_set_pte,
.set_pte_at = native_set_pte_at,
.set_pmd = native_set_pmd,
- .set_pmd_at = native_set_pmd_at,
- .pte_update = paravirt_nop,
.ptep_modify_prot_start = __ptep_modify_prot_start,
.ptep_modify_prot_commit = __ptep_modify_prot_commit,
@@ -427,7 +423,6 @@ struc...
2016 Oct 26
0
[PATCH 3/3] x86/vmware: Add paravirt sched clock
...lexey Makhalov wrote:
> no-vmw-sched-clock kernel parameter is added to switch back to the
> native_sched_clock() implementation.
You are not switching back. The parameter is used to disable the paravirt
sched clock.
> #ifdef CONFIG_PARAVIRT
> +static struct cyc2ns_data vmware_cyc2ns __ro_after_init;
> +
> +static int vmw_sched_clock __initdata = 1;
> +static __init int setup_vmw_sched_clock(char *s)
Please stop glueing a variable to a function w/o a new line between
them. It's just stopping the reading flow.
> +{
> + vmw_sched_clock = 0;
> + return 0;
> +}
> +ear...
2016 Oct 20
0
[PATCH] x86/vmware: Read tsc_khz only once - at boot time
...el/cpu/vmware.c b/arch/x86/kernel/cpu/vmware.c
index 5130985..46c7b9d 100644
--- a/arch/x86/kernel/cpu/vmware.c
+++ b/arch/x86/kernel/cpu/vmware.c
@@ -48,6 +48,8 @@
"2"(VMWARE_HYPERVISOR_PORT), "3"(UINT_MAX) : \
"memory");
+static unsigned long vmware_tsc_khz __ro_after_init;
+
static inline int __vmware_platform(void)
{
uint32_t eax, ebx, ecx, edx;
@@ -57,35 +59,32 @@ static inline int __vmware_platform(void)
static unsigned long vmware_get_tsc_khz(void)
{
- uint64_t tsc_hz, lpj;
- uint32_t eax, ebx, ecx, edx;
-
- VMWARE_PORT(GETHZ, eax, ebx, ecx, edx);
-
- ts...
2020 Feb 11
0
[PATCH 23/62] x86/idt: Move IDT to data segment
...idt.c
@@ -166,7 +166,7 @@ static const __initconst struct idt_data dbg_idts[] = {
#endif
/* Must be page-aligned because the real IDT is used in a fixmap. */
-gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss;
+gate_desc idt_table[IDT_ENTRIES] __page_aligned_data;
struct desc_ptr idt_descr __ro_after_init = {
.size = (IDT_ENTRIES * 2 * sizeof(unsigned long)) - 1,
--
2.17.1
2020 Jul 14
0
[PATCH v4 27/75] x86/idt: Move IDT to data segment
...,7 @@ static const __initconst struct idt_data apic_idts[] = {
};
/* Must be page-aligned because the real IDT is used in the cpu entry area */
-static gate_desc idt_table[IDT_ENTRIES] __page_aligned_bss;
+static gate_desc idt_table[IDT_ENTRIES] __page_aligned_data;
struct desc_ptr idt_descr __ro_after_init = {
.size = IDT_TABLE_SIZE - 1,
--
2.27.0