diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2012-09-11 13:30:22 -0300 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2012-09-11 13:30:22 -0300 |
commit | 6b414d9fb86527118f3ddb81a1d1a684b3548a9d (patch) | |
tree | 21973df930ee1bff414b15a42088dd97e256543c /kvm-all.c | |
parent | 4c3e02beed9878a5f760eeceb6cd42c475cf0127 (diff) | |
parent | 8ca9e258af2921d41214b0b644bdaeedab0f7f64 (diff) |
Merge branch 'upstream-merge'
* upstream-merge: (88 commits)
Add ability to force enable/disable of tools build
Add ability to disable build of all targets
RTC: Remove the current_tm field
RTC: Get and set time without going through s->current_tm
RTC: Do not fire timer periodically to catch next alarm
RTC: Add divider reset support
RTC: Update the RTC clock only when reading it
vmstate: add VMSTATE_TIMER_V
RTC: Update interrupt state when interrupts are masked/unmasked
RTC: introduce RTC_CLOCK_RATE
RTC: Rename rtc_timer_update
RTC: Remove the logic to update time format when DM bit changed
socket: don't attempt to reconnect a TCP socket in server mode
use --libexecdir instead of ignoring it first and reinventing it later
hw/mcf5206: Fix buffer overflow for MBAR read / write
target-arm: Fix potential buffer overflow
hw/wm8750: Fix potential buffer overflow
kvm: i386: Add classic PCI device assignment
kvm: i386: Add services required for PCI device assignment
kvm: Introduce kvm_has_intx_set_mask
...
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'kvm-all.c')
-rw-r--r-- | kvm-all.c | 25 |
1 files changed, 11 insertions, 14 deletions
@@ -39,6 +39,10 @@ #include <sys/eventfd.h> #endif +#ifdef CONFIG_VALGRIND_H +#include <valgrind/memcheck.h> +#endif + /* KVM uses PAGE_SIZE in its definition of COALESCED_MMIO_MAX */ #define PAGE_SIZE TARGET_PAGE_SIZE @@ -1205,24 +1209,14 @@ static int kvm_irqchip_assign_irqfd(KVMState *s, int fd, int virq, bool assign) } #endif /* !KVM_CAP_IRQ_ROUTING */ -int kvm_irqchip_add_irqfd(KVMState *s, int fd, int virq) -{ - return kvm_irqchip_assign_irqfd(s, fd, virq, true); -} - -int kvm_irqchip_add_irq_notifier(KVMState *s, EventNotifier *n, int virq) +int kvm_irqchip_add_irqfd_notifier(KVMState *s, EventNotifier *n, int virq) { - return kvm_irqchip_add_irqfd(s, event_notifier_get_fd(n), virq); + return kvm_irqchip_assign_irqfd(s, event_notifier_get_fd(n), virq, true); } -int kvm_irqchip_remove_irqfd(KVMState *s, int fd, int virq) +int kvm_irqchip_remove_irqfd_notifier(KVMState *s, EventNotifier *n, int virq) { - return kvm_irqchip_assign_irqfd(s, fd, virq, false); -} - -int kvm_irqchip_remove_irq_notifier(KVMState *s, EventNotifier *n, int virq) -{ - return kvm_irqchip_remove_irqfd(s, event_notifier_get_fd(n), virq); + return kvm_irqchip_assign_irqfd(s, event_notifier_get_fd(n), virq, false); } static int kvm_irqchip_create(KVMState *s) @@ -1769,6 +1763,9 @@ void *kvm_vmalloc(ram_addr_t size) void kvm_setup_guest_memory(void *start, size_t size) { +#ifdef CONFIG_VALGRIND_H + VALGRIND_MAKE_MEM_DEFINED(start, size); +#endif if (!kvm_has_sync_mmu()) { int ret = qemu_madvise(start, size, QEMU_MADV_DONTFORK); |