Compare commits
8 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
34aee2552f | ||
|
9fd0e57dc9 | ||
|
2fd0f93286 | ||
|
8bd8199f70 | ||
|
2da1e39864 | ||
|
b468f27acd | ||
|
8bc2ad6a6a | ||
|
f24f1e2a85 |
@@ -1,3 +1,11 @@
|
||||
version 0.10.4:
|
||||
- Improve block range checks to remove integer overflow (Kevin Wolf)
|
||||
- e1000: do not re-init PCI config space 0 (Amit Shah)
|
||||
- fix AIO deletion race (Alex Graf)
|
||||
- reset option roms on reboot (Glauber Costa)
|
||||
- fix qcow2 corruption in cluster freeing (Gleb Natapov)
|
||||
- Enable power button event generation (Gleb Natapov)
|
||||
|
||||
version 0.10.3:
|
||||
- fix AIO cancellations (Avi Kivity)
|
||||
- fix live migration error path on incoming
|
||||
|
3
aio.c
3
aio.c
@@ -44,7 +44,8 @@ static AioHandler *find_aio_handler(int fd)
|
||||
|
||||
LIST_FOREACH(node, &aio_handlers, node) {
|
||||
if (node->fd == fd)
|
||||
return node;
|
||||
if (!node->deleted)
|
||||
return node;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
@@ -903,6 +903,12 @@ static int alloc_cluster_link_l2(BlockDriverState *bs, uint64_t cluster_offset,
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < m->nb_clusters; i++) {
|
||||
/* if two concurrent writes happen to the same unallocated cluster
|
||||
* each write allocates separate cluster and writes data concurrently.
|
||||
* The first one to complete updates l2 table with pointer to its
|
||||
* cluster the second one has to do RMW (which is done above by
|
||||
* copy_sectors()), update l2 table with its cluster pointer and free
|
||||
* old cluster. This is what this loop does */
|
||||
if(l2_table[l2_index + i] != 0)
|
||||
old_cluster[j++] = l2_table[l2_index + i];
|
||||
|
||||
@@ -916,7 +922,8 @@ static int alloc_cluster_link_l2(BlockDriverState *bs, uint64_t cluster_offset,
|
||||
goto err;
|
||||
|
||||
for (i = 0; i < j; i++)
|
||||
free_any_clusters(bs, be64_to_cpu(old_cluster[i]), 1);
|
||||
free_any_clusters(bs, be64_to_cpu(old_cluster[i]) & ~QCOW_OFLAG_COPIED,
|
||||
1);
|
||||
|
||||
ret = 0;
|
||||
err:
|
||||
|
7
block.c
7
block.c
@@ -533,7 +533,10 @@ static int bdrv_check_byte_request(BlockDriverState *bs, int64_t offset,
|
||||
|
||||
len = bdrv_getlength(bs);
|
||||
|
||||
if ((offset + size) > len)
|
||||
if (offset < 0)
|
||||
return -EIO;
|
||||
|
||||
if ((offset > len) || (len - offset < size))
|
||||
return -EIO;
|
||||
|
||||
return 0;
|
||||
@@ -1170,6 +1173,8 @@ int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
|
||||
return -ENOMEDIUM;
|
||||
if (!drv->bdrv_write_compressed)
|
||||
return -ENOTSUP;
|
||||
if (bdrv_check_request(bs, sector_num, nb_sectors))
|
||||
return -EIO;
|
||||
return drv->bdrv_write_compressed(bs, sector_num, buf, nb_sectors);
|
||||
}
|
||||
|
||||
|
@@ -1067,7 +1067,6 @@ pci_e1000_init(PCIBus *bus, NICInfo *nd, int devfn)
|
||||
return NULL;
|
||||
|
||||
pci_conf = d->dev.config;
|
||||
memset(pci_conf, 0, 256);
|
||||
|
||||
pci_config_set_vendor_id(pci_conf, PCI_VENDOR_ID_INTEL);
|
||||
pci_config_set_device_id(pci_conf, E1000_DEVID);
|
||||
|
39
hw/pc.c
39
hw/pc.c
@@ -63,6 +63,30 @@ static PITState *pit;
|
||||
static IOAPICState *ioapic;
|
||||
static PCIDevice *i440fx_state;
|
||||
|
||||
typedef struct rom_reset_data {
|
||||
uint8_t *data;
|
||||
target_phys_addr_t addr;
|
||||
unsigned size;
|
||||
} RomResetData;
|
||||
|
||||
static void option_rom_reset(void *_rrd)
|
||||
{
|
||||
RomResetData *rrd = _rrd;
|
||||
|
||||
cpu_physical_memory_write_rom(rrd->addr, rrd->data, rrd->size);
|
||||
}
|
||||
|
||||
static void option_rom_setup_reset(target_phys_addr_t addr, unsigned size)
|
||||
{
|
||||
RomResetData *rrd = qemu_malloc(sizeof *rrd);
|
||||
|
||||
rrd->data = qemu_malloc(size);
|
||||
cpu_physical_memory_read(addr, rrd->data, size);
|
||||
rrd->addr = addr;
|
||||
rrd->size = size;
|
||||
qemu_register_reset(option_rom_reset, rrd);
|
||||
}
|
||||
|
||||
static void ioport80_write(void *opaque, uint32_t addr, uint32_t data)
|
||||
{
|
||||
}
|
||||
@@ -447,7 +471,7 @@ static void bochs_bios_init(void)
|
||||
|
||||
/* Generate an initial boot sector which sets state and jump to
|
||||
a specified vector */
|
||||
static void generate_bootsect(uint8_t *option_rom,
|
||||
static void generate_bootsect(target_phys_addr_t option_rom,
|
||||
uint32_t gpr[8], uint16_t segs[6], uint16_t ip)
|
||||
{
|
||||
uint8_t rom[512], *p, *reloc;
|
||||
@@ -521,7 +545,8 @@ static void generate_bootsect(uint8_t *option_rom,
|
||||
sum += rom[i];
|
||||
rom[sizeof(rom) - 1] = -sum;
|
||||
|
||||
memcpy(option_rom, rom, sizeof(rom));
|
||||
cpu_physical_memory_write_rom(option_rom, rom, sizeof(rom));
|
||||
option_rom_setup_reset(option_rom, sizeof (rom));
|
||||
}
|
||||
|
||||
static long get_file_size(FILE *f)
|
||||
@@ -538,7 +563,7 @@ static long get_file_size(FILE *f)
|
||||
return size;
|
||||
}
|
||||
|
||||
static void load_linux(uint8_t *option_rom,
|
||||
static void load_linux(target_phys_addr_t option_rom,
|
||||
const char *kernel_filename,
|
||||
const char *initrd_filename,
|
||||
const char *kernel_cmdline)
|
||||
@@ -689,6 +714,12 @@ static void load_linux(uint8_t *option_rom,
|
||||
memset(gpr, 0, sizeof gpr);
|
||||
gpr[4] = cmdline_addr-real_addr-16; /* SP (-16 is paranoia) */
|
||||
|
||||
option_rom_setup_reset(real_addr, setup_size);
|
||||
option_rom_setup_reset(prot_addr, kernel_size);
|
||||
option_rom_setup_reset(cmdline_addr, cmdline_size);
|
||||
if (initrd_filename)
|
||||
option_rom_setup_reset(initrd_addr, initrd_size);
|
||||
|
||||
generate_bootsect(option_rom, gpr, seg, 0);
|
||||
}
|
||||
|
||||
@@ -896,7 +927,7 @@ vga_bios_error:
|
||||
offset = 0;
|
||||
if (linux_boot) {
|
||||
option_rom_offset = qemu_ram_alloc(TARGET_PAGE_SIZE);
|
||||
load_linux(phys_ram_base + option_rom_offset,
|
||||
load_linux(option_rom_offset,
|
||||
kernel_filename, initrd_filename, kernel_cmdline);
|
||||
cpu_register_physical_memory(0xd0000, TARGET_PAGE_SIZE,
|
||||
option_rom_offset);
|
||||
|
@@ -0,0 +1,20 @@
|
||||
Enable power button event generation.
|
||||
|
||||
Signed-off-by: Gleb Natapov <gleb@redhat.com>
|
||||
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
|
||||
|
||||
diff --git a/bios/rombios32.c b/bios/rombios32.c
|
||||
index 81e3bad..9986531 100644
|
||||
--- a/bios/rombios32.c
|
||||
+++ b/bios/rombios32.c
|
||||
@@ -1767,8 +1767,8 @@ void acpi_bios_init(void)
|
||||
fadt->plvl3_lat = cpu_to_le16(0xfff); // C3 state not supported
|
||||
fadt->gpe0_blk = cpu_to_le32(0xafe0);
|
||||
fadt->gpe0_blk_len = 4;
|
||||
- /* WBINVD + PROC_C1 + PWR_BUTTON + SLP_BUTTON + FIX_RTC */
|
||||
- fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 4) | (1 << 5) | (1 << 6));
|
||||
+ /* WBINVD + PROC_C1 + SLP_BUTTON + FIX_RTC */
|
||||
+ fadt->flags = cpu_to_le32((1 << 0) | (1 << 2) | (1 << 5) | (1 << 6));
|
||||
acpi_build_table_header((struct acpi_table_header *)fadt, "FACP",
|
||||
sizeof(*fadt), 1);
|
||||
|
@@ -10,3 +10,4 @@
|
||||
0010_bios-mark-the-acpi-sci-interrupt-as-connected-to-irq-9.patch
|
||||
0011_read-additional-acpi-tables-from-a-vm.patch
|
||||
0013_fix-non-acpi-timer-interrupt-routing.patch
|
||||
0015_enable-power-button-even-generation.patch
|
||||
|
BIN
pc-bios/bios.bin
BIN
pc-bios/bios.bin
Binary file not shown.
Reference in New Issue
Block a user