Merge tag 'v4.3-rc3' into x86/urgent, before applying dependent fix
Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
@@ -86,6 +86,16 @@ extern u64 asmlinkage efi_call(void *fp, ...);
|
||||
extern void __iomem *__init efi_ioremap(unsigned long addr, unsigned long size,
|
||||
u32 type, u64 attribute);
|
||||
|
||||
/*
|
||||
* CONFIG_KASAN may redefine memset to __memset. __memset function is present
|
||||
* only in kernel binary. Since the EFI stub linked into a separate binary it
|
||||
* doesn't have __memset(). So we should use standard memset from
|
||||
* arch/x86/boot/compressed/string.c. The same applies to memcpy and memmove.
|
||||
*/
|
||||
#undef memcpy
|
||||
#undef memset
|
||||
#undef memmove
|
||||
|
||||
#endif /* CONFIG_X86_32 */
|
||||
|
||||
extern struct efi_scratch efi_scratch;
|
||||
|
@@ -40,6 +40,7 @@
|
||||
|
||||
#define KVM_PIO_PAGE_OFFSET 1
|
||||
#define KVM_COALESCED_MMIO_PAGE_OFFSET 2
|
||||
#define KVM_HALT_POLL_NS_DEFAULT 500000
|
||||
|
||||
#define KVM_IRQCHIP_NUM_PINS KVM_IOAPIC_NUM_PINS
|
||||
|
||||
|
@@ -331,6 +331,7 @@
|
||||
/* C1E active bits in int pending message */
|
||||
#define K8_INTP_C1E_ACTIVE_MASK 0x18000000
|
||||
#define MSR_K8_TSEG_ADDR 0xc0010112
|
||||
#define MSR_K8_TSEG_MASK 0xc0010113
|
||||
#define K8_MTRRFIXRANGE_DRAM_ENABLE 0x00040000 /* MtrrFixDramEn bit */
|
||||
#define K8_MTRRFIXRANGE_DRAM_MODIFY 0x00080000 /* MtrrFixDramModEn bit */
|
||||
#define K8_MTRR_RDMEM_WRMEM_MASK 0x18181818 /* Mask: RdMem|WrMem */
|
||||
|
@@ -3322,7 +3322,7 @@ walk_shadow_page_get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr, u64 *sptep)
|
||||
break;
|
||||
|
||||
reserved |= is_shadow_zero_bits_set(&vcpu->arch.mmu, spte,
|
||||
leaf);
|
||||
iterator.level);
|
||||
}
|
||||
|
||||
walk_shadow_page_lockless_end(vcpu);
|
||||
@@ -3614,7 +3614,7 @@ static void
|
||||
__reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
|
||||
struct rsvd_bits_validate *rsvd_check,
|
||||
int maxphyaddr, int level, bool nx, bool gbpages,
|
||||
bool pse)
|
||||
bool pse, bool amd)
|
||||
{
|
||||
u64 exb_bit_rsvd = 0;
|
||||
u64 gbpages_bit_rsvd = 0;
|
||||
@@ -3631,7 +3631,7 @@ __reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
|
||||
* Non-leaf PML4Es and PDPEs reserve bit 8 (which would be the G bit for
|
||||
* leaf entries) on AMD CPUs only.
|
||||
*/
|
||||
if (guest_cpuid_is_amd(vcpu))
|
||||
if (amd)
|
||||
nonleaf_bit8_rsvd = rsvd_bits(8, 8);
|
||||
|
||||
switch (level) {
|
||||
@@ -3699,7 +3699,7 @@ static void reset_rsvds_bits_mask(struct kvm_vcpu *vcpu,
|
||||
__reset_rsvds_bits_mask(vcpu, &context->guest_rsvd_check,
|
||||
cpuid_maxphyaddr(vcpu), context->root_level,
|
||||
context->nx, guest_cpuid_has_gbpages(vcpu),
|
||||
is_pse(vcpu));
|
||||
is_pse(vcpu), guest_cpuid_is_amd(vcpu));
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -3749,13 +3749,24 @@ static void reset_rsvds_bits_mask_ept(struct kvm_vcpu *vcpu,
|
||||
void
|
||||
reset_shadow_zero_bits_mask(struct kvm_vcpu *vcpu, struct kvm_mmu *context)
|
||||
{
|
||||
/*
|
||||
* Passing "true" to the last argument is okay; it adds a check
|
||||
* on bit 8 of the SPTEs which KVM doesn't use anyway.
|
||||
*/
|
||||
__reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check,
|
||||
boot_cpu_data.x86_phys_bits,
|
||||
context->shadow_root_level, context->nx,
|
||||
guest_cpuid_has_gbpages(vcpu), is_pse(vcpu));
|
||||
guest_cpuid_has_gbpages(vcpu), is_pse(vcpu),
|
||||
true);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(reset_shadow_zero_bits_mask);
|
||||
|
||||
static inline bool boot_cpu_is_amd(void)
|
||||
{
|
||||
WARN_ON_ONCE(!tdp_enabled);
|
||||
return shadow_x_mask == 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* the direct page table on host, use as much mmu features as
|
||||
* possible, however, kvm currently does not do execution-protection.
|
||||
@@ -3764,11 +3775,11 @@ static void
|
||||
reset_tdp_shadow_zero_bits_mask(struct kvm_vcpu *vcpu,
|
||||
struct kvm_mmu *context)
|
||||
{
|
||||
if (guest_cpuid_is_amd(vcpu))
|
||||
if (boot_cpu_is_amd())
|
||||
__reset_rsvds_bits_mask(vcpu, &context->shadow_zero_check,
|
||||
boot_cpu_data.x86_phys_bits,
|
||||
context->shadow_root_level, false,
|
||||
cpu_has_gbpages, true);
|
||||
cpu_has_gbpages, true, true);
|
||||
else
|
||||
__reset_rsvds_bits_mask_ept(&context->shadow_zero_check,
|
||||
boot_cpu_data.x86_phys_bits,
|
||||
|
@@ -202,6 +202,7 @@ module_param(npt, int, S_IRUGO);
|
||||
static int nested = true;
|
||||
module_param(nested, int, S_IRUGO);
|
||||
|
||||
static void svm_set_cr0(struct kvm_vcpu *vcpu, unsigned long cr0);
|
||||
static void svm_flush_tlb(struct kvm_vcpu *vcpu);
|
||||
static void svm_complete_interrupts(struct vcpu_svm *svm);
|
||||
|
||||
@@ -1263,7 +1264,8 @@ static void init_vmcb(struct vcpu_svm *svm, bool init_event)
|
||||
* svm_set_cr0() sets PG and WP and clears NW and CD on save->cr0.
|
||||
* It also updates the guest-visible cr0 value.
|
||||
*/
|
||||
(void)kvm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
|
||||
svm_set_cr0(&svm->vcpu, X86_CR0_NW | X86_CR0_CD | X86_CR0_ET);
|
||||
kvm_mmu_reset_context(&svm->vcpu);
|
||||
|
||||
save->cr4 = X86_CR4_PAE;
|
||||
/* rdx = ?? */
|
||||
|
@@ -2190,6 +2190,8 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, struct msr_data *msr_info)
|
||||
case MSR_IA32_LASTINTFROMIP:
|
||||
case MSR_IA32_LASTINTTOIP:
|
||||
case MSR_K8_SYSCFG:
|
||||
case MSR_K8_TSEG_ADDR:
|
||||
case MSR_K8_TSEG_MASK:
|
||||
case MSR_K7_HWCR:
|
||||
case MSR_VM_HSAVE_PA:
|
||||
case MSR_K8_INT_PENDING_MSG:
|
||||
|
@@ -166,6 +166,7 @@ void pcibios_fixup_bus(struct pci_bus *b)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
pci_read_bridge_bases(b);
|
||||
list_for_each_entry(dev, &b->devices, bus_list)
|
||||
pcibios_fixup_device_resources(dev);
|
||||
}
|
||||
|
Reference in New Issue
Block a user