All of lore.kernel.org
 help / color / mirror / Atom feed
From: Izik Eidus <izike-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
To: "Yang, Sheng" <sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
Cc: kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: [PATCH 2/2] KVM: VMX: Enable memory mapped TPR	shadow(FlexPriority)
Date: Fri, 26 Oct 2007 10:25:08 +0200	[thread overview]
Message-ID: <4721A464.2000003@qumranet.com> (raw)
In-Reply-To: <DB3BD37E3533EE46BED2FBA80995557F9BED4E-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>

Yang, Sheng wrote:
>  
> +static int alloc_apic_access_page(struct kvm *kvm)
> +{
> +	struct kvm_userspace_memory_region kvm_userspace_mem;
> +	int r;
> +
> +	r = -EFAULT;
> +	/* Top memslot for apic access page */
> +	if (kvm->nmemslots == KVM_MEMORY_SLOTS)
> +		return r;
> +	kvm_userspace_mem.slot = kvm->nmemslots + 1;
> +	kvm_userspace_mem.flags = 0;
> +	kvm_userspace_mem.guest_phys_addr = 0xfee00000ULL;
> +	kvm_userspace_mem.memory_size = PAGE_SIZE;
> +	r = kvm_set_memory_region(kvm, &kvm_userspace_mem, 0);
> +	if (r)
> +		return r;
> +	kvm->apic_access_page = gfn_to_page(kvm, 0xfee00);
> +	return 0;
> +}
you probably want to use slot number 9 (every slot above KVM_MEMORY_SLOT 
and below KVM_MEMORY_SLOT + KVM+PRIVATE_MEM_SLOTS are private slots that 
meant to be used like you use them in your patch,) using the number 9 
slot will make the slot invisible to the guest
and insure that at runtime the user can still allocate and remove slots 
without clashing with your slots.
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >> http://get.splunk.com/
> ------------------------------------------------------------------------
>
> _______________________________________________
> kvm-devel mailing list
> kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/kvm-devel
>   


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/

  parent reply	other threads:[~2007-10-26  8:25 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-26  6:17 [PATCH 2/2] KVM: VMX: Enable memory mapped TPR shadow(FlexPriority) Yang, Sheng
     [not found] ` <DB3BD37E3533EE46BED2FBA80995557F9BED4E-wq7ZOvIWXbM/UvCtAeCM4rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2007-10-26  8:25   ` Izik Eidus [this message]
     [not found]     ` <4721A464.2000003-atKUWr5tajBWk0Htik3J/w@public.gmane.org>
2007-10-26  6:42       ` Yang, Sheng
  -- strict thread matches above, loose matches on Subject: below --
2007-10-26  6:52 Yang, Sheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4721A464.2000003@qumranet.com \
    --to=izike-atkuwr5tajbwk0htik3j/w@public.gmane.org \
    --cc=kvm-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=sheng.yang-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.