You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
Merge branches 'upstream/xenfs' and 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'upstream/xenfs' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
xen/privcmd: make privcmd visible in domU
xen/privcmd: move remap_domain_mfn_range() to core xen code and export.
privcmd: MMAPBATCH: Fix error handling/reporting
xenbus: export xen_store_interface for xenfs
xen/privcmd: make sure vma is ours before doing anything to it
xen/privcmd: print SIGBUS faults
xen/xenfs: set_page_dirty is supposed to return true if it dirties
xen/privcmd: create address space to allow writable mmaps
xen: add privcmd driver
xen: add variable hypercall caller
xen: add xen_set_domain_pte()
xen: add /proc/xen/xsd_{kva,port} to xenfs
* 'upstream/core' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen: (29 commits)
xen: include xen/xen.h for definition of xen_initial_domain()
xen: use host E820 map for dom0
xen: correctly rebuild mfn list list after migration.
xen: improvements to VIRQ_DEBUG output
xen: set up IRQ before binding virq to evtchn
xen: ensure that all event channels start off bound to VCPU 0
xen/hvc: only notify if we actually sent something
xen: don't add extra_pages for RAM after mem_end
xen: add support for PAT
xen: make sure xen_max_p2m_pfn is up to date
xen: limit extra memory to a certain ratio of base
xen: add extra pages for E820 RAM regions, even if beyond mem_end
xen: make sure xen_extra_mem_start is beyond all non-RAM e820
xen: implement "extra" memory to reserve space for pages not present at boot
xen: Use host-provided E820 map
xen: don't map missing memory
xen: defer building p2m mfn structures until kernel is mapped
xen: add return value to set_phys_to_machine()
xen: convert p2m to a 3 level tree
xen: make install_p2mtop_page() static
...
Fix up trivial conflict in arch/x86/xen/mmu.c, and fix the use of
'reserve_early()' - in the new memblock world order it is now
'memblock_x86_reserve_range()' instead. Pointed out by Jeremy.
This commit is contained in:
@@ -1 +1,2 @@
|
||||
header-y += evtchn.h
|
||||
header-y += privcmd.h
|
||||
|
||||
@@ -186,6 +186,35 @@ struct xen_translate_gpfn_list {
|
||||
};
|
||||
DEFINE_GUEST_HANDLE_STRUCT(xen_translate_gpfn_list);
|
||||
|
||||
/*
|
||||
* Returns the pseudo-physical memory map as it was when the domain
|
||||
* was started (specified by XENMEM_set_memory_map).
|
||||
* arg == addr of struct xen_memory_map.
|
||||
*/
|
||||
#define XENMEM_memory_map 9
|
||||
struct xen_memory_map {
|
||||
/*
|
||||
* On call the number of entries which can be stored in buffer. On
|
||||
* return the number of entries which have been stored in
|
||||
* buffer.
|
||||
*/
|
||||
unsigned int nr_entries;
|
||||
|
||||
/*
|
||||
* Entries in the buffer are in the same format as returned by the
|
||||
* BIOS INT 0x15 EAX=0xE820 call.
|
||||
*/
|
||||
GUEST_HANDLE(void) buffer;
|
||||
};
|
||||
DEFINE_GUEST_HANDLE_STRUCT(xen_memory_map);
|
||||
|
||||
/*
|
||||
* Returns the real physical memory map. Passes the same structure as
|
||||
* XENMEM_memory_map.
|
||||
* arg == addr of struct xen_memory_map.
|
||||
*/
|
||||
#define XENMEM_machine_memory_map 10
|
||||
|
||||
|
||||
/*
|
||||
* Prevent the balloon driver from changing the memory reservation
|
||||
|
||||
@@ -0,0 +1,80 @@
|
||||
/******************************************************************************
|
||||
* privcmd.h
|
||||
*
|
||||
* Interface to /proc/xen/privcmd.
|
||||
*
|
||||
* Copyright (c) 2003-2005, K A Fraser
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License version 2
|
||||
* as published by the Free Software Foundation; or, when distributed
|
||||
* separately from the Linux kernel or incorporated into other
|
||||
* software packages, subject to the following license:
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this source file (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use, copy, modify,
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software,
|
||||
* and to permit persons to whom the Software is furnished to do so, subject to
|
||||
* the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
* IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef __LINUX_PUBLIC_PRIVCMD_H__
|
||||
#define __LINUX_PUBLIC_PRIVCMD_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
typedef unsigned long xen_pfn_t;
|
||||
|
||||
#ifndef __user
|
||||
#define __user
|
||||
#endif
|
||||
|
||||
struct privcmd_hypercall {
|
||||
__u64 op;
|
||||
__u64 arg[5];
|
||||
};
|
||||
|
||||
struct privcmd_mmap_entry {
|
||||
__u64 va;
|
||||
__u64 mfn;
|
||||
__u64 npages;
|
||||
};
|
||||
|
||||
struct privcmd_mmap {
|
||||
int num;
|
||||
domid_t dom; /* target domain */
|
||||
struct privcmd_mmap_entry __user *entry;
|
||||
};
|
||||
|
||||
struct privcmd_mmapbatch {
|
||||
int num; /* number of pages to populate */
|
||||
domid_t dom; /* target domain */
|
||||
__u64 addr; /* virtual address */
|
||||
xen_pfn_t __user *arr; /* array of mfns - top nibble set on err */
|
||||
};
|
||||
|
||||
/*
|
||||
* @cmd: IOCTL_PRIVCMD_HYPERCALL
|
||||
* @arg: &privcmd_hypercall_t
|
||||
* Return: Value returned from execution of the specified hypercall.
|
||||
*/
|
||||
#define IOCTL_PRIVCMD_HYPERCALL \
|
||||
_IOC(_IOC_NONE, 'P', 0, sizeof(struct privcmd_hypercall))
|
||||
#define IOCTL_PRIVCMD_MMAP \
|
||||
_IOC(_IOC_NONE, 'P', 2, sizeof(struct privcmd_mmap))
|
||||
#define IOCTL_PRIVCMD_MMAPBATCH \
|
||||
_IOC(_IOC_NONE, 'P', 3, sizeof(struct privcmd_mmapbatch))
|
||||
|
||||
#endif /* __LINUX_PUBLIC_PRIVCMD_H__ */
|
||||
@@ -23,4 +23,9 @@ int xen_create_contiguous_region(unsigned long vstart, unsigned int order,
|
||||
|
||||
void xen_destroy_contiguous_region(unsigned long vstart, unsigned int order);
|
||||
|
||||
int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
|
||||
unsigned long addr,
|
||||
unsigned long mfn, int nr,
|
||||
pgprot_t prot, unsigned domid);
|
||||
|
||||
#endif /* INCLUDE_XEN_OPS_H */
|
||||
|
||||
Reference in New Issue
Block a user