Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 343428
b: refs/heads/master
c: 9a032e3
h: refs/heads/master
v: v3
  • Loading branch information
Ian Campbell committed Nov 29, 2012
1 parent ff599d8 commit aa176ac
Show file tree
Hide file tree
Showing 9 changed files with 27 additions and 231 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a7be94ac8d69c037d08f0fd94b45a593f1d45176
refs/heads/master: 9a032e393a8bc888a9b0c898cbdb9db2cee7b536
27 changes: 3 additions & 24 deletions trunk/arch/x86/xen/enlighten.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,21 +223,6 @@ static void __init xen_banner(void)
version >> 16, version & 0xffff, extra.extraversion,
xen_feature(XENFEAT_mmu_pt_update_preserve_ad) ? " (preserve-AD)" : "");
}
/* Check if running on Xen version (major, minor) or later */
bool
xen_running_on_version_or_later(unsigned int major, unsigned int minor)
{
unsigned int version;

if (!xen_domain())
return false;

version = HYPERVISOR_xen_version(XENVER_version, NULL);
if ((((version >> 16) == major) && ((version & 0xffff) >= minor)) ||
((version >> 16) > major))
return true;
return false;
}

#define CPUID_THERM_POWER_LEAF 6
#define APERFMPERF_PRESENT 0
Expand Down Expand Up @@ -302,7 +287,8 @@ static void xen_cpuid(unsigned int *ax, unsigned int *bx,

static bool __init xen_check_mwait(void)
{
#ifdef CONFIG_ACPI
#if defined(CONFIG_ACPI) && !defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR) && \
!defined(CONFIG_ACPI_PROCESSOR_AGGREGATOR_MODULE)
struct xen_platform_op op = {
.cmd = XENPF_set_processor_pminfo,
.u.set_pminfo.id = -1,
Expand All @@ -323,13 +309,6 @@ static bool __init xen_check_mwait(void)
if (!xen_initial_domain())
return false;

/*
* When running under platform earlier than Xen4.2, do not expose
* mwait, to avoid the risk of loading native acpi pad driver
*/
if (!xen_running_on_version_or_later(4, 2))
return false;

ax = 1;
cx = 0;

Expand Down Expand Up @@ -1578,7 +1557,7 @@ static void __init xen_hvm_init_shared_info(void)

static void __init init_hvm_pv_info(void)
{
uint32_t ecx, edx, pages, msr, base;
uint32_t eax, ebx, ecx, edx, pages, msr, base;
u64 pfn;

base = xen_cpuid_base();
Expand Down
15 changes: 14 additions & 1 deletion trunk/arch/x86/xen/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -2479,7 +2479,9 @@ static int remap_area_mfn_pte_fn(pte_t *ptep, pgtable_t token,
int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
unsigned long addr,
unsigned long mfn, int nr,
pgprot_t prot, unsigned domid)
pgprot_t prot, unsigned domid,
struct page **pages)

{
struct remap_data rmd;
struct mmu_update mmu_update[REMAP_BATCH_SIZE];
Expand Down Expand Up @@ -2523,3 +2525,14 @@ int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
return err;
}
EXPORT_SYMBOL_GPL(xen_remap_domain_mfn_range);

/* Returns: 0 success */
int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
int numpgs, struct page **pages)
{
if (!pages || !xen_feature(XENFEAT_auto_translated_physmap))
return 0;

return -EINVAL;
}
EXPORT_SYMBOL_GPL(xen_unmap_domain_mfn_range);
3 changes: 1 addition & 2 deletions trunk/drivers/xen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ CFLAGS_features.o := $(nostackp)

dom0-$(CONFIG_PCI) += pci.o
dom0-$(CONFIG_USB_SUPPORT) += dbgp.o
dom0-$(CONFIG_ACPI) += acpi.o $(xen-pad-y)
xen-pad-$(CONFIG_X86) += xen-acpi-pad.o
dom0-$(CONFIG_ACPI) += acpi.o
dom0-$(CONFIG_X86) += pcpu.o
obj-$(CONFIG_XEN_DOM0) += $(dom0-y)
obj-$(CONFIG_BLOCK) += biomerge.o
Expand Down
5 changes: 3 additions & 2 deletions trunk/drivers/xen/privcmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ static int mmap_mfn_range(void *data, void *state)
msg->va & PAGE_MASK,
msg->mfn, msg->npages,
vma->vm_page_prot,
st->domain);
st->domain, NULL);
if (rc < 0)
return rc;

Expand Down Expand Up @@ -267,7 +267,8 @@ static int mmap_batch_fn(void *data, void *state)
int ret;

ret = xen_remap_domain_mfn_range(st->vma, st->va & PAGE_MASK, *mfnp, 1,
st->vma->vm_page_prot, st->domain);
st->vma->vm_page_prot, st->domain,
NULL);

/* Store error code for second pass. */
*(st->err++) = ret;
Expand Down
182 changes: 0 additions & 182 deletions trunk/drivers/xen/xen-acpi-pad.c

This file was deleted.

1 change: 1 addition & 0 deletions trunk/drivers/xen/xenbus/xenbus_xs.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
#include <xen/xenbus.h>
#include <xen/xen.h>
#include "xenbus_comms.h"
#include <asm/xen/hypervisor.h>

struct xs_stored_msg {
struct list_head list;
Expand Down
17 changes: 0 additions & 17 deletions trunk/include/xen/interface/platform.h
Original file line number Diff line number Diff line change
Expand Up @@ -324,22 +324,6 @@ struct xenpf_cpu_ol {
};
DEFINE_GUEST_HANDLE_STRUCT(xenpf_cpu_ol);

/*
* CMD 58 and 59 are reserved for cpu hotadd and memory hotadd,
* which are already occupied at Xen hypervisor side.
*/
#define XENPF_core_parking 60
struct xenpf_core_parking {
/* IN variables */
#define XEN_CORE_PARKING_SET 1
#define XEN_CORE_PARKING_GET 2
uint32_t type;
/* IN variables: set cpu nums expected to be idled */
/* OUT variables: get cpu nums actually be idled */
uint32_t idle_nums;
};
DEFINE_GUEST_HANDLE_STRUCT(xenpf_core_parking);

struct xen_platform_op {
uint32_t cmd;
uint32_t interface_version; /* XENPF_INTERFACE_VERSION */
Expand All @@ -357,7 +341,6 @@ struct xen_platform_op {
struct xenpf_set_processor_pminfo set_pminfo;
struct xenpf_pcpuinfo pcpu_info;
struct xenpf_cpu_ol cpu_ol;
struct xenpf_core_parking core_parking;
uint8_t pad[128];
} u;
};
Expand Down
6 changes: 4 additions & 2 deletions trunk/include/xen/xen-ops.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ struct vm_area_struct;
int xen_remap_domain_mfn_range(struct vm_area_struct *vma,
unsigned long addr,
unsigned long mfn, int nr,
pgprot_t prot, unsigned domid);
pgprot_t prot, unsigned domid,
struct page **pages);
int xen_unmap_domain_mfn_range(struct vm_area_struct *vma,
int numpgs, struct page **pages);

bool xen_running_on_version_or_later(unsigned int major, unsigned int minor);
#endif /* INCLUDE_XEN_OPS_H */

0 comments on commit aa176ac

Please sign in to comment.