mirror of
https://github.com/torvalds/linux.git
synced 2024-11-25 05:32:00 +00:00
xen: branch for v6.7-rc2
-----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRTLbB6QfY48x44uB6AXGG7T9hjvgUCZVX+TwAKCRCAXGG7T9hj vmy/AP9E0XUIT05gFVcoyHXsh5VfCd7pu4bSDtf5TRZIpzgV2wD/czHkik77rJ55 kPtFuZ4gEngFVSM8z3C+bKszEWu7rgM= =Zy37 -----END PGP SIGNATURE----- Merge tag 'for-linus-6.7a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip Pull xen updates from Juergen Gross: - A fix in the Xen events driver avoiding the use of RCU after the call to rcu_report_dead() when taking a cpu down - A fix for running as Xen dom0 to line up ACPI's idea of power management capabilities with the one of Xen - A cleanup eliminating several kernel-doc warnings in Xen related code - A cleanup series of the Xen events driver * tag 'for-linus-6.7a-rc2-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip: xen/events: remove some info_for_irq() calls in pirq handling xen/events: modify internal [un]bind interfaces xen/events: drop xen_allocate_irqs_dynamic() xen/events: remove some simple helpers from events_base.c xen/events: reduce externally visible helper functions xen/events: remove unused functions xen/events: fix delayed eoi list handling xen/shbuf: eliminate 17 kernel-doc warnings acpi/processor: sanitize _OSC/_PDC capabilities for Xen dom0 xen/events: avoid using info_for_irq() in xen_send_IPI_one()
This commit is contained in:
commit
6eb1acd976
@ -16,6 +16,9 @@
|
||||
#include <asm/x86_init.h>
|
||||
#include <asm/cpufeature.h>
|
||||
#include <asm/irq_vectors.h>
|
||||
#include <asm/xen/hypervisor.h>
|
||||
|
||||
#include <xen/xen.h>
|
||||
|
||||
#ifdef CONFIG_ACPI_APEI
|
||||
# include <asm/pgtable_types.h>
|
||||
@ -127,6 +130,17 @@ static inline void arch_acpi_set_proc_cap_bits(u32 *cap)
|
||||
if (!cpu_has(c, X86_FEATURE_MWAIT) ||
|
||||
boot_option_idle_override == IDLE_NOMWAIT)
|
||||
*cap &= ~(ACPI_PROC_CAP_C_C1_FFH | ACPI_PROC_CAP_C_C2C3_FFH);
|
||||
|
||||
if (xen_initial_domain()) {
|
||||
/*
|
||||
* When Linux is running as Xen dom0, the hypervisor is the
|
||||
* entity in charge of the processor power management, and so
|
||||
* Xen needs to check the OS capabilities reported in the
|
||||
* processor capabilities buffer matches what the hypervisor
|
||||
* driver supports.
|
||||
*/
|
||||
xen_sanitize_proc_cap_bits(cap);
|
||||
}
|
||||
}
|
||||
|
||||
static inline bool acpi_has_cpu_in_madt(void)
|
||||
|
@ -100,4 +100,13 @@ static inline void leave_lazy(enum xen_lazy_mode mode)
|
||||
|
||||
enum xen_lazy_mode xen_get_lazy_mode(void);
|
||||
|
||||
#if defined(CONFIG_XEN_DOM0) && defined(CONFIG_ACPI)
|
||||
void xen_sanitize_proc_cap_bits(uint32_t *buf);
|
||||
#else
|
||||
static inline void xen_sanitize_proc_cap_bits(uint32_t *buf)
|
||||
{
|
||||
BUG();
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_X86_XEN_HYPERVISOR_H */
|
||||
|
@ -171,11 +171,11 @@ static void evtchn_2l_handle_events(unsigned cpu, struct evtchn_loop_ctrl *ctrl)
|
||||
int i;
|
||||
struct shared_info *s = HYPERVISOR_shared_info;
|
||||
struct vcpu_info *vcpu_info = __this_cpu_read(xen_vcpu);
|
||||
evtchn_port_t evtchn;
|
||||
|
||||
/* Timer interrupt has highest priority. */
|
||||
irq = irq_from_virq(cpu, VIRQ_TIMER);
|
||||
irq = irq_evtchn_from_virq(cpu, VIRQ_TIMER, &evtchn);
|
||||
if (irq != -1) {
|
||||
evtchn_port_t evtchn = evtchn_from_irq(irq);
|
||||
word_idx = evtchn / BITS_PER_LONG;
|
||||
bit_idx = evtchn % BITS_PER_LONG;
|
||||
if (active_evtchns(cpu, s, word_idx) & (1ULL << bit_idx))
|
||||
@ -328,9 +328,9 @@ irqreturn_t xen_debug_interrupt(int irq, void *dev_id)
|
||||
for (i = 0; i < EVTCHN_2L_NR_CHANNELS; i++) {
|
||||
if (sync_test_bit(i, BM(sh->evtchn_pending))) {
|
||||
int word_idx = i / BITS_PER_EVTCHN_WORD;
|
||||
printk(" %d: event %d -> irq %d%s%s%s\n",
|
||||
printk(" %d: event %d -> irq %u%s%s%s\n",
|
||||
cpu_from_evtchn(i), i,
|
||||
get_evtchn_to_irq(i),
|
||||
irq_from_evtchn(i),
|
||||
sync_test_bit(word_idx, BM(&v->evtchn_pending_sel))
|
||||
? "" : " l2-clear",
|
||||
!sync_test_bit(i, BM(sh->evtchn_mask))
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,6 @@ struct evtchn_ops {
|
||||
|
||||
extern const struct evtchn_ops *evtchn_ops;
|
||||
|
||||
int get_evtchn_to_irq(evtchn_port_t evtchn);
|
||||
void handle_irq_for_port(evtchn_port_t port, struct evtchn_loop_ctrl *ctrl);
|
||||
|
||||
unsigned int cpu_from_evtchn(evtchn_port_t evtchn);
|
||||
|
@ -47,6 +47,9 @@
|
||||
#include <asm/xen/hypervisor.h>
|
||||
#include <asm/xen/hypercall.h>
|
||||
|
||||
#ifdef CONFIG_ACPI
|
||||
#include <acpi/processor.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* @cpu_id: Xen physical cpu logic number
|
||||
@ -400,4 +403,23 @@ bool __init xen_processor_present(uint32_t acpi_id)
|
||||
|
||||
return online;
|
||||
}
|
||||
|
||||
void xen_sanitize_proc_cap_bits(uint32_t *cap)
|
||||
{
|
||||
struct xen_platform_op op = {
|
||||
.cmd = XENPF_set_processor_pminfo,
|
||||
.u.set_pminfo.id = -1,
|
||||
.u.set_pminfo.type = XEN_PM_PDC,
|
||||
};
|
||||
u32 buf[3] = { ACPI_PDC_REVISION_ID, 1, *cap };
|
||||
int ret;
|
||||
|
||||
set_xen_guest_handle(op.u.set_pminfo.pdc, buf);
|
||||
ret = HYPERVISOR_platform_op(&op);
|
||||
if (ret)
|
||||
pr_err("sanitize of _PDC buffer bits from Xen failed: %d\n",
|
||||
ret);
|
||||
else
|
||||
*cap = buf[2];
|
||||
}
|
||||
#endif
|
||||
|
@ -21,7 +21,7 @@
|
||||
|
||||
#include <xen/xen-front-pgdir-shbuf.h>
|
||||
|
||||
/**
|
||||
/*
|
||||
* This structure represents the structure of a shared page
|
||||
* that contains grant references to the pages of the shared
|
||||
* buffer. This structure is common to many Xen para-virtualized
|
||||
@ -33,7 +33,7 @@ struct xen_page_directory {
|
||||
grant_ref_t gref[]; /* Variable length */
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* Shared buffer ops which are differently implemented
|
||||
* depending on the allocation mode, e.g. if the buffer
|
||||
* is allocated by the corresponding backend or frontend.
|
||||
@ -61,7 +61,7 @@ struct xen_front_pgdir_shbuf_ops {
|
||||
int (*unmap)(struct xen_front_pgdir_shbuf *buf);
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get granted reference to the very first page of the
|
||||
* page directory. Usually this is passed to the backend,
|
||||
* so it can find/fill the grant references to the buffer's
|
||||
@ -81,7 +81,7 @@ xen_front_pgdir_shbuf_get_dir_start(struct xen_front_pgdir_shbuf *buf)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xen_front_pgdir_shbuf_get_dir_start);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Map granted references of the shared buffer.
|
||||
*
|
||||
* Depending on the shared buffer mode of allocation
|
||||
@ -102,7 +102,7 @@ int xen_front_pgdir_shbuf_map(struct xen_front_pgdir_shbuf *buf)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xen_front_pgdir_shbuf_map);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Unmap granted references of the shared buffer.
|
||||
*
|
||||
* Depending on the shared buffer mode of allocation
|
||||
@ -123,7 +123,7 @@ int xen_front_pgdir_shbuf_unmap(struct xen_front_pgdir_shbuf *buf)
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(xen_front_pgdir_shbuf_unmap);
|
||||
|
||||
/**
|
||||
/*
|
||||
* Free all the resources of the shared buffer.
|
||||
*
|
||||
* \param buf shared buffer which resources to be freed.
|
||||
@ -150,7 +150,7 @@ EXPORT_SYMBOL_GPL(xen_front_pgdir_shbuf_free);
|
||||
offsetof(struct xen_page_directory, \
|
||||
gref)) / sizeof(grant_ref_t))
|
||||
|
||||
/**
|
||||
/*
|
||||
* Get the number of pages the page directory consumes itself.
|
||||
*
|
||||
* \param buf shared buffer.
|
||||
@ -160,7 +160,7 @@ static int get_num_pages_dir(struct xen_front_pgdir_shbuf *buf)
|
||||
return DIV_ROUND_UP(buf->num_pages, XEN_NUM_GREFS_PER_PAGE);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Calculate the number of grant references needed to share the buffer
|
||||
* and its pages when backend allocates the buffer.
|
||||
*
|
||||
@ -172,7 +172,7 @@ static void backend_calc_num_grefs(struct xen_front_pgdir_shbuf *buf)
|
||||
buf->num_grefs = get_num_pages_dir(buf);
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Calculate the number of grant references needed to share the buffer
|
||||
* and its pages when frontend allocates the buffer.
|
||||
*
|
||||
@ -190,7 +190,7 @@ static void guest_calc_num_grefs(struct xen_front_pgdir_shbuf *buf)
|
||||
#define xen_page_to_vaddr(page) \
|
||||
((uintptr_t)pfn_to_kaddr(page_to_xen_pfn(page)))
|
||||
|
||||
/**
|
||||
/*
|
||||
* Unmap the buffer previously mapped with grant references
|
||||
* provided by the backend.
|
||||
*
|
||||
@ -238,7 +238,7 @@ static int backend_unmap(struct xen_front_pgdir_shbuf *buf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Map the buffer with grant references provided by the backend.
|
||||
*
|
||||
* \param buf shared buffer.
|
||||
@ -320,7 +320,7 @@ static int backend_map(struct xen_front_pgdir_shbuf *buf)
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Fill page directory with grant references to the pages of the
|
||||
* page directory itself.
|
||||
*
|
||||
@ -350,7 +350,7 @@ static void backend_fill_page_dir(struct xen_front_pgdir_shbuf *buf)
|
||||
page_dir->gref_dir_next_page = XEN_GREF_LIST_END;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Fill page directory with grant references to the pages of the
|
||||
* page directory and the buffer we share with the backend.
|
||||
*
|
||||
@ -389,7 +389,7 @@ static void guest_fill_page_dir(struct xen_front_pgdir_shbuf *buf)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Grant references to the frontend's buffer pages.
|
||||
*
|
||||
* These will be shared with the backend, so it can
|
||||
@ -418,7 +418,7 @@ static int guest_grant_refs_for_buffer(struct xen_front_pgdir_shbuf *buf,
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Grant all the references needed to share the buffer.
|
||||
*
|
||||
* Grant references to the page directory pages and, if
|
||||
@ -466,7 +466,7 @@ static int grant_references(struct xen_front_pgdir_shbuf *buf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
/*
|
||||
* Allocate all required structures to mange shared buffer.
|
||||
*
|
||||
* \param buf shared buffer.
|
||||
@ -506,7 +506,7 @@ static const struct xen_front_pgdir_shbuf_ops local_ops = {
|
||||
.grant_refs_for_buffer = guest_grant_refs_for_buffer,
|
||||
};
|
||||
|
||||
/**
|
||||
/*
|
||||
* Allocate a new instance of a shared buffer.
|
||||
*
|
||||
* \param cfg configuration to be used while allocating a new shared buffer.
|
||||
|
@ -88,7 +88,6 @@ void xen_irq_resume(void);
|
||||
|
||||
/* Clear an irq's pending state, in preparation for polling on it */
|
||||
void xen_clear_irq_pending(int irq);
|
||||
void xen_set_irq_pending(int irq);
|
||||
bool xen_test_irq_pending(int irq);
|
||||
|
||||
/* Poll waiting for an irq to become pending. In the usual case, the
|
||||
@ -101,8 +100,8 @@ void xen_poll_irq_timeout(int irq, u64 timeout);
|
||||
|
||||
/* Determine the IRQ which is bound to an event channel */
|
||||
unsigned int irq_from_evtchn(evtchn_port_t evtchn);
|
||||
int irq_from_virq(unsigned int cpu, unsigned int virq);
|
||||
evtchn_port_t evtchn_from_irq(unsigned irq);
|
||||
int irq_evtchn_from_virq(unsigned int cpu, unsigned int virq,
|
||||
evtchn_port_t *evtchn);
|
||||
|
||||
int xen_set_callback_via(uint64_t via);
|
||||
int xen_evtchn_do_upcall(void);
|
||||
@ -122,9 +121,6 @@ int xen_bind_pirq_msi_to_irq(struct pci_dev *dev, struct msi_desc *msidesc,
|
||||
/* De-allocates the above mentioned physical interrupt. */
|
||||
int xen_destroy_irq(int irq);
|
||||
|
||||
/* Return irq from pirq */
|
||||
int xen_irq_from_pirq(unsigned pirq);
|
||||
|
||||
/* Return the pirq allocated to the irq. */
|
||||
int xen_pirq_from_irq(unsigned irq);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user