vmm_vector.c 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * VMM vector handle
  3. *
  4. * COPYRIGHT (C) 2013-2014, Shanghai Real-Thread Technology Co., Ltd
  5. *
  6. * This file is part of RT-Thread (http://www.rt-thread.org)
  7. * Maintainer: bernard.xiong <bernard.xiong at gmail.com>
  8. *
  9. * All rights reserved.
  10. *
  11. * This program is free software; you can redistribute it and/or modify
  12. * it under the terms of the GNU General Public License as published by
  13. * the Free Software Foundation; either version 2 of the License, or
  14. * (at your option) any later version.
  15. *
  16. * This program is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public License along
  22. * with this program; if not, write to the Free Software Foundation, Inc.,
  23. * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  24. *
  25. * Change Logs:
  26. * Date Author Notes
  27. * 2013-06-15 Bernard the first verion
  28. */
  29. #include <rthw.h>
  30. #include <rtthread.h>
  31. #include <interrupt.h>
  32. #include "vmm.h"
  33. void vmm_guest_isr(int irqno, void* parameter)
  34. {
  35. /* nothing, let GuestOS to handle it */
  36. rt_hw_interrupt_clear(irqno);
  37. }
  38. void vmm_vector_init(void)
  39. {
  40. rt_hw_interrupt_install(RT_VMM_VIRQ_TRIGGER, vmm_guest_isr, RT_NULL, "virq");
  41. rt_hw_interrupt_umask(RT_VMM_VIRQ_TRIGGER);
  42. return;
  43. }