Главная » Просмотр файлов » Volume 3B System Programming Guide_ Part 2

Volume 3B System Programming Guide_ Part 2 (794104), страница 32

Файл №794104 Volume 3B System Programming Guide_ Part 2 (Intel and AMD manuals) 32 страницаVolume 3B System Programming Guide_ Part 2 (794104) страница 322019-04-28СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 32)

Bit 0 must be 0 for all fields except for 64-bit fields (those withfield-width 1; see above). A VMREAD or VMWRITE using an encoding with this bitcleared to 0 accesses the entire field. For a 64-bit field with field-width 1, aVMREAD or VMWRITE using an encoding with this bit set to 1 accesses only thehigh 32 bits of the field.Appendix H gives the encodings of all fields in the VMCS.The following describes the operation of VMREAD and VMWRITE based on processormode, VMCS-field width, and access type:•16-bit fields:— A VMREAD returns the value of the field in bits 15:0 of the destinationoperand; other bits of the destination operand are cleared to 0.— A VMWRITE writes the value of bits 15:0 of the source operand into the VMCSfield; other bits of the source operand are not used.•32-bit fields:— A VMREAD returns the value of the field in bits 31:0 of the destinationoperand; in 64-bit mode, bits 63:32 of the destination operand are cleared to0.— A VMWRITE writes the value of bits 31:0 of the source operand into the VMCSfield; in 64-bit mode, bits 63:32 of the source operand are not used.•64-bit fields and natural-width fields using the full access type outside IA-32emode.— A VMREAD returns the value of bits 31:0 of the field in its destinationoperand; bits 63:32 of the field are ignored.— A VMWRITE writes the value of its source operand to bits 31:0 of the field andclears bits 63:32 of the field.•64-bit fields and natural-width fields using the full access type in 64-bit mode(only on processors that support Intel 64 architecture).— A VMREAD returns the value of the field in bits 63:0 of the destinationoperand— A VMWRITE writes the value of bits 63:0 of the source operand into the VMCSfield.•64-bit fields using the high access type.— A VMREAD returns the value of bits 63:32 of the field in bits 31:0 of thedestination operand; in 64-bit mode, bits 63:32 of the destination operandare cleared to 0.— A VMWRITE writes the value of bits 31:0 of the source operand to bits 63:32of the field; in 64-bit mode, bits 63:32 of the source operand are not used.Software seeking to read a 64-bit field outside IA-32e mode can use VMREAD withthe full access type (reading bits 31:0 of the field) and VMREAD with the high accesstype (reading bits 63:32 of the field); the order of the two VMREAD executions is notVol.

3 20-27VIRTUAL-MACHINE CONTROL STRUCTURESimportant. Software seeking to modify a 64-bit field outside IA-32e mode should firstuse VMWRITE with the full access type (establishing bits 31:0 of the field whileclearing bits 63:32) and then use VMWRITE with the high access type (establishingbits 63:32 of the field).20.10.3 Software Access to Related StructuresIn addition to data in the VMCS region itself, VMX non-root operation can becontrolled by data structures that are referenced by pointers in a VMCS (for example,the I/O bitmaps). Note that, while the pointers to these data structures are parts ofthe VMCS, the data structures themselves are not.

They are not accessible usingVMREAD and VMWRITE but by ordinary memory writes.Software should ensure that each such data structure is modified only when nological processor with a current VMCS that references it is in VMX non-root operation.Doing otherwise may lead to unpredictable behavior (including behaviors identified inSection 20.10.1).20.10.4 VMXON RegionBefore executing VMXON, software allocates a region of memory (called the VMXONregion)1 that the logical processor uses to support VMX operation. The physicaladdress of this region (the VMXON pointer) is provided in an operand to VMXON.

TheVMXON pointer is subject to the limitations that apply to VMCS pointers:••The VMXON pointer must be 4-KByte aligned (bits 11:0 must be zero).On processors that support Intel 64 architecture, the VMXON pointer must notset any bits beyond the processor’s physical-address width.2 On processors thatdo not support Intel 64 architecture, the VMXON pointer must not set any bits inthe range 63:32.Before executing VMXON, software should write the VMCS revision identifier (seeSection 20.2) to the VMXON region. It need not initialize the VMXON region in anyother way.

Software should use a separate region for each logical processor andshould not access or modify the VMXON region of a logical processor between execution of VMXON and VMXOFF on that logical processor. Doing otherwise may lead tounpredictable behavior (including behaviors identified in Section 20.10.1).1. The amount of memory required for the VMXON region is the same as that required for a VMCSregion. This size is implementation specific and can be determined by consulting the VMX capability MSR IA32_VMX_BASIC (see Appendix G.1).2.

Software can determine a processor’s physical-address width by executing CPUID with80000008H in EAX. The physical-address width is returned in bits 7:0 of EAX.20-28 Vol. 3VIRTUAL-MACHINE CONTROL STRUCTURES20.11USING VMCLEAR TO INITIALIZE A VMCS REGIONA processor may use the VMCS data portion of a VMCS region to maintain implementation-specific information about the VMCS. When software first allocates a region ofmemory for use as a VMCS region, the data in that region may be interpreted in animplementation-specific manner. In addition to its other functions, the VMCLEARinstruction initializes any implementation-specific information in the VMCS regionreferenced by its operand. To avoid the uncertainties of implementation-specificbehavior, software should execute VMCLEAR on a VMCS region before making thecorresponding VMCS active with VMPTRLD.A logical processor uses the VMCS region to maintain the launch state of the corresponding VMCS.

The launch state may be clear or launched. The VMCLEAR instruction puts the VMCS referenced by its operand into the clear state. The VMLAUNCHinstruction requires a VMCS whose launch state is clear and changes its launch stateto launched. The VMRESUME instruction requires a VMCS whose launch state islaunched. There are no other ways to modify the launch state of a VMCS (it cannot bemodified using VMWRITE) and there is no direct way to read it (it cannot be readusing VMREAD). Improper software usage (for example, software writing to theVMCS data of an active VMCS) may leave the launch state undefined.The following software usage is consistent with these limitations:••VMCLEAR should be executed for a VMCS before it is used for VM entry.•VMRESUME should be used for any subsequent VM entry using a VMCS (until thenext execution of VMCLEAR for the VMCS).VMLAUNCH should be used for the first VM entry using a VMCS after VMCLEARhas been executed for that VMCS.It is expected that, in general, VMRESUME will have lower latency than VMLAUNCH.Since “migrating” a VMCS from one logical processor to another requires use ofVMCLEAR (see Section 20.10.1), which sets the launch state of the VMCS to “clear,”such migration requires the next VM entry to be performed using VMLAUNCH.

Software developers can avoid the performance cost of increased VM-entry latency byavoiding unnecessary migration of a VMCS from one logical processor to another.Vol. 3 20-29VIRTUAL-MACHINE CONTROL STRUCTURES20-30 Vol. 3CHAPTER 21VMX NON-ROOT OPERATIONIn a virtualized environment using VMX, the guest software stack typically runs on alogical processor in VMX non-root operation. This mode of operation is similar to thatof ordinary processor operation outside of the virtualized environment.

This chapterdescribes the differences between VMX non-root operation and ordinary processoroperation with special attention to causes of VM exits (which bring a logical processorfrom VMX non-root operation to root operation). The differences between VMX nonroot operation and ordinary processor operation are described in the followingsections:••••••Section 21.1, “Instructions That Cause VM Exits”Section 21.2, “APIC-Access VM Exits”Section 21.3, “Other Causes of VM Exits”Section 21.4, “Changes to Instruction Behavior in VMX Non-Root Operation”Section 21.5, “APIC Accesses That Do Not Cause VM Exits”Section 21.6, “Other Changes in VMX Non-Root Operation”Chapter 20, “Virtual-Machine Control Structures,” describes the data control structure that governs VMX operation (root and non-root). Chapter 22, “VM Entries,”describes the operation of VM entries which allow the processor to transition fromVMX root operation to non-root operation.21.1INSTRUCTIONS THAT CAUSE VM EXITSCertain instructions may cause VM exits if executed in VMX non-root operation.Unless otherwise specified, such VM exits are “fault-like,” meaning that the instruction causing the VM exit does not execute and no processor state is updated by theinstruction.

Section 23.1 details architectural state in the context of a VM exit.Section 21.1.1 defines the prioritization between faults and VM exits for instructionssubject to both. Section 21.1.2 identifies instructions that cause VM exits wheneverthey are executed in VMX non-root operation (and thus can never be executed inVMX non-root operation). Section 21.1.3 identifies instructions that cause VM exitsdepending on the settings of certain VM-execution control fields (see Section 20.6).21.1.1Relative Priority of Faults and VM ExitsThe following principles describe the ordering between existing faults and VM exits:•Certain exceptions have priority over VM exits. These include invalid-opcodeexceptions, faults based on privilege level, and general-protection exceptionsVol.

3 21-1VMX NON-ROOT OPERATIONthat are based on checking I/O permission bits in the task-state segment (TSS).For example, execution of RDMSR with CPL = 3 generates a general-protectionexception and not a VM exit.1•Faults incurred while fetching instruction operands have priority over VM exitsthat are conditioned based on the contents of those operands (see LMSW inSection 21.1.3).•VM exits caused by execution of the INS and OUTS instructions (resulting eitherbecause the “unconditional I/O exiting” VM-execution control is 1 or because the“use I/O bitmaps control is 1) have priority over the following faults:— A general-protection fault due to the relevant segment (ES for INS; DS forOUTS unless overridden by an instruction prefix) being unusable— A general-protection fault due to an offset beyond the limit of the relevantsegment— An alignment-check exception•Fault-like VM exits have priority over general-protection exceptions other thanthose mentioned above.

Характеристики

Тип файла
PDF-файл
Размер
2,89 Mb
Материал
Тип материала
Высшее учебное заведение

Список файлов книги

Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6382
Авторов
на СтудИзбе
308
Средний доход
с одного платного файла
Обучение Подробнее