Changeset 107227 in vbox for trunk/include/VBox/vmm/vm.h
- Timestamp:
- Dec 4, 2024 3:20:14 PM (6 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/vmm/vm.h
r107113 r107227 56 56 # pragma D depends_on library CPUMInternal.d 57 57 # define VMM_INCLUDED_SRC_include_CPUMInternal_h 58 # define VBOX_VMM_TARGET_AGNOSTIC 59 #endif 60 61 #if !defined(VBOX_VMM_TARGET_AGNOSTIC) \ 62 && !defined(VBOX_VMM_TARGET_X86) \ 63 && !defined(VBOX_VMM_TARGET_ARMV8) 64 # error "VMM target not defined" 58 65 #endif 59 66 … … 130 137 VMCPUSTATE volatile enmState; 131 138 132 #if defined(VBOX_VMM_TARGET_ARMV8)139 #ifdef VBOX_VMM_TARGET_ARMV8 133 140 uint32_t u32Alignment0; 134 141 /** The number of nano seconds when the vTimer of the associated vCPU is supposed to activate … … 288 295 } gim; 289 296 290 #if defined(VBOX_VMM_TARGET_ARMV8) 291 /** GIC part. */ 292 union VMCPUUNIONGIC 293 { 297 /* Interrupt controller, target specific. */ 298 RT_GCC_EXTENSION 299 union 300 { 301 #if defined(VBOX_VMM_TARGET_ARMV8) || defined(VBOX_VMM_TARGET_AGNOSTIC) 302 /** GIC part. */ 303 union 304 { 294 305 # ifdef VMM_INCLUDED_SRC_include_GICInternal_h 295 struct GICCPU s;306 struct GICCPU s; 296 307 # endif 297 uint8_t padding[3840]; /* multiple of 64 */ 298 } gic; 299 #else 300 /** APIC part. */ 301 union VMCPUUNIONAPIC 302 { 308 uint8_t padding[3840]; /* multiple of 64 */ 309 } gic; 310 #endif 311 #if defined(VBOX_VMM_TARGET_X86) || defined(VBOX_VMM_TARGET_AGNOSTIC) 312 /** APIC part. */ 313 union 314 { 303 315 # ifdef VMM_INCLUDED_SRC_include_APICInternal_h 304 struct APICCPU s;316 struct APICCPU s; 305 317 # endif 306 uint8_t padding[3840]; /* multiple of 64 */ 307 } apic; 308 #endif 318 uint8_t padding[3840]; /* multiple of 64 */ 319 } apic; 320 #endif 321 }; 309 322 310 323 /* … … 483 496 484 497 485 #if defined(VBOX_VMM_TARGET_ARMV8) 498 #if defined(VBOX_VMM_TARGET_ARMV8) || defined(VBOX_VMM_TARGET_AGNOSTIC) 486 499 /** This action forces the VM to inject an IRQ into the guest. */ 487 500 # define VMCPU_FF_INTERRUPT_IRQ RT_BIT_64(VMCPU_FF_INTERRUPT_IRQ_BIT) … … 490 503 # define VMCPU_FF_INTERRUPT_FIQ RT_BIT_64(VMCPU_FF_INTERRUPT_FIQ_BIT) 491 504 # define VMCPU_FF_INTERRUPT_FIQ_BIT 1 492 #else 505 #endif 506 #if defined(VBOX_VMM_TARGET_X86) || defined(VBOX_VMM_TARGET_AGNOSTIC) 493 507 /** This action forces the VM to check any pending interrupts on the APIC. */ 494 508 # define VMCPU_FF_INTERRUPT_APIC RT_BIT_64(VMCPU_FF_INTERRUPT_APIC_BIT) … … 541 555 #define VMCPU_FF_HM_UPDATE_CR3 RT_BIT_64(VMCPU_FF_HM_UPDATE_CR3_BIT) 542 556 #define VMCPU_FF_HM_UPDATE_CR3_BIT 12 543 #if defined(VBOX_VMM_TARGET_ARMV8) 557 #if defined(VBOX_VMM_TARGET_ARMV8) || defined(VBOX_VMM_TARGET_AGNOSTIC) 544 558 # define VMCPU_FF_VTIMER_ACTIVATED RT_BIT_64(VMCPU_FF_VTIMER_ACTIVATED_BIT) 545 559 # define VMCPU_FF_VTIMER_ACTIVATED_BIT 13 546 #else 560 #endif 561 #if defined(VBOX_VMM_TARGET_X86) || defined(VBOX_VMM_TARGET_AGNOSTIC) 547 562 /* Bit 13 used to be VMCPU_FF_HM_UPDATE_PAE_PDPES. */ 548 563 #endif … … 618 633 #define VM_FF_EXTERNAL_HALTED_MASK ( VM_FF_CHECK_VM_STATE | VM_FF_DBGF | VM_FF_REQUEST \ 619 634 | VM_FF_PDM_QUEUES | VM_FF_PDM_DMA | VM_FF_EMT_RENDEZVOUS ) 635 636 #ifndef VBOX_VMM_TARGET_AGNOSTIC 620 637 /** Externally forced VMCPU actions. Used to quit the idle/wait loop. */ 621 # if defined(VBOX_VMM_TARGET_ARMV8)622 # define VMCPU_FF_EXTERNAL_HALTED_MASK( VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ \638 # if defined(VBOX_VMM_TARGET_ARMV8) 639 # define VMCPU_FF_EXTERNAL_HALTED_MASK ( VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ \ 623 640 | VMCPU_FF_REQUEST | VMCPU_FF_INTERRUPT_NMI | VMCPU_FF_INTERRUPT_SMI \ 624 641 | VMCPU_FF_UNHALT | VMCPU_FF_TIMER | VMCPU_FF_DBGF \ 625 642 | VMCPU_FF_VTIMER_ACTIVATED) 626 # else627 # define VMCPU_FF_EXTERNAL_HALTED_MASK( VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \643 # else 644 # define VMCPU_FF_EXTERNAL_HALTED_MASK ( VMCPU_FF_UPDATE_APIC | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \ 628 645 | VMCPU_FF_REQUEST | VMCPU_FF_INTERRUPT_NMI | VMCPU_FF_INTERRUPT_SMI \ 629 646 | VMCPU_FF_UNHALT | VMCPU_FF_TIMER | VMCPU_FF_DBGF \ 630 647 | VMCPU_FF_INTERRUPT_NESTED_GUEST) 648 # endif 631 649 #endif 632 650 … … 635 653 | VM_FF_DEBUG_SUSPEND | VM_FF_PGM_NEED_HANDY_PAGES | VM_FF_PGM_NO_MEMORY \ 636 654 | VM_FF_EMT_RENDEZVOUS ) 655 #ifndef VBOX_VMM_TARGET_AGNOSTIC 637 656 /** High priority VMCPU pre-execution actions. */ 638 # if defined(VBOX_VMM_TARGET_ARMV8)639 # define VMCPU_FF_HIGH_PRIORITY_PRE_MASK( VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ \657 # if defined(VBOX_VMM_TARGET_ARMV8) 658 # define VMCPU_FF_HIGH_PRIORITY_PRE_MASK ( VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_IRQ | VMCPU_FF_INTERRUPT_FIQ \ 640 659 | VMCPU_FF_DBGF ) 641 # else642 # define VMCPU_FF_HIGH_PRIORITY_PRE_MASK( VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \660 # else 661 # define VMCPU_FF_HIGH_PRIORITY_PRE_MASK ( VMCPU_FF_TIMER | VMCPU_FF_INTERRUPT_APIC | VMCPU_FF_INTERRUPT_PIC \ 643 662 | VMCPU_FF_UPDATE_APIC | VMCPU_FF_DBGF \ 644 663 | VMCPU_FF_PGM_SYNC_CR3 | VMCPU_FF_PGM_SYNC_CR3_NON_GLOBAL \ 645 664 | VMCPU_FF_INTERRUPT_NESTED_GUEST | VMCPU_FF_VMX_MTF | VMCPU_FF_VMX_APIC_WRITE \ 646 665 | VMCPU_FF_VMX_PREEMPT_TIMER | VMCPU_FF_VMX_NMI_WINDOW | VMCPU_FF_VMX_INT_WINDOW ) 666 # endif 647 667 #endif 648 668 … … 685 705 #endif 686 706 687 #if !defined(VBOX_VMM_TARGET_ARMV8)707 #if defined(VBOX_VMM_TARGET_X86) || defined(VBOX_VMM_TARGET_AGNOSTIC) 688 708 /** VMCPU flags that cause the REP[|NE|E] STRINS loops to yield, interrupts 689 709 * enabled. */ … … 1504 1524 } gim; 1505 1525 1506 #if defined(VBOX_VMM_TARGET_ARMV8) 1507 union 1508 { 1526 /** Interrupt controller, target specific. */ 1527 RT_GCC_EXTENSION 1528 union 1529 { 1530 #if defined(VBOX_VMM_TARGET_ARMV8) || defined(VBOX_VMM_TARGET_AGNOSTIC) 1531 union 1532 { 1509 1533 # ifdef VMM_INCLUDED_SRC_include_GICInternal_h 1510 struct GIC s;1534 struct GIC s; 1511 1535 # endif 1512 uint8_t padding[128]; /* multiple of 8 */ 1513 } gic; 1514 #else 1515 union 1516 { 1536 uint8_t padding[128]; /* multiple of 8 */ 1537 } gic; 1538 #endif 1539 #if defined(VBOX_VMM_TARGET_X86) || defined(VBOX_VMM_TARGET_AGNOSTIC) 1540 union 1541 { 1517 1542 # ifdef VMM_INCLUDED_SRC_include_APICInternal_h 1518 struct APIC s;1543 struct APIC s; 1519 1544 # endif 1520 uint8_t padding[128]; /* multiple of 8 */ 1521 } apic; 1522 #endif 1545 uint8_t padding[128]; /* multiple of 8 */ 1546 } apic; 1547 #endif 1548 }; 1523 1549 1524 1550 /* ---- begin small stuff ---- */
Note:
See TracChangeset
for help on using the changeset viewer.