mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-09 02:24:58 -06:00
virtio,pc,pci: features, cleanups, fixes
vhost-user-snd support x2APIC mode with TCG support CXL update to r3.1 fixes, cleanups all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> -----BEGIN PGP SIGNATURE----- iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmXMoXUPHG1zdEByZWRo YXQuY29tAAoJECgfDbjSjVRpFtMIAKUKD0hzJrwOyPo4xsRUMbsB3ehIsJsMKfOK w+JWzTaojAG8ENPelWBdL2sEIs5U73VOchjLqHbH2m5sz6GJ13214amvdU/fYc8+ /dU2ZKoAmaR5L1ovKO/fq07y/J6DrITZ5tosy2i84Xa8EnsL4j3wEPNVWsDi7dna mvXUICSOOoJQ4O2YhSruKCQ8qIgF1/0Oi3u/rcrW3alSs8VQlrtQXxl6k+LbYqek +Fytco3jMRHPvQ+GYUIwGuHjN15ghArcvbsV0GIa+24BPY5h7YbDYGbfasePT5OK zDz51jitkoyDrQr+OzwOEe/X5+dVGhayRXfMtU5Qm53IE3y61qc= =K4b1 -----END PGP SIGNATURE----- Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu into staging virtio,pc,pci: features, cleanups, fixes vhost-user-snd support x2APIC mode with TCG support CXL update to r3.1 fixes, cleanups all over the place. Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # -----BEGIN PGP SIGNATURE----- # # iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmXMoXUPHG1zdEByZWRo # YXQuY29tAAoJECgfDbjSjVRpFtMIAKUKD0hzJrwOyPo4xsRUMbsB3ehIsJsMKfOK # w+JWzTaojAG8ENPelWBdL2sEIs5U73VOchjLqHbH2m5sz6GJ13214amvdU/fYc8+ # /dU2ZKoAmaR5L1ovKO/fq07y/J6DrITZ5tosy2i84Xa8EnsL4j3wEPNVWsDi7dna # mvXUICSOOoJQ4O2YhSruKCQ8qIgF1/0Oi3u/rcrW3alSs8VQlrtQXxl6k+LbYqek # +Fytco3jMRHPvQ+GYUIwGuHjN15ghArcvbsV0GIa+24BPY5h7YbDYGbfasePT5OK # zDz51jitkoyDrQr+OzwOEe/X5+dVGhayRXfMtU5Qm53IE3y61qc= # =K4b1 # -----END PGP SIGNATURE----- # gpg: Signature made Wed 14 Feb 2024 11:18:13 GMT # gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469 # gpg: issuer "mst@redhat.com" # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [full] # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [full] # Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67 # Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469 * tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (60 commits) MAINTAINERS: Switch to my Enfabrica email virtio-gpu-rutabaga.c: override resource_destroy method virtio-gpu.c: add resource_destroy class method hw/display/virtio-gpu.c: use reset_bh class method hw/smbios: Fix port connector option validation hw/smbios: Fix OEM strings table option validation virtio-gpu: Correct virgl_renderer_resource_get_info() error check hw/cxl: Standardize all references on CXL r3.1 and minor updates hw/cxl: Update mailbox status registers. hw/cxl: Update RAS Capability Definitions for version 3. hw/cxl: Update link register definitions. hw/cxl: Update HDM Decoder capability to version 3 tests/acpi: Update DSDT.cxl to reflect change _STA return value. hw/i386: Fix _STA return value for ACPI0017 tests/acpi: Allow update of DSDT.cxl hw/mem/cxl_type3: Fix potential divide by zero reported by coverity hw/cxl: Pass NULL for a NULL MemoryRegionOps hw/cxl: Pass CXLComponentState to cache_mem_ops hw/cxl/device: read from register values in mdev_reg_read() hw/cxl/mbox: Remove dead code ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
5767815218
84 changed files with 2004 additions and 1910 deletions
|
@ -15,6 +15,9 @@
|
|||
|
||||
#include "qemu/osdep.h"
|
||||
#include "hw/isa/vt82c686.h"
|
||||
#include "hw/block/fdc.h"
|
||||
#include "hw/char/parallel-isa.h"
|
||||
#include "hw/char/serial.h"
|
||||
#include "hw/pci/pci.h"
|
||||
#include "hw/qdev-properties.h"
|
||||
#include "hw/ide/pci.h"
|
||||
|
@ -323,6 +326,17 @@ static uint64_t via_superio_cfg_read(void *opaque, hwaddr addr, unsigned size)
|
|||
return val;
|
||||
}
|
||||
|
||||
static void via_superio_devices_enable(ViaSuperIOState *s, uint8_t data)
|
||||
{
|
||||
ISASuperIOClass *ic = ISA_SUPERIO_GET_CLASS(s);
|
||||
|
||||
isa_parallel_set_enabled(s->superio.parallel[0], (data & 0x3) != 3);
|
||||
for (int i = 0; i < ic->serial.count; i++) {
|
||||
isa_serial_set_enabled(s->superio.serial[i], data & BIT(i + 2));
|
||||
}
|
||||
isa_fdc_set_enabled(s->superio.floppy, data & BIT(4));
|
||||
}
|
||||
|
||||
static void via_superio_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
@ -368,7 +382,25 @@ static void vt82c686b_superio_cfg_write(void *opaque, hwaddr addr,
|
|||
case 0xfd ... 0xff:
|
||||
/* ignore write to read only registers */
|
||||
return;
|
||||
/* case 0xe6 ... 0xe8: Should set base port of parallel and serial */
|
||||
case 0xe2:
|
||||
data &= 0x1f;
|
||||
via_superio_devices_enable(sc, data);
|
||||
break;
|
||||
case 0xe3:
|
||||
data &= 0xfc;
|
||||
isa_fdc_set_iobase(sc->superio.floppy, data << 2);
|
||||
break;
|
||||
case 0xe6:
|
||||
isa_parallel_set_iobase(sc->superio.parallel[0], data << 2);
|
||||
break;
|
||||
case 0xe7:
|
||||
data &= 0xfe;
|
||||
isa_serial_set_iobase(sc->superio.serial[0], data << 2);
|
||||
break;
|
||||
case 0xe8:
|
||||
data &= 0xfe;
|
||||
isa_serial_set_iobase(sc->superio.serial[1], data << 2);
|
||||
break;
|
||||
default:
|
||||
qemu_log_mask(LOG_UNIMP,
|
||||
"via_superio_cfg: unimplemented register 0x%x\n", idx);
|
||||
|
@ -395,9 +427,14 @@ static void vt82c686b_superio_reset(DeviceState *dev)
|
|||
/* Device ID */
|
||||
vt82c686b_superio_cfg_write(s, 0, 0xe0, 1);
|
||||
vt82c686b_superio_cfg_write(s, 1, 0x3c, 1);
|
||||
/* Function select - all disabled */
|
||||
/*
|
||||
* Function select - only serial enabled
|
||||
* Fuloong 2e's rescue-yl prints to the serial console w/o enabling it. This
|
||||
* suggests that the serial ports are enabled by default, so override the
|
||||
* datasheet.
|
||||
*/
|
||||
vt82c686b_superio_cfg_write(s, 0, 0xe2, 1);
|
||||
vt82c686b_superio_cfg_write(s, 1, 0x03, 1);
|
||||
vt82c686b_superio_cfg_write(s, 1, 0x0f, 1);
|
||||
/* Floppy ctrl base addr 0x3f0-7 */
|
||||
vt82c686b_superio_cfg_write(s, 0, 0xe3, 1);
|
||||
vt82c686b_superio_cfg_write(s, 1, 0xfc, 1);
|
||||
|
@ -465,6 +502,21 @@ static void vt8231_superio_cfg_write(void *opaque, hwaddr addr,
|
|||
case 0xfd:
|
||||
/* ignore write to read only registers */
|
||||
return;
|
||||
case 0xf2:
|
||||
data &= 0x17;
|
||||
via_superio_devices_enable(sc, data);
|
||||
break;
|
||||
case 0xf4:
|
||||
data &= 0xfe;
|
||||
isa_serial_set_iobase(sc->superio.serial[0], data << 2);
|
||||
break;
|
||||
case 0xf6:
|
||||
isa_parallel_set_iobase(sc->superio.parallel[0], data << 2);
|
||||
break;
|
||||
case 0xf7:
|
||||
data &= 0xfc;
|
||||
isa_fdc_set_iobase(sc->superio.floppy, data << 2);
|
||||
break;
|
||||
default:
|
||||
qemu_log_mask(LOG_UNIMP,
|
||||
"via_superio_cfg: unimplemented register 0x%x\n", idx);
|
||||
|
@ -513,12 +565,6 @@ static void vt8231_superio_init(Object *obj)
|
|||
VIA_SUPERIO(obj)->io_ops = &vt8231_superio_cfg_ops;
|
||||
}
|
||||
|
||||
static uint16_t vt8231_superio_serial_iobase(ISASuperIODevice *sio,
|
||||
uint8_t index)
|
||||
{
|
||||
return 0x2f8; /* FIXME: This should be settable via registers f2-f4 */
|
||||
}
|
||||
|
||||
static void vt8231_superio_class_init(ObjectClass *klass, void *data)
|
||||
{
|
||||
DeviceClass *dc = DEVICE_CLASS(klass);
|
||||
|
@ -526,7 +572,6 @@ static void vt8231_superio_class_init(ObjectClass *klass, void *data)
|
|||
|
||||
dc->reset = vt8231_superio_reset;
|
||||
sc->serial.count = 1;
|
||||
sc->serial.get_iobase = vt8231_superio_serial_iobase;
|
||||
sc->parallel.count = 1;
|
||||
sc->ide.count = 0; /* emulated by via-ide */
|
||||
sc->floppy.count = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue