Commit 30d4efb2 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'for-linus-6.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip

Pull xen updates from Juergen Gross:

 - fix the migration of a Xen virq to another cpu plus some related
   cleanup work

 - clean up Xen-PV mode specific code, resulting in removing some of
   that code in the resulting binary in case CONFIG_XEN_PV is not set

 - fixes and cleanup for suspend handling under Xen

* tag 'for-linus-6.18-rc1-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  xen: take system_transition_mutex on suspend
  xen/manage: Fix suspend error path
  xen/events: Update virq_to_irq on migration
  xen/events: Return -EEXIST for bound VIRQs
  xen/events: Cleanup find_virq() return codes
  x86/xen: select HIBERNATE_CALLBACKS more directly
  drivers/xen/gntdev: use xen_pv_domain() instead of cached value
  xen: replace XENFEAT_auto_translated_physmap with xen_pv_domain()
  xen: rework xen_pv_domain()
parents 41755299 9d52b0b4
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@ CONFIG_CPU_FREQ=y

# x86 xen specific config options
CONFIG_XEN_PVH=y
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_XEN_MCE_LOG=y
CONFIG_XEN_ACPI_PROCESSOR=m
+7 −7
Original line number Diff line number Diff line
@@ -12,9 +12,9 @@
#include <asm/extable.h>
#include <asm/page.h>

#include <xen/xen.h>
#include <xen/interface/xen.h>
#include <xen/interface/grant_table.h>
#include <xen/features.h>

/* Xen machine address */
typedef struct xmaddr {
@@ -162,7 +162,7 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn)
	 * pfn_to_mfn. This will have to be removed when we figured
	 * out which call.
	 */
	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return pfn;

	mfn = __pfn_to_mfn(pfn);
@@ -175,7 +175,7 @@ static inline unsigned long pfn_to_mfn(unsigned long pfn)

static inline int phys_to_machine_mapping_valid(unsigned long pfn)
{
	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return 1;

	return __pfn_to_mfn(pfn) != INVALID_P2M_ENTRY;
@@ -210,7 +210,7 @@ static inline unsigned long mfn_to_pfn(unsigned long mfn)
	 * gfn_to_pfn. This will have to be removed when we figure
	 * out which call.
	 */
	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return mfn;

	pfn = mfn_to_pfn_no_overrides(mfn);
@@ -242,7 +242,7 @@ static inline xpaddr_t machine_to_phys(xmaddr_t machine)
/* Pseudo-physical <-> Guest conversion */
static inline unsigned long pfn_to_gfn(unsigned long pfn)
{
	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return pfn;
	else
		return pfn_to_mfn(pfn);
@@ -250,7 +250,7 @@ static inline unsigned long pfn_to_gfn(unsigned long pfn)

static inline unsigned long gfn_to_pfn(unsigned long gfn)
{
	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return gfn;
	else
		return mfn_to_pfn(gfn);
@@ -284,7 +284,7 @@ static inline unsigned long bfn_to_local_pfn(unsigned long mfn)
{
	unsigned long pfn;

	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return mfn;

	pfn = mfn_to_pfn(mfn);
+1 −6
Original line number Diff line number Diff line
@@ -8,6 +8,7 @@ config XEN
	depends on PARAVIRT
	select PARAVIRT_CLOCK
	select X86_HV_CALLBACK_VECTOR
	select HIBERNATE_CALLBACKS
	depends on X86_64 || (X86_32 && X86_PAE)
	depends on X86_64 || (X86_GENERIC || MPENTIUM4 || MATOM)
	depends on X86_LOCAL_APIC && X86_TSC
@@ -64,12 +65,6 @@ config XEN_PVHVM_GUEST
	help
	  Support running as a Xen PVHVM guest.

config XEN_SAVE_RESTORE
	bool
	depends on XEN
	select HIBERNATE_CALLBACKS
	default y

config XEN_DEBUG_FS
	bool "Enable Xen debug and tuning parameters in debugfs"
	depends on XEN && DEBUG_FS
+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,6 @@ static bool __init xen_check_xsave(void)

static void __init xen_init_capabilities(void)
{
	setup_force_cpu_cap(X86_FEATURE_XENPV);
	setup_clear_cpu_cap(X86_FEATURE_DCA);
	setup_clear_cpu_cap(X86_FEATURE_APERFMPERF);
	setup_clear_cpu_cap(X86_FEATURE_MTRR);
@@ -1402,6 +1401,7 @@ asmlinkage __visible void __init xen_start_kernel(struct start_info *si)
			JMP32_INSN_SIZE);

	xen_domain_type = XEN_PV_DOMAIN;
	setup_force_cpu_cap(X86_FEATURE_XENPV);
	xen_start_flags = xen_start_info->flags;
	/* Interrupts are guaranteed to be off initially. */
	early_boot_irqs_disabled = true;
+1 −1
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ EXPORT_SYMBOL_GPL(arbitrary_virt_to_machine);
int xen_unmap_domain_gfn_range(struct vm_area_struct *vma,
			       int nr, struct page **pages)
{
	if (xen_feature(XENFEAT_auto_translated_physmap))
	if (!xen_pv_domain())
		return xen_xlate_unmap_gfn_range(vma, nr, pages);

	if (!pages)
Loading