Mailing List Archive

[PVH] Help: mtrr.c
Hi,

I am getting closer to submitting RFC patch for PVH but have two more things
that need sorting out beofre I can do that. First is mtrr.c, I'm attaching
list of functions that are affected below. I am guessing it should be
similar to HVM path, but I'd need to spend time understanding it. If
anyone already knows, please let me know.

Thanks,
Mukesh


diff -r ba5e9253d04d xen/arch/x86/hvm/mtrr.c
--- a/xen/arch/x86/hvm/mtrr.c Thu Nov 01 16:53:31 2012 -0700
+++ b/xen/arch/x86/hvm/mtrr.c Fri Dec 07 17:17:31 2012 -0800
@@ -553,6 +553,10 @@ int32_t hvm_get_mem_pinned_cacheattr(

*type = 0;

+ if ( is_pvh_domain(d) ) {
+ printk("PVH: fixme: hvm_get_mem_pinned_cacheattr(). \n");
+ return 0;
+ }
if ( !is_hvm_domain(d) )
return 0;

@@ -578,6 +582,11 @@ int32_t hvm_set_mem_pinned_cacheattr(
{
struct hvm_mem_pinned_cacheattr_range *range;

+ if ( is_pvh_domain(d) ) {
+ printk("PVH: fixme: hvm_set_mem_pinned_cacheattr()\n");
+ return 0;
+ }
+
if ( !((type == PAT_TYPE_UNCACHABLE) ||
(type == PAT_TYPE_WRCOMB) ||
(type == PAT_TYPE_WRTHROUGH) ||
@@ -606,6 +615,12 @@ static int hvm_save_mtrr_msr(struct doma
struct vcpu *v;
struct hvm_hw_mtrr hw_mtrr;
struct mtrr_state *mtrr_state;
+
+ if ( is_pvh_domain(d) ) {
+ printk("PVH: fixme: hvm_save_mtrr_msr()\n");
+ return 0;
+ }
+
/* save mtrr&pat */
for_each_vcpu(d, v)
{
@@ -644,6 +659,10 @@ static int hvm_load_mtrr_msr(struct doma
struct mtrr_state *mtrr_state;
struct hvm_hw_mtrr hw_mtrr;

+ if ( is_pvh_domain(d) ) {
+ printk("PVH: fixme: hvm_load_mtrr_msr()\n");
+ return 0;
+ }
vcpuid = hvm_load_instance(h);
if ( vcpuid >= d->max_vcpus || (v = d->vcpu[vcpuid]) == NULL )
{
@@ -693,6 +712,14 @@ uint8_t epte_get_entry_emt(struct domain
((d->vcpu == NULL) || ((v = d->vcpu[0]) == NULL)) )
return MTRR_TYPE_WRBACK;

+ /* PVH TBD: FIXME: this needs to be studied, figure what need to be done
+ * for PVH */
+ if ( is_pvh_domain(d) ) {
+ if (direct_mmio)
+ return MTRR_TYPE_UNCACHABLE;
+ return MTRR_TYPE_WRBACK;
+ }
+
if ( !v->domain->arch.hvm_domain.params[HVM_PARAM_IDENT_PT] )
return MTRR_TYPE_WRBACK;


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel