qemu-e2k/hw
Roman Kagan 4cbaf3c133 hyperv: add synic message delivery
Add infrastructure to deliver SynIC messages to the SynIC message page.

Note that KVM may also want to deliver (SynIC timer) messages to the
same message slot.

The problem is that the access to a SynIC message slot is controlled by
the value of its .msg_type field which indicates if the slot is being
owned by the hypervisor (zero) or by the guest (non-zero).

This leaves no room for synchronizing multiple concurrent producers.

The simplest way to deal with this for both KVM and QEMU is to only
deliver messages in the vcpu thread.  KVM already does this; this patch
makes it for QEMU, too.

Specifically,

 - add a function for posting messages, which only copies the message
   into the staging buffer if its free, and schedules a work on the
   corresponding vcpu to actually deliver it to the guest slot;

 - instead of a sint ack callback, set up the sint route with a message
   status callback.  This function is called in a bh whenever there are
   updates to the message slot status: either the vcpu made definitive
   progress delivering the message from the staging buffer (succeeded or
   failed) or the guest issued EOM; the status is passed as an argument
   to the callback.

Signed-off-by: Roman Kagan <rkagan@virtuozzo.com>
Message-Id: <20180921082217.29481-6-rkagan@virtuozzo.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-10-19 13:44:14 +02:00
..
9pfs
acpi pci, pc, virtio: fixes, features 2018-09-24 18:49:11 +01:00
adc
alpha change get_image_size return type to int64_t 2018-10-02 19:08:49 +02:00
arm hw/arm/virt: add DT property /secure-chosen/stdout-path indicating secure UART 2018-10-16 16:15:01 +01:00
audio es1370: more fixes for ADC_FRAMEADR and ADC_FRAMECNT 2018-10-19 13:44:00 +02:00
block block: Remove deprecated -drive option serial 2018-08-15 12:50:39 +02:00
bt
char chardev: mark the calls that allow an implicit mux monitor 2018-10-03 14:45:05 +04:00
core call HotplugHandler->plug() as the last step in device realization 2018-10-19 13:44:12 +02:00
cpu hw/cpu/a15mpcore: If CPU has EL2, enable it on the GIC and wire it up 2018-08-24 13:17:34 +01:00
cris hw/cris: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
display hw/display/cirrus_vga: Move "isa-cirrus-vga" device into a separate file 2018-10-15 09:57:33 +02:00
dma hw/dma/pl080: Remove hw_error() if DMA is enabled 2018-08-20 11:24:33 +01:00
gpio
hppa change get_image_size return type to int64_t 2018-10-02 19:08:49 +02:00
hyperv hyperv: add synic message delivery 2018-10-19 13:44:14 +02:00
i2c i2c: switch ddc to use the new edid generator 2018-10-15 09:57:33 +02:00
i386 kvmclock: run KVM_KVMCLOCK_CTRL ioctl in vcpu thread 2018-10-02 19:09:13 +02:00
ide replay: replay BH for IDE trim operation 2018-10-02 19:09:13 +02:00
input ps2: prevent changing irq state on save and load 2018-10-02 18:47:55 +02:00
intc hw/intc/arm_gic: Drop GIC_BASE_IRQ macro 2018-09-25 15:13:24 +01:00
ipack hw/ipack: Use the IEC binary prefix definitions 2018-07-02 15:41:12 +02:00
ipmi ipmi: Use proper struct reference for BT vmstate 2018-08-23 18:46:25 +02:00
isa i2c: pm_smbus: Add the ability to force block transfer enable 2018-08-23 18:46:25 +02:00
lm32 hw/lm32: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
m68k hw/m68k: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
mem pc-dimm: assign and verify the "addr" property during pre_plug 2018-08-23 18:46:25 +02:00
microblaze hw/microblaze/xlnx-zynqmp-pmu: Fix introspection problem in 'xlnx, zynqmp-pmu-soc' 2018-07-23 15:21:25 +01:00
mips change get_image_size return type to int64_t 2018-10-02 19:08:49 +02:00
misc hyperv: factor out arch-independent API into hw/hyperv 2018-10-19 13:44:13 +02:00
moxie change get_image_size return type to int64_t 2018-10-02 19:08:49 +02:00
net net: cadence_gem: Implement support for 64bit descriptor addresses 2018-10-16 17:13:50 +01:00
nios2 hw/nios2: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
nvram hw/nvram/fw_cfg: Use memberwise copy of MemoryRegionOps struct 2018-10-02 19:09:14 +02:00
openrisc
pci qmp, hmp: make subsystem/system-vendor identities optional 2018-10-11 19:58:26 +01:00
pci-bridge hw/pci: add PCI resource reserve capability to legacy PCI bridge 2018-09-07 17:05:18 -04:00
pci-host target-i386: add q35 0xcf8 port as coalesced_pio 2018-10-19 13:44:11 +02:00
pcmcia
ppc ppc patch queue 2018-09-25 2018-09-25 13:30:45 +01:00
rdma config: split PVRDMA from RDMA 2018-08-18 18:01:34 +03:00
riscv Error reporting & miscellaneous patches for 2018-09-24 2018-09-25 11:37:39 +01:00
s390x hw/s390x: Include the tod-qemu also for builds with --disable-tcg 2018-10-12 11:32:19 +02:00
scsi scsi-disk: fix rerror/werror=ignore 2018-10-19 13:44:13 +02:00
sd sdhci: add i.MX SD Stable Clock bit 2018-08-20 11:24:32 +01:00
sh4 hw/sh4: Use the IEC binary prefix definitions 2018-07-02 15:41:15 +02:00
smbios hw/smbios: Use the IEC binary prefix definitions 2018-07-02 15:41:12 +02:00
sparc sun4m: don't use legacy fw_cfg_init_mem() function 2018-08-20 19:18:31 +01:00
sparc64 sun4u: implement custom FWPathProvider 2018-09-14 09:18:11 +01:00
ssi aspeed/smc: fix some alignment issues 2018-09-25 15:13:24 +01:00
timer target-i386: add rtc 0x70 port as coalesced_pio 2018-10-19 13:44:11 +02:00
tpm
tricore hw/tricore: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
unicore32
usb ohci: set effectively usb frame rate to 1kHz 2018-10-01 10:49:54 +02:00
vfio vfio-pci: make vfio-pci device more QOM conventional 2018-10-15 11:22:29 -06:00
virtio cpu: Provide a proper prototype for target_words_bigendian() in a header 2018-10-17 08:41:43 +02:00
watchdog qapi: Drop qapi_event_send_FOO()'s Error ** argument 2018-08-28 18:21:38 +02:00
xen
xenpv hw/xen: Use the IEC binary prefix definitions 2018-07-02 15:41:13 +02:00
xtensa hw/xtensa: Use the IEC binary prefix definitions 2018-07-02 15:41:14 +02:00
Makefile.objs hyperv: factor out arch-independent API into hw/hyperv 2018-10-19 13:44:13 +02:00