Commit 7adf12b8 authored by Linus Torvalds's avatar Linus Torvalds

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

Pull xen updates from David Vrabel:
 "Xen features and cleanups for 4.2-rc0:

   - add "make xenconfig" to assist in generating configs for Xen guests

   - preparatory cleanups necessary for supporting 64 KiB pages in ARM
     guests

   - automatically use hvc0 as the default console in ARM guests"

* tag 'for-linus-4.2-rc0-tag' of git://git.kernel.org/pub/scm/linux/kernel/git/xen/tip:
  block/xen-blkback: s/nr_pages/nr_segs/
  block/xen-blkfront: Remove invalid comment
  block/xen-blkfront: Remove unused macro MAXIMUM_OUTSTANDING_BLOCK_REQS
  arm/xen: Drop duplicate define mfn_to_virt
  xen/grant-table: Remove unused macro SPP
  xen/xenbus: client: Fix call of virt_to_mfn in xenbus_grant_ring
  xen: Include xen/page.h rather than asm/xen/page.h
  kconfig: add xenconfig defconfig helper
  kconfig: clarify kvmconfig is for kvm
  xen/pcifront: Remove usage of struct timeval
  xen/tmem: use BUILD_BUG_ON() in favor of BUG_ON()
  hvc_xen: avoid uninitialized variable warning
  xenbus: avoid uninitialized variable warning
  xen/arm: allow console=hvc0 to be omitted for guests
  arm,arm64/xen: move Xen initialization earlier
  arm/xen: Correctly check if the event channel interrupt is present
parents 02201e3f 6684fa1c
#ifndef _ASM_ARM_XEN_HYPERVISOR_H #ifndef _ASM_ARM_XEN_HYPERVISOR_H
#define _ASM_ARM_XEN_HYPERVISOR_H #define _ASM_ARM_XEN_HYPERVISOR_H
#include <linux/init.h>
extern struct shared_info *HYPERVISOR_shared_info; extern struct shared_info *HYPERVISOR_shared_info;
extern struct start_info *xen_start_info; extern struct start_info *xen_start_info;
...@@ -18,4 +20,10 @@ static inline enum paravirt_lazy_mode paravirt_get_lazy_mode(void) ...@@ -18,4 +20,10 @@ static inline enum paravirt_lazy_mode paravirt_get_lazy_mode(void)
extern struct dma_map_ops *xen_dma_ops; extern struct dma_map_ops *xen_dma_ops;
#ifdef CONFIG_XEN
void __init xen_early_init(void);
#else
static inline void xen_early_init(void) { return; }
#endif
#endif /* _ASM_ARM_XEN_HYPERVISOR_H */ #endif /* _ASM_ARM_XEN_HYPERVISOR_H */
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
#include <xen/interface/grant_table.h> #include <xen/interface/grant_table.h>
#define phys_to_machine_mapping_valid(pfn) (1) #define phys_to_machine_mapping_valid(pfn) (1)
#define mfn_to_virt(m) (__va(mfn_to_pfn(m) << PAGE_SHIFT))
#define pte_mfn pte_pfn #define pte_mfn pte_pfn
#define mfn_pte pfn_pte #define mfn_pte pfn_pte
......
...@@ -46,6 +46,7 @@ ...@@ -46,6 +46,7 @@
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/cachetype.h> #include <asm/cachetype.h>
#include <asm/tlbflush.h> #include <asm/tlbflush.h>
#include <asm/xen/hypervisor.h>
#include <asm/prom.h> #include <asm/prom.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -972,6 +973,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -972,6 +973,7 @@ void __init setup_arch(char **cmdline_p)
arm_dt_init_cpu_maps(); arm_dt_init_cpu_maps();
psci_init(); psci_init();
xen_early_init();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
if (is_smp()) { if (is_smp()) {
if (!mdesc->smp_init || !mdesc->smp_init()) { if (!mdesc->smp_init || !mdesc->smp_init()) {
......
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
#include <linux/cpuidle.h> #include <linux/cpuidle.h>
#include <linux/cpufreq.h> #include <linux/cpufreq.h>
#include <linux/cpu.h> #include <linux/cpu.h>
#include <linux/console.h>
#include <linux/mm.h> #include <linux/mm.h>
...@@ -51,7 +52,9 @@ EXPORT_SYMBOL_GPL(xen_have_vector_callback); ...@@ -51,7 +52,9 @@ EXPORT_SYMBOL_GPL(xen_have_vector_callback);
int xen_platform_pci_unplug = XEN_UNPLUG_ALL; int xen_platform_pci_unplug = XEN_UNPLUG_ALL;
EXPORT_SYMBOL_GPL(xen_platform_pci_unplug); EXPORT_SYMBOL_GPL(xen_platform_pci_unplug);
static __read_mostly int xen_events_irq = -1; static __read_mostly unsigned int xen_events_irq;
static __initdata struct device_node *xen_node;
int xen_remap_domain_mfn_array(struct vm_area_struct *vma, int xen_remap_domain_mfn_array(struct vm_area_struct *vma,
unsigned long addr, unsigned long addr,
...@@ -150,40 +153,28 @@ static irqreturn_t xen_arm_callback(int irq, void *arg) ...@@ -150,40 +153,28 @@ static irqreturn_t xen_arm_callback(int irq, void *arg)
* documentation of the Xen Device Tree format. * documentation of the Xen Device Tree format.
*/ */
#define GRANT_TABLE_PHYSADDR 0 #define GRANT_TABLE_PHYSADDR 0
static int __init xen_guest_init(void) void __init xen_early_init(void)
{ {
struct xen_add_to_physmap xatp;
static struct shared_info *shared_info_page = 0;
struct device_node *node;
int len; int len;
const char *s = NULL; const char *s = NULL;
const char *version = NULL; const char *version = NULL;
const char *xen_prefix = "xen,xen-"; const char *xen_prefix = "xen,xen-";
struct resource res;
phys_addr_t grant_frames;
node = of_find_compatible_node(NULL, NULL, "xen,xen"); xen_node = of_find_compatible_node(NULL, NULL, "xen,xen");
if (!node) { if (!xen_node) {
pr_debug("No Xen support\n"); pr_debug("No Xen support\n");
return 0; return;
} }
s = of_get_property(node, "compatible", &len); s = of_get_property(xen_node, "compatible", &len);
if (strlen(xen_prefix) + 3 < len && if (strlen(xen_prefix) + 3 < len &&
!strncmp(xen_prefix, s, strlen(xen_prefix))) !strncmp(xen_prefix, s, strlen(xen_prefix)))
version = s + strlen(xen_prefix); version = s + strlen(xen_prefix);
if (version == NULL) { if (version == NULL) {
pr_debug("Xen version not found\n"); pr_debug("Xen version not found\n");
return 0; return;
} }
if (of_address_to_resource(node, GRANT_TABLE_PHYSADDR, &res))
return 0;
grant_frames = res.start;
xen_events_irq = irq_of_parse_and_map(node, 0);
pr_info("Xen %s support found, events_irq=%d gnttab_frame=%pa\n",
version, xen_events_irq, &grant_frames);
if (xen_events_irq < 0) pr_info("Xen %s support found\n", version);
return -ENODEV;
xen_domain_type = XEN_HVM_DOMAIN; xen_domain_type = XEN_HVM_DOMAIN;
...@@ -194,9 +185,34 @@ static int __init xen_guest_init(void) ...@@ -194,9 +185,34 @@ static int __init xen_guest_init(void)
else else
xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED); xen_start_info->flags &= ~(SIF_INITDOMAIN|SIF_PRIVILEGED);
if (!shared_info_page) if (!console_set_on_cmdline && !xen_initial_domain())
shared_info_page = (struct shared_info *) add_preferred_console("hvc", 0, NULL);
get_zeroed_page(GFP_KERNEL); }
static int __init xen_guest_init(void)
{
struct xen_add_to_physmap xatp;
struct shared_info *shared_info_page = NULL;
struct resource res;
phys_addr_t grant_frames;
if (!xen_domain())
return 0;
if (of_address_to_resource(xen_node, GRANT_TABLE_PHYSADDR, &res)) {
pr_err("Xen grant table base address not found\n");
return -ENODEV;
}
grant_frames = res.start;
xen_events_irq = irq_of_parse_and_map(xen_node, 0);
if (!xen_events_irq) {
pr_err("Xen event channel interrupt not found\n");
return -ENODEV;
}
shared_info_page = (struct shared_info *)get_zeroed_page(GFP_KERNEL);
if (!shared_info_page) { if (!shared_info_page) {
pr_err("not enough memory\n"); pr_err("not enough memory\n");
return -ENOMEM; return -ENOMEM;
......
...@@ -15,10 +15,10 @@ ...@@ -15,10 +15,10 @@
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/interface/grant_table.h> #include <xen/interface/grant_table.h>
#include <xen/interface/memory.h> #include <xen/interface/memory.h>
#include <xen/page.h>
#include <xen/swiotlb-xen.h> #include <xen/swiotlb-xen.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/xen/page.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/interface.h> #include <asm/xen/interface.h>
......
...@@ -10,10 +10,10 @@ ...@@ -10,10 +10,10 @@
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/interface/memory.h> #include <xen/interface/memory.h>
#include <xen/page.h>
#include <xen/swiotlb-xen.h> #include <xen/swiotlb-xen.h>
#include <asm/cacheflush.h> #include <asm/cacheflush.h>
#include <asm/xen/page.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/interface.h> #include <asm/xen/interface.h>
......
...@@ -64,6 +64,7 @@ ...@@ -64,6 +64,7 @@
#include <asm/psci.h> #include <asm/psci.h>
#include <asm/efi.h> #include <asm/efi.h>
#include <asm/virt.h> #include <asm/virt.h>
#include <asm/xen/hypervisor.h>
unsigned long elf_hwcap __read_mostly; unsigned long elf_hwcap __read_mostly;
EXPORT_SYMBOL_GPL(elf_hwcap); EXPORT_SYMBOL_GPL(elf_hwcap);
...@@ -401,6 +402,7 @@ void __init setup_arch(char **cmdline_p) ...@@ -401,6 +402,7 @@ void __init setup_arch(char **cmdline_p)
} else { } else {
psci_acpi_init(); psci_acpi_init();
} }
xen_early_init();
cpu_read_bootcpu_ops(); cpu_read_bootcpu_ops();
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
......
# global x86 required specific stuff
# On 32-bit HIGHMEM4G is not allowed
CONFIG_HIGHMEM64G=y
CONFIG_64BIT=y
# These enable us to allow some of the
# not so generic stuff below
CONFIG_HYPERVISOR_GUEST=y
CONFIG_PCI=y
CONFIG_PCI_MSI=y
CONFIG_X86_MCE=y
CONFIG_ACPI_PROCESSOR=y
CONFIG_CPU_FREQ=y
# x86 xen specific config options
CONFIG_XEN_PVH=y
CONFIG_XEN_MAX_DOMAIN_MEMORY=500
CONFIG_XEN_SAVE_RESTORE=y
# CONFIG_XEN_DEBUG_FS is not set
CONFIG_XEN_MCE_LOG=y
CONFIG_XEN_ACPI_PROCESSOR=m
# x86 specific backend drivers
CONFIG_XEN_PCIDEV_BACKEND=m
# x86 specific frontend drivers
CONFIG_XEN_PCIDEV_FRONTEND=m
# depends on MEMORY_HOTPLUG, arm64 doesn't enable this yet,
# move to generic config if it ever does.
CONFIG_XEN_BALLOON_MEMORY_HOTPLUG=y
...@@ -736,7 +736,7 @@ static void xen_blkbk_unmap_and_respond(struct pending_req *req) ...@@ -736,7 +736,7 @@ static void xen_blkbk_unmap_and_respond(struct pending_req *req)
struct grant_page **pages = req->segments; struct grant_page **pages = req->segments;
unsigned int invcount; unsigned int invcount;
invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_pages, invcount = xen_blkbk_unmap_prepare(blkif, pages, req->nr_segs,
req->unmap, req->unmap_pages); req->unmap, req->unmap_pages);
work->data = req; work->data = req;
...@@ -922,7 +922,7 @@ static int xen_blkbk_map_seg(struct pending_req *pending_req) ...@@ -922,7 +922,7 @@ static int xen_blkbk_map_seg(struct pending_req *pending_req)
int rc; int rc;
rc = xen_blkbk_map(pending_req->blkif, pending_req->segments, rc = xen_blkbk_map(pending_req->blkif, pending_req->segments,
pending_req->nr_pages, pending_req->nr_segs,
(pending_req->operation != BLKIF_OP_READ)); (pending_req->operation != BLKIF_OP_READ));
return rc; return rc;
...@@ -938,7 +938,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req, ...@@ -938,7 +938,7 @@ static int xen_blkbk_parse_indirect(struct blkif_request *req,
int indirect_grefs, rc, n, nseg, i; int indirect_grefs, rc, n, nseg, i;
struct blkif_request_segment *segments = NULL; struct blkif_request_segment *segments = NULL;
nseg = pending_req->nr_pages; nseg = pending_req->nr_segs;
indirect_grefs = INDIRECT_PAGES(nseg); indirect_grefs = INDIRECT_PAGES(nseg);
BUG_ON(indirect_grefs > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST); BUG_ON(indirect_grefs > BLKIF_MAX_INDIRECT_PAGES_PER_REQUEST);
...@@ -1258,7 +1258,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, ...@@ -1258,7 +1258,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
pending_req->id = req->u.rw.id; pending_req->id = req->u.rw.id;
pending_req->operation = req_operation; pending_req->operation = req_operation;
pending_req->status = BLKIF_RSP_OKAY; pending_req->status = BLKIF_RSP_OKAY;
pending_req->nr_pages = nseg; pending_req->nr_segs = nseg;
if (req->operation != BLKIF_OP_INDIRECT) { if (req->operation != BLKIF_OP_INDIRECT) {
preq.dev = req->u.rw.handle; preq.dev = req->u.rw.handle;
...@@ -1379,7 +1379,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, ...@@ -1379,7 +1379,7 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif,
fail_flush: fail_flush:
xen_blkbk_unmap(blkif, pending_req->segments, xen_blkbk_unmap(blkif, pending_req->segments,
pending_req->nr_pages); pending_req->nr_segs);
fail_response: fail_response:
/* Haven't submitted any bio's yet. */ /* Haven't submitted any bio's yet. */
make_response(blkif, req->u.rw.id, req_operation, BLKIF_RSP_ERROR); make_response(blkif, req->u.rw.id, req_operation, BLKIF_RSP_ERROR);
......
...@@ -345,7 +345,7 @@ struct grant_page { ...@@ -345,7 +345,7 @@ struct grant_page {
struct pending_req { struct pending_req {
struct xen_blkif *blkif; struct xen_blkif *blkif;
u64 id; u64 id;
int nr_pages; int nr_segs;
atomic_t pendcnt; atomic_t pendcnt;
unsigned short operation; unsigned short operation;
int status; int status;
......
...@@ -1074,12 +1074,6 @@ static void blkif_completion(struct blk_shadow *s, struct blkfront_info *info, ...@@ -1074,12 +1074,6 @@ static void blkif_completion(struct blk_shadow *s, struct blkfront_info *info,
s->req.u.indirect.nr_segments : s->req.u.rw.nr_segments; s->req.u.indirect.nr_segments : s->req.u.rw.nr_segments;
if (bret->operation == BLKIF_OP_READ && info->feature_persistent) { if (bret->operation == BLKIF_OP_READ && info->feature_persistent) {
/*
* Copy the data received from the backend into the bvec.
* Since bv_offset can be different than 0, and bv_len different
* than PAGE_SIZE, we have to keep track of the current offset,
* to be sure we are copying the data from the right shared page.
*/
for_each_sg(s->sg, sg, nseg, i) { for_each_sg(s->sg, sg, nseg, i) {
BUG_ON(sg->offset + sg->length > PAGE_SIZE); BUG_ON(sg->offset + sg->length > PAGE_SIZE);
shared_data = kmap_atomic( shared_data = kmap_atomic(
......
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/events.h> #include <xen/events.h>
#include <xen/interface/memory.h> #include <xen/interface/memory.h>
#include <xen/page.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/page.h>
/* Provide an option to disable split event channels at load time as /* Provide an option to disable split event channels at load time as
* event channels are limited resource. Split event channels are * event channels are limited resource. Split event channels are
......
...@@ -45,7 +45,6 @@ ...@@ -45,7 +45,6 @@
#include <linux/slab.h> #include <linux/slab.h>
#include <net/ip.h> #include <net/ip.h>
#include <asm/xen/page.h>
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/xenbus.h> #include <xen/xenbus.h>
#include <xen/events.h> #include <xen/events.h>
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <linux/bitops.h> #include <linux/bitops.h>
#include <linux/time.h> #include <linux/time.h>
#include <linux/ktime.h>
#include <xen/platform_pci.h> #include <xen/platform_pci.h>
#include <asm/xen/swiotlb-xen.h> #include <asm/xen/swiotlb-xen.h>
...@@ -115,7 +116,6 @@ static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op) ...@@ -115,7 +116,6 @@ static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op)
evtchn_port_t port = pdev->evtchn; evtchn_port_t port = pdev->evtchn;
unsigned irq = pdev->irq; unsigned irq = pdev->irq;
s64 ns, ns_timeout; s64 ns, ns_timeout;
struct timeval tv;
spin_lock_irqsave(&pdev->sh_info_lock, irq_flags); spin_lock_irqsave(&pdev->sh_info_lock, irq_flags);
...@@ -132,8 +132,7 @@ static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op) ...@@ -132,8 +132,7 @@ static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op)
* (in the latter case we end up continually re-executing poll() with a * (in the latter case we end up continually re-executing poll() with a
* timeout in the past). 1s difference gives plenty of slack for error. * timeout in the past). 1s difference gives plenty of slack for error.
*/ */
do_gettimeofday(&tv); ns_timeout = ktime_get_ns() + 2 * (s64)NSEC_PER_SEC;
ns_timeout = timeval_to_ns(&tv) + 2 * (s64)NSEC_PER_SEC;
xen_clear_irq_pending(irq); xen_clear_irq_pending(irq);
...@@ -141,8 +140,7 @@ static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op) ...@@ -141,8 +140,7 @@ static int do_pci_op(struct pcifront_device *pdev, struct xen_pci_op *op)
(unsigned long *)&pdev->sh_info->flags)) { (unsigned long *)&pdev->sh_info->flags)) {
xen_poll_irq_timeout(irq, jiffies + 3*HZ); xen_poll_irq_timeout(irq, jiffies + 3*HZ);
xen_clear_irq_pending(irq); xen_clear_irq_pending(irq);
do_gettimeofday(&tv); ns = ktime_get_ns();
ns = timeval_to_ns(&tv);
if (ns > ns_timeout) { if (ns > ns_timeout) {
dev_err(&pdev->xdev->dev, dev_err(&pdev->xdev->dev,
"pciback not responding!!!\n"); "pciback not responding!!!\n");
......
...@@ -302,7 +302,7 @@ static int xen_initial_domain_console_init(void) ...@@ -302,7 +302,7 @@ static int xen_initial_domain_console_init(void)
static void xen_console_update_evtchn(struct xencons_info *info) static void xen_console_update_evtchn(struct xencons_info *info)
{ {
if (xen_hvm_domain()) { if (xen_hvm_domain()) {
uint64_t v; uint64_t v = 0;
int err; int err;
err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v); err = hvm_get_parameter(HVM_PARAM_CONSOLE_EVTCHN, &v);
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
#include <asm/irq.h> #include <asm/irq.h>
#include <asm/idle.h> #include <asm/idle.h>
#include <asm/io_apic.h> #include <asm/io_apic.h>
#include <asm/xen/page.h>
#include <asm/xen/pci.h> #include <asm/xen/pci.h>
#include <xen/page.h>
#endif #endif
#include <asm/sync_bitops.h> #include <asm/sync_bitops.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
......
...@@ -44,13 +44,13 @@ ...@@ -44,13 +44,13 @@
#include <asm/sync_bitops.h> #include <asm/sync_bitops.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/hypervisor.h> #include <asm/xen/hypervisor.h>
#include <asm/xen/page.h>
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/xen-ops.h> #include <xen/xen-ops.h>
#include <xen/events.h> #include <xen/events.h>
#include <xen/interface/xen.h> #include <xen/interface/xen.h>
#include <xen/interface/event_channel.h> #include <xen/interface/event_channel.h>
#include <xen/page.h>
#include "events_internal.h" #include "events_internal.h"
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
#include <xen/balloon.h> #include <xen/balloon.h>
#include <xen/gntdev.h> #include <xen/gntdev.h>
#include <xen/events.h> #include <xen/events.h>
#include <xen/page.h>
#include <asm/xen/hypervisor.h> #include <asm/xen/hypervisor.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/page.h>
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
MODULE_AUTHOR("Derek G. Murray <Derek.Murray@cl.cam.ac.uk>, " MODULE_AUTHOR("Derek G. Murray <Derek.Murray@cl.cam.ac.uk>, "
......
...@@ -138,7 +138,6 @@ static struct gnttab_free_callback *gnttab_free_callback_list; ...@@ -138,7 +138,6 @@ static struct gnttab_free_callback *gnttab_free_callback_list;
static int gnttab_expand(unsigned int req_entries); static int gnttab_expand(unsigned int req_entries);
#define RPP (PAGE_SIZE / sizeof(grant_ref_t)) #define RPP (PAGE_SIZE / sizeof(grant_ref_t))
#define SPP (PAGE_SIZE / sizeof(grant_status_t))
static inline grant_ref_t *__gnttab_entry(grant_ref_t entry) static inline grant_ref_t *__gnttab_entry(grant_ref_t entry)
{ {
......
...@@ -19,10 +19,10 @@ ...@@ -19,10 +19,10 @@
#include <xen/grant_table.h> #include <xen/grant_table.h>
#include <xen/events.h> #include <xen/events.h>
#include <xen/hvc-console.h> #include <xen/hvc-console.h>
#include <xen/page.h>
#include <xen/xen-ops.h> #include <xen/xen-ops.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/page.h>
#include <asm/xen/hypervisor.h> #include <asm/xen/hypervisor.h>
enum shutdown_state { enum shutdown_state {
......
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
#include <xen/xen.h> #include <xen/xen.h>
#include <xen/interface/xen.h> #include <xen/interface/xen.h>
#include <xen/page.h>
#include <asm/xen/hypercall.h> #include <asm/xen/hypercall.h>
#include <asm/xen/page.h>
#include <asm/xen/hypervisor.h> #include <asm/xen/hypervisor.h>
#include <xen/tmem.h> #include <xen/tmem.h>
...@@ -389,7 +389,7 @@ static int __init xen_tmem_init(void) ...@@ -389,7 +389,7 @@ static int __init xen_tmem_init(void)
} }
#endif #endif
#ifdef CONFIG_CLEANCACHE #ifdef CONFIG_CLEANCACHE
BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid)); BUILD_BUG_ON(sizeof(struct cleancache_filekey) != sizeof(struct tmem_oid));
if (tmem_enabled && cleancache) { if (tmem_enabled && cleancache) {
int err; int err;
......
...@@ -37,7 +37,7 @@ ...@@ -37,7 +37,7 @@
#include <linux/vmalloc.h> #include <linux/vmalloc.h>
#include <linux/export.h> #include <linux/export.h>
#include <asm/xen/hypervisor.h> #include <asm/xen/hypervisor.h>
#include <asm/xen/page.h> #include <xen/page.h>
#include <xen/interface/xen.h> #include <xen/interface/xen.h>
#include <xen/interface/event_channel.h> #include <xen/interface/event_channel.h>
#include <xen/balloon.h> #include <xen/balloon.h>
...@@ -379,16 +379,16 @@ int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr, ...@@ -379,16 +379,16 @@ int xenbus_grant_ring(struct xenbus_device *dev, void *vaddr,
int i, j; int i, j;
for (i = 0; i < nr_pages; i++) { for (i = 0; i < nr_pages; i++) {
unsigned long addr = (unsigned long)vaddr +
(PAGE_SIZE * i);
err = gnttab_grant_foreign_access(dev->otherend_id, err = gnttab_grant_foreign_access(dev->otherend_id,
virt_to_mfn(addr), 0); virt_to_mfn(vaddr), 0);
if (err < 0) { if (err < 0) {
xenbus_dev_fatal(dev, err, xenbus_dev_fatal(dev, err,
"granting access to ring page"); "granting access to ring page");
goto fail; goto fail;
} }
grefs[i] = err; grefs[i] = err;
vaddr = vaddr + PAGE_SIZE;
} }
return 0; return 0;
......
...@@ -742,7 +742,7 @@ static int xenbus_resume_cb(struct notifier_block *nb, ...@@ -742,7 +742,7 @@ static int xenbus_resume_cb(struct notifier_block *nb,
int err = 0; int err = 0;
if (xen_hvm_domain()) { if (xen_hvm_domain()) {
uint64_t v; uint64_t v = 0;
err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v); err = hvm_get_parameter(HVM_PARAM_STORE_EVTCHN, &v);
if (!err && v) if (!err && v)
......
# global stuff - these enable us to allow some
# of the not so generic stuff below for xen
CONFIG_PARAVIRT=y
CONFIG_NET=y
CONFIG_NET_CORE=y
CONFIG_NETDEVICES=y
CONFIG_BLOCK=y
CONFIG_WATCHDOG=y
CONFIG_TARGET_CORE=y
CONFIG_SCSI=y
CONFIG_FB=y
CONFIG_INPUT_MISC=y
CONFIG_MEMORY_HOTPLUG=y
CONFIG_TTY=y
# Technically not required but otherwise produces
# pretty useless systems starting from allnoconfig
# You want TCP/IP and ELF binaries right?
CONFIG_INET=y
CONFIG_BINFMT_ELF=y
# generic config
CONFIG_XEN=y
CONFIG_XEN_DOM0=y
# backend drivers
CONFIG_XEN_BACKEND=y
CONFIG_XEN_BLKDEV_BACKEND=m
CONFIG_XEN_NETDEV_BACKEND=m
CONFIG_HVC_XEN=y
CONFIG_XEN_WDT=m
CONFIG_XEN_SCSI_BACKEND=m
# frontend drivers
CONFIG_XEN_FBDEV_FRONTEND=m
CONFIG_HVC_XEN_FRONTEND=y
CONFIG_INPUT_XEN_KBDDEV_FRONTEND=m
CONFIG_XEN_SCSI_FRONTEND=m
# others
CONFIG_XEN_BALLOON=y
CONFIG_XEN_SCRUB_PAGES=y
CONFIG_XEN_DEV_EVTCHN=m
CONFIG_XEN_BLKDEV_FRONTEND=m
CONFIG_XEN_NETDEV_FRONTEND=m
CONFIG_XENFS=m
CONFIG_XEN_COMPAT_XENFS=y
CONFIG_XEN_SYS_HYPERVISOR=y
CONFIG_XEN_XENBUS_FRONTEND=y
CONFIG_XEN_GNTDEV=m
CONFIG_XEN_GRANT_DEV_ALLOC=m
CONFIG_SWIOTLB_XEN=y
CONFIG_XEN_PRIVCMD=m
...@@ -115,6 +115,10 @@ PHONY += kvmconfig ...@@ -115,6 +115,10 @@ PHONY += kvmconfig
kvmconfig: kvm_guest.config kvmconfig: kvm_guest.config
@: @:
PHONY += xenconfig
xenconfig: xen.config
@:
PHONY += tinyconfig PHONY += tinyconfig
tinyconfig: tinyconfig:
$(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config $(Q)$(MAKE) -f $(srctree)/Makefile allnoconfig tiny.config
...@@ -139,7 +143,8 @@ help: ...@@ -139,7 +143,8 @@ help:
@echo ' randconfig - New config with random answer to all options' @echo ' randconfig - New config with random answer to all options'
@echo ' listnewconfig - List new options' @echo ' listnewconfig - List new options'
@echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value' @echo ' olddefconfig - Same as silentoldconfig but sets new symbols to their default value'
@echo ' kvmconfig - Enable additional options for guest kernel support' @echo ' kvmconfig - Enable additional options for kvm guest kernel support'
@echo ' xenconfig - Enable additional options for xen dom0 and guest kernel support'
@echo ' tinyconfig - Configure the tiniest possible kernel' @echo ' tinyconfig - Configure the tiniest possible kernel'
# lxdialog stuff # lxdialog stuff
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment