everytime there is a warning, god kills a kitten Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/libkvm.h | 2 ++ qemu/hw/passthrough/passthrough.c | 8 ++++++-- qemu/hw/pc.h | 1 + qemu/hw/pci.h | 2 ++ 4 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/libkvm/libkvm.h b/libkvm/libkvm.h index 34d188b..f345f48 100644 --- a/libkvm/libkvm.h +++ b/libkvm/libkvm.h @@ -23,6 +23,8 @@ #if defined(__x86_64__) || defined(__i38 struct kvm_msr_list *kvm_get_msr_list(kvm_context_t); int kvm_get_msrs(kvm_context_t, int vcpu, struct kvm_msr_entry *msrs, int n); int kvm_set_msrs(kvm_context_t, int vcpu, struct kvm_msr_entry *msrs, int n); +int kvm_assign_pv_pci_device(kvm_context_t kvm, + struct kvm_pv_passthrough_dev *pv_pci_dev); #endif /*! diff --git a/qemu/hw/passthrough/passthrough.c b/qemu/hw/passthrough/passthrough.c index 64f0af9..844c0e8 100644 --- a/qemu/hw/passthrough/passthrough.c +++ b/qemu/hw/passthrough/passthrough.c @@ -17,6 +17,9 @@ #include "neo_pci_tree.h" typedef u64 resource_size_t; #define __deprecated +#include "hw/pci.h" +#include "hw/pc.h" + #include <linux/ioport.h> #include "passthrough.h" @@ -352,7 +355,7 @@ pt_get_real_device(pt_dev_t *pci_dev, ui rp->valid = 1; rp->base_addr = start; rp->size = size; - fprintf(logfile, "region %d size %d start 0x%x type %d " + fprintf(logfile, "region %d size %d start 0x%llx type %d " "resource_fd %d\n", r, rp->size, start, rp->type, rp->resource_fd); } @@ -468,7 +471,7 @@ static pt_dev_t **apicv[0xfe]; //0x10 - #define IRQHOOK_DEV "/dev/irqhook" static pthread_t irqthread; -void pt_irq(void *arg) +void *pt_irq(void *arg) { char buf[20]; int irq; @@ -500,6 +503,7 @@ void pt_irq(void *arg) dev->run = 1; qemu_bh_schedule(ptbh); } + return NULL; } static void pt_bh(void *p) diff --git a/qemu/hw/pc.h b/qemu/hw/pc.h index f640395..aec98d4 100644 --- a/qemu/hw/pc.h +++ b/qemu/hw/pc.h @@ -101,6 +101,7 @@ int pcspk_audio_init(AudioState *, qemu_ PCIBus *i440fx_init(PCIDevice **pi440fx_state, qemu_irq *pic); void i440fx_set_smm(PCIDevice *d, int val); int piix3_init(PCIBus *bus, int devfn); +int piix3_get_pin(int pic_irq); void i440fx_init_memory_mappings(PCIDevice *d); int piix4_init(PCIBus *bus, int devfn); diff --git a/qemu/hw/pci.h b/qemu/hw/pci.h index 220189f..4858e3e 100644 --- a/qemu/hw/pci.h +++ b/qemu/hw/pci.h @@ -91,6 +91,8 @@ PCIBus *pci_register_bus(pci_set_irq_fn void pci_nic_init(PCIBus *bus, NICInfo *nd, int devfn); void pci_data_write(void *opaque, uint32_t addr, uint32_t val, int len); uint32_t pci_data_read(void *opaque, uint32_t addr, int len); +int pci_map_irq(PCIDevice *pci_dev, int pin); + int pci_bus_num(PCIBus *s); void pci_for_each_device(int bus_num, void (*fn)(PCIDevice *d)); -- 1.4.2 ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel