login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2010
»
June
»
13
Re: [PATCH 2/2] kvm, ept: remove the default write bit
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From: Avi Kivity
Subject:
Re: [PATCH 2/2] kvm, ept: remove the default write bit
Date: Sunday, June 13, 2010 - 1:09 am
On 06/11/2010 10:50 PM, Marcelo Tosatti wrote:
quoted text
> On Fri, Jun 11, 2010 at 07:30:50PM +0800, Lai Jiangshan wrote: > >> When ept enabled, current code set shadow_base_present_pte >> including the write bit, thus all pte entries have >> writabe bit, and it means guest os can always >> write to any mapped page (even VMM maps RO pages for >> the guest.) >> >> We always use get_user_pages(write=1), so this bad code does not >> cause any bad result currently. >> >> But it is really bad, so fix it, and we will use RO pages future. >> >> We will set writabe bit when it is really writable (determined by >> the parameters of the set_spte()) >> >> Signed-off-by: Lai Jiangshan<laijs@cn.fujitsu.com> >> --- >> diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c >> index fdb18cf..c7565ea 100644 >> --- a/arch/x86/kvm/vmx.c >> +++ b/arch/x86/kvm/vmx.c >> @@ -4365,8 +4365,7 @@ static int __init vmx_init(void) >> >> if (enable_ept) { >> bypass_guest_pf = 0; >> - kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK | >> - VMX_EPT_WRITABLE_MASK); >> + kvm_mmu_set_base_ptes(VMX_EPT_READABLE_MASK); >> kvm_mmu_set_mask_ptes(0ull, 0ull, 0ull, 0ull, >> VMX_EPT_EXECUTABLE_MASK); >> kvm_enable_tdp(); >> > You can remove the call to kvm_mmu_set_base_ptes entirely, because > VMX_EPT_READABLE_MASK == PT_PRESENT_MASK. >
We can leave that to a later patch which removes kvm_mmu_set_base_ptes() entirely. -- error compiling committee.c: too many arguments to function --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH 2/2] kvm, ept: remove the default write bit
, Lai Jiangshan
, (Fri Jun 11, 4:30 am)
Re: [PATCH 2/2] kvm, ept: remove the default write bit
, Avi Kivity
, (Sun Jun 13, 1:09 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Ken Chen
[patch] sched: fix inconsistency when redistribute per-cpu tg->cfs_rq shares.
Hugh Dickins
Re: Linux 2.6.26-rc1 - pgtable_32.c:178 pmd_bad
Bernhard Beck
[PATCH 001/001] usb-serial: Add ThinkOptics WavIT
Oleg Nesterov
Re: [PATCH 4/5] don't panic if /sbin/init exits or killed
Greg KH
[patch 07/21] rtc-pcf8563: detect polarity of century bit automatically
git
:
Jonathan del Strother
Re: [PATCH] Fixing path quoting issues
Gerrit Pape
[PATCH] fix skipping merge-order test with NO_OPENSSL=1.
Linus Torvalds
Re: Implementing branch attributes in git config
Johannes Schindelin
Re: Trying to use git-filter-branch to compress history by removing large, obsolet...
Gerrit Pape
[PATCH] hooks--update: fix test for properly set up project description file
linux-netdev
:
David Miller
Re: [PATCH 04/15] tg3: Preserve LAA when device control is released
Jean-Louis Dupond
Re: tg3 driver not advertising 1000mbit
Sven Wegener
[PATCH] ipvs: Add missing locking during connection table hashing and unhashing
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
Stephen Hemminger
[PATCH 2/2] sky2: fix transmit state on resume
git-commits-head
:
Linux Kernel Mailing List
[SCSI] scsi ioctl: fix kernel-doc warning
Linux Kernel Mailing List
ALSA: HDA - Correct trivial typos in comments.
Linux Kernel Mailing List
i2c-viapro: Add support for SMBus Process Call transactions
Linux Kernel Mailing List
i2c: Documentation: upgrading clients HOWTO
Linux Kernel Mailing List
[PATCH] fix sysctl_nr_open bugs
openbsd-misc
:
Die Gestalt
Re: How to re-build openssl with SHA1 support?
Edwin Eyan Moragas
Re: managing routes for multiple PPPoE connections
Brian Candler
Re: OBSD's perspective on SELinux
Jonathan Schleifer
Why is getaddrinfo breaking POSIX?
Predrag Punosevac
Re: Kernel developers guide/tutorial
Colocation donated by:
Syndicate