Changeset 71927 in vbox
- Timestamp:
- Apr 20, 2018 4:18:24 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/hm_svm.h
r71859 r71927 514 514 typedef struct 515 515 { 516 uint16_t u16Reserved0; 516 517 uint16_t u16Reserved1; 517 uint16_t u16Reserved2;518 518 uint32_t u32Limit; /**< Only lower 16 bits are implemented. */ 519 519 uint64_t u64Base; … … 561 561 uint32_t u1VIrqPending : 1; /* V_IRQ */ 562 562 uint32_t u1VGif : 1; /* VGIF */ 563 uint32_t u6Reserved 0: 6;563 uint32_t u6Reserved : 6; 564 564 uint32_t u4VIntrPrio : 4; /* V_INTR_PRIO */ 565 565 uint32_t u1IgnoreTPR : 1; /* V_IGN_TPR */ … … 567 567 uint32_t u1VIntrMasking : 1; /* V_INTR_MASKING */ 568 568 uint32_t u1VGifEnable : 1; /* VGIF enable */ 569 uint32_t u5Reserved 1: 5;569 uint32_t u5Reserved : 5; 570 570 uint32_t u1AvicEnable : 1; /* AVIC enable */ 571 571 uint32_t u8VIntrVector : 8; /* V_INTR_VECTOR */ … … 598 598 uint32_t u1Type : 1; /**< Bit 0: 0 = out, 1 = in */ 599 599 uint32_t u1Reserved : 1; /**< Bit 1: Reserved */ 600 uint32_t u1S TR: 1; /**< Bit 2: String I/O (1) or not (0). */601 uint32_t u1R EP: 1; /**< Bit 3: Repeat prefixed string I/O. */602 uint32_t u1O P8 : 1; /**< Bit 4: 8-bit operand. */603 uint32_t u1O P16 : 1; /**< Bit 5: 16-bit operand. */604 uint32_t u1O P32 : 1; /**< Bit 6: 32-bit operand. */605 uint32_t u1A DDR16 : 1; /**< Bit 7: 16-bit address size. */606 uint32_t u1A DDR32 : 1; /**< Bit 8: 32-bit address size. */607 uint32_t u1A DDR64 : 1; /**< Bit 9: 64-bit address size. */608 uint32_t u3S EG: 3; /**< Bits 12:10: Effective segment number. Added w/ decode assist in APM v3.17. */600 uint32_t u1Str : 1; /**< Bit 2: String I/O (1) or not (0). */ 601 uint32_t u1Rep : 1; /**< Bit 3: Repeat prefixed string I/O. */ 602 uint32_t u1Op8 : 1; /**< Bit 4: 8-bit operand. */ 603 uint32_t u1Op16 : 1; /**< Bit 5: 16-bit operand. */ 604 uint32_t u1Op32 : 1; /**< Bit 6: 32-bit operand. */ 605 uint32_t u1Addr16 : 1; /**< Bit 7: 16-bit address size. */ 606 uint32_t u1Addr32 : 1; /**< Bit 8: 32-bit address size. */ 607 uint32_t u1Addr64 : 1; /**< Bit 9: 64-bit address size. */ 608 uint32_t u3Seg : 3; /**< Bits 12:10: Effective segment number. Added w/ decode assist in APM v3.17. */ 609 609 uint32_t u3Reserved : 3; 610 610 uint32_t u16Port : 16; /**< Bits 31:16: Port number. */ … … 659 659 struct 660 660 { 661 uint64_t u12Reserved0 : 12; 662 uint64_t u40Addr : 40; 661 663 uint64_t u12Reserved1 : 12; 662 uint64_t u40Addr : 40;663 uint64_t u12Reserved2 : 12;664 664 } n; 665 665 uint64_t u; … … 693 693 uint32_t u1Sev : 1; 694 694 uint32_t u1SevEs : 1; 695 uint32_t u29Reserved 0: 29;695 uint32_t u29Reserved : 29; 696 696 } n; 697 697 uint64_t u; … … 708 708 uint32_t u1IntShadow : 1; 709 709 uint32_t u1GuestIntMask : 1; 710 uint32_t u30Reserved 0: 30;710 uint32_t u30Reserved : 30; 711 711 } n; 712 712 uint64_t u; … … 723 723 uint32_t u1LbrVirt : 1; 724 724 uint32_t u1VirtVmsaveVmload : 1; 725 uint32_t u30Reserved 1: 30;725 uint32_t u30Reserved : 30; 726 726 } n; 727 727 uint64_t u; … … 751 751 uint64_t u64InterceptCtrl; 752 752 /** Offset 0x14-0x3f - Reserved. */ 753 uint8_t u8Reserved [0x3c - 0x14];753 uint8_t u8Reserved0[0x3c - 0x14]; 754 754 /** Offset 0x3c - PAUSE filter threshold. */ 755 755 uint16_t u16PauseFilterThreshold; … … 781 781 SVMAVIC AvicBar; 782 782 /** Offset 0xa0-0xa7 - Reserved. */ 783 uint8_t u8Reserved 2[0xA8 - 0xA0];783 uint8_t u8Reserved1[0xA8 - 0xA0]; 784 784 /** Offset 0xa8 - Event injection. */ 785 785 SVMEVENT EventInject; … … 800 800 SVMAVIC AvicBackingPagePtr; 801 801 /** Offset 0xe8-0xef - Reserved. */ 802 uint8_t u8Reserved 3[0xF0 - 0xE8];802 uint8_t u8Reserved2[0xF0 - 0xE8]; 803 803 /** Offset 0xf0 - AVIC LOGICAL_TABLE pointer. */ 804 804 SVMAVIC AvicLogicalTablePtr; … … 818 818 AssertCompileMemberOffset(SVMVMCBCTRL, u32InterceptXcpt, 0x08); 819 819 AssertCompileMemberOffset(SVMVMCBCTRL, u64InterceptCtrl, 0x0c); 820 AssertCompileMemberOffset(SVMVMCBCTRL, u8Reserved ,0x14);820 AssertCompileMemberOffset(SVMVMCBCTRL, u8Reserved0, 0x14); 821 821 AssertCompileMemberOffset(SVMVMCBCTRL, u16PauseFilterThreshold, 0x3c); 822 822 AssertCompileMemberOffset(SVMVMCBCTRL, u16PauseFilterCount, 0x3e); … … 833 833 AssertCompileMemberOffset(SVMVMCBCTRL, NestedPagingCtrl, 0x90); 834 834 AssertCompileMemberOffset(SVMVMCBCTRL, AvicBar, 0x98); 835 AssertCompileMemberOffset(SVMVMCBCTRL, u8Reserved 2, 0xa0);835 AssertCompileMemberOffset(SVMVMCBCTRL, u8Reserved1, 0xa0); 836 836 AssertCompileMemberOffset(SVMVMCBCTRL, EventInject, 0xa8); 837 837 AssertCompileMemberOffset(SVMVMCBCTRL, u64NestedPagingCR3, 0xb0); … … 842 842 AssertCompileMemberOffset(SVMVMCBCTRL, abInstr, 0xd1); 843 843 AssertCompileMemberOffset(SVMVMCBCTRL, AvicBackingPagePtr, 0xe0); 844 AssertCompileMemberOffset(SVMVMCBCTRL, u8Reserved 3, 0xe8);844 AssertCompileMemberOffset(SVMVMCBCTRL, u8Reserved2, 0xe8); 845 845 AssertCompileMemberOffset(SVMVMCBCTRL, AvicLogicalTablePtr, 0xf0); 846 846 AssertCompileMemberOffset(SVMVMCBCTRL, AvicPhysicalTablePtr, 0xf8); … … 874 874 SVMSELREG TR; 875 875 /** Offset 0x4A0-0x4CA - Reserved. */ 876 uint8_t u8Reserved 4[0x4CB - 0x4A0];876 uint8_t u8Reserved0[0x4CB - 0x4A0]; 877 877 /** Offset 0x4CB - CPL. */ 878 878 uint8_t u8CPL; 879 879 /** Offset 0x4CC-0x4CF - Reserved. */ 880 uint8_t u8Reserved 5[0x4D0 - 0x4CC];880 uint8_t u8Reserved1[0x4D0 - 0x4CC]; 881 881 /** Offset 0x4D0 - EFER. */ 882 882 uint64_t u64EFER; 883 883 /** Offset 0x4D8-0x547 - Reserved. */ 884 uint8_t u8Reserved 6[0x548 - 0x4D8];884 uint8_t u8Reserved2[0x548 - 0x4D8]; 885 885 /** Offset 0x548 - CR4. */ 886 886 uint64_t u64CR4; … … 898 898 uint64_t u64RIP; 899 899 /** Offset 0x580-0x5D7 - Reserved. */ 900 uint8_t u8Reserved 7[0x5D8 - 0x580];900 uint8_t u8Reserved3[0x5D8 - 0x580]; 901 901 /** Offset 0x5D8 - RSP. */ 902 902 uint64_t u64RSP; 903 903 /** Offset 0x5E0-0x5F7 - Reserved. */ 904 uint8_t u8Reserved 8[0x5F8 - 0x5E0];904 uint8_t u8Reserved4[0x5F8 - 0x5E0]; 905 905 /** Offset 0x5F8 - RAX. */ 906 906 uint64_t u64RAX; … … 924 924 uint64_t u64CR2; 925 925 /** Offset 0x648-0x667 - Reserved. */ 926 uint8_t u8Reserved 9[0x668 - 0x648];926 uint8_t u8Reserved5[0x668 - 0x648]; 927 927 /** Offset 0x668 - PAT (Page Attribute Table) MSR. */ 928 928 uint64_t u64PAT; … … 954 954 AssertCompileMemberOffset(SVMVMCBSTATESAVE, IDTR, 0x480 - 0x400); 955 955 AssertCompileMemberOffset(SVMVMCBSTATESAVE, TR, 0x490 - 0x400); 956 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved 4, 0x4a0 - 0x400);956 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved0, 0x4a0 - 0x400); 957 957 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8CPL, 0x4cb - 0x400); 958 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved 5, 0x4cc - 0x400);958 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved1, 0x4cc - 0x400); 959 959 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64EFER, 0x4d0 - 0x400); 960 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved 6, 0x4d8 - 0x400);960 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved2, 0x4d8 - 0x400); 961 961 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64CR4, 0x548 - 0x400); 962 962 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64CR3, 0x550 - 0x400); … … 966 966 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64RFlags, 0x570 - 0x400); 967 967 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64RIP, 0x578 - 0x400); 968 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved 7, 0x580 - 0x400);968 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved3, 0x580 - 0x400); 969 969 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64RSP, 0x5d8 - 0x400); 970 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved 8, 0x5e0 - 0x400);970 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved4, 0x5e0 - 0x400); 971 971 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64RAX, 0x5f8 - 0x400); 972 972 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64STAR, 0x600 - 0x400); … … 979 979 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64SysEnterEIP, 0x638 - 0x400); 980 980 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64CR2, 0x640 - 0x400); 981 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved 9, 0x648 - 0x400);981 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u8Reserved5, 0x648 - 0x400); 982 982 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64PAT, 0x668 - 0x400); 983 983 AssertCompileMemberOffset(SVMVMCBSTATESAVE, u64DBGCTL, 0x670 - 0x400); … … 996 996 SVMVMCBCTRL ctrl; 997 997 /** Offset 0x100-0x3FF - Reserved. */ 998 uint8_t u8Reserved 3[0x400 - 0x100];998 uint8_t u8Reserved0[0x400 - 0x100]; 999 999 /** Offset 0x400 - State save area. */ 1000 1000 SVMVMCBSTATESAVE guest; 1001 1001 /** Offset 0x698-0xFFF- Reserved. */ 1002 uint8_t u8Reserved1 0[0x1000 - 0x698];1002 uint8_t u8Reserved1[0x1000 - 0x698]; 1003 1003 } SVMVMCB; 1004 1004 #pragma pack() … … 1008 1008 typedef const SVMVMCB *PCSVMVMCB; 1009 1009 AssertCompileMemberOffset(SVMVMCB, ctrl, 0x00); 1010 AssertCompileMemberOffset(SVMVMCB, u8Reserved 3, 0x100);1010 AssertCompileMemberOffset(SVMVMCB, u8Reserved0, 0x100); 1011 1011 AssertCompileMemberOffset(SVMVMCB, guest, 0x400); 1012 AssertCompileMemberOffset(SVMVMCB, u8Reserved1 0,0x698);1012 AssertCompileMemberOffset(SVMVMCB, u8Reserved1, 0x698); 1013 1013 AssertCompileSize(SVMVMCB, 0x1000); 1014 1014 … … 1059 1059 /** Cache of the LBR virtualization control. */ 1060 1060 uint32_t u1LbrVirt : 1; 1061 uint32_t u3 1Reserved0: 30;1061 uint32_t u30Reserved : 30; 1062 1062 uint32_t u32Reserved1; 1063 1063 /** @} */ -
trunk/src/VBox/VMM/VMMAll/HMSVMAll.cpp
r71910 r71927 435 435 pIoExitInfo->u = s_auIoOpSize[cbReg & 7]; 436 436 pIoExitInfo->u |= s_auIoAddrSize[(cAddrSizeBits >> 4) & 7]; 437 pIoExitInfo->n.u1S TR= fStrIo;438 pIoExitInfo->n.u1R EP= fRep;439 pIoExitInfo->n.u3S EG= iEffSeg & 7;437 pIoExitInfo->n.u1Str = fStrIo; 438 pIoExitInfo->n.u1Rep = fRep; 439 pIoExitInfo->n.u3Seg = iEffSeg & 7; 440 440 pIoExitInfo->n.u1Type = enmIoType; 441 441 pIoExitInfo->n.u16Port = u16Port; -
trunk/src/VBox/VMM/VMMR0/HMSVMR0.cpp
r71919 r71927 3913 3913 Log4(("ctrl.IntCtrl.u1VIrqPending %#x\n", pVmcb->ctrl.IntCtrl.n.u1VIrqPending)); 3914 3914 Log4(("ctrl.IntCtrl.u1VGif %#x\n", pVmcb->ctrl.IntCtrl.n.u1VGif)); 3915 Log4(("ctrl.IntCtrl.u6Reserved0 %#x\n", pVmcb->ctrl.IntCtrl.n.u6Reserved 0));3915 Log4(("ctrl.IntCtrl.u6Reserved0 %#x\n", pVmcb->ctrl.IntCtrl.n.u6Reserved)); 3916 3916 Log4(("ctrl.IntCtrl.u4VIntrPrio %#x\n", pVmcb->ctrl.IntCtrl.n.u4VIntrPrio)); 3917 3917 Log4(("ctrl.IntCtrl.u1IgnoreTPR %#x\n", pVmcb->ctrl.IntCtrl.n.u1IgnoreTPR)); … … 3919 3919 Log4(("ctrl.IntCtrl.u1VIntrMasking %#x\n", pVmcb->ctrl.IntCtrl.n.u1VIntrMasking)); 3920 3920 Log4(("ctrl.IntCtrl.u1VGifEnable %#x\n", pVmcb->ctrl.IntCtrl.n.u1VGifEnable)); 3921 Log4(("ctrl.IntCtrl.u5Reserved1 %#x\n", pVmcb->ctrl.IntCtrl.n.u5Reserved 1));3921 Log4(("ctrl.IntCtrl.u5Reserved1 %#x\n", pVmcb->ctrl.IntCtrl.n.u5Reserved)); 3922 3922 Log4(("ctrl.IntCtrl.u8VIntrVector %#x\n", pVmcb->ctrl.IntCtrl.n.u8VIntrVector)); 3923 3923 Log4(("ctrl.IntCtrl.u24Reserved %#x\n", pVmcb->ctrl.IntCtrl.n.u24Reserved)); … … 4992 4992 const uint8_t cbReg = (pIoExitInfo->u >> SVM_IOIO_OP_SIZE_SHIFT) & 7; 4993 4993 const uint8_t cAddrSizeBits = ((pIoExitInfo->u >> SVM_IOIO_ADDR_SIZE_SHIFT) & 7) << 4; 4994 const uint8_t iEffSeg = pIoExitInfo->n.u3S EG;4995 const bool fRep = pIoExitInfo->n.u1R EP;4996 const bool fStrIo = pIoExitInfo->n.u1S TR;4994 const uint8_t iEffSeg = pIoExitInfo->n.u3Seg; 4995 const bool fRep = pIoExitInfo->n.u1Rep; 4996 const bool fStrIo = pIoExitInfo->n.u1Str; 4997 4997 4998 4998 return HMSvmIsIOInterceptActive(pvIoBitmap, u16Port, enmIoType, cbReg, cAddrSizeBits, iEffSeg, fRep, fStrIo, … … 6863 6863 VBOXSTRICTRC rcStrict; 6864 6864 bool fUpdateRipAlready = false; 6865 if (IoExitInfo.n.u1S TR)6865 if (IoExitInfo.n.u1Str) 6866 6866 { 6867 6867 #ifdef VBOX_WITH_2ND_IEM_STEP … … 6882 6882 if (cbInstr <= 15 && cbInstr >= 1) 6883 6883 { 6884 Assert(cbInstr >= 1U + IoExitInfo.n.u1R EP);6884 Assert(cbInstr >= 1U + IoExitInfo.n.u1Rep); 6885 6885 if (IoExitInfo.n.u1Type == SVM_IOIO_WRITE) 6886 6886 { 6887 /* Don't know exactly how to detect whether u3S EGis valid, currently6887 /* Don't know exactly how to detect whether u3Seg is valid, currently 6888 6888 only enabling it for Bulldozer and later with NRIP. OS/2 broke on 6889 6889 2384 Opterons when only checking NRIP. */ … … 6892 6892 && pVM->cpum.ro.GuestFeatures.enmMicroarch >= kCpumMicroarch_AMD_15h_First) 6893 6893 { 6894 AssertMsg(IoExitInfo.n.u3S EG == X86_SREG_DS || cbInstr > 1U + IoExitInfo.n.u1REP,6895 ("u32Seg=%d cbInstr=%d u1REP=%d", IoExitInfo.n.u3S EG, cbInstr, IoExitInfo.n.u1REP));6896 rcStrict = IEMExecStringIoWrite(pVCpu, cbValue, enmAddrMode, IoExitInfo.n.u1R EP, (uint8_t)cbInstr,6897 IoExitInfo.n.u3S EG, true /*fIoChecked*/);6894 AssertMsg(IoExitInfo.n.u3Seg == X86_SREG_DS || cbInstr > 1U + IoExitInfo.n.u1Rep, 6895 ("u32Seg=%d cbInstr=%d u1REP=%d", IoExitInfo.n.u3Seg, cbInstr, IoExitInfo.n.u1Rep)); 6896 rcStrict = IEMExecStringIoWrite(pVCpu, cbValue, enmAddrMode, IoExitInfo.n.u1Rep, (uint8_t)cbInstr, 6897 IoExitInfo.n.u3Seg, true /*fIoChecked*/); 6898 6898 } 6899 else if (cbInstr == 1U + IoExitInfo.n.u1R EP)6900 rcStrict = IEMExecStringIoWrite(pVCpu, cbValue, enmAddrMode, IoExitInfo.n.u1R EP, (uint8_t)cbInstr,6899 else if (cbInstr == 1U + IoExitInfo.n.u1Rep) 6900 rcStrict = IEMExecStringIoWrite(pVCpu, cbValue, enmAddrMode, IoExitInfo.n.u1Rep, (uint8_t)cbInstr, 6901 6901 X86_SREG_DS, true /*fIoChecked*/); 6902 6902 else … … 6906 6906 else 6907 6907 { 6908 AssertMsg(IoExitInfo.n.u3S EG == X86_SREG_ES /*=0*/, ("%#x\n", IoExitInfo.n.u3SEG));6909 rcStrict = IEMExecStringIoRead(pVCpu, cbValue, enmAddrMode, IoExitInfo.n.u1R EP, (uint8_t)cbInstr,6908 AssertMsg(IoExitInfo.n.u3Seg == X86_SREG_ES /*=0*/, ("%#x\n", IoExitInfo.n.u3Seg)); 6909 rcStrict = IEMExecStringIoRead(pVCpu, cbValue, enmAddrMode, IoExitInfo.n.u1Rep, (uint8_t)cbInstr, 6910 6910 true /*fIoChecked*/); 6911 6911 STAM_COUNTER_INC(&pVCpu->hm.s.StatExitIOStringRead); … … 6955 6955 { 6956 6956 /* IN/OUT - I/O instruction. */ 6957 Assert(!IoExitInfo.n.u1R EP);6957 Assert(!IoExitInfo.n.u1Rep); 6958 6958 6959 6959 if (IoExitInfo.n.u1Type == SVM_IOIO_WRITE)
Note:
See TracChangeset
for help on using the changeset viewer.